public class Problem
extends javax.constraints.impl.AbstractProblem
| Modifier and Type | Field and Description |
|---|---|
static String |
JSR331_LINEAR_VERSION |
| Modifier and Type | Method and Description |
|---|---|
javax.constraints.Constraint |
allDiff(javax.constraints.Var[] vars) |
Constraint[] |
constraintsWithDerivedVars() |
protected javax.constraints.Solver |
createSolver() |
javax.constraints.Var |
createVariable(String name) |
javax.constraints.Var |
createVariable(String name,
int min,
int max) |
javax.constraints.VarReal |
createVariableReal(String name) |
javax.constraints.VarReal |
createVariableReal(String name,
double min,
double max) |
void |
debug(String text) |
void |
error(String text) |
Constraint |
findConstraintForVariable(String name) |
String |
getImplVersion() |
boolean |
isDerivedVar(javax.constraints.impl.AbstractConstrainedVariable var) |
javax.constraints.Constraint |
linear(javax.constraints.Var var,
String oper,
int value) |
javax.constraints.Constraint |
linear(javax.constraints.Var var1,
String oper,
javax.constraints.Var var2) |
void |
loadFromXML(InputStream in) |
void |
log(String text) |
void |
post(javax.constraints.Constraint constraint) |
javax.constraints.Constraint |
post(double[] coefficients,
javax.constraints.ConstrainedVariable[] vars,
String oper,
javax.constraints.ConstrainedVariable var) |
javax.constraints.Constraint |
post(double[] coefficients,
javax.constraints.ConstrainedVariable[] vars,
String oper,
double value) |
javax.constraints.Constraint |
post(double[] coefficients,
javax.constraints.Var[] vars,
String oper,
double value)
Creates and posts a constraint: array*vars 'oper' value
for an "array: of real coefficients to be multiplied by an array "vars"
of integer constrained variables
|
javax.constraints.Constraint |
post(double[] coefficients,
javax.constraints.VarReal[] vars,
String oper,
double value) |
javax.constraints.Constraint |
post(double[] coefficients,
javax.constraints.VarReal[] vars,
String oper,
javax.constraints.VarReal var) |
javax.constraints.Constraint |
post(int[] coefficients,
javax.constraints.Var[] vars,
String oper,
int value) |
javax.constraints.Constraint |
post(int[] coefficients,
javax.constraints.Var[] vars,
String oper,
javax.constraints.Var var) |
javax.constraints.Constraint |
post(javax.constraints.Var[] vars,
String oper,
int value) |
javax.constraints.Constraint |
post(javax.constraints.Var[] vars,
String oper,
javax.constraints.Var var) |
javax.constraints.Constraint |
post(javax.constraints.VarReal[] vars,
String oper,
double value) |
javax.constraints.Constraint |
post(javax.constraints.VarReal[] vars,
String oper,
int value) |
javax.constraints.Constraint |
post(javax.constraints.VarReal[] vars,
String oper,
javax.constraints.VarReal var) |
javax.constraints.Constraint |
post(javax.constraints.VarReal var,
String oper,
double value) |
javax.constraints.Constraint |
post(javax.constraints.VarReal var,
String oper,
int value) |
javax.constraints.Constraint |
post(javax.constraints.VarReal var1,
String oper,
javax.constraints.Var var2) |
javax.constraints.Constraint |
post(javax.constraints.VarReal var1,
String oper,
javax.constraints.VarReal var2) |
javax.constraints.Constraint |
post(javax.constraints.Var var,
String oper,
int value) |
javax.constraints.Constraint |
post(javax.constraints.Var var1,
String oper,
javax.constraints.Var var2) |
javax.constraints.Constraint |
post(javax.constraints.Var var1,
String oper,
javax.constraints.VarReal var2) |
javax.constraints.Constraint |
postCardinality(javax.constraints.Var[] vars,
int cardValue,
String oper,
int value) |
javax.constraints.Constraint |
postCardinality(javax.constraints.Var[] vars,
int cardValue,
String oper,
javax.constraints.Var var) |
javax.constraints.Constraint |
postElement(int[] array,
javax.constraints.Var indexVar,
String oper,
int value) |
javax.constraints.Constraint |
postElement(int[] array,
javax.constraints.Var indexVar,
String oper,
javax.constraints.Var var) |
javax.constraints.Constraint |
postElement(javax.constraints.Var[] vars,
javax.constraints.Var indexVar,
String oper,
int value) |
javax.constraints.Constraint |
postElement(javax.constraints.Var[] vars,
javax.constraints.Var indexVar,
String oper,
javax.constraints.Var var) |
javax.constraints.Constraint |
postScalProd(javax.constraints.Var var,
String oper,
int[] coefficients,
javax.constraints.Var[] vars)
Creates and posts a constraint: var "oper" scalProd(arrayOfValues,arrayOfVariables)
|
javax.constraints.VarReal |
scalProd(double[] arrayOfValues,
javax.constraints.ConstrainedVariable[] arrayOfVariables) |
javax.constraints.VarReal |
scalProd(double[] arrayOfValues,
javax.constraints.VarReal[] arrayOfVariables)
Returns a real constrained variable equal to the scalar product of an array of values "arrayOfValues"
and an array of variables "arrayOfVariables".
|
javax.constraints.Var |
scalProd(int[] coefficients,
javax.constraints.Var[] vars) |
javax.constraints.Var |
scalProd(String name,
int[] coefficients,
javax.constraints.Var[] vars) |
void |
storeToXML(OutputStream os,
String comment) |
javax.constraints.Var |
sum(String name,
javax.constraints.Var[] vars) |
javax.constraints.Var |
sum(javax.constraints.Var[] vars) |
javax.constraints.VarReal |
sum(javax.constraints.VarReal[] vars) |
javax.constraints.VarBool |
variableBool(String name) |
add, add, add, add, add, add, add, add, addConstraintWithProbability, addReversible, addVarArray, addVarArray, allDiff, and, areThereProbabilityConstraints, element, element, element, element, getAPIVersion, getConstraint, getConstraints, getDomainType, getFalseConstraint, getName, getRealPrecision, getSolver, getTotalConstraintViolation, getTrueConstraint, getVar, getVarArray, getVarArray, getVarBools, getVarMatrix, getVarReal, getVarRealArray, getVarReals, getVars, getVarSets, getVarString, getVarStrings, isNotOneOfConstraint, isNotOneOfConstraint, isOneOfConstraint, isOneOfConstraint, isSolverCreated, linear, linear, log, log, log, log, log, log, log, log, max, max, max, min, min, min, notImplementedException, post, post, post, post, post, post, post, post, post, postAllDiff, postAllDiff, postAllDiff, postAllDifferent, postAllDifferent, postAllDifferent, postAnd, postCardinality, postCardinality, postCardinality, postCardinality, postCardinality, postCardinality, postElement, postGlobalCardinality, postGlobalCardinality, postGlobalCardinality, postGlobalCardinality, postIfThen, postIfThen, postMax, postMax, postMin, postMin, postOr, remove, scalProd, setDomainType, setName, setRealPrecision, setSolver, stringToOper, sum, sum, sum, sum, sum, var, variable, variable, variable, variable, variable, variableArray, variableBool, variableMatrix, variableReal, variableReal, variableSet, variableSet, variableSet, variableString, varSquarepublic static final String JSR331_LINEAR_VERSION
public Problem()
public Problem(String name)
public javax.constraints.Constraint postElement(int[] array,
javax.constraints.Var indexVar,
String oper,
int value)
public javax.constraints.Constraint postElement(int[] array,
javax.constraints.Var indexVar,
String oper,
javax.constraints.Var var)
public javax.constraints.Constraint postElement(javax.constraints.Var[] vars,
javax.constraints.Var indexVar,
String oper,
int value)
public javax.constraints.Constraint postElement(javax.constraints.Var[] vars,
javax.constraints.Var indexVar,
String oper,
javax.constraints.Var var)
public javax.constraints.Constraint post(int[] coefficients,
javax.constraints.Var[] vars,
String oper,
int value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(int[] coefficients,
javax.constraints.Var[] vars,
String oper,
javax.constraints.Var var)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.Var[] vars,
String oper,
int value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.Var[] vars,
String oper,
javax.constraints.Var var)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.Var var,
String oper,
int value)
public javax.constraints.Constraint post(javax.constraints.Var var1,
String oper,
javax.constraints.Var var2)
public javax.constraints.Constraint linear(javax.constraints.Var var,
String oper,
int value)
public javax.constraints.Constraint linear(javax.constraints.Var var1,
String oper,
javax.constraints.Var var2)
public javax.constraints.Constraint post(double[] coefficients,
javax.constraints.Var[] vars,
String oper,
double value)
post in class javax.constraints.impl.AbstractProblemRuntimeException - if the posting failspublic javax.constraints.Constraint post(double[] coefficients,
javax.constraints.VarReal[] vars,
String oper,
double value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(double[] coefficients,
javax.constraints.ConstrainedVariable[] vars,
String oper,
double value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(double[] coefficients,
javax.constraints.VarReal[] vars,
String oper,
javax.constraints.VarReal var)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(double[] coefficients,
javax.constraints.ConstrainedVariable[] vars,
String oper,
javax.constraints.ConstrainedVariable var)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal[] vars,
String oper,
double value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal[] vars,
String oper,
int value)
public javax.constraints.Constraint post(javax.constraints.VarReal[] vars,
String oper,
javax.constraints.VarReal var)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal var,
String oper,
double value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal var,
String oper,
int value)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal var1,
String oper,
javax.constraints.VarReal var2)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.VarReal var1,
String oper,
javax.constraints.Var var2)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint post(javax.constraints.Var var1,
String oper,
javax.constraints.VarReal var2)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblempublic javax.constraints.Constraint postScalProd(javax.constraints.Var var,
String oper,
int[] coefficients,
javax.constraints.Var[] vars)
postScalProd in interface javax.constraints.ProblempostScalProd in class javax.constraints.impl.AbstractProblemvar - the constraint variableoper - an operatorcoefficients - the array of valuesvars - the array of variablespublic javax.constraints.Var scalProd(int[] coefficients,
javax.constraints.Var[] vars)
public javax.constraints.Var scalProd(String name, int[] coefficients, javax.constraints.Var[] vars)
scalProd in interface javax.constraints.ProblemscalProd in class javax.constraints.impl.AbstractProblempublic javax.constraints.VarReal scalProd(double[] arrayOfValues,
javax.constraints.VarReal[] arrayOfVariables)
scalProd in interface javax.constraints.ProblemscalProd in class javax.constraints.impl.AbstractProblemarrayOfValues - the array of values.arrayOfVariables - the array of variables.public javax.constraints.VarReal scalProd(double[] arrayOfValues,
javax.constraints.ConstrainedVariable[] arrayOfVariables)
scalProd in interface javax.constraints.ProblemscalProd in class javax.constraints.impl.AbstractProblempublic javax.constraints.Var sum(javax.constraints.Var[] vars)
sum in interface javax.constraints.Problemsum in class javax.constraints.impl.AbstractProblempublic javax.constraints.Var sum(String name, javax.constraints.Var[] vars)
sum in interface javax.constraints.Problemsum in class javax.constraints.impl.AbstractProblempublic javax.constraints.VarReal sum(javax.constraints.VarReal[] vars)
sum in interface javax.constraints.Problemsum in class javax.constraints.impl.AbstractProblempublic boolean isDerivedVar(javax.constraints.impl.AbstractConstrainedVariable var)
public Constraint[] constraintsWithDerivedVars()
public Constraint findConstraintForVariable(String name)
public javax.constraints.Constraint allDiff(javax.constraints.Var[] vars)
public javax.constraints.Constraint postCardinality(javax.constraints.Var[] vars,
int cardValue,
String oper,
int value)
public javax.constraints.Constraint postCardinality(javax.constraints.Var[] vars,
int cardValue,
String oper,
javax.constraints.Var var)
public String getImplVersion()
getImplVersion in interface javax.constraints.ProblemgetImplVersion in class javax.constraints.impl.AbstractProblempublic javax.constraints.Var createVariable(String name, int min, int max)
createVariable in interface javax.constraints.ProblemcreateVariable in class javax.constraints.impl.AbstractProblempublic javax.constraints.Var createVariable(String name)
public javax.constraints.VarReal createVariableReal(String name, double min, double max)
createVariableReal in interface javax.constraints.ProblemcreateVariableReal in class javax.constraints.impl.AbstractProblempublic javax.constraints.VarReal createVariableReal(String name)
public javax.constraints.VarBool variableBool(String name)
variableBool in interface javax.constraints.ProblemvariableBool in class javax.constraints.impl.AbstractProblempublic void post(javax.constraints.Constraint constraint)
post in interface javax.constraints.Problempost in class javax.constraints.impl.AbstractProblemprotected javax.constraints.Solver createSolver()
createSolver in class javax.constraints.impl.AbstractProblempublic void log(String text)
log in interface javax.constraints.Problemlog in class javax.constraints.impl.AbstractProblempublic void debug(String text)
debug in class javax.constraints.impl.AbstractProblempublic void error(String text)
error in class javax.constraints.impl.AbstractProblempublic void loadFromXML(InputStream in) throws Exception
Exceptionpublic void storeToXML(OutputStream os, String comment) throws Exception
ExceptionCopyright © 2024. All rights reserved.