org.optaplanner.core.api.solver.event
Class BestSolutionChangedEvent<SolutionG extends Solution>
java.lang.Object
java.util.EventObject
org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<SolutionG>
- All Implemented Interfaces:
- Serializable
public class BestSolutionChangedEvent<SolutionG extends Solution>
- extends EventObject
Delivered when the best Solution changes during solving.
Delivered in the solver thread (which is the thread that calls Solver.solve(Solution).
- See Also:
- Serialized Form
BestSolutionChangedEvent
public BestSolutionChangedEvent(Solver solver,
long timeMillisSpent,
SolutionG newBestSolution,
int newUninitializedVariableCount)
- Parameters:
solver - never nulltimeMillisSpent - >= 0LnewBestSolution - never nullnewUninitializedVariableCount - >= 0
getTimeMillisSpent
public long getTimeMillisSpent()
- Returns:
- >= 0, the amount of millis spent since the
Solver started
until getNewBestSolution() was found
getNewBestSolution
public SolutionG getNewBestSolution()
- Note that:
- Returns:
- never null
isEveryProblemFactChangeProcessed
public boolean isEveryProblemFactChangeProcessed()
- See Also:
Solver.isEveryProblemFactChangeProcessed()
isNewBestSolutionInitialized
public boolean isNewBestSolutionInitialized()
- Returns:
- true if all the planning entities have planning variables that are initialized.
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.