sdt.ga
Class GeneticAlgorithm
java.lang.Object
|
+--sdt.dist.Program
|
+--sdt.ga.GeneticAlgorithm
- Direct Known Subclasses:
- AsyncGeneticAlgorithm
- public class GeneticAlgorithm
- extends Program
- implements java.io.Serializable
This class implements the main module in a GA. The GeneticAlgorithm class calls
various operations involved in a GA.
- See Also:
- Serialized Form
Constructor Summary |
GeneticAlgorithm()
|
GeneticAlgorithm(java.lang.Class c)
default constructor for GA class |
GeneticAlgorithm(java.lang.Class organismClass,
java.lang.Class fitnessClass)
Creates an instance of a GeneticAlgorithm class with the specified organism and fitness classes. |
Method Summary |
void |
evaluate(Organism org)
|
java.lang.Object |
run(boolean distributed)
Implements the run method with various steps involved in a genetic algorithm. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
fitness_class
public java.lang.Class fitness_class
- class of organism fitness
organism_class
public java.lang.Class organism_class
generations
public int generations
population_size
public int population_size
crossover_percentage
public double crossover_percentage
niching_percentage
public double niching_percentage
select_fittest_percentage
public double select_fittest_percentage
mutation_rate
public double mutation_rate
mga
public boolean mga
- variable indicating if MGA solutions are required.
n_mga
public int n_mga
- Number of MGA solutions needed.
mga_solns
public java.util.Vector mga_solns
minimize_evaluations
public boolean minimize_evaluations
evaluation_count
public int evaluation_count
generationNo
public int generationNo
textObs
public OutputObserver textObs
- These is the observer which pipes the print statements to the GUI
text screen.
elitism_level
public int elitism_level
sharing_percentage
public double sharing_percentage
print_level
public int print_level
seeded
public boolean seeded
save_mode
public boolean save_mode
seed
public static int seed
random
public static java.util.Random random
gaView
public GaView gaView
costView
public CostView costView
distributed
public boolean distributed
- variable indicating if GA is run in a distributed fashion.
graphics
public boolean graphics
GeneticAlgorithm
public GeneticAlgorithm()
GeneticAlgorithm
public GeneticAlgorithm(java.lang.Class c)
- default constructor for GA class
GeneticAlgorithm
public GeneticAlgorithm(java.lang.Class organismClass,
java.lang.Class fitnessClass)
- Creates an instance of a GeneticAlgorithm class with the specified organism and fitness classes.
run
public java.lang.Object run(boolean distributed)
- Implements the run method with various steps involved in a genetic algorithm.
- Overrides:
- run in class Program
evaluate
public void evaluate(Organism org)