be.ac.ulg.montefiore.run.totem.repository.genericheuristics.simulatedAnnealing.facade
Class SimulatedAnnealing

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.repository.genericheuristics.simulatedAnnealing.facade.SimulatedAnnealing

public class SimulatedAnnealing
extends java.lang.Object

Implementation of the Simulated Algorithm

Creation date: 18 nov. 2004 11:56:14

Author:
Simon Balon (balon@run.montefiore.ulg.ac.be)

Field Summary
 boolean minimise
           
protected  SANeighbourhood neighbourhood
           
protected  SAParameter param
           
protected  SAReportGenerator reportGenerator
           
protected  ObjectiveFunction scf
           
 
Constructor Summary
SimulatedAnnealing(SANeighbourhood neighbourhood, SAInitialSolutionGenerator solutionGenerator, ObjectiveFunction scf)
          This constructor build a simulated annealing instance with the specified parameters.
SimulatedAnnealing(SANeighbourhood neighbourhood, SAInitialSolutionGenerator solutionGenerator, ObjectiveFunction scf, SAParameter param)
          This constructor build a simulated annealing instance with the specified parameters.
SimulatedAnnealing(SANeighbourhood neighbourhood, SAInitialSolutionGenerator solutionGenerator, ObjectiveFunction scf, SAParameter param, SAReportGenerator reportGenerator)
          This constructor build a simulated annealing instance with the specified parameters.
SimulatedAnnealing(SANeighbourhood neighbourhood, SAParameter param)
          This constructor build a simulated annealing instance without solution generator.
SimulatedAnnealing(SANeighbourhood neighbourhood, SAParameter param, SAReportGenerator reportGenerator)
           
 
Method Summary
protected  boolean compare(double a, double b)
          If minimise == true, returns true if a < b and false otherwise.
 int proposeL()
           
 float proposeT0(float T0, int plateauSize)
           
 float proposeT0(int plateauSize)
           
 SASolution solve()
          This method will return the solution of the simulated Annealing MetaHeuristic.
 SASolution solve(SAParameter param)
           
 SASolution solve(SASolution initialSolution)
          This method will return the solution of the simulated Annealing MetaHeuristic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

neighbourhood

protected SANeighbourhood neighbourhood

scf

protected ObjectiveFunction scf

param

protected SAParameter param

reportGenerator

protected SAReportGenerator reportGenerator

minimise

public boolean minimise
Constructor Detail

SimulatedAnnealing

public SimulatedAnnealing(SANeighbourhood neighbourhood,
                          SAInitialSolutionGenerator solutionGenerator,
                          ObjectiveFunction scf,
                          SAParameter param,
                          SAReportGenerator reportGenerator)
This constructor build a simulated annealing instance with the specified parameters.

Parameters:
neighbourhood - : the neighbourhood function
solutionGenerator - : the solution generator
param - : the parameters of the Simulated Annealing (T0, alpha, etc)

SimulatedAnnealing

public SimulatedAnnealing(SANeighbourhood neighbourhood,
                          SAParameter param,
                          SAReportGenerator reportGenerator)

SimulatedAnnealing

public SimulatedAnnealing(SANeighbourhood neighbourhood,
                          SAInitialSolutionGenerator solutionGenerator,
                          ObjectiveFunction scf,
                          SAParameter param)
This constructor build a simulated annealing instance with the specified parameters.

Parameters:
neighbourhood - : the neighbourhood function
solutionGenerator - : the solution generator
param - : the parameters of the Simulated Annealing (T0, alpha, etc)

SimulatedAnnealing

public SimulatedAnnealing(SANeighbourhood neighbourhood,
                          SAInitialSolutionGenerator solutionGenerator,
                          ObjectiveFunction scf)
This constructor build a simulated annealing instance with the specified parameters.

Parameters:
neighbourhood - : the neighbourhood function
solutionGenerator - : the solution generator

SimulatedAnnealing

public SimulatedAnnealing(SANeighbourhood neighbourhood,
                          SAParameter param)
This constructor build a simulated annealing instance without solution generator. If you use this constructor, you cannot call after the solve() method, you have to provide yourself the initial solution and call the solve(SASolution initialSolution) instead.

Parameters:
neighbourhood - : the neighbourhood function
param - : the parameters of the Simulated Annealing (T0, alpha, etc)
Method Detail

solve

public SASolution solve()
                 throws java.lang.Exception
This method will return the solution of the simulated Annealing MetaHeuristic. The initial solution is generated with the solutionGenerator.

Returns:
the solution of the algorithm (type : SASolution)
Throws:
java.lang.Exception

solve

public SASolution solve(SAParameter param)
                 throws java.lang.Exception
Throws:
java.lang.Exception

proposeT0

public float proposeT0(int plateauSize)
                throws java.lang.IllegalArgumentException,
                       java.lang.Exception
Throws:
java.lang.IllegalArgumentException
java.lang.Exception

proposeT0

public float proposeT0(float T0,
                       int plateauSize)
                throws java.lang.IllegalArgumentException,
                       java.lang.Exception
Throws:
java.lang.IllegalArgumentException
java.lang.Exception

proposeL

public int proposeL()

solve

public SASolution solve(SASolution initialSolution)
                 throws java.lang.Exception
This method will return the solution of the simulated Annealing MetaHeuristic. The initial solution is given as argument.

Returns:
the solution of the algorithm (type : SASolution)
Throws:
java.lang.Exception

compare

protected boolean compare(double a,
                          double b)
If minimise == true, returns true if a < b and false otherwise. If minimise == false (maximisation problem), returns true if a > b and false otherwise.



Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.