org.optaplanner.core.api.solver.event
Class BestSolutionChangedEvent<SolutionG extends Solution>
java.lang.Object
   java.util.EventObject
java.util.EventObject
       org.optaplanner.core.api.solver.event.BestSolutionChangedEvent<SolutionG>
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 null
- timeMillisSpent- >= 0L
- newBestSolution- never null
- newUninitializedVariableCount- >= 0
getTimeMillisSpent
public long getTimeMillisSpent()
- 
- Returns:
- >= 0, the amount of millis spent since the Solverstarted
 untilgetNewBestSolution()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.