-
- All Superinterfaces:
ICause
- All Known Implementing Classes:
AdaptiveNeighborhood
,IntNeighbor
,PropagationGuidedNeighborhood
,RandomNeighborhood
,ReversePropagationGuidedNeighborhood
,SequenceNeighborhood
,SetRandomNeighbor
public interface INeighbor extends ICause
An interface that defines services required for the LNS to select variables to freeze-unfreeze (for any type of variables).- Since:
- 18/06/13
- Author:
- Charles Prud'homme
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
fixSomeVariables()
Freezes some variables in order to have a fast computation.default void
init()
Initialize this neighbordefault boolean
isSearchComplete()
void
loadFromSolution(Solution solution)
Load a solution and record itvoid
recordSolution()
Record values of decision variables to freeze some ones during the next LNS rundefault void
restrictLess()
Use less restriction at the beginning of a LNS run in order to get better solutions Called when no solution was found during a LNS run (trapped into a local optimum)-
Methods inherited from interface org.chocosolver.solver.ICause
explain, forEachIntVar
-
-
-
-
Method Detail
-
init
default void init()
Initialize this neighbor
-
recordSolution
void recordSolution()
Record values of decision variables to freeze some ones during the next LNS run
-
fixSomeVariables
void fixSomeVariables() throws ContradictionException
Freezes some variables in order to have a fast computation. The fixed variables are declared as decisions in the decision path.- Throws:
ContradictionException
-
restrictLess
default void restrictLess()
Use less restriction at the beginning of a LNS run in order to get better solutions Called when no solution was found during a LNS run (trapped into a local optimum)
-
isSearchComplete
default boolean isSearchComplete()
- Returns:
- true iff the search is in a complete mode (no fixed variable)
-
loadFromSolution
void loadFromSolution(Solution solution)
Load a solution and record it- Parameters:
solution
- a solution to record
-
-