public interface Configuration
SimulatedAnnealer
which represents the current
best solution found during a search.
Classes that implement this interface will typically have some
idea of the overall fitness or energy of any given solution and so will implement computeEnergy
accordingly.
Similarly, they will have some idea of how to permute the configuration into another possible solution based
on the current "temperature" and the min,max values of the possible range of temperature and thus will implement
melt(...) accordingly.Modifier and Type | Method and Description |
---|---|
double |
computeEnergy()
Computes the energy or fitness of the current configuration.
|
Configuration |
melt(double temperature,
double maxTemp,
double minTemp)
Randomly perturbs the current configuration in some way.
|
double computeEnergy()
double
value representing the computed energyConfiguration melt(double temperature, double maxTemp, double minTemp)
temperature
- the current temperature of the systemmaxTemp
- the highest temperature the system can go tominTemp
- the lowest temperature the system can go to