JGAP

examples.equalDistribution
Class MainClass

java.lang.Object
  extended by examples.equalDistribution.MainClass

public class MainClass
extends java.lang.Object

Given 64 vents with different weights. Try to make 8 group with each groups having (nearly) the same weight as the other groups.

Here, each vent has a similar weight with a small deviation. But the deviation could also be significant (then, good solutions are harder to find).

The proposed way of solving this problem is quite easy in its structure. There is potential for optimzations!

Since:
3.2

Constructor Summary
MainClass()
          Constructor.
 
Method Summary
protected  Genotype configureJGAP()
          Sets up the configuration for the problem.
 void doEvolution(Genotype a_genotype)
          Does the evolution until finished.
static void main(java.lang.String[] args)
          Start the example
 void makeVents()
          Create vents with different weights.
 void printSolution(IChromosome a_solution)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainClass

public MainClass()
          throws java.lang.Exception
Constructor.

Throws:
java.lang.Exception
Since:
3.2
Method Detail

configureJGAP

protected Genotype configureJGAP()
                          throws java.lang.Exception
Sets up the configuration for the problem.

Returns:
configured genotype
Throws:
java.lang.Exception
Since:
3.2

doEvolution

public void doEvolution(Genotype a_genotype)
Does the evolution until finished.

Parameters:
a_genotype - the genotype to evolve
Since:
3.2

printSolution

public void printSolution(IChromosome a_solution)
Parameters:
a_solution - a solution to print to the console
Since:
3.2

makeVents

public void makeVents()
Create vents with different weights.

Since:
3.2

main

public static void main(java.lang.String[] args)
Start the example

Parameters:
args - ignored
Since:
3.2

JGAP