Package org.jacop.search.sgmpcs
Class SimpleImprovementSearch<T extends IntVar>
java.lang.Object
org.jacop.search.sgmpcs.SimpleImprovementSearch<T>
- Type Parameters:
T
- type of the variable for which choice point is being created.
- All Implemented Interfaces:
ImproveSolution<T>
Defines an interface for defining different methods for selecting next search
decision to be taken. The search decision called choice point will be first
enforced and later upon backtrack a negation of that search decision will be
enforced.
- Version:
- 4.10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
SimpleImprovementSearch.CostListener<T extends IntVar>
Saves the cost produced by a given search -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int[]
boolean
searchFromEliteSolution
(int[] eliteSolution, int failLimit) boolean
searchFromEmptySolution
(int failLimit) void
setPrintInfo
(boolean print) void
setTimeOut
(long timeOut)
-
Field Details
-
printInfo
boolean printInfo -
store
-
vars
-
cost
IntVar cost -
solution
public int[] solution -
searchCost
int searchCost -
timeOut
long timeOut -
failCalculator
-
-
Constructor Details
-
SimpleImprovementSearch
-
-
Method Details
-
searchFromEmptySolution
public boolean searchFromEmptySolution(int failLimit) - Specified by:
searchFromEmptySolution
in interfaceImproveSolution<T extends IntVar>
-
searchFromEliteSolution
public boolean searchFromEliteSolution(int[] eliteSolution, int failLimit) - Specified by:
searchFromEliteSolution
in interfaceImproveSolution<T extends IntVar>
-
getCurrentCost
public int getCurrentCost()- Specified by:
getCurrentCost
in interfaceImproveSolution<T extends IntVar>
-
getSolution
public int[] getSolution()- Specified by:
getSolution
in interfaceImproveSolution<T extends IntVar>
-
getNumberFails
public int getNumberFails()- Specified by:
getNumberFails
in interfaceImproveSolution<T extends IntVar>
-
getFailLimit
public int getFailLimit()- Specified by:
getFailLimit
in interfaceImproveSolution<T extends IntVar>
-
setPrintInfo
public void setPrintInfo(boolean print) - Specified by:
setPrintInfo
in interfaceImproveSolution<T extends IntVar>
-
setTimeOut
public void setTimeOut(long timeOut) - Specified by:
setTimeOut
in interfaceImproveSolution<T extends IntVar>
-