Solution_
- the solution type, the class with the PlanningSolution
annotationpublic interface ScoreManager<Solution_>
Score
, ConstraintMatchTotal
,
Indictment
, etc.
To create a ScoreManager, use create(SolverFactory)
.
These methods are thread-safe unless explicitly stated otherwise.
Modifier and Type | Method and Description |
---|---|
static <Solution_> |
create(SolverFactory<Solution_> solverFactory)
Uses a
SolverFactory to build a ScoreManager . |
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. |
Score |
updateScore(Solution_ solution)
|
static <Solution_> ScoreManager<Solution_> create(SolverFactory<Solution_> solverFactory)
SolverFactory
to build a ScoreManager
.Solution_
- the solution type, the class with the PlanningSolution
annotationsolverFactory
- never nullString explainScore(Solution_ solution)
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.
updateScore(Object)
returns null with the same solutionScoreDirector.explainScore()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.