QuantLib: HybridSimulatedAnnealing< Sampler, Probability, Temperature, Reannealing > Class Template Reference

A free/open-source library for quantitative finance Reference manual - version 1.20

Public Types | Public Member Functions | List of all members
HybridSimulatedAnnealing< Sampler, Probability, Temperature, Reannealing > Class Template Reference

`#include <ql/experimental/math/hybridsimulatedannealing.hpp>`

Inheritance diagram for HybridSimulatedAnnealing< Sampler, Probability, Temperature, Reannealing >:
[legend]

## Public Types
enum | LocalOptimizeScheme { NoLocalOptimize, EveryNewPoint, EveryBestPoint }
enum | ResetScheme { NoResetScheme, ResetToBestPoint, ResetToOrigin }

## Public Member Functions
| HybridSimulatedAnnealing (const Sampler &sampler, const Probability &probability, const Temperature &temperature, const Reannealing &reannealing=ReannealingTrivial(), Real startTemperature=200.0, Real endTemperature=0.01, Size reAnnealSteps=50, ResetScheme resetScheme=ResetToBestPoint, Size resetSteps=150, ext::shared_ptr< OptimizationMethod > localOptimizer=ext::shared_ptr< OptimizationMethod >(), LocalOptimizeScheme optimizeScheme=EveryBestPoint)
EndCriteria::Type | minimize (Problem &P, const EndCriteria &endCriteria)
| minimize the optimization problem P

## Detailed Description

### template<class Sampler, class Probability, class Temperature, class Reannealing = ReannealingTrivial>
class QuantLib::HybridSimulatedAnnealing< Sampler, Probability, Temperature, Reannealing >

Method is fairly straightforward: 1) Sampler provides a probability density (based on current value) for the parameters. Each iteration a new draw is made from it to find a new point 2) Probability determines whether the new point, obtained from Sampler, is accepted or not 3) Temperature is a schedule T(k) for the iteration k, which affects the Sampler and Probability 4) Reannealing is a departure from the traditional Boltzmann Annealing method: it rescales the iteration k independently for each dimension so as to improve convergence

The hybrid in the name is because one can provide it a local optimizer for use whenever any new best point is found or at every accepted point, in which case is used is chose by the user.

Class Sampler must implement the following interface:

void operator()(Array &newPoint, const Array &currentPoint, const Array &temp) const;

Class Probability must implement the following interface:

bool operator()(Real currentValue, Real newValue, const Array &temp) const;

Class Temperature must implement the following interface:

void operator()(Array &newTemp, const Array &currTemp, const Array &steps) const;

Class Reannealing must implement the following interface:

void operator()(Array & steps, const Array &currentPoint,
Real aCurrentValue, const Array & currTemp) const;

Examples
  GlobalOptimizer.cpp.