|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
public abstract class Example
It is an abstract class to describe all necessary functions of any store.
| Field Summary | |
|---|---|
IntVar |
cost
It specifies the cost function, null if no cost function is used. |
Search |
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. |
java.util.ArrayList<Var> |
vars
It contains all variables used within a specific example. |
| Constructor Summary | |
|---|---|
Example()
|
|
| Method Summary | |
|---|---|
boolean |
creditSearch(int credits,
int backtracks,
int maxDepth)
It uses credit search to solve a problem. |
Search |
getSearch()
It returns the search used within an example. |
java.util.ArrayList<Var> |
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(java.util.ArrayList<Var> masterVars,
java.util.ArrayList<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(java.util.ArrayList<Constraint> guidingShaving,
boolean printInfo)
It searches with shaving which is guided by supplied constraints. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.ArrayList<Var> vars
public IntVar cost
public Store store
public Search search
| Constructor Detail |
|---|
public Example()
| Method Detail |
|---|
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(java.util.ArrayList<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 discrepancies
public boolean searchMaxRegretOptimal()
public boolean searchSmallestMiddle()
public boolean searchSmallestMedian()
public boolean searchSmallestMin()
public boolean searchMasterSlave(java.util.ArrayList<Var> masterVars,
java.util.ArrayList<Var> slaveVars)
masterVars - it specifies the search variables used in master search.slaveVars - it specifies the search variables used in slave search.
public Search getSearch()
public Store getStore()
public java.util.ArrayList<Var> 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||