Package org.optaplanner.core.impl.score
Class DefaultScoreManager<Solution_,Score_ extends Score<Score_>>
- java.lang.Object
- 
- org.optaplanner.core.impl.score.DefaultScoreManager<Solution_,Score_>
 
- 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
 - All Implemented Interfaces:
- ScoreManager<Solution_,Score_>
 
 public final class DefaultScoreManager<Solution_,Score_ extends Score<Score_>> extends Object implements ScoreManager<Solution_,Score_> 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultScoreManager(InnerScoreDirectorFactory<Solution_,Score_> scoreDirectorFactory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ScoreExplanation<Solution_,Score_>explainScore(Solution_ solution)Calculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.InnerScoreDirectorFactory<Solution_,Score_>getScoreDirectorFactory()StringgetSummary(Solution_ solution)Returns a diagnostic text that explains the solution through theConstraintMatchAPI to identify which constraints or planning entities cause that score quality.Score_updateScore(Solution_ solution)
 
- 
- 
- 
Constructor Detail- 
DefaultScoreManagerpublic DefaultScoreManager(InnerScoreDirectorFactory<Solution_,Score_> scoreDirectorFactory) 
 
- 
 - 
Method Detail- 
getScoreDirectorFactorypublic InnerScoreDirectorFactory<Solution_,Score_> getScoreDirectorFactory() 
 - 
updateScorepublic Score_ updateScore(Solution_ solution) Description copied from interface:ScoreManager- Specified by:
- updateScorein interface- ScoreManager<Solution_,Score_ extends Score<Score_>>
- Parameters:
- solution- never null
 
 - 
getSummarypublic String getSummary(Solution_ solution) Description copied from interface:ScoreManagerReturns a diagnostic text that explains the solution through theConstraintMatchAPI to identify which constraints or planning entities cause that score quality. In case of aninfeasiblesolution, this can help diagnose the cause of that.Do not parse this string. Instead, to provide this information in a UI or a service, use ScoreManager.explainScore(Object)to retrieveScoreExplanation.getConstraintMatchTotalMap()andScoreExplanation.getIndictmentMap()and convert those into a domain specific API.- Specified by:
- getSummaryin interface- ScoreManager<Solution_,Score_ extends Score<Score_>>
- Parameters:
- solution- never null
- Returns:
- null if ScoreManager.updateScore(Object)returns null with the same solution
 
 - 
explainScorepublic ScoreExplanation<Solution_,Score_> explainScore(Solution_ solution) Description copied from interface:ScoreManagerCalculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.- Specified by:
- explainScorein interface- ScoreManager<Solution_,Score_ extends Score<Score_>>
- Parameters:
- solution- never null
- Returns:
- never null
 
 
- 
 
-