org.dbe.eve.opt.alg.gaBeasely
Class GApop

java.lang.Object
  extended by org.dbe.eve.opt.alg.gaBeasely.GApop

public class GApop
extends java.lang.Object


Field Summary
private  GAsolution best
           
private  int bestGen
           
private  int[] dimensions
           
private  int generation
           
private  int gPopSize
           
private  ZeroOneMatrix matrix
           
private  GAsolution[] pop
           
private  java.util.Random random
           
private  GAsolution worst
           
private  int worstIdx
           
 
Constructor Summary
GApop(ZeroOneMatrix m, int _gPopSize, double GAinitPop)
           
 
Method Summary
 int[] binaryTournament()
           
 boolean checkDuplicate(GAsolution child)
           
 int getAge()
           
 GAsolution getBest()
           
 int getBestGeneration()
           
 GAsolution getIndividual(int index)
           
 GAsolution getWorst()
           
private  void initRandSolutions(double GAinitPop)
           
 void replaceWorst(GAsolution newSol)
           
 void setBest()
           
 void setWorst()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pop

private GAsolution[] pop

matrix

private ZeroOneMatrix matrix

random

private java.util.Random random

best

private GAsolution best

worst

private GAsolution worst

worstIdx

private int worstIdx

generation

private int generation

bestGen

private int bestGen

dimensions

private int[] dimensions

gPopSize

private int gPopSize
Constructor Detail

GApop

public GApop(ZeroOneMatrix m,
             int _gPopSize,
             double GAinitPop)
Method Detail

getBest

public GAsolution getBest()

setBest

public void setBest()

replaceWorst

public void replaceWorst(GAsolution newSol)

getWorst

public GAsolution getWorst()

setWorst

public void setWorst()

initRandSolutions

private void initRandSolutions(double GAinitPop)

binaryTournament

public int[] binaryTournament()

checkDuplicate

public boolean checkDuplicate(GAsolution child)

getIndividual

public GAsolution getIndividual(int index)

getAge

public int getAge()

getBestGeneration

public int getBestGeneration()