ec.multiobjective.spea2
Class SPEA2Subpopulation

java.lang.Object
  extended by ec.Subpopulation
      extended by ec.multiobjective.spea2.SPEA2Subpopulation
All Implemented Interfaces:
Group, Setup, java.io.Serializable, java.lang.Cloneable

public class SPEA2Subpopulation
extends Subpopulation

SPEA2Subpopulation is a simple subclass of Subpopulation which adds the archiveSize field. The archive is portion of the subpopulation so archive size may not exceed the population size.

Parameters

base.archive-size
int >= 1 < populationSize
(total number of individuals from the population which are in the archive)

Parameter bases

base.species species (the subpopulations' species)
base.fitness species.f_prototype (the prototypical fitness)

Version:
1.0
Author:
Robert Hubley (based on Subpopulation.java by Sean Luke)
See Also:
Subpopulation, Serialized Form

Field Summary
static java.lang.String ARCHIVE_PREAMBLE
           
 int archiveSize
          The SPEA2 archive size
static java.lang.String P_ARCHIVESIZE
           
 
Fields inherited from class ec.Subpopulation
INDIVIDUAL_INDEX_PREAMBLE, individuals, loadInds, NUM_INDIVIDUALS_PREAMBLE, numDuplicateRetries, P_FILE, P_RETRIES, P_SPECIES, P_SUBPOPSIZE, species
 
Constructor Summary
SPEA2Subpopulation()
           
 
Method Summary
 void printSubpopulation(EvolutionState state, int log, int verbosity)
          Overridden to include the archive size in the stream.
 void printSubpopulation(EvolutionState state, java.io.PrintWriter writer)
          Overridden to include the archive size in the stream.
 void printSubpopulationForHumans(EvolutionState state, int log, int verbosity)
          Overridden to include the archive size in the stream.
 void readSubpopulation(EvolutionState state, java.io.DataInput dataInput)
          Overridden to include the archive size in the stream.
 void readSubpopulation(EvolutionState state, java.io.LineNumberReader reader)
          Overridden to include the archive size in the stream.
 void setup(EvolutionState state, Parameter base)
          Returns an instance of Subpopulation just like it had been before it was populated with individuals.
 void writeSubpopulation(EvolutionState state, java.io.DataOutput dataOutput)
          Overridden to include the archive size in the stream.
 
Methods inherited from class ec.Subpopulation
emptyClone, populate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

archiveSize

public int archiveSize
The SPEA2 archive size


P_ARCHIVESIZE

public static final java.lang.String P_ARCHIVESIZE
See Also:
Constant Field Values

ARCHIVE_PREAMBLE

public static final java.lang.String ARCHIVE_PREAMBLE
See Also:
Constant Field Values
Constructor Detail

SPEA2Subpopulation

public SPEA2Subpopulation()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Returns an instance of Subpopulation just like it had been before it was populated with individuals. You may need to override this if you override Subpopulation. IMPORTANT NOTE: if the size of the array in Subpopulation has been changed, then the clone will take on the new array size. This helps some evolution strategies.

Specified by:
setup in interface Setup
Overrides:
setup in class Subpopulation
See Also:
Group.emptyClone()

printSubpopulationForHumans

public void printSubpopulationForHumans(EvolutionState state,
                                        int log,
                                        int verbosity)
Overridden to include the archive size in the stream.

Overrides:
printSubpopulationForHumans in class Subpopulation

printSubpopulation

public void printSubpopulation(EvolutionState state,
                               int log,
                               int verbosity)
Overridden to include the archive size in the stream.

Overrides:
printSubpopulation in class Subpopulation

printSubpopulation

public void printSubpopulation(EvolutionState state,
                               java.io.PrintWriter writer)
Overridden to include the archive size in the stream.

Overrides:
printSubpopulation in class Subpopulation

readSubpopulation

public void readSubpopulation(EvolutionState state,
                              java.io.LineNumberReader reader)
                       throws java.io.IOException
Overridden to include the archive size in the stream.

Overrides:
readSubpopulation in class Subpopulation
Throws:
java.io.IOException

writeSubpopulation

public void writeSubpopulation(EvolutionState state,
                               java.io.DataOutput dataOutput)
                        throws java.io.IOException
Overridden to include the archive size in the stream.

Overrides:
writeSubpopulation in class Subpopulation
Throws:
java.io.IOException

readSubpopulation

public void readSubpopulation(EvolutionState state,
                              java.io.DataInput dataInput)
                       throws java.io.IOException
Overridden to include the archive size in the stream.

Overrides:
readSubpopulation in class Subpopulation
Throws:
java.io.IOException