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

#include <incop.h>

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

Public Member Functions

 ThresholdAccepting (double maxthreshold, int walklength)
 
int acceptance (Move *move, Configuration *config)
 
void executebeforemove (Move *move, Configuration *configuration, OpProblem *problem)
 
void reinit (OpProblem *problem)
 

Public Attributes

double thresholdinit
 
double delta
 
double thresholdaccept
 

Detailed Description

Threshold accepting Metaheuristics : a move must no deteriorate the evaluation more than the current threshod : the threshold goes down linearly from thresholdinit to 0

Constructor & Destructor Documentation

◆ ThresholdAccepting()

ThresholdAccepting::ThresholdAccepting ( double  maxthreshold,
int  walklength 
)

constructor : two arguments : maxthreshold the initial threshold and walklength , it computes a constant step for lowering the threshold

References delta, and thresholdinit.

Member Function Documentation

◆ acceptance()

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

acceptance condition : being under or at the threshold

Reimplemented from Metaheuristic.

References thresholdaccept, and Configuration::valuation.

◆ executebeforemove()

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

the threshold is lowered by delta

Reimplemented from Metaheuristic.

References delta, and thresholdaccept.

◆ reinit()

void ThresholdAccepting::reinit ( OpProblem problem)
virtual

the threshold is initialized at thresholdinit

Reimplemented from Metaheuristic.

References thresholdaccept, and thresholdinit.

Member Data Documentation

◆ delta

double ThresholdAccepting::delta

constant step to lower the threshold

Referenced by executebeforemove(), and ThresholdAccepting().

◆ thresholdaccept

double ThresholdAccepting::thresholdaccept

current value of the threshold

Referenced by acceptance(), executebeforemove(), and reinit().

◆ thresholdinit

double ThresholdAccepting::thresholdinit

initial threshold

Referenced by reinit(), and ThresholdAccepting().