Box constrained differential evolution global optimizer (PyOPUS subsystem name: DEOPT)
Published first in
Storn R., Price K.: Differential evolution - a simple and efficient heuristic for global optimization over continuous spaces. Journal of Global Optimization vol. 11, pp. 341–359, 1997.
A message holding the result of the evaluation of a point x.
f is the result of the cost function evaluation while annotations holds the corresponding annotations.
Box constrained differential evolution global optimizer class
If debug is above 1, the debug option of the EventDrivenMS class is set to 1.
The lower and upper bound (xlo and xhi) must both be finite.
maxGen is the maximal number of generations. It sets an upper bound on
the number of iterations to be the greater of the following two values:
maxiter and .
populationSize is the number of inidividuals (points) in the population.
w is the differential weight between 0 and 2.
pc is the crossover probability between 0 and 1.
If a virtual machine object is passed in the vm argument the algorithm runs in parallel on the virtual machine represented by vm. The algorithm can also run locally (vm set to None).
The algorithm is capable of handling notification messages received when a slave fails or a new host joins the virtual machine. In the first case the work that was performed by the failed slave is reassigned. In the second case new slaves are spawned. The latter is performed by the handler in the EventDrivenMS class. Work is assigned to new slaves when the algorithm detects that they are idle.
Infinite bounds are allowed. This means that the algorithm behaves as
an unconstrained algorithm if lower bounds are and
upper bounds are
. In this case the initial population
must be defined with the reset() method.
See the BoxConstrainedOptimizer and the EventDrivenMS classes for more information.
Handles a MsgIdle message.
Distributes work to the slaves.
In the beginning the initial population is evaluated in parallel (if possible) by sending class:MsgEvaluatePoint messages to slaves.
After the initial population was evaluated the main part of the algorithm starts to produce offspring and evaluates them on slaves.
Handles a MsgResult message and takes care of the evaluation result.
Marks the slave that sent the message as idle so that new work can be assigned to it by the MsgIdle message handler.
Handles a MsgStartup message received by master/slave when the event loop is entered.
Performs some initializations on the master and prevents the plugins in the slave from printing messages.
Handles a notification message reporting that a slave has failed (is down).
Stores the work that was performed at the time the slave failed so it can later be reassigned to some other slave.
Constructs and returns the initial population.
Fails if any bound is infinite.
Puts the optimizer in its initial state.
x is eiter the initial point (which must be within bounds and is ignored) or the initial population in the form of a 2-dimensional array or list where the first index is the population member index while the second index is the component index. The initial population must lie within bounds xlo and xhi and have populationSize members.
If x is None the initial population is generated automatically. In this case xlo and xhi determine the dimension of the problem. See the initialPopulation() method.