JGAP

examples.audit
Class EvolutionMonitorExample

java.lang.Object
  extended by examples.audit.EvolutionMonitorExample

public class EvolutionMonitorExample
extends java.lang.Object

Demonstrates how to use evolution monitors to stop evolution when certain criteria are met. You may want to rerun the example several times to see different criteria match. Concerning your system, an adaptation of the timed monitor (max. runtime) may be necessary.

Please see class examples.MinimizingMakeChange for the original example, which was just extended by monitors here.

Since:
3.4.4

Constructor Summary
EvolutionMonitorExample()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main method to start the example.
static void makeChangeForAmount(int a_targetChangeAmount)
          Executes the genetic algorithm to determine the minimum number of coins necessary to make up the given target amount of change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvolutionMonitorExample

public EvolutionMonitorExample()
Method Detail

makeChangeForAmount

public static void makeChangeForAmount(int a_targetChangeAmount)
                                throws java.lang.Exception
Executes the genetic algorithm to determine the minimum number of coins necessary to make up the given target amount of change. The solution will then be written to System.out.

Parameters:
a_targetChangeAmount - the target amount of change for which this method is attempting to produce the minimum number of coins
Throws:
java.lang.Exception
Since:
3.4.4

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method to start the example.

Parameters:
args - ignored here
Throws:
java.lang.Exception
Since:
3.4.4

JGAP