public class NetworkSA
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Class and Description |
---|---|
static class |
NetworkSA.LastAction
Possible outcomes of the last mutation
|
Constructor and Description |
---|
NetworkSA(double T0,
double coolingMultiplier,
double freezingTemperature,
NetworkModifier modifier,
PartitionFitnessFunction fitness,
boolean allowWorseSolutions,
long maxIterations,
java.util.ArrayList<ManualLogger> loggers,
NetworkFileBackedWrapper wrapper,
EnsembleSA ensemble)
Constructs a new optimization procedure with following temperature settings, network, modifier, logger and fitnessfunction
|
Modifier and Type | Method and Description |
---|---|
void |
approved()
Indicates the ensemble procedure accepted a chance in the temperature parameters and is now asking for feedback
|
void |
clear()
Completely clears all the resources registered by the procedure.
|
double |
getCoolingMultiplier() |
EnsembleSA |
getEnsemble() |
PartitionFitnessFunction |
getFitness() |
double |
getFreezingTemperature() |
long |
getIterationsSoFar() |
NetworkSA.LastAction |
getLastAction() |
double |
getLastChance() |
long |
getMaxIterations() |
NetworkModifier |
getModifier() |
Network |
getNetwork() |
double |
getT0() |
NetworkFileBackedWrapper |
getWrapper() |
boolean |
isRestarting() |
void |
run()
Runs the optimization procedure.
|
void |
setCoolingMultiplier(double coolingMultiplier) |
void |
setEnsemble(EnsembleSA ensemble) |
void |
setFitness(PartitionFitnessFunction fitness) |
void |
setFreezingTemperature(double freezingTemperature) |
void |
setMaxIterations(long maxIterations) |
void |
setModifier(NetworkModifier modifier) |
void |
setNetwork(Network network) |
void |
setRestarting(boolean restarting) |
void |
setT0(double t0) |
void |
setWrapper(NetworkFileBackedWrapper wrapper) |
public NetworkSA(double T0, double coolingMultiplier, double freezingTemperature, NetworkModifier modifier, PartitionFitnessFunction fitness, boolean allowWorseSolutions, long maxIterations, java.util.ArrayList<ManualLogger> loggers, NetworkFileBackedWrapper wrapper, EnsembleSA ensemble)
T0
- start temperaturecoolingMultiplier
- cooldown factor of temperature schemefreezingTemperature
- end temperaturemodifier
- modifies the networkfitness
- current fitness of the rankingallowWorseSolutions
- boolean if worse solutions can be allowedmaxIterations
- maximum amount of iterations (chances to the network)loggers
- registered loggers following this optimizationwrapper
- network/rankingensemble
- responsible ensemble which spawned this optimizationpublic void run()
run
in interface java.lang.Runnable
public void approved()
public void clear()
public boolean isRestarting()
public void setRestarting(boolean restarting)
public long getIterationsSoFar()
public Network getNetwork()
public void setNetwork(Network network)
public double getT0()
public void setT0(double t0)
public double getCoolingMultiplier()
public void setCoolingMultiplier(double coolingMultiplier)
public double getFreezingTemperature()
public void setFreezingTemperature(double freezingTemperature)
public NetworkModifier getModifier()
public void setModifier(NetworkModifier modifier)
public PartitionFitnessFunction getFitness()
public void setFitness(PartitionFitnessFunction fitness)
public long getMaxIterations()
public void setMaxIterations(long maxIterations)
public NetworkFileBackedWrapper getWrapper()
public void setWrapper(NetworkFileBackedWrapper wrapper)
public EnsembleSA getEnsemble()
public void setEnsemble(EnsembleSA ensemble)
public double getLastChance()
public NetworkSA.LastAction getLastAction()