4.11. pyopus.optimizer.psade — Box constrained parallel SADE global optimizer

Inheritance diagram of pyopus.optimizer.psade

Box constrained parallel SADE global optimizer (PyOPUS subsystem name: PSADEOPT)

SADE stands for Simulated Annealing with Differential Evolution.

A provably convergent (parallel) global optimization algorithm.

The algorithm was published in [psade].

[psade]Olenšek J., Tuma T., Puhan J., Bűrmen Á.: A new asynchronous parallel global optimization meth od based on simulated annealing and differential evolution. Applied Soft Computing Journal, vol. 11, pp. 1481-1489, 2011.
class pyopus.optimizer.psade.ParallelSADE(function, xlo, xhi, debug=0, fstop=None, maxiter=None, populationSize=20, pLocal=0.01, Tmin=1e-10, Rmin=1e-10, Rmax=1.0, wmin=0.5, wmax=1.5, pxmin=0.1, pxmax=0.9, minSlaves=1, maxSlaves=None, spawnerLevel=1)

Parallel SADE global optimizer class

If debug is above 0, debugging messages are printed.

The lower and upper bound (xlo and xhi) must both be finite.

populationSize is the number of inidividuals (points) in the population.

pLocal is the probability of performing a local step.

Tmin is the minimal temperature of the annealers.

Rmin and Rmax are the lower and upper bound on the range parameter of the annealers.

wmin, wmax, pxmin, and pxmax are the lower and upper bounds for the differential evolution’s weight and crossover probability parameters.

All operations are performed on normalized points ([0,1] interval corresponding to the range defined by the bounds).

If spawnerLevel is not greater than 1, evaluations are distributed across available computing nodes (that is unless task distribution takes place at a higher level).

See the BoxConstrainedOptimizer for more information.

accept(xt, ft, ip, itR)

Decides if a normalized point xt should be accepted. ft is the corresponding cost function value. ip is the index of the best point in the population. itR is the index of the point (annealer) whose temperature is used in the Metropolis criterion.

Returns a tuple (accepted, bestReplaced) where accepted is True if the point should be accpeted and bestReplaced is True if accepting xt will replace the best point in the population.


Checks the optimization algorithm’s settings and raises an exception if something is wrong.


Performs a contest between two random points in the population for better values of the temperature and range parameter. The first point’s index is ip. The second point is chosen randomly.

generateTrial(xip, xi1, delta1, delta2, R, w, px)

Generates a normalized trial point for the global search step.

A mutated normalized point is generated as

xi1 + delta1*w*random1 + delta2*w*random2

where random1 and random2 are two random numbers from the [0,1] interval.

A component-wise crossover of the mutated point and xip is performed with the crossover probability px. Then every component of the resulting point is changed by a random value generated from the Cauchy probalility distribution with parameter R.

Finally the bounds are enforced by selecting a random value between xip and the violated bound for every component of the generated point that violates a bound.

Returns a normalized point.


Generates all the prerequisites for the generation of a trial point.

Choosed 5 random normalized points (xi1..xi5) from the population.

Returns a tuple comprising the normalized point xi1, and two differential vectors xi2-xi3, xi4-xi5.


Constructs and returns the initial population with Np members.


Chooses the values of the range and temperature parameters for the annealers.

classmethod localStep(xa, fa, d, origin, scale, evf, args)

Performs a local step starting at normalized point xa with the corresponding cost function value fa in direction d. Runs remotely.

The local step is performed with the help of a quadratic model. Two or three additional points are evaluated.

The return value is a tuple of three tuples. The furst tuple lists the evaluated normalized point, the second one lists the corresponding cost function values and the third one the corresponding annotations. All three tuples must have the same size.

Returns None if something goes wrong (like a failure to move a point within bounds).


Puts the optimizer in its initial state.

If it is a 2-dimensional array or list the first index is the initial 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 the initial point x0 is a 1-dimensional array or list, Np-1 population members are generated. Point x0 is the Np-th member. See the initialPopulation() method.

If x0 is None the Np members of the initial population are generated automatically.


Run the algorithm.


Selects the point (annealer) whose range, temperature, differential operator weight and crossover probability will be used in the global step.

Returns the index of the point.

Previous topic

4.10. pyopus.optimizer.de — Box constrained differential evolution optimizer

Next topic

4.12. pyopus.optimizer.qpmads — Mesh adaptive direct search with quadratic programming

This Page