toulbar2
Public Member Functions | Public Attributes | List of all members
SimulatedAnnealing Class Reference

#include <incop.h>

Inheritance diagram for SimulatedAnnealing:
Inheritance graph
[legend]
Collaboration diagram for SimulatedAnnealing:
Collaboration graph
[legend]

Public Member Functions

 SimulatedAnnealing (double initialtemperature, int walklength)
 
int acceptance (Move *move, Configuration *config)
 
void executebeforemove (Move *move, Configuration *configuration, OpProblem *problem)
 

Public Attributes

double inittemperature
 
double delta
 
double temperature
 

Detailed Description

Simulated Annealing : linear temperature descent from inittemperature to 0

Constructor & Destructor Documentation

◆ SimulatedAnnealing()

SimulatedAnnealing::SimulatedAnnealing ( double  initialtemperature,
int  walklength 
)

Constructor : 2 parameters : initial temperature and walk length : the fixed temperature decrement is computed.

References delta, and inittemperature.

Member Function Documentation

◆ acceptance()

int SimulatedAnnealing::acceptance ( Move move,
Configuration config 
)
virtual

Acceptance function of the temperature : classical simulated annealing formula for accepting a bad move : probability = exp (-temperature/evaluationdelta)

Reimplemented from Metaheuristic.

References temperature, and Configuration::valuation.

◆ executebeforemove()

void SimulatedAnnealing::executebeforemove ( Move move,
Configuration configuration,
OpProblem problem 
)
virtual

the temperature is lowered by delta

Reimplemented from Metaheuristic.

References delta, and temperature.

Member Data Documentation

◆ delta

double SimulatedAnnealing::delta

constant step for lowering the temperature

Referenced by executebeforemove(), and SimulatedAnnealing().

◆ inittemperature

double SimulatedAnnealing::inittemperature

initial temperature

Referenced by SimulatedAnnealing().

◆ temperature

double SimulatedAnnealing::temperature

current temperature

Referenced by acceptance(), and executebeforemove().