OptaPlanner core 6.2.0.Beta1

org.optaplanner.core.api.solver.event
Interface SolverEventListener<SolutionG extends Solution>

All Superinterfaces:
EventListener

public interface SolverEventListener<SolutionG extends Solution>
extends EventListener


Method Summary
 void bestSolutionChanged(BestSolutionChangedEvent<SolutionG> event)
          Called once every time when a better Solution is found.
 

Method Detail

bestSolutionChanged

void bestSolutionChanged(BestSolutionChangedEvent<SolutionG> event)
Called once every time when a better Solution is found. The Solution is guaranteed to be initialized. Early in the solving process it's usually called more frequently than later on.

Called from the solver thread. Should return fast, because it steals time from the Solver.

In real-time planning If Solver.addProblemFactChange(ProblemFactChange) has been called once or more, all ProblemFactChanges in the queue will be processed and this method is called only once. In that case, the former best Solution is considered stale, so it doesn't matter whether the new Score is better than that or not.

Parameters:
event - never null

OptaPlanner core 6.2.0.Beta1

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.