public class SimpleConstructionRule extends Object implements ConstructionRule, Setup
ComponentSelector
of your choice.Modifier and Type | Field and Description |
---|---|
static String |
P_SELECTOR |
static String |
P_START |
private ComponentSelector |
selector |
private String |
startComponent |
Constructor and Description |
---|
SimpleConstructionRule() |
Modifier and Type | Method and Description |
---|---|
ConstructiveIndividual |
constructSolution(EvolutionState state,
ConstructiveIndividual ind,
PheromoneTable pheromones,
int thread)
Constructs a solution by greedily adding the lowest-desirability component at
each step until a complete solution is formed.
|
boolean |
repOK() |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored
in state, built off of the parameter base base.
|
public static final String P_SELECTOR
public static final String P_START
private String startComponent
private ComponentSelector selector
public void setup(EvolutionState state, Parameter base)
Setup
public ConstructiveIndividual constructSolution(EvolutionState state, ConstructiveIndividual ind, PheromoneTable pheromones, int thread)
constructSolution
in interface ConstructionRule
public final boolean repOK()
Copyright © 2019. All rights reserved.