Expand description

Termination determines when to stop the process of the genetic algorithm. Common termination conditions are:

  • A solution is found that satisfies minimum criteria
  • A fixed number of generations is reached
  • An allocated budget (computation time/money) is reached
  • The highest ranking solution’s fitness is reaching or has reached a plateau such that successive iterations no longer produce better results
  • …or a combination of such termination conditions.

Termination conditions are defined by implementing the Termination trait. Each kind of termination condition should be implemented as a separate type. Terminations conditions are combined using combinators such as logical and and logical or.

A combinator is a special Termination condition that combines two other Termination conditions with a logical operation. The most important combinators are provided in the combinator package.

For convenience the provided combinators can be instantiated by using the public functions and and or which are reexported by this module.

Re-exports

pub use self::combinator::and;
pub use self::combinator::or;

Modules

The limiter package provides Termination functions that stop the simulation when a certain limit is reached.

Enums

The StopFlag is the result of the Termination function. It tells the simulation whether it shall stop or if it can continue.

Traits

A Termination defines a condition when the Simulation shall stop.

Type Definitions

A StopReason should explain to the user of the simulation why the simulation has been stopped. Examples: