Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class DefaultScoreManager<Solution_> extends Object implements ScoreManager<Solution_>
Constructor and Description |
---|
DefaultScoreManager(ScoreDirectorFactory<Solution_> scoreDirectorFactory) |
Modifier and Type | Method and Description |
---|---|
String |
explainScore(Solution_ solution)
Returns a diagnostic text that explains the solution through the
ConstraintMatch API to identify which
constraints or planning entities cause that score quality. |
ScoreDirectorFactory<Solution_> |
getScoreDirectorFactory() |
Score |
updateScore(Solution_ solution)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public DefaultScoreManager(ScoreDirectorFactory<Solution_> scoreDirectorFactory)
public ScoreDirectorFactory<Solution_> getScoreDirectorFactory()
public Score updateScore(Solution_ solution)
ScoreManager
updateScore
in interface ScoreManager<Solution_>
solution
- never nullpublic String explainScore(Solution_ solution)
ScoreManager
ConstraintMatch
API to identify which
constraints or planning entities cause that score quality.
In case of an infeasible
solution, 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 SolverFactory.getScoreDirectorFactory()
to retrieve ScoreDirector.getConstraintMatchTotalMap()
and ScoreDirector.getIndictmentMap()
and convert those into a domain specific API.
This method is thread-safe.
explainScore
in interface ScoreManager<Solution_>
ScoreManager.updateScore(Object)
returns null with the same solutionScoreDirector.explainScore()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.