public abstract class ExampleFD extends Object
Modifier and Type | Field and Description |
---|---|
IntVar |
cost
It specifies the cost function, null if no cost function is used.
|
Search<IntVar> |
search
It specifies the search procedure used by a given example.
|
Store |
store
It specifies the constraint store responsible for holding information
about constraints and variables.
|
List<IntVar> |
vars
It contains all variables used within a specific example.
|
Constructor and Description |
---|
ExampleFD() |
Modifier and Type | Method and Description |
---|---|
boolean |
creditSearch(int credits,
int backtracks,
int maxDepth)
It uses credit search to solve a problem.
|
Search<IntVar> |
getSearch()
It returns the search used within an example.
|
List<IntVar> |
getSearchVariables()
It returns an array list of variables used to model the example.
|
Store |
getStore()
It specifies the constraint store used within an example.
|
abstract void |
model()
It specifies a standard way of modeling the problem.
|
static void |
printMatrix(IntVar[][] matrix,
int rows,
int cols)
It prints a matrix of variables.
|
boolean |
search()
It specifies simple search method based on input order and lexigraphical
ordering of values.
|
boolean |
searchAllAtOnce()
It specifies simple search method based on most constrained static and lexigraphical
ordering of values.
|
boolean |
searchAllOptimal()
It searches for all solutions with the optimal value.
|
boolean |
searchLDS(int noDiscrepancy)
It searches for solution using Limited Discrepancy Search.
|
boolean |
searchMasterSlave(List<Var> masterVars,
List<Var> slaveVars)
It conducts master-slave search.
|
boolean |
searchMaxRegretOptimal()
It searches for optimal solution using max regret variable ordering
and indomain min for value ordering.
|
boolean |
searchMiddle()
It searches using an input order search with indomain based on middle value.
|
boolean |
searchMostConstrainedStatic()
It specifies simple search method based variable order which
takes into account the number of constraints attached to a variable
and lexigraphical ordering of values.
|
boolean |
searchOptimal()
It specifies simple search method based on input order and lexigraphical
ordering of values.
|
boolean |
searchSmallestDomain(boolean optimal)
It specifies simple search method based on smallest domain variable order
and lexigraphical ordering of values.
|
boolean |
searchSmallestMedian()
It searches using smallest domain variable ordering and
indomain middle value ordering.
|
boolean |
searchSmallestMiddle()
It searches using smallest domain variable ordering and
indomain middle value ordering.
|
boolean |
searchSmallestMin()
It searches using Smallest Min variable ordering heuristic and indomainMin value
ordering heuristic.
|
boolean |
searchWeightedDegree()
It specifies simple search method based on weighted degree variable order
and lexigraphical ordering of values.
|
boolean |
searchWithMaxRegret()
It uses MaxRegret variable ordering heuristic to search for a solution.
|
boolean |
searchWithRestarts()
It conducts the search with restarts from which the no-goods are derived.
|
boolean |
shavingSearch(List<Constraint> guidingShaving,
boolean printInfo)
It searches with shaving which is guided by supplied constraints.
|
public IntVar cost
public Store store
public abstract void model()
public boolean search()
public boolean searchOptimal()
public boolean searchAllOptimal()
public boolean searchSmallestDomain(boolean optimal)
optimal
- it specifies if the search the optimal solution takes place.public boolean searchWeightedDegree()
public boolean searchMostConstrainedStatic()
public boolean searchAllAtOnce()
public boolean searchMiddle()
public boolean shavingSearch(List<Constraint> guidingShaving, boolean printInfo)
guidingShaving
- the array of constraints proposing shaving candidates.printInfo
- it specifies if that function should print any info.public boolean searchWithRestarts()
public boolean creditSearch(int credits, int backtracks, int maxDepth)
credits
- the number of credits available.backtracks
- the maximum number of backtracks used when a path exhausts its credits.maxDepth
- the maximum depth to which the credit distribution takes place.public boolean searchWithMaxRegret()
public boolean searchLDS(int noDiscrepancy)
noDiscrepancy
- maximal number of discrepanciespublic boolean searchMaxRegretOptimal()
public boolean searchSmallestMiddle()
public boolean searchSmallestMedian()
public boolean searchSmallestMin()
public boolean searchMasterSlave(List<Var> masterVars, List<Var> slaveVars)
masterVars
- it specifies the search variables used in master search.slaveVars
- it specifies the search variables used in slave search.public Search<IntVar> getSearch()
public Store getStore()
public List<IntVar> getSearchVariables()
public static void printMatrix(IntVar[][] matrix, int rows, int cols)
matrix
- matrix containing the grounded variables.rows
- number of elements in the first dimension.cols
- number of elements in the second dimension.Copyright © 2022. All rights reserved.