public class FixedPriorityInitialSelector extends java.lang.Object implements IInitialPopulationSelector
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
logger |
protected java.util.HashMap<BatchTransformationRule<?,?>,java.lang.Integer> |
priorities |
Constructor and Description |
---|
FixedPriorityInitialSelector() |
Modifier and Type | Method and Description |
---|---|
FixedPriorityInitialSelector |
alwaysAcceptTrajectoryIfMaxDepthReached() |
void |
explore()
This method explores the design space as the implementation specifies.
|
java.util.Set<TrajectoryFitness> |
getInitialPopulation() |
void |
initStrategy(ThreadContext context)
Initializes the strategy with a specific
ThreadContext . |
void |
interruptStrategy()
The implementation of this interface should be ready to be interrupted.
|
void |
setPopulationSize(int populationSize)
Sets the populations size in the initialization phase.
|
FixedPriorityInitialSelector |
withHardObjective(IObjective objective) |
FixedPriorityInitialSelector |
withMaxDepth(int maxDepth) |
FixedPriorityInitialSelector |
withRulePriority(BatchTransformationRule<?,?> rule,
int priority) |
protected java.util.HashMap<BatchTransformationRule<?,?>,java.lang.Integer> priorities
protected org.apache.log4j.Logger logger
public FixedPriorityInitialSelector withRulePriority(BatchTransformationRule<?,?> rule, int priority)
rule
- priority
- Lower is better.public FixedPriorityInitialSelector withHardObjective(IObjective objective)
public FixedPriorityInitialSelector withMaxDepth(int maxDepth)
public FixedPriorityInitialSelector alwaysAcceptTrajectoryIfMaxDepthReached()
public void setPopulationSize(int populationSize)
IInitialPopulationSelector
IStoreChild
implementation.setPopulationSize
in interface IInitialPopulationSelector
populationSize
- Expected number of children.public void initStrategy(ThreadContext context)
IStrategy
ThreadContext
.initStrategy
in interface IStrategy
context
- The context.public void explore()
IStrategy
public void interruptStrategy()
IStrategy
IStrategy.explore()
method should return ASAP.
This method is also called by the SolutionStore
class if enough solutions are found.interruptStrategy
in interface IStrategy
public java.util.Set<TrajectoryFitness> getInitialPopulation()
getInitialPopulation
in interface IInitialPopulationSelector