public class BestSolutionChangedEvent<SolutionG extends Solution> extends EventObject
Solution
changes during solving.
Delivered in the solver thread (which is the thread that calls Solver.solve(Solution)
.source
Constructor and Description |
---|
BestSolutionChangedEvent(Solver solver,
long timeMillisSpent,
SolutionG newBestSolution,
int newUninitializedVariableCount) |
Modifier and Type | Method and Description |
---|---|
SolutionG |
getNewBestSolution()
Note that:
In real-time planning, not all
ProblemFactChange s might be processed:
check isEveryProblemFactChangeProcessed()
this Solution might be uninitialized: check isNewBestSolutionInitialized()
this Solution might be infeasible: check FeasibilityScore.isFeasible()
|
long |
getTimeMillisSpent() |
boolean |
isEveryProblemFactChangeProcessed() |
boolean |
isNewBestSolutionInitialized() |
getSource, toString
public long getTimeMillisSpent()
>= 0
, the amount of millis spent since the Solver
started
until getNewBestSolution()
was foundpublic SolutionG getNewBestSolution()
ProblemFactChange
s might be processed:
check isEveryProblemFactChangeProcessed()
Solution
might be uninitialized: check isNewBestSolutionInitialized()
Solution
might be infeasible: check FeasibilityScore.isFeasible()
public boolean isEveryProblemFactChangeProcessed()
Solver.isEveryProblemFactChangeProcessed()
Solver.isEveryProblemFactChangeProcessed()
public boolean isNewBestSolutionInitialized()
Copyright © 2006–2015 JBoss by Red Hat. All rights reserved.