Class IteratedLocalSearch
- java.lang.Object
-
- org.tweetyproject.math.opt.solver.Solver
-
- org.tweetyproject.math.opt.solver.CombinatoricsSolver
-
- org.tweetyproject.math.opt.solver.IteratedLocalSearch
-
public class IteratedLocalSearch extends CombinatoricsSolver
implements the Iterates local search algorithm for combinatorial problems- Author:
- Sebastian Franke
-
-
Constructor Summary
Constructors Constructor Description IteratedLocalSearch(double perturbationStrength, int maxnumberOfRestarts, int maxIterations)
-
Method Summary
Modifier and Type Method Description java.util.ArrayList<ElementOfCombinatoricsProb>
bestNeighbor(java.util.ArrayList<ElementOfCombinatoricsProb> currSol)
performs one step of a local searchjava.util.ArrayList<ElementOfCombinatoricsProb>
pertubate(java.util.ArrayList<ElementOfCombinatoricsProb> currSol)
changes the solution drastically to escape a local minimumjava.util.ArrayList<ElementOfCombinatoricsProb>
solve(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
-
-
-
-
Method Detail
-
bestNeighbor
public java.util.ArrayList<ElementOfCombinatoricsProb> bestNeighbor(java.util.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 java.util.ArrayList<ElementOfCombinatoricsProb> pertubate(java.util.ArrayList<ElementOfCombinatoricsProb> currSol)
changes the solution drastically to escape a local minimum- Parameters:
currSol
- the solution to be pertubated- Returns:
- the new currSol
-
solve
public java.util.ArrayList<ElementOfCombinatoricsProb> solve(CombinatoricsProblem prob)
-
-