public class InstanceGeneticStrategy extends LocalSearchStrategyBase
Constructor and Description |
---|
InstanceGeneticStrategy() |
Modifier and Type | Method and Description |
---|---|
ITransition |
getNextTransition(boolean lastWasSuccesful)
Returns the next
ITransition to fire, the next step in the design space. |
void |
init(ThreadContext context)
Initializes the strategy, called once before the first
LocalSearchStrategyBase#getNextTransition(ThreadContext) is called for every new thread. |
void |
interrupted()
Called if the exploration process is interrupted for example by timeout.
|
void |
newStateIsProcessed(boolean isAlreadyTraversed,
Fitness objectives,
boolean constraintsNotSatisfied)
Called after the chosen transition is fired and the new state has been processed.
|
explore, initStrategy, interruptStrategy
public void init(ThreadContext context)
LocalSearchStrategyBase
LocalSearchStrategyBase#getNextTransition(ThreadContext)
is called for every new thread.init
in class LocalSearchStrategyBase
context
- The ThreadContext
which contains necessary informations. Should be assigned to a field.public ITransition getNextTransition(boolean lastWasSuccesful)
LocalSearchStrategyBase
ITransition
to fire, the next step in the design space. It can be a quite complex method
or a simple depth first search.getNextTransition
in class LocalSearchStrategyBase
lastWasSuccesful
- False if the last returned transition was already fired by someone and therefore should choose an
other transition, otherwise true.ITransition
which is not traversed yet. Null if there is no more to fire.public void newStateIsProcessed(boolean isAlreadyTraversed, Fitness objectives, boolean constraintsNotSatisfied)
LocalSearchStrategyBase
newStateIsProcessed
in class LocalSearchStrategyBase
isAlreadyTraversed
- True if the new state is already traversed in the past.objectives
- A map containing the values of the objectives.public void interrupted()
LocalSearchStrategyBase
LocalSearchStrategyBase#getNextTransition(ThreadContext, boolean)
method witch is called right after this
one.interrupted
in class LocalSearchStrategyBase