Class AbstractScore<S extends Score>

    • Constructor Detail

      • AbstractScore

        protected AbstractScore​(int initScore)
        Parameters:
        initScore - see Score.getInitScore()
    • Method Detail

      • parseScoreTokens

        protected static String[] parseScoreTokens​(Class<? extends Score> scoreClass,
                                                   String scoreString,
                                                   String... levelSuffixes)
      • parseInitScore

        protected static int parseInitScore​(Class<? extends Score> scoreClass,
                                            String scoreString,
                                            String initScoreString)
      • parseLevelAsInt

        protected static int parseLevelAsInt​(Class<? extends Score> scoreClass,
                                             String scoreString,
                                             String levelString)
      • parseLevelAsLong

        protected static long parseLevelAsLong​(Class<? extends Score> scoreClass,
                                               String scoreString,
                                               String levelString)
      • parseLevelAsDouble

        protected static double parseLevelAsDouble​(Class<? extends Score> scoreClass,
                                                   String scoreString,
                                                   String levelString)
      • buildScorePattern

        protected static String buildScorePattern​(boolean bendable,
                                                  String... levelSuffixes)
      • getInitScore

        public int getInitScore()
        Description copied from interface: Score
        The init score is the negative of the number of uninitialized genuine planning variables. If it's 0 (which it usually is), the PlanningSolution is fully initialized and the score's Object.toString() does not mention it.

        During Comparable.compareTo(Object), it's even more important than the hard score: if you don't want this behaviour, read about overconstrained planning in the reference manual.

        Specified by:
        getInitScore in interface Score<S extends Score>
        Returns:
        higher is better, always negative (except in statistical calculations), 0 if all planning variables are initialized
      • assertNoInitScore

        @Deprecated
        protected void assertNoInitScore()
        Deprecated.
        We do not use it anymore.
      • getInitPrefix

        protected String getInitPrefix()