SimulatedAnnealing< RNG > Class Template Reference
Math tools » Optimizers

`#include <ql/math/optimization/simulatedannealing.hpp>`

Inheritance diagram for SimulatedAnnealing< RNG >:
[legend]

## Public Types

enum | Scheme { ConstantFactor, ConstantBudget }

## Public Member Functions

| SimulatedAnnealing (const Real lambda, const Real T0, const Real epsilon, const Size m, const RNG &rng=RNG())
| SimulatedAnnealing (const Real lambda, const Real T0, const Size K, const Real alpha, const RNG &rng=RNG())
EndCriteria::Type | minimize (Problem &P, const EndCriteria &ec)
| minimize the optimization problem P

## Detailed Description

### template<class RNG = MersenneTwisterUniformRng>
class QuantLib::SimulatedAnnealing< RNG >

Class RNG must implement the following interface:

RNG::sample_type RNG::next() const;

## Constructor & Destructor Documentation

## SimulatedAnnealing() [1/2]

SimulatedAnnealing | ( | const Real | lambda,
|  | const Real | T0,
|  | const Real | epsilon,
|  | const Size | m,
|  | const RNG & | rng = `RNG()`
| ) |  |

reduce temperature T by a factor of \( (1-\epsilon) \) after m moves

## SimulatedAnnealing() [2/2]

SimulatedAnnealing | ( | const Real | lambda,
|  | const Real | T0,
|  | const Size | K,
|  | const Real | alpha,
|  | const RNG & | rng = `RNG()`
| ) |  |

budget a total of K moves, set temperature T to the initial temperature times \( ( 1 - k/K )^\alpha \) with k being the total number of moves so far. After K moves the temperature is guaranteed to be zero, after that the optimization runs like a deterministic simplex algorithm.