iterator
Class PCGA

java.lang.Object
  extended by iterator.AbstractIterator
      extended by iterator.AbstractOptimizer<T>
          extended by iterator.AbstractInitialSampleBasedOptimizer<T>
              extended by iterator.AbstractPopulationOptimizer<T>
                  extended by iterator.BasicRealEncodedGA<BoundConstrainedProblem>
                      extended by iterator.PCGA
All Implemented Interfaces:
DataListener, InitialSamplesSettable, Iterable, LoggableIterator, RepeatableLoggableIterator

public class PCGA
extends BasicRealEncodedGA<BoundConstrainedProblem>

Prof Ilan Kroo's 'Politically Correct' GA: all population members are assured to have a mate. Not particularly politically incorrect to do otherwise, but still. This is a real-encoded GA with a single point crossover.

Author:
dgorur

Field Summary
 
Fields inherited from class iterator.BasicRealEncodedGA
comparator, extrapolationFactor, interpolationFactor, xMutation
 
Fields inherited from class iterator.AbstractPopulationOptimizer
currentBestG, lastBestG, nextBlock
 
Fields inherited from class iterator.AbstractInitialSampleBasedOptimizer
uniform
 
Fields inherited from class iterator.AbstractOptimizer
doubleFormat, funEvalCount, logWriter
 
Fields inherited from class iterator.AbstractIterator
diagnosticString, iter
 
Constructor Summary
PCGA()
           
 
Method Summary
protected  cern.colt.matrix.DoubleMatrix2D computeNextPoints()
          Computes the next set of candidate solutions.
 void init()
          Initialization routine
static void main(java.lang.String[] args)
          Runs some test problem.
 void singleIteration()
          This method is overriden here for this special implementation of PCGA, where generated offspring are immediately added to the eligible mating pool.
 
Methods inherited from class iterator.BasicRealEncodedGA
getExtrapolationFactor, getInterpolationFactor, getMutationBox, getMutationFraction, getMutationProbability, getPopulation, initializePopulation, makeChildren, setExtrapolationFactor, setInterpolationFactor, setMutationBox, setMutationFraction, setMutationProbability
 
Methods inherited from class iterator.AbstractPopulationOptimizer
evaluatePoints, getPopulationSize, setInitialSamples, setInitialSamples, setInitialSamples, setPopulationSize
 
Methods inherited from class iterator.AbstractInitialSampleBasedOptimizer
getRandomSeed, makeInitialSamples, setRandomSeed
 
Methods inherited from class iterator.AbstractOptimizer
clear, dataAdded, dataAdded, dataRemoved, dataRemoved, getDataHandler, getFunEvalCount, getLogFileName, getMaxFunEval, getProblem, isTerminated, iterate, setDataHandler, setFunEvalCount, setLogFileName, setMaxFunEval, setProblem, updateDiagnostics, writeInitialRunLog
 
Methods inherited from class iterator.AbstractIterator
isVerbose, printDiagnostics, setVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface iterator.LoggableIterator
getLogFileName, setLogFileName
 
Methods inherited from interface iterator.Iterable
isTerminated, iterate
 

Constructor Detail

PCGA

public PCGA()
Method Detail

main

public static void main(java.lang.String[] args)
Runs some test problem. Make changes to this routine if desired, but better to use the spring framework.

Parameters:
args - None used.

init

public void init()
Description copied from interface: Iterable
Initialization routine

Specified by:
init in interface Iterable
Overrides:
init in class BasicRealEncodedGA<BoundConstrainedProblem>

singleIteration

public void singleIteration()
This method is overriden here for this special implementation of PCGA, where generated offspring are immediately added to the eligible mating pool. This means that one iteration actually consists of multiple 'sub-generations', in an embarrassingly incestuous scheme.

Specified by:
singleIteration in interface Iterable
Overrides:
singleIteration in class AbstractPopulationOptimizer<BoundConstrainedProblem>

computeNextPoints

protected cern.colt.matrix.DoubleMatrix2D computeNextPoints()
Description copied from class: AbstractPopulationOptimizer
Computes the next set of candidate solutions.

Specified by:
computeNextPoints in class AbstractPopulationOptimizer<BoundConstrainedProblem>
Returns:
a DoubleMatrix2D containing design points row-wise.