Package org.optaplanner.core.api.score
Interface ScoreManager<Solution_,Score_ extends Score<Score_>> 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
- Score_- the actual score type
- All Known Implementing Classes:
- DefaultScoreManager
Deprecated, for removal: This API element is subject to removal in a future version.
A stateless service to help calculate 
Score, ConstraintMatchTotal, Indictment, etc.
 
 To create a ScoreManager, use create(SolverFactory).
 
These methods are thread-safe unless explicitly stated otherwise.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <Solution_,Score_ extends Score<Score_>> 
 ScoreManager<Solution_,Score_> create(SolverFactory<Solution_> solverFactory) Deprecated, for removal: This API element is subject to removal in a future version.Uses aSolverFactoryto build aScoreManager.static <Solution_,Score_ extends Score<Score_>, ProblemId_> 
 ScoreManager<Solution_,Score_> create(SolverManager<Solution_, ProblemId_> solverManager) Deprecated, for removal: This API element is subject to removal in a future version.Uses aSolverManagerto build aScoreManager.default ScoreExplanation<Solution_,Score_> Deprecated, for removal: This API element is subject to removal in a future version.As defined byexplain(Object), usingSolutionUpdatePolicy.UPDATE_ALL.explain(Solution_ solution, SolutionUpdatePolicy solutionUpdatePolicy) Deprecated, for removal: This API element is subject to removal in a future version.Calculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.explainScore(Solution_ solution) Deprecated, for removal: This API element is subject to removal in a future version.Calculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.getSummary(Solution_ solution) Deprecated, for removal: This API element is subject to removal in a future version.Returns a diagnostic text that explains the solution through theConstraintMatchAPI to identify which constraints or planning entities cause that score quality.default Score_Deprecated, for removal: This API element is subject to removal in a future version.As defined byupdate(Object, SolutionUpdatePolicy), usingSolutionUpdatePolicy.UPDATE_ALL.update(Solution_ solution, SolutionUpdatePolicy solutionUpdatePolicy) Deprecated, for removal: This API element is subject to removal in a future version.Updates the given solution according to theSolutionUpdatePolicy.updateScore(Solution_ solution) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method Details- 
createstatic <Solution_,Score_ extends Score<Score_>> ScoreManager<Solution_,Score_> create(SolverFactory<Solution_> solverFactory) Deprecated, for removal: This API element is subject to removal in a future version.Uses aSolverFactoryto build aScoreManager.- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
- Score_- the actual score type
- Parameters:
- solverFactory- never null
- Returns:
- never null
 
- 
createstatic <Solution_,Score_ extends Score<Score_>, ScoreManager<Solution_,ProblemId_> Score_> create(SolverManager<Solution_, ProblemId_> solverManager) Deprecated, for removal: This API element is subject to removal in a future version.Uses aSolverManagerto build aScoreManager.- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
- Score_- the actual score type
- ProblemId_- the ID type of a submitted problem, such as- Longor- UUID
- Parameters:
- solverManager- never null
- Returns:
- never null
 
- 
updateScoreDeprecated, for removal: This API element is subject to removal in a future version.- Parameters:
- solution- never null
 
- 
getSummaryDeprecated, for removal: This API element is subject to removal in a future version.Returns 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 explainScore(Object)to retrieveScoreExplanation.getConstraintMatchTotalMap()andScoreExplanation.getIndictmentMap()and convert those into a domain specific API.- Parameters:
- solution- never null
- Returns:
- null if updateScore(Object)returns null with the same solution
- Throws:
- IllegalStateException- when constraint matching is disabled or not supported by the underlying score calculator, such as- EasyScoreCalculator.
 
- 
explainScoreDeprecated, for removal: This API element is subject to removal in a future version.Calculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.- Parameters:
- solution- never null
- Returns:
- never null
- Throws:
- IllegalStateException- when constraint matching is disabled or not supported by the underlying score calculator, such as- EasyScoreCalculator.
 
- 
updateDeprecated, for removal: This API element is subject to removal in a future version.As defined byupdate(Object, SolutionUpdatePolicy), usingSolutionUpdatePolicy.UPDATE_ALL.
- 
updateDeprecated, for removal: This API element is subject to removal in a future version.Updates the given solution according to theSolutionUpdatePolicy.- Parameters:
- solution- never null
- solutionUpdatePolicy- never null; if unsure, pick- SolutionUpdatePolicy.UPDATE_ALL
- Returns:
- possibly null if already null and SolutionUpdatePolicydidn't cause its update
- See Also:
 
- 
explainDeprecated, for removal: This API element is subject to removal in a future version.As defined byexplain(Object), usingSolutionUpdatePolicy.UPDATE_ALL.
- 
explainScoreExplanation<Solution_,Score_> explain(Solution_ solution, SolutionUpdatePolicy solutionUpdatePolicy) Deprecated, for removal: This API element is subject to removal in a future version.Calculates and retrievesConstraintMatchTotals andIndictments necessary for describing the quality of a particular solution.- Parameters:
- solution- never null
- solutionUpdatePolicy- never null; if unsure, pick- SolutionUpdatePolicy.UPDATE_ALL
- Returns:
- never null
- Throws:
- IllegalStateException- when constraint matching is disabled or not supported by the underlying score calculator, such as- EasyScoreCalculator.
- See Also:
 
 
- 
SolutionManagerinstead.