|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.constraints.impl.AbstractProblem
public abstract class AbstractProblem
Problem - a placeholder for all components used to represent and resolve a constraint satisfaction problem (Problem). A Problem usually consists of two parts:
To find the problem solutions, javax.constraints uses search algorithms presented using objects of the predefined type Goal. Goals are building blocks to define different search algorithms.
Var,
Constraint,
Goal| Field Summary |
|---|
| Fields inherited from interface javax.constraints.Problem |
|---|
JSR331_VERSION |
| Constructor Summary | |
|---|---|
AbstractProblem(java.lang.String name)
|
|
| Method Summary | |
|---|---|
Constraint |
add(Constraint constraint)
Adds a Constraint "constraint" to the problem, then returns the constraint. |
Constraint |
add(java.lang.String name,
Constraint constraint)
Gives a Constraint "constraint" a new name "name", adds the Constraint to the problem and returns the newly added Constraint. |
Var |
add(java.lang.String name,
Var var)
Gives the Var variable "var" a new name "name", adds it to the problem, and returns the newly added Var. |
VarReal |
add(java.lang.String name,
VarReal var)
Gives the VarReal variable "var" a new name "name", adds it to the problem, and returns the newly added VarReal. |
Var |
add(Var var)
Adds a Var variable "var" to the problem, and returns the newly added Var. |
VarBool |
add(VarBool varBool)
Adds a VarBool variable "var" to the problem, and returns the newly added Var. |
VarReal |
add(VarReal var)
Adds a VarReal variable "var" to the problem, and returns the newly added VarReal. |
void |
add(VarString var)
|
Reversible |
addReversible(java.lang.String name,
int value)
Creates a Reversible integer with the name "name" and value "value" and returns the newly added Reversible. |
Var[] |
addVarArray(java.lang.String arrayName,
java.lang.String[] varNames)
Creates an array of Var variables with name "arrayName". |
Var[] |
addVarArray(java.lang.String name,
Var[] vars)
Gives the array of Var variables "vars" a new name "name", adds the array of variables to the problem, and returns the newly added Var array. |
Constraint |
allDiff(VarList vars)
This method create a new Constraint stating that all of the elements of the list of variables "vars" must take different values from each other. |
Constraint |
and(Constraint[] array)
Returns an "AND" Constraint. |
abstract Var |
createVariable(java.lang.String name,
int min,
int max)
Creates a Var with the name "name" and domain [min;max] of the default domain type, and returns the newly added Var. |
abstract void |
debug(java.lang.String text)
Log the String parameter "text" |
Var |
element(int[] array,
Var indexVar)
Returns a constrained integer variable that is an element of the integer "array" with index defined as another constrained integer variable "indexVar". |
VarSet |
element(java.util.Set<java.lang.Integer>[] sets,
Var indexVar)
Creates a set variable that corresponds to sets[index] |
Var |
element(Var[] array,
Var indexVar)
Returns a constrained integer variable that is an element of the "array" of variables with index defined as another constrained integer variable "indexVar". |
Var |
element(VarList list,
Var indexVar)
|
abstract void |
error(java.lang.String text)
Log the String parameter "text" |
java.lang.String |
getAPIVersion()
Returns JSR331 API version number |
Constraint |
getConstraint(java.lang.String name)
Returns the Constraint the name "name", or null if no such constraints exists in the problem. |
Constraint[] |
getConstraints()
Returns an array of Objects containing the Constraints previously added to the problem. |
DomainType |
getDomainType()
|
Constraint |
getFalseConstraint()
Returns the constant constraint that always will fail when it is posted or executed. |
abstract java.lang.String |
getImplVersion()
Returns JSR331 Implementation version number |
java.lang.String |
getName()
Returns the problem name |
double |
getRealPrecision()
Returns the precision for VarReals |
Solver |
getSolver()
Returns an instance of a Solver associated with this problem. |
Constraint |
getTrueConstraint()
Returns the constant constraint that always succeeds when it is posted or executed. |
Var |
getVar(java.lang.String name)
Returns the Var variable with the name "name", or null if no such variable exists in the problem. |
Var[] |
getVarArray(java.lang.String name)
Returns the array of Var variables with the name "name", or null if no such array exists in the problem. |
VarBool[] |
getVarBools()
Returns an array containing the VarBool variables previously added to the problem. |
VarMatrix |
getVarMatrix(java.lang.String name)
|
VarReal |
getVarReal(java.lang.String name)
Returns the VarReal variable with the name "name", or null if no such variable exists in the problem. |
VarReal[] |
getVarReals()
Returns an array containing the VarReal variables previously added to the problem. |
Var[] |
getVars()
Returns an array containing the Var variables previously added to the problem. |
VarReal[] |
getVarSets()
Returns an array containing the VarSet variables previously added to the problem. |
VarString |
getVarString(java.lang.String name)
|
VarString[] |
getVarStrings()
|
boolean |
isSolverCreated()
|
Constraint |
linear(VarString var,
java.lang.String oper,
java.lang.String value)
|
void |
log(Constraint[] constraints)
Logs all Constraints contained in the array "constraints". |
abstract void |
log(java.lang.String text)
Log the String parameter "text" |
void |
log(java.lang.String text,
Var[] vars)
Logs the String "text" and then all integer constrained variables added to the problem. |
void |
log(java.lang.String text,
VarReal[] vars)
Logs the String "text" and then all real constrained variables contained in the array "vars". |
void |
log(java.lang.String text,
VarSet[] vars)
Logs the String "text" and then all constrained set variables contained in the array "vars". |
void |
log(Var[] vars)
Logs the integer constrained variables contained in the array "vars". |
void |
log(VarList vars)
|
void |
log(VarReal[] vars)
Logs the real constrained variables contained in the array "vars". |
void |
log(VarSet[] vars)
Logs the constrained set variables contained in the array "vars". |
Var |
max(Var[] vars)
Returns a constrained integer variable that is equal to the maximal variable in the array "arrayOfVariables" when they are all instantiated. |
Var |
max(VarList listOfVariables)
|
Var |
max(Var var1,
Var var2)
Returns a constrained integer variable that is equal to the maximal of two variablea var1 or var 2 when they are both instantiated. |
Var |
min(Var[] vars)
Returns a constrained integer variable that is equal to the minimal variable in the array "arrayOfVariables" when they are all instantiated. |
Var |
min(VarList listOfVariables)
|
Var |
min(Var var1,
Var var2)
Returns a constrained integer variable that is equal to the minimal of two variablea var1 or var 2 when they are both instantiated. |
void |
notImplementedException(java.lang.String feature)
|
abstract void |
post(Constraint constraint)
This method takes a constraint's implementation and uses its own implementation-specific post-method. |
Constraint |
post(int[] array,
VarList vars,
java.lang.String oper,
int value)
|
Constraint |
post(int[] array,
VarList vars,
java.lang.String oper,
Var var)
|
Constraint |
post(java.lang.String name,
java.lang.String symbolicExpression)
Creates a Constraint based on the symbolicExpression such as "x*y-z<3*r", adds this constraint to the problem, and returns the newly added Constraint. |
Constraint |
post(VarList vars,
java.lang.String oper,
int value)
Creates and posts a constraint: sum of vars |
Constraint |
post(VarList vars,
java.lang.String oper,
Var var)
Creates and posts a constraint: sum of vars "oper" var |
Constraint |
post(VarString var,
java.lang.String oper,
java.lang.String value)
|
Constraint |
post(VarString var1,
java.lang.String oper,
VarString var2)
|
Constraint |
post(Var var1,
Var var2,
java.lang.String oper,
int value)
Creates and posts a constraint: (var1 + var2) "oper" value |
Constraint |
post(Var var1,
Var var2,
java.lang.String oper,
Var var)
Creates and posts a constraint: (var1 + var2) "oper" var |
Constraint |
postAllDiff(java.util.ArrayList<Var> vars)
Similar to postAllDiff for variables saved in the ArrayList vars |
Constraint |
postAllDiff(Var[] vars)
This constraint is a synonym for constraintAllDifferent |
Constraint |
postAllDifferent(java.util.ArrayList<Var> vars)
Similar to postAllDifferent for variables saved in the ArrayList vars |
Constraint |
postAllDifferent(java.util.List vars)
|
Constraint |
postAllDifferent(Var[] vars)
Creates and posts a new Constraint stating that all of the elements of the array of variables "vars" must take different values from each other. |
Constraint |
postAllDifferent(VarList vars)
|
Constraint |
postAnd(Constraint c1,
Constraint c2)
Creates and posts a constraint an "AND" Constraint. |
Constraint |
postCardinality(Var[] vars,
Var cardVar,
java.lang.String oper,
int value)
This method is similar to the one above but instead of “var” it uses "value" |
Constraint |
postCardinality(Var[] vars,
Var cardVar,
java.lang.String oper,
Var var)
This method creates a new cardinality constraint “cardinality(vars,cardVar) < value”. |
Constraint |
postCardinality(VarList vars,
int cardValue,
java.lang.String oper,
int value)
|
Constraint |
postCardinality(VarList vars,
int cardValue,
java.lang.String oper,
Var var)
|
Constraint |
postCardinality(VarList vars,
Var cardVar,
java.lang.String oper,
int value)
|
Constraint |
postCardinality(VarList vars,
Var cardVar,
java.lang.String oper,
Var var)
|
Constraint |
postElement(java.util.Set[] arrayOfSets,
Var indexVar,
java.lang.String oper,
VarSet var)
Creates and posts a constraint: arrayOfSets[indexVar] |
Constraint |
postGlobalCardinality(Var[] vars,
int[] values,
int[] cardMin,
int[] cardMax)
For each index i the number of times the value "values[i]" occurs in the array "vars" should be cardMin[i] and cardMax[i] (inclusive) |
Constraint |
postGlobalCardinality(Var[] vars,
int[] values,
Var[] cardinalityVars)
Creates and posts a new global cardinality constraint that states: |
Constraint |
postGlobalCardinality(VarList vars,
int[] values,
int[] cardMin,
int[] cardMax)
|
Constraint |
postGlobalCardinality(VarList vars,
int[] values,
Var[] cardinalityVars)
|
Constraint |
postIfThen(Constraint constraint1,
Constraint constraint2)
Creates and posts a constraint that states the implication: constraint1 => constraint2. |
Constraint |
postLinear(int[] array,
Var[] vars,
java.lang.String oper,
int value)
Synonym for constraint(int[] array, Var[] vars, String oper, int value) |
Constraint |
postLinear(int[] array,
Var[] vars,
java.lang.String oper,
Var var)
Synonym for constraint(int[] array, Var[] vars, String oper, Var var) |
Constraint |
postLinear(int[] array,
VarList vars,
java.lang.String oper,
int value)
|
Constraint |
postLinear(int[] array,
VarList vars,
java.lang.String oper,
Var var)
|
Constraint |
postLinear(Var[] vars,
java.lang.String oper,
int value)
Synonym for constraint(Var[] vars, String oper, int value) |
Constraint |
postLinear(Var[] vars,
java.lang.String oper,
Var var)
Synonym for constraint(Var[] vars, String oper, Var var) |
Constraint |
postLinear(Var var,
java.lang.String oper,
int value)
Synonym for constraint(Var var, String oper, int value) |
Constraint |
postLinear(Var var1,
java.lang.String oper,
Var var2)
Synonym for constraint(Var var1, String oper, Var var2) |
Constraint |
postMax(Var[] vars,
java.lang.String oper,
int value)
Creates and posts a constraint: max(vars) "oper" value where max(vars) is a maximal variable in the array "vars" when they are all instantiated. |
Constraint |
postMax(Var[] vars,
java.lang.String oper,
Var var)
Creates and posts a constraint: max(vars) "oper" var where max(vars) is a maximal variable in the array "vars" when they are all instantiated. |
Constraint |
postMin(Var[] vars,
java.lang.String oper,
int value)
Creates and posts a constraint: min(vars) "oper" value where max(vars) is a minimal variable in the array "vars" when they are all instantiated. |
Constraint |
postMin(Var[] vars,
java.lang.String oper,
Var var)
Creates and posts a constraint: min(vars) "oper" var where max(vars) is a minimal variable in the array "vars" when they are all instantiated. |
Constraint |
postOr(Constraint c1,
Constraint c2)
Creates and posts a constraint an "OR" Constraint. |
void |
remove(java.lang.String varName)
Removes a Var variable by "name". |
Var |
scalProd(int[] arrayOfValues,
VarList vars)
|
void |
setDomainType(DomainType domainType)
Sets the domain type that will be used as the default for subsequent creation of variables using addVar-methods |
void |
setName(java.lang.String name)
Sets the problem name |
void |
setRealPrecision(double value)
Sets the precision for VarReals |
void |
setSolver(Solver solver)
Associates a "solver" with the problem making it available through the method "getSolver()". |
Var |
sum(Var[] vars)
Returns a constrained integer variable that is constrained to be the sum of the variables in the array "vars". |
Var |
sum(VarList vars)
Returns a constrained integer variable that is constrained to be the sum of the variables in the VarList "vars". |
Var |
var(java.lang.String name,
java.lang.String symbolicExpression)
Creates a Var variable based on the symbolicExpression, adds this variable to the problem, and returns the newly added Var. |
Var |
variable(int[] domain)
An equivalent of var("",domain) |
Var |
variable(int min,
int max)
Creates a Var with domain [min;max]. |
Var |
variable(java.lang.String name,
int[] domain)
Creates a Var with the name "name", and domain int[] |
Var |
variable(java.lang.String name,
int min,
int max)
Creates a Var by calling createVariable(name,min,max) and adds this variable to the problem. |
Var |
variable(java.lang.String name,
int min,
int max,
DomainType domainType)
Similar to variable(String name, int min, int max) but also has one more parameter that defines the default domain type |
Var[] |
variableArray(java.lang.String name,
int min,
int max,
int size)
Adds an array of Var variables with the name "name" and domains [min;max] of domain type "type", adds this array of variables to the problem, and returns the newly added Var array. |
VarBool |
variableBool()
Creates a bool var not added to the problem. |
abstract VarBool |
variableBool(java.lang.String name)
Creates a boolean constrained variable with the name "name" and adds this variable to the problem, and returns the newly added VarBool. |
VarList |
variableList()
|
VarMatrix |
variableMatrix(java.lang.String name,
int min,
int max,
int rows,
int columns)
|
VarReal |
variableReal(java.lang.String name)
Creates a VarReal with the name "name" and default domain [Double.MIN_VALUE+1;Double.MAX_VALUE-1], adds this variable to the problem, and returns the newly added VarReal. |
VarReal |
variableReal(java.lang.String name,
double min,
double max)
Creates a VarReal with the name "name" and domain [min;max], adds this variable to the problem, and returns the newly added VarReal. |
VarSet |
variableSet(java.lang.String name,
int[] values)
Creates a constrained set variable VarSet with the name "name" and which domain consists of integer values from the array "value". |
VarSet |
variableSet(java.lang.String name,
int min,
int max)
Creates a constrained set variable VarSet with the name "name" and domain of integer values from "min" to "max" inclusive. |
VarSet |
variableSet(java.lang.String name,
java.util.Set set)
Creates a constrained set variable VarSet with the name "name" and which domain consists of integer values from the Set "set". |
VarString |
variableString(java.lang.String name,
java.lang.String[] allStrings)
|
Var[] |
varSquare(java.lang.String name,
int min,
int max,
int size)
Creates a 2-dimensional array of Var variables, with dimensions "size"x"size". |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.constraints.Problem |
|---|
allDiff, linear, linear, loadFromXML, post, post, post, post, post, post, postCardinality, postCardinality, postElement, postElement, postElement, postElement, scalProd, storeToXML |
| Constructor Detail |
|---|
public AbstractProblem(java.lang.String name)
| Method Detail |
|---|
public Constraint add(Constraint constraint)
add in interface Problemconstraint - the constraint to add to the problem.
public Constraint add(java.lang.String name,
Constraint constraint)
name - the new name for the Constraint.constraint - the Constraint to add to the problem
public Var add(java.lang.String name,
Var var)
add in interface Problemname - the new name for var.var - the variable to add to the problem.
public VarReal add(java.lang.String name,
VarReal var)
name - the new name for var.var - the real variable to add to the problem.
public Var add(Var var)
add in interface Problemvar - the variable to add to the problem.
public VarBool add(VarBool varBool)
add in interface ProblemvarBool - the bolean variable to add to the problem.
public VarReal add(VarReal var)
add in interface Problemvar - the real variable to add to the problem.
public void add(VarString var)
add in interface Problem
public Reversible addReversible(java.lang.String name,
int value)
name - the name for the new reversible.value - the initial value
public Var[] addVarArray(java.lang.String arrayName,
java.lang.String[] varNames)
arrayName - the name for the new Var array.varNames - an array of names of already added variables, which are to
form the new array.
public Var[] addVarArray(java.lang.String name,
Var[] vars)
name - the new name for the array "vars".vars - the array of Var variables to add to the problem.
public Constraint allDiff(VarList vars)
Problem
allDiff in interface Problemvars - the VarList which must all take different values.
public Constraint and(Constraint[] array)
array - the array of constraints forming the new "AND" Constraint.
public abstract Var createVariable(java.lang.String name,
int min,
int max)
Problem
createVariable in interface Problemname - the name for the new Var.min - the minimum value in the domain for the new Var.max - the maximum value in the domain for the new Var.
public abstract void debug(java.lang.String text)
public Var element(int[] array,
Var indexVar)
element in interface Problemarray - an array of integersindexVar - a constrained integer variable whose domain serves as an index into
the array.
public VarSet element(java.util.Set<java.lang.Integer>[] sets,
Var indexVar)
throws java.lang.Exception
element in interface Problemsets - indexVar -
java.lang.Exception
public Var element(Var[] array,
Var indexVar)
element in interface Problemarray - an array of Var variables.indexVar - a constrained integer variable whose domain serves as an index into
the array.
public Var element(VarList list,
Var indexVar)
element in interface Problempublic abstract void error(java.lang.String text)
public java.lang.String getAPIVersion()
Problem
getAPIVersion in interface Problempublic final Constraint getConstraint(java.lang.String name)
Problem
getConstraint in interface Problemname - the name of the desired constraint.
public Constraint[] getConstraints()
getConstraints in interface Problempublic final DomainType getDomainType()
public Constraint getFalseConstraint()
getFalseConstraint in interface Problempublic abstract java.lang.String getImplVersion()
Problem
getImplVersion in interface Problempublic final java.lang.String getName()
Problem
getName in interface Problempublic double getRealPrecision()
getRealPrecision in interface Problempublic Solver getSolver()
getSolver in interface Problempublic Constraint getTrueConstraint()
getTrueConstraint in interface Problempublic Var getVar(java.lang.String name)
getVar in interface Problemname - the name of the desired variable.
public Var[] getVarArray(java.lang.String name)
getVarArray in interface Problemname - the name of the desired array of Var variables.
public VarBool[] getVarBools()
getVarBools in interface Problempublic VarMatrix getVarMatrix(java.lang.String name)
getVarMatrix in interface Problempublic VarReal getVarReal(java.lang.String name)
getVarReal in interface Problemname - the name of the desired variable.
public VarReal[] getVarReals()
getVarReals in interface Problempublic Var[] getVars()
getVars in interface Problempublic VarReal[] getVarSets()
getVarSets in interface Problempublic VarString getVarString(java.lang.String name)
getVarString in interface Problempublic VarString[] getVarStrings()
getVarStrings in interface Problempublic boolean isSolverCreated()
public Constraint linear(VarString var,
java.lang.String oper,
java.lang.String value)
linear in interface Problempublic void log(Constraint[] constraints)
public abstract void log(java.lang.String text)
log in interface Problem
public void log(java.lang.String text,
Var[] vars)
text - the text to log prior to logging all the integer constrained
variables added to the problem.
public void log(java.lang.String text,
VarReal[] vars)
text - the text to log prior to logging all the real constrained
variables added to the problem.
public void log(java.lang.String text,
VarSet[] vars)
text - the text to log prior to logging all the constrained set
variables added to the problem.public void log(Var[] vars)
log in interface Problemvars - the array of Vars to log.public void log(VarList vars)
log in interface Problempublic void log(VarReal[] vars)
vars - the array of VarReals to log.public void log(VarSet[] vars)
vars - the array of VarSets to log.public Var max(Var[] vars)
max in interface Problemvars - the array of variables from which we desire the maximal
variable.
public Var max(VarList listOfVariables)
max in interface Problem
public Var max(Var var1,
Var var2)
Problem
max in interface Problemvar1 - integer variablevar2 - integer variable
public Var min(Var[] vars)
min in interface Problemvars - the array of variables from which we desire the minimal
variable.
public Var min(VarList listOfVariables)
min in interface Problem
public Var min(Var var1,
Var var2)
Problem
min in interface Problemvar1 - integer variablevar2 - integer variable
public void notImplementedException(java.lang.String feature)
public abstract void post(Constraint constraint)
post in interface Problemconstraint - the constraint to post.
java.lang.RuntimeException - if a failure happened during the posting
public Constraint post(int[] array,
VarList vars,
java.lang.String oper,
int value)
post in interface Problem
public Constraint post(int[] array,
VarList vars,
java.lang.String oper,
Var var)
public Constraint post(java.lang.String name,
java.lang.String symbolicExpression)
post in interface Problemname - the name for a new constraintsymbolicExpression - a string that defines a constrained expression that uses
already defined variables, e.g. "x*y-z<3*r"
public Constraint post(VarList vars,
java.lang.String oper,
int value)
Problem
post in interface Problem
public Constraint post(VarList vars,
java.lang.String oper,
Var var)
Problem
post in interface Problem
public Constraint post(VarString var,
java.lang.String oper,
java.lang.String value)
post in interface Problem
public Constraint post(VarString var1,
java.lang.String oper,
VarString var2)
post in interface Problem
public Constraint post(Var var1,
Var var2,
java.lang.String oper,
int value)
post in interface Problem
public Constraint post(Var var1,
Var var2,
java.lang.String oper,
Var var)
post in interface Problempublic Constraint postAllDiff(java.util.ArrayList<Var> vars)
Problem
postAllDiff in interface Problempublic Constraint postAllDiff(Var[] vars)
postAllDiff in interface Problempublic Constraint postAllDifferent(java.util.ArrayList<Var> vars)
Problem
postAllDifferent in interface Problempublic Constraint postAllDifferent(java.util.List vars)
postAllDifferent in interface Problempublic Constraint postAllDifferent(Var[] vars)
postAllDifferent in interface Problemvars - the array of Vars which must all take different values.
public Constraint postAllDifferent(VarList vars)
postAllDifferent in interface Problem
public Constraint postAnd(Constraint c1,
Constraint c2)
postAnd in interface Problemc1 - a Constraintc2 - a Constraint
public Constraint postCardinality(Var[] vars,
Var cardVar,
java.lang.String oper,
int value)
postCardinality in interface Problem
public Constraint postCardinality(Var[] vars,
Var cardVar,
java.lang.String oper,
Var var)
postCardinality in interface Problem
public Constraint postCardinality(VarList vars,
int cardValue,
java.lang.String oper,
int value)
postCardinality in interface Problem
public Constraint postCardinality(VarList vars,
int cardValue,
java.lang.String oper,
Var var)
postCardinality in interface Problem
public Constraint postCardinality(VarList vars,
Var cardVar,
java.lang.String oper,
int value)
postCardinality in interface Problem
public Constraint postCardinality(VarList vars,
Var cardVar,
java.lang.String oper,
Var var)
postCardinality in interface Problem
public Constraint postElement(java.util.Set[] arrayOfSets,
Var indexVar,
java.lang.String oper,
VarSet var)
postElement in interface ProblemarrayOfSets - an array of integer sets.indexVar - a constrained integer variable whose domain serves as
an index into the "arrayOfSets".
java.lang.RuntimeException - if the posting fails
public Constraint postGlobalCardinality(Var[] vars,
int[] values,
int[] cardMin,
int[] cardMax)
postGlobalCardinality in interface Problemvars - array of constrained integer variablesvalues - array of integer values within domain of all varscardMin - array of integers that serves as lower bounds for values[i]cardMax - array of integers that serves as upper bounds for values[i]
Note that arrays values, cardMin, and cardMax should have the same size
otherwise a RuntimeException will be thrown
public Constraint postGlobalCardinality(Var[] vars,
int[] values,
Var[] cardinalityVars)
ProblemFor each index i the number of times the value "values[i]" occurs in the array "vars" is exactly "cardinalityVars[i]"
postGlobalCardinality in interface Problemvars - array of constrained integer variablesvalues - array of integer valuescardinalityVars - array of constrained integer variables (cardinality variables)
public Constraint postGlobalCardinality(VarList vars,
int[] values,
int[] cardMin,
int[] cardMax)
postGlobalCardinality in interface Problem
public Constraint postGlobalCardinality(VarList vars,
int[] values,
Var[] cardinalityVars)
postGlobalCardinality in interface Problem
public Constraint postIfThen(Constraint constraint1,
Constraint constraint2)
postIfThen in interface Problemconstraint1 - If-Constraint in the implication.constraint2 - Then-Constraint in the implication.
public Constraint postLinear(int[] array,
Var[] vars,
java.lang.String oper,
int value)
Problem
postLinear in interface Problem
public Constraint postLinear(int[] array,
Var[] vars,
java.lang.String oper,
Var var)
Problem
postLinear in interface Problem
public Constraint postLinear(int[] array,
VarList vars,
java.lang.String oper,
int value)
postLinear in interface Problem
public Constraint postLinear(int[] array,
VarList vars,
java.lang.String oper,
Var var)
public Constraint postLinear(Var[] vars,
java.lang.String oper,
int value)
Problem
postLinear in interface Problem
public Constraint postLinear(Var[] vars,
java.lang.String oper,
Var var)
Problem
postLinear in interface Problem
public Constraint postLinear(Var var,
java.lang.String oper,
int value)
Problem
postLinear in interface Problem
public Constraint postLinear(Var var1,
java.lang.String oper,
Var var2)
Problem
postLinear in interface Problem
public Constraint postMax(Var[] vars,
java.lang.String oper,
int value)
postMax in interface Problemvars - oper - value -
public Constraint postMax(Var[] vars,
java.lang.String oper,
Var var)
postMax in interface Problemvars - oper - var -
public Constraint postMin(Var[] vars,
java.lang.String oper,
int value)
postMin in interface Problemvars - oper - value -
public Constraint postMin(Var[] vars,
java.lang.String oper,
Var var)
postMin in interface Problemvars - oper - var -
public Constraint postOr(Constraint c1,
Constraint c2)
postOr in interface Problemc1 - a Constraintc2 - a Constraint
public void remove(java.lang.String varName)
varName - the name of the variable to be removed from the problem.
public Var scalProd(int[] arrayOfValues,
VarList vars)
scalProd in interface Problempublic final void setDomainType(DomainType domainType)
Problem
setDomainType in interface Problempublic final void setName(java.lang.String name)
setName in interface Problemname - public void setRealPrecision(double value)
setRealPrecision in interface Problemvalue - the new precision for VarRealspublic void setSolver(Solver solver)
setSolver in interface Problemsolver - public Var sum(Var[] vars)
sum in interface Problemvars - the array of variables from which we desire the sum.
public Var sum(VarList vars)
sum in interface Problemvars - the list of variables from which we desire the sum.
public Var var(java.lang.String name,
java.lang.String symbolicExpression)
symbolicExpression - a string that defines a constrained expression that uses
already defined variables.
public Var variable(int[] domain)
Problem
variable in interface Problemdomain - an array specifying the values in the domain for the new Var.
public Var variable(int min,
int max)
Problem
variable in interface Problemmin - the minimum value in the domain for the new Var.max - the maximum value in the domain for the new Var.
public Var variable(java.lang.String name,
int[] domain)
variable in interface Problemname - a stringdomain - an array of integers
public Var variable(java.lang.String name,
int min,
int max)
Problem
variable in interface Problemname - the name for the new Var.min - the minimum value in the domain for the new Var.max - the maximum value in the domain for the new Var.
public Var variable(java.lang.String name,
int min,
int max,
DomainType domainType)
variable in interface Problemname - the name for the new Varmin - the minimum value in the domain for the new Varmax - the maximum value in the domain for the new VardomainType - DomainType
public Var[] variableArray(java.lang.String name,
int min,
int max,
int size)
variableArray in interface Problemname - the name for the new Var array.min - the minimum value in the domains for the new Vars in the new
Var array.max - the maximum value in the domain for the new Vars in the new
Var array.size - the number of Vars in the new Var array.
public VarBool variableBool()
variableBool in interface Problempublic abstract VarBool variableBool(java.lang.String name)
variableBool in interface Problemname - the name for the new Var.
public VarList variableList()
variableList in interface Problem
public VarMatrix variableMatrix(java.lang.String name,
int min,
int max,
int rows,
int columns)
variableMatrix in interface Problempublic VarReal variableReal(java.lang.String name)
variableReal in interface Problemname - the name for the new VarReal.
public VarReal variableReal(java.lang.String name,
double min,
double max)
variableReal in interface Problemname - the name for the new VarReal.min - the minimum value in the domain for the new VarReal.max - the maximum value in the domain for the new VarReal.
public VarSet variableSet(java.lang.String name,
int[] values)
throws java.lang.Exception
variableSet in interface Problemname - values -
java.lang.Exception
public VarSet variableSet(java.lang.String name,
int min,
int max)
throws java.lang.Exception
variableSet in interface Problemname - min - max -
java.lang.Exception
public VarSet variableSet(java.lang.String name,
java.util.Set set)
throws java.lang.Exception
variableSet in interface Problemname - set -
java.lang.Exception
public VarString variableString(java.lang.String name,
java.lang.String[] allStrings)
variableString in interface Problem
public Var[] varSquare(java.lang.String name,
int min,
int max,
int size)
min - the minimum value in the domains for the new Vars in the new
Var array.max - the maximum value in the domain for the new Vars in the new
Var array.size - the dimensions of the new 2-dimensional array. The array
contains size*size elements.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||