LocalSearchStrategyBase
abstract class.@Deprecated public class SimpleSolutionStore extends java.lang.Object implements ISolutionStore
ISolutionStore
interface which stores all the found solution
trajectory (i.e. trajectories, which satisfy all the hard objectives).
It can be configured to stop the exploration after a predefined number of solutions is found.ISolutionStore.StopExecutionType
Constructor and Description |
---|
SimpleSolutionStore()
Deprecated.
|
SimpleSolutionStore(int numOfSolutionsToFind)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Solution> |
getSolutions()
Deprecated.
Returns the currently stored solutions.
|
boolean |
isStrategyDependent()
Deprecated.
If an
ISolutionStore is exploration strategy dependent the framework passes the responsibility of calling
the ISolutionStore.newSolution(ThreadContext) method to the LocalSearchStrategyBase implementation. |
ISolutionStore.StopExecutionType |
newSolution(ThreadContext context)
Deprecated.
Notifies the solution store of a potential solution trajectory.
|
void |
registerSolutionFoundHandler(ISolutionFoundHandler handler)
Deprecated.
Registers a handler for executing custom code after a solution is found.
|
public SimpleSolutionStore()
public SimpleSolutionStore(int numOfSolutionsToFind)
public ISolutionStore.StopExecutionType newSolution(ThreadContext context)
ISolutionStore
objectives
will never be
null and the implementation should be thread safe.
Also it determines whether the execution should stop or not, if a solution is found. It can have three different responses:
ISolutionStore.StopExecutionType.CONTINUE
: the execution should continue.ISolutionStore.StopExecutionType.STOP_THREAD
: this execution thread should be stopped while the others can continue.
ISolutionStore.StopExecutionType.STOP_ALL
: the whole design space exploration process should exit.newSolution
in interface ISolutionStore
context
- Context with the actual state of the exploration process.ISolutionStore.StopExecutionType
based on it's internal reasoning.public java.util.Collection<Solution> getSolutions()
ISolutionStore
getSolutions
in interface ISolutionStore
Solution
s.public void registerSolutionFoundHandler(ISolutionFoundHandler handler)
ISolutionStore
registerSolutionFoundHandler
in interface ISolutionStore
handler
- The handler.public boolean isStrategyDependent()
ISolutionStore
ISolutionStore
is exploration strategy dependent the framework passes the responsibility of calling
the ISolutionStore.newSolution(ThreadContext)
method to the LocalSearchStrategyBase
implementation.isStrategyDependent
in interface ISolutionStore