MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
The base simulated annealing algorithm. More...
Classes | |
class | CState |
The state keeps information about the energy of the actual state it wraps. More... | |
Public Member Functions | |
void | setEvaluator (IEvaluator< T > evaluator) |
Sets the evaluator. | |
void | setComparer (IComparer comparer) |
Sets the fitness score comparer. | |
void | setAcceptor (IAcceptor acceptor) |
Sets the acceptor probability distribution method. | |
void | setCooler (ICooler cooler) |
Sets the temperature cooling method. | |
void | setPerturber (IPerturber< T > perturber) |
Sets the neighbour generating method. | |
void | setMaximumTemperature (double maximumTemperature) |
Sets the maximum (starting) temperature for the simulated annealing. | |
double | getMaximumTemperature () |
Returns the maximum (starting) temperature of the simulated annealing algorithm. | |
void | setMinimumTemperature (double minimumTemperature) |
Sets the minimum (ending) temperature for the simulated annealing. | |
double | getMinimumTemperature () |
Returns the minimum (ending) temperature of the simulated annealing algorithm. | |
void | setRandomGenerator (IRandomizer randomizer) |
Sets the pseudo-random number generator for the simulated annealing algorithm. | |
IRandomizer | getRandomGenerator () |
Returns the random number generator used by the simulated annealing algorithm. | |
void | setInterrupted (bool interrupted) |
Sets the interrupted flag on the specified value. | |
bool | isInterrupted () |
Returns the state of the interrupted flag. | |
T | solve (long iterationLimit, long timeLimit) |
Solves a problem using simulated annealing. | |
Protected Member Functions | |
CBaseSimulatedAnnealing () | |
Initializes the basic simulated annealing method. | |
CBaseSimulatedAnnealing (IRandomizer randomizer) | |
Initializes the base simulated annealing method. | |
virtual void | moveToNeighbour (ref CState state, double temperature) |
The metropolis algorithm. | |
abstract T | InitialSolution () |
Returns the initial solution. |
The base simulated annealing algorithm.
T | The type of solution. |
T | : | ICloneable<T> |
MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.CBaseSimulatedAnnealing | ( | IRandomizer | randomizer | ) | [protected] |
Initializes the base simulated annealing method.
randomizer | The pseudo-random number generator to use. |
double MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.getMaximumTemperature | ( | ) |
Returns the maximum (starting) temperature of the simulated annealing algorithm.
double MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.getMinimumTemperature | ( | ) |
Returns the minimum (ending) temperature of the simulated annealing algorithm.
IRandomizer MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.getRandomGenerator | ( | ) |
Returns the random number generator used by the simulated annealing algorithm.
abstract T MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.InitialSolution | ( | ) | [protected, pure virtual] |
Returns the initial solution.
Implemented in MCScheduling.MixedCriticality.SA.CMixedCriticalitySimulatedAnnealing.
bool MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.isInterrupted | ( | ) |
Returns the state of the interrupted flag.
virtual void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.moveToNeighbour | ( | ref CState | state, |
double | temperature | ||
) | [protected, virtual] |
The metropolis algorithm.
Returns a neighbouring state of the specified state.
state | The current state. |
temperature | The temperature influencing probability of acceptance of a neighbouring state. |
Reimplemented in MCScheduling.MixedCriticality.SA.CMixedCriticalitySimulatedAnnealing.
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setAcceptor | ( | IAcceptor | acceptor | ) |
Sets the acceptor probability distribution method.
acceptor | The acceptor. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setComparer | ( | IComparer | comparer | ) |
Sets the fitness score comparer.
comparer | The comparer. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setCooler | ( | ICooler | cooler | ) |
Sets the temperature cooling method.
cooler | The temperature cooling method. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setEvaluator | ( | IEvaluator< T > | evaluator | ) |
Sets the evaluator.
evaluator | The evaluator of states. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setInterrupted | ( | bool | interrupted | ) |
Sets the interrupted flag on the specified value.
If the value is true, and the optimization process is currently running, then it is interrupted.
interrupted | If true, then the running optimization process is interrupted. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setMaximumTemperature | ( | double | maximumTemperature | ) |
Sets the maximum (starting) temperature for the simulated annealing.
maximumTemperature | The maximum temperature value. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setMinimumTemperature | ( | double | minimumTemperature | ) |
Sets the minimum (ending) temperature for the simulated annealing.
minimumTemperature | The minimum temperature value. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setPerturber | ( | IPerturber< T > | perturber | ) |
Sets the neighbour generating method.
perturber | A method generating a neighbouring state given a current state. |
void MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.setRandomGenerator | ( | IRandomizer | randomizer | ) |
Sets the pseudo-random number generator for the simulated annealing algorithm.
randomizer | The random number generator. |
T MCScheduling.SimulatedAnnealing.CBaseSimulatedAnnealing< T >.solve | ( | long | iterationLimit, |
long | timeLimit | ||
) |
Solves a problem using simulated annealing.
The process is stopped after the specified number of iterations has been exceded or the specified number of miliseconds have passed, the temperature has dropped down to minimum temperature, or the process has been interrupted.
iterationLimit | The maximum number of iterations. |
timeLimit | The maximum number of miliseconds. |