optimization.optimizer.scipy.dual_annealing

Classes

DualAnnealing(problem)

DualAnnealing is an optimizer that uses the dual annealing algorithm to find the minimum of an optimization problem.

class DualAnnealing(problem: OptimizationProblem)[source]

DualAnnealing is an optimizer that uses the dual annealing algorithm to find the minimum of an optimization problem.

Parameters:

problem (OptimizationProblem) – The optimization problem to be solved.

optimize(maxiter=1000, disp=True)[source]

Runs the dual annealing algorithm to optimize the problem and returns the result.

optimize(maxiter: int = 1000, disp: bool = True, plot: bool = False, callback: Any = None)[source]

Runs the dual annealing algorithm to optimize the problem.

Parameters:
  • maxiter (int) – Maximum number of iterations.

  • disp (bool) – Whether to display the optimization process.

  • plot – If True, update live plots during optimization.

  • callback (callable) – A callable called after each iteration.

Returns:

The result of the optimization.

Return type:

result

undo()

Undo the last optimization step.