Package net.sf.tweety.math.opt.solver
Class SimulatedAnnealingOnConstrProb
- java.lang.Object
-
- net.sf.tweety.math.opt.solver.Solver
-
- net.sf.tweety.math.opt.solver.SimulatedAnnealingOnConstrProb
-
public class SimulatedAnnealingOnConstrProb extends Solver
implements the Simulated Annealing algorithm for optimization problems- Author:
- Sebastian Franke
-
-
Constructor Summary
Constructors Constructor Description SimulatedAnnealingOnConstrProb(double startTemp, double decreasePerIt, int maxStepsWithNoImprove)
-
Method Summary
Modifier and Type Method Description java.util.Map<Variable,Term>
chooseANeighbor(java.util.Map<Variable,Term> currSol, int minIterations, int maxIterations, double threshold)
java.util.Map<Variable,Term>
solve(ConstraintSatisfactionProblem problem)
Computes a solution to the given constraint satisfaction or optimization problem, i.e.-
Methods inherited from class net.sf.tweety.math.opt.solver.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, isInstalled, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
-
-
-
Method Detail
-
chooseANeighbor
public java.util.Map<Variable,Term> chooseANeighbor(java.util.Map<Variable,Term> currSol, int minIterations, int maxIterations, double threshold)
- Parameters:
minIterations
- : the minimum amount of solutions to be createdmaxIterations
- : the maximum amount of solutions to be createdthreshold
- : if a solution with the quality of threshold is reached we do maximum 10 more triescurrSol
- : the solution that every newly created solution uses as a initial solution in createNewSol- Returns:
- the best solution that was found and is a mutant of currSol
-
solve
public java.util.Map<Variable,Term> solve(ConstraintSatisfactionProblem problem)
Description copied from class:Solver
Computes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.
-
-