Class IteratedLocalSearch
java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.CombinatoricsSolver
org.tweetyproject.math.opt.solver.IteratedLocalSearch
implements the Iterates local search algorithm
for combinatorial problems
- Author:
- Sebastian Franke
-
Constructor Summary
ConstructorsConstructorDescriptionIteratedLocalSearch
(double perturbationStrength, int maxnumberOfRestarts, int maxIterations) -
Method Summary
Modifier and TypeMethodDescriptionbestNeighbor
(ArrayList<ElementOfCombinatoricsProb> currSol) performs one step of a local searchpertubate
(ArrayList<ElementOfCombinatoricsProb> currSol) changes the solution drastically to escape a local minimumsolve
(CombinatoricsProblem prob) Methods inherited from class org.tweetyproject.math.opt.solver.CombinatoricsSolver
solve
Methods inherited from class org.tweetyproject.math.opt.solver.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, isInstalled, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
Constructor Details
-
IteratedLocalSearch
public IteratedLocalSearch(double perturbationStrength, int maxnumberOfRestarts, int maxIterations)
-
-
Method Details
-
bestNeighbor
public ArrayList<ElementOfCombinatoricsProb> bestNeighbor(ArrayList<ElementOfCombinatoricsProb> currSol) performs one step of a local search- Parameters:
currSol
- the current state of which we check the neighborhood- Returns:
- the best neighbor / the current state
-
pertubate
public ArrayList<ElementOfCombinatoricsProb> pertubate(ArrayList<ElementOfCombinatoricsProb> currSol) changes the solution drastically to escape a local minimum- Parameters:
currSol
- the solution to be pertubated- Returns:
- the new currSol
-
solve
-