public class CoolingScheduleExponential extends java.lang.Object implements CoolingSchedule
The CoolingScheduleExponential
is a CoolingSchedule
for the
SimulatedAnnealing
.
tn - final temperature
t0 - initial temperature
i - current iteration
n - maximal number of iterations
a - alpha value
The current temperature is calculated by tn + t0 * a^i
.
Modifier and Type | Field and Description |
---|---|
protected double |
alpha |
protected double |
t0 |
protected double |
tn |
Constructor and Description |
---|
CoolingScheduleExponential(double t0,
double tn,
double alpha)
Constructs a new
CoolingScheduleExponential . |
Modifier and Type | Method and Description |
---|---|
double |
getTemperature(int i,
int n)
Returns the temperature for the iteration
i of the maximal number
of iterations n . |
protected final double t0
protected final double tn
protected final double alpha
@Inject public CoolingScheduleExponential(double t0, double tn, double alpha)
CoolingScheduleExponential
.t0
- the initial temperature (using namespace
CoolingSchedule
)tn
- the final temperature (using namespace CoolingSchedule
) )alpha
- the alpha valuepublic double getTemperature(int i, int n)
CoolingSchedule
i
of the maximal number
of iterations n
.getTemperature
in interface CoolingSchedule
i
- the current iterationn
- the maximal number of iterations