Package org.xcsp.parser.callbacks
Class SolutionChecker
- java.lang.Object
-
- org.xcsp.parser.callbacks.SolutionChecker
-
- All Implemented Interfaces:
XCallbacks
,XCallbacks2
public final class SolutionChecker extends Object implements XCallbacks2
This class allows us to check solutions and bounds obtained for XCSP3 instances.- Author:
- Gilles Audemard and Christophe Lecoutre
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xcsp.parser.callbacks.XCallbacks
XCallbacks.Implem, XCallbacks.XCallbacksParameters
-
-
Field Summary
Fields Modifier and Type Field Description List<String>
invalidObjs
The list of ids of invalid objectives (for the current solution).List<String>
violatedCtrs
The list of ids of violated constraints (for the current solution).
-
Constructor Summary
Constructors Constructor Description SolutionChecker(boolean competitionMode, String fileName, InputStream solutionStream)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildCtrAllDifferent(String id, XNode<XVariables.XVarInteger>[] trees)
void
buildCtrAllDifferent(String id, XVariables.XVarInteger[] list)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferent(String id, XVariables.XVarSymbolic[] list)
void
buildCtrAllDifferentExcept(String id, XVariables.XVarInteger[] list, int[] except)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists, int[][] except)
void
buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix, int[] except)
void
buildCtrAllEqual(String id, XNode<XVariables.XVarInteger>[] trees)
void
buildCtrAllEqual(String id, XVariables.XVarInteger[] list)
Callback method for building a constraintallEqual
.void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, int[] capacities, boolean loads)
void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition condition)
void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition[] conditions, int startIndex)
void
buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, XVariables.XVarInteger[] capacities, boolean loads)
void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occursMin, int[] occursMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, XVariables.XVarInteger[] occurs)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger value)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrChannel(String id, XVariables.XVarInteger[] list1, int startIndex1, XVariables.XVarInteger[] list2, int startIndex2)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, int size)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger size)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrClause(String id, XVariables.XVarInteger[] pos, XVariables.XVarInteger[] neg)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCount(String id, XNode<XVariables.XVarInteger>[] trees, int[] values, Condition condition)
void
buildCtrCount(String id, XVariables.XVarInteger[] list, int[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCount(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] values, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrElement(String id, int[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
void
buildCtrElement(String id, int[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
void
buildCtrElement(String id, XVariables.XVarInteger[] list, Condition condition)
void
buildCtrExtension(String id, XVariables.XVarInteger[] list, int[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a (non-unary) extensional constraint.void
buildCtrExtension(String id, XVariables.XVarInteger[] list, AbstractTuple[] tuples, boolean positive, Set<Types.TypeFlag> flags)
void
buildCtrExtension(String id, XVariables.XVarInteger x, int[] values, boolean positive, Set<Types.TypeFlag> flags)
Callback method for building a unary extensional constraint.void
buildCtrExtension(String id, XVariables.XVarSymbolic[] list, String[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
void
buildCtrExtension(String id, XVariables.XVarSymbolic x, String[] values, boolean positive, Set<Types.TypeFlag> flags)
void
buildCtrFlow(String id, XVariables.XVarInteger[] list, int[] balance, int[][] arcs)
void
buildCtrFlow(String id, XVariables.XVarInteger[] list, int[] balance, int[][] arcs, int[] weights, Condition condition)
void
buildCtrInstantiation(String id, XVariables.XVarInteger[] list, int[] values)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrIntension(String id, XVariables.XVarInteger[] scope, XNodeParent<XVariables.XVarInteger> tree)
Callback method for building a constraintintension
from the specified syntactic tree.void
buildCtrIntension(String id, XVariables.XVarSymbolic[] scope, XNodeParent<XVariables.XVarSymbolic> tree)
void
buildCtrKnapsack(String id, XVariables.XVarInteger[] list, int[] weights, Condition wcondition, int[] profits, Condition pcondition)
void
buildCtrLex(String id, XVariables.XVarInteger[][] lists, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrLexMatrix(String id, XVariables.XVarInteger[][] matrix, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMaximum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrMaximum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMaximum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMaximumArg(String id, XNode<XVariables.XVarInteger>[] trees, Types.TypeRank rank, Condition condition)
void
buildCtrMaximumArg(String id, XVariables.XVarInteger[] list, Types.TypeRank rank, Condition condition)
void
buildCtrMDD(String id, XVariables.XVarInteger[] list, Transition[] transitions)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMinimum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrMinimum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMinimum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrMinimumArg(String id, XNode<XVariables.XVarInteger>[] trees, Types.TypeRank rank, Condition condition)
void
buildCtrMinimumArg(String id, XVariables.XVarInteger[] list, Types.TypeRank rank, Condition condition)
void
buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, int[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, XVariables.XVarInteger[][] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, int[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, boolean zeroIgnored)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNValues(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrNValues(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrNValuesExcept(String id, XVariables.XVarInteger[] list, int[] except, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, int[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrOrdered(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] lengths, Types.TypeOperatorRel operator)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrPrecedence(String id, XVariables.XVarInteger[] list)
void
buildCtrPrecedence(String id, XVariables.XVarInteger[] list, int[] values, boolean covered)
void
buildCtrRegular(String id, XVariables.XVarInteger[] list, Transition[] transitions, String startState, String[] finalStates)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, int[] coeffs, Condition condition)
void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
void
buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, XVariables.XVarInteger[] coeffs, Condition condition)
void
buildCtrSum(String id, XVariables.XVarInteger[] list, int[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XVariables.XVarInteger[] list, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildCtrSum(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] coeffs, Condition condition)
Full information about the constraint (this form) in the specifications (Chapter 4).void
buildObjToMaximize(String id, XNodeParent<XVariables.XVarInteger> tree)
void
buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
void
buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
void
buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
void
buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
void
buildObjToMaximize(String id, XVariables.XVarInteger x)
void
buildObjToMinimize(String id, XNodeParent<XVariables.XVarInteger> tree)
void
buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
void
buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
void
buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
void
buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
void
buildObjToMinimize(String id, XVariables.XVarInteger x)
Methods to be implemented for managing objectivesvoid
buildVarInteger(XVariables.XVarInteger x, int[] values)
Callback method for building in the solver an integer variable whose domain is given by the specified array.void
buildVarInteger(XVariables.XVarInteger x, int minValue, int maxValue)
Callback method for building in the solver an integer variable whose domain contains all integer values between the two specified bounds.void
buildVarSymbolic(XVariables.XVarSymbolic x, String[] values)
Methods to be implemented on symbolic variables/constraintsprotected void
checkCondition(int value, Condition condition)
protected void
controlConstraint(boolean condition)
protected void
controlObjective(BigInteger computedCost)
void
endInstance()
Method called at the end of the process of loading the XCSP3 instance.protected boolean
evaluateCondition(int value, Condition condition)
XCallbacks.Implem
implem()
Returns the object that implements necessary data structures during the loading process.void
loadConstraints(XParser parser)
Loads all elements that are contained in the element <constraints> of the XCSP3 instance, which have been parsed by the specified parser object.void
loadCtr(XConstraints.XCtr c)
Loads the specified constraint.void
loadObj(XObjectives.XObj o)
Loads the specified objective.void
loadObjectives(XParser parser)
Loads all elements that are contained in the elementof the XCSP3 instance, which have been parsed by the specified parser object. void
loadVariables(XParser parser)
Loads all elements that are contained in the element <variables> of the XCSP3 instance, which have been parsed by the specified parser object.static void
main(String[] args)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xcsp.parser.callbacks.XCallbacks
buildCtrFalse, buildCtrTrue, loadAnnotations, loadArray, loadBlock, loadConstraints, loadCtrs, loadDocument, loadGroup, loadInstance, loadInstance, loadLogic, loadSlide, loadVar, repost
-
Methods inherited from interface org.xcsp.parser.callbacks.XCallbacks2
beginAnnotations, beginArray, beginBlock, beginConstraints, beginGroup, beginInstance, beginLogic, beginObjectives, beginSlide, beginVariables, buildAnnotationDecision, buildCtrAmong, buildCtrAmong, buildCtrAtLeast, buildCtrAtMost, buildCtrExactly, buildCtrExactly, buildCtrLogic, buildCtrLogic, buildCtrLogic, buildCtrLogic, buildCtrNoOverlap, buildCtrNotAllEqual, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, buildCtrPrimitive, endAnnotations, endArray, endBlock, endConstraints, endGroup, endLogic, endObjectives, endSlide, endVariables, unimplementedCase
-
-
-
-
Constructor Detail
-
SolutionChecker
public SolutionChecker(boolean competitionMode, String fileName, InputStream solutionStream) throws Exception
- Throws:
Exception
-
-
Method Detail
-
implem
public XCallbacks.Implem implem()
Description copied from interface:XCallbacks
Returns the object that implements necessary data structures during the loading process. In your class implementing XCallbacks, you should simply write something like:Implem implem = new Implem(this); @Override public Implem implem() { return implem; }
- Specified by:
implem
in interfaceXCallbacks
- Returns:
- the object that implements some data structures used during the loading process
-
controlConstraint
protected void controlConstraint(boolean condition)
-
controlObjective
protected void controlObjective(BigInteger computedCost)
-
loadVariables
public void loadVariables(XParser parser)
Description copied from interface:XCallbacks
Loads all elements that are contained in the element <variables> of the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden.- Specified by:
loadVariables
in interfaceXCallbacks
- Parameters:
parser
- the object used to parse the element
-
loadConstraints
public void loadConstraints(XParser parser)
Description copied from interface:XCallbacks
Loads all elements that are contained in the element <constraints> of the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden.- Specified by:
loadConstraints
in interfaceXCallbacks
- Parameters:
parser
- the object used to parse the element
-
loadCtr
public void loadCtr(XConstraints.XCtr c)
Description copied from interface:XCallbacks
Loads the specified constraint. One callback function (for example, builCtrIntension or buildCtrAllDifferent) is called when this method is executed. Except for some advanced uses, this method should not be overridden.- Specified by:
loadCtr
in interfaceXCallbacks
- Parameters:
c
- the constraint to be loaded
-
loadObjectives
public void loadObjectives(XParser parser)
Description copied from interface:XCallbacks
Loads all elements that are contained in the elementof the XCSP3 instance, which have been parsed by the specified parser object. Except for some advanced uses, this method should not be overridden. - Specified by:
loadObjectives
in interfaceXCallbacks
- Parameters:
parser
- the object used to parse the element
-
loadObj
public void loadObj(XObjectives.XObj o)
Description copied from interface:XCallbacks
Loads the specified objective. One callback function (for example, builObjToMinimize or buildObjToMaximize) is called when this method is executed. Except for some advanced uses, this method should not be overridden.- Specified by:
loadObj
in interfaceXCallbacks
- Parameters:
o
- the objective to be loaded
-
endInstance
public void endInstance()
Description copied from interface:XCallbacks
Method called at the end of the process of loading the XCSP3 instance. Implement (or redefine) this method (if you implement XCallbacks2) in case you want some special operation to be executed (for example, for debugging).- Specified by:
endInstance
in interfaceXCallbacks
- Specified by:
endInstance
in interfaceXCallbacks2
-
buildVarInteger
public void buildVarInteger(XVariables.XVarInteger x, int minValue, int maxValue)
Description copied from interface:XCallbacks
Callback method for building in the solver an integer variable whose domain contains all integer values between the two specified bounds.- Specified by:
buildVarInteger
in interfaceXCallbacks
- Specified by:
buildVarInteger
in interfaceXCallbacks2
- Parameters:
x
- an integer variable built by the parserminValue
- the minimum value of the domain of xmaxValue
- the maximum value of the domain of x
-
buildVarInteger
public void buildVarInteger(XVariables.XVarInteger x, int[] values)
Description copied from interface:XCallbacks
Callback method for building in the solver an integer variable whose domain is given by the specified array.- Specified by:
buildVarInteger
in interfaceXCallbacks
- Specified by:
buildVarInteger
in interfaceXCallbacks2
- Parameters:
x
- an integer variable built by the parservalues
- the values in the domain of x
-
buildCtrIntension
public void buildCtrIntension(String id, XVariables.XVarInteger[] scope, XNodeParent<XVariables.XVarInteger> tree)
Description copied from interface:XCallbacks
Callback method for building a constraintintension
from the specified syntactic tree. Variables of the specified array of variables are exactly those that are present in the tree.- Specified by:
buildCtrIntension
in interfaceXCallbacks
- Specified by:
buildCtrIntension
in interfaceXCallbacks2
- Parameters:
id
- the id of the constraintscope
- the list of integer variables of the constrainttree
- the root of a syntactic tree representing the predicate associated with the constraint
-
buildCtrExtension
public void buildCtrExtension(String id, XVariables.XVarInteger x, int[] values, boolean positive, Set<Types.TypeFlag> flags)
Description copied from interface:XCallbacks
Callback method for building a unary extensional constraint. Values are supports (accepted by the constraint) iff the specified Boolean is true, otherwise they are conflicts (not accepted by the constraint). The flag STARRED_TUPLES cannot appear in the specified set (because this is a unary constraint). The flag UNCLEAN_TUPLES, if present, indicates that all specified values do not necessarily belong to the (initial) domain of the specified variable. More information in the specifications (Chapter 4). Quick information available at XCSP3 website (Tab Specifications).- Specified by:
buildCtrExtension
in interfaceXCallbacks
- Specified by:
buildCtrExtension
in interfaceXCallbacks2
- Parameters:
id
- the id of the constraintx
- an integer variablevalues
- supports or conflictspositive
- values are supports iff this value is trueflags
- set of flags giving information about the values
-
buildCtrExtension
public void buildCtrExtension(String id, XVariables.XVarInteger[] list, int[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
Description copied from interface:XCallbacks
Callback method for building a (non-unary) extensional constraint. Tuples are supports (accepted by the constraint) iff the specified Boolean is true, otherwise they are conflicts (not accepted by the constraint). The flag STARRED_TUPLES indicates if the symbol * (denoted by Constants.STAR_INT, whose value is Integer.MAX_VALUE - 1) is present in some tuple(s). The flag UNCLEAN_TUPLES, if present, indicates that all specified tuples do not necessarily belong to the (initial) domains of the specified variables. More information in the specifications (Chapter 4). Quick information available at XCSP3 website (Tab Specifications).- Specified by:
buildCtrExtension
in interfaceXCallbacks
- Specified by:
buildCtrExtension
in interfaceXCallbacks2
- Parameters:
id
- the id of the constraintlist
- the scope of the constrainttuples
- supports or conflictspositive
- tuples are supports iff this value is trueflags
- set of flags giving information about the tuples
-
buildCtrExtension
public void buildCtrExtension(String id, XVariables.XVarInteger[] list, AbstractTuple[] tuples, boolean positive, Set<Types.TypeFlag> flags)
- Specified by:
buildCtrExtension
in interfaceXCallbacks
- Specified by:
buildCtrExtension
in interfaceXCallbacks2
-
buildCtrRegular
public void buildCtrRegular(String id, XVariables.XVarInteger[] list, Transition[] transitions, String startState, String[] finalStates)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrRegular
in interfaceXCallbacks
- Specified by:
buildCtrRegular
in interfaceXCallbacks2
-
buildCtrMDD
public void buildCtrMDD(String id, XVariables.XVarInteger[] list, Transition[] transitions)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrMDD
in interfaceXCallbacks
- Specified by:
buildCtrMDD
in interfaceXCallbacks2
-
buildCtrAllDifferent
public void buildCtrAllDifferent(String id, XVariables.XVarInteger[] list)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks2
-
buildCtrAllDifferentExcept
public void buildCtrAllDifferentExcept(String id, XVariables.XVarInteger[] list, int[] except)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrAllDifferentExcept
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferentExcept
in interfaceXCallbacks2
-
buildCtrAllDifferentList
public void buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrAllDifferentList
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferentList
in interfaceXCallbacks2
-
buildCtrAllDifferentList
public void buildCtrAllDifferentList(String id, XVariables.XVarInteger[][] lists, int[][] except)
- Specified by:
buildCtrAllDifferentList
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferentList
in interfaceXCallbacks2
-
buildCtrAllDifferentMatrix
public void buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrAllDifferentMatrix
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferentMatrix
in interfaceXCallbacks2
-
buildCtrAllDifferentMatrix
public void buildCtrAllDifferentMatrix(String id, XVariables.XVarInteger[][] matrix, int[] except)
- Specified by:
buildCtrAllDifferentMatrix
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferentMatrix
in interfaceXCallbacks2
-
buildCtrAllDifferent
public void buildCtrAllDifferent(String id, XNode<XVariables.XVarInteger>[] trees)
- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks2
-
buildCtrAllEqual
public void buildCtrAllEqual(String id, XVariables.XVarInteger[] list)
Description copied from interface:XCallbacks
Callback method for building a constraintallEqual
.- Specified by:
buildCtrAllEqual
in interfaceXCallbacks
- Specified by:
buildCtrAllEqual
in interfaceXCallbacks2
- Parameters:
id
- the id of the constraintlist
- the list of variables of the constraint
-
buildCtrAllEqual
public void buildCtrAllEqual(String id, XNode<XVariables.XVarInteger>[] trees)
- Specified by:
buildCtrAllEqual
in interfaceXCallbacks
- Specified by:
buildCtrAllEqual
in interfaceXCallbacks2
-
buildCtrOrdered
public void buildCtrOrdered(String id, XVariables.XVarInteger[] list, Types.TypeOperatorRel operator)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrOrdered
in interfaceXCallbacks
- Specified by:
buildCtrOrdered
in interfaceXCallbacks2
-
buildCtrOrdered
public void buildCtrOrdered(String id, XVariables.XVarInteger[] list, int[] lengths, Types.TypeOperatorRel operator)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrOrdered
in interfaceXCallbacks
- Specified by:
buildCtrOrdered
in interfaceXCallbacks2
-
buildCtrOrdered
public void buildCtrOrdered(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] lengths, Types.TypeOperatorRel operator)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrOrdered
in interfaceXCallbacks
- Specified by:
buildCtrOrdered
in interfaceXCallbacks2
-
buildCtrLex
public void buildCtrLex(String id, XVariables.XVarInteger[][] lists, Types.TypeOperatorRel operator)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrLex
in interfaceXCallbacks
- Specified by:
buildCtrLex
in interfaceXCallbacks2
-
buildCtrLexMatrix
public void buildCtrLexMatrix(String id, XVariables.XVarInteger[][] matrix, Types.TypeOperatorRel operator)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrLexMatrix
in interfaceXCallbacks
- Specified by:
buildCtrLexMatrix
in interfaceXCallbacks2
-
buildCtrPrecedence
public void buildCtrPrecedence(String id, XVariables.XVarInteger[] list)
- Specified by:
buildCtrPrecedence
in interfaceXCallbacks
- Specified by:
buildCtrPrecedence
in interfaceXCallbacks2
-
buildCtrPrecedence
public void buildCtrPrecedence(String id, XVariables.XVarInteger[] list, int[] values, boolean covered)
- Specified by:
buildCtrPrecedence
in interfaceXCallbacks
- Specified by:
buildCtrPrecedence
in interfaceXCallbacks2
-
evaluateCondition
protected boolean evaluateCondition(int value, Condition condition)
-
checkCondition
protected void checkCondition(int value, Condition condition)
-
buildCtrSum
public void buildCtrSum(String id, XVariables.XVarInteger[] list, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrSum
public void buildCtrSum(String id, XVariables.XVarInteger[] list, int[] coeffs, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrSum
public void buildCtrSum(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] coeffs, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrSum
public void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrSum
public void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, int[] coeffs, Condition condition)
- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrSum
public void buildCtrSum(String id, XNode<XVariables.XVarInteger>[] trees, XVariables.XVarInteger[] coeffs, Condition condition)
- Specified by:
buildCtrSum
in interfaceXCallbacks
- Specified by:
buildCtrSum
in interfaceXCallbacks2
-
buildCtrCount
public void buildCtrCount(String id, XVariables.XVarInteger[] list, int[] values, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCount
in interfaceXCallbacks
- Specified by:
buildCtrCount
in interfaceXCallbacks2
-
buildCtrCount
public void buildCtrCount(String id, XNode<XVariables.XVarInteger>[] trees, int[] values, Condition condition)
- Specified by:
buildCtrCount
in interfaceXCallbacks
- Specified by:
buildCtrCount
in interfaceXCallbacks2
-
buildCtrCount
public void buildCtrCount(String id, XVariables.XVarInteger[] list, XVariables.XVarInteger[] values, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCount
in interfaceXCallbacks
- Specified by:
buildCtrCount
in interfaceXCallbacks2
-
buildCtrNValuesExcept
public void buildCtrNValuesExcept(String id, XVariables.XVarInteger[] list, int[] except, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNValuesExcept
in interfaceXCallbacks
- Specified by:
buildCtrNValuesExcept
in interfaceXCallbacks2
-
buildCtrNValues
public void buildCtrNValues(String id, XVariables.XVarInteger[] list, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNValues
in interfaceXCallbacks
- Specified by:
buildCtrNValues
in interfaceXCallbacks2
-
buildCtrNValues
public void buildCtrNValues(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
- Specified by:
buildCtrNValues
in interfaceXCallbacks
- Specified by:
buildCtrNValues
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occurs)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, XVariables.XVarInteger[] occurs)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, XVariables.XVarInteger[] occurs)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occurs)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, int[] values, int[] occursMin, int[] occursMax)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrCardinality
public void buildCtrCardinality(String id, XVariables.XVarInteger[] list, boolean closed, XVariables.XVarInteger[] values, int[] occursMin, int[] occursMax)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCardinality
in interfaceXCallbacks
- Specified by:
buildCtrCardinality
in interfaceXCallbacks2
-
buildCtrMaximum
public void buildCtrMaximum(String id, XVariables.XVarInteger[] list, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrMaximum
in interfaceXCallbacks
- Specified by:
buildCtrMaximum
in interfaceXCallbacks2
-
buildCtrMaximum
public void buildCtrMaximum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
- Specified by:
buildCtrMaximum
in interfaceXCallbacks
- Specified by:
buildCtrMaximum
in interfaceXCallbacks2
-
buildCtrMinimum
public void buildCtrMinimum(String id, XVariables.XVarInteger[] list, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrMinimum
in interfaceXCallbacks
- Specified by:
buildCtrMinimum
in interfaceXCallbacks2
-
buildCtrMinimum
public void buildCtrMinimum(String id, XNode<XVariables.XVarInteger>[] trees, Condition condition)
- Specified by:
buildCtrMinimum
in interfaceXCallbacks
- Specified by:
buildCtrMinimum
in interfaceXCallbacks2
-
buildCtrMaximum
public void buildCtrMaximum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrMaximum
in interfaceXCallbacks
- Specified by:
buildCtrMaximum
in interfaceXCallbacks2
-
buildCtrMinimum
public void buildCtrMinimum(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrMinimum
in interfaceXCallbacks
- Specified by:
buildCtrMinimum
in interfaceXCallbacks2
-
buildCtrMaximumArg
public void buildCtrMaximumArg(String id, XVariables.XVarInteger[] list, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrMaximumArg
in interfaceXCallbacks
- Specified by:
buildCtrMaximumArg
in interfaceXCallbacks2
-
buildCtrMaximumArg
public void buildCtrMaximumArg(String id, XNode<XVariables.XVarInteger>[] trees, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrMaximumArg
in interfaceXCallbacks
- Specified by:
buildCtrMaximumArg
in interfaceXCallbacks2
-
buildCtrMinimumArg
public void buildCtrMinimumArg(String id, XVariables.XVarInteger[] list, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrMinimumArg
in interfaceXCallbacks
- Specified by:
buildCtrMinimumArg
in interfaceXCallbacks2
-
buildCtrMinimumArg
public void buildCtrMinimumArg(String id, XNode<XVariables.XVarInteger>[] trees, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrMinimumArg
in interfaceXCallbacks
- Specified by:
buildCtrMinimumArg
in interfaceXCallbacks2
-
buildCtrChannel
public void buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrChannel
in interfaceXCallbacks
- Specified by:
buildCtrChannel
in interfaceXCallbacks2
-
buildCtrChannel
public void buildCtrChannel(String id, XVariables.XVarInteger[] list1, int startIndex1, XVariables.XVarInteger[] list2, int startIndex2)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrChannel
in interfaceXCallbacks
- Specified by:
buildCtrChannel
in interfaceXCallbacks2
-
buildCtrChannel
public void buildCtrChannel(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger value)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrChannel
in interfaceXCallbacks
- Specified by:
buildCtrChannel
in interfaceXCallbacks2
-
buildCtrElement
public void buildCtrElement(String id, XVariables.XVarInteger[] list, Condition condition)
- Specified by:
buildCtrElement
in interfaceXCallbacks
- Specified by:
buildCtrElement
in interfaceXCallbacks2
-
buildCtrElement
public void buildCtrElement(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrElement
in interfaceXCallbacks
- Specified by:
buildCtrElement
in interfaceXCallbacks2
-
buildCtrElement
public void buildCtrElement(String id, int[] list, int startIndex, XVariables.XVarInteger index, Types.TypeRank rank, Condition condition)
- Specified by:
buildCtrElement
in interfaceXCallbacks
- Specified by:
buildCtrElement
in interfaceXCallbacks2
-
buildCtrElement
public void buildCtrElement(String id, int[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
- Specified by:
buildCtrElement
in interfaceXCallbacks
- Specified by:
buildCtrElement
in interfaceXCallbacks2
-
buildCtrElement
public void buildCtrElement(String id, XVariables.XVarInteger[][] matrix, int startRowIndex, XVariables.XVarInteger rowIndex, int startColIndex, XVariables.XVarInteger colIndex, Condition condition)
- Specified by:
buildCtrElement
in interfaceXCallbacks
- Specified by:
buildCtrElement
in interfaceXCallbacks2
-
buildCtrStretch
public void buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrStretch
in interfaceXCallbacks
- Specified by:
buildCtrStretch
in interfaceXCallbacks2
-
buildCtrStretch
public void buildCtrStretch(String id, XVariables.XVarInteger[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrStretch
in interfaceXCallbacks
- Specified by:
buildCtrStretch
in interfaceXCallbacks2
-
buildCtrNoOverlap
public void buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, int[] lengths, boolean zeroIgnored)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks
- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks2
-
buildCtrNoOverlap
public void buildCtrNoOverlap(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, boolean zeroIgnored)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks
- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks2
-
buildCtrNoOverlap
public void buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, int[][] lengths, boolean zeroIgnored)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks
- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks2
-
buildCtrNoOverlap
public void buildCtrNoOverlap(String id, XVariables.XVarInteger[][] origins, XVariables.XVarInteger[][] lengths, boolean zeroIgnored)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks
- Specified by:
buildCtrNoOverlap
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, int[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, int[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, int[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, int[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrCumulative
public void buildCtrCumulative(String id, XVariables.XVarInteger[] origins, XVariables.XVarInteger[] lengths, XVariables.XVarInteger[] ends, XVariables.XVarInteger[] heights, Condition condition)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCumulative
in interfaceXCallbacks
- Specified by:
buildCtrCumulative
in interfaceXCallbacks2
-
buildCtrBinPacking
public void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition condition)
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks2
-
buildCtrBinPacking
public void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, int[] capacities, boolean loads)
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks2
-
buildCtrBinPacking
public void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, XVariables.XVarInteger[] capacities, boolean loads)
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks2
-
buildCtrBinPacking
public void buildCtrBinPacking(String id, XVariables.XVarInteger[] list, int[] sizes, Condition[] conditions, int startIndex)
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks
- Specified by:
buildCtrBinPacking
in interfaceXCallbacks2
-
buildCtrKnapsack
public void buildCtrKnapsack(String id, XVariables.XVarInteger[] list, int[] weights, Condition wcondition, int[] profits, Condition pcondition)
- Specified by:
buildCtrKnapsack
in interfaceXCallbacks
- Specified by:
buildCtrKnapsack
in interfaceXCallbacks2
-
buildCtrFlow
public void buildCtrFlow(String id, XVariables.XVarInteger[] list, int[] balance, int[][] arcs)
- Specified by:
buildCtrFlow
in interfaceXCallbacks
- Specified by:
buildCtrFlow
in interfaceXCallbacks2
-
buildCtrFlow
public void buildCtrFlow(String id, XVariables.XVarInteger[] list, int[] balance, int[][] arcs, int[] weights, Condition condition)
- Specified by:
buildCtrFlow
in interfaceXCallbacks
- Specified by:
buildCtrFlow
in interfaceXCallbacks2
-
buildCtrInstantiation
public void buildCtrInstantiation(String id, XVariables.XVarInteger[] list, int[] values)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrInstantiation
in interfaceXCallbacks
- Specified by:
buildCtrInstantiation
in interfaceXCallbacks2
-
buildCtrClause
public void buildCtrClause(String id, XVariables.XVarInteger[] pos, XVariables.XVarInteger[] neg)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrClause
in interfaceXCallbacks
- Specified by:
buildCtrClause
in interfaceXCallbacks2
-
buildCtrCircuit
public void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCircuit
in interfaceXCallbacks
- Specified by:
buildCtrCircuit
in interfaceXCallbacks2
-
buildCtrCircuit
public void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, int size)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCircuit
in interfaceXCallbacks
- Specified by:
buildCtrCircuit
in interfaceXCallbacks2
-
buildCtrCircuit
public void buildCtrCircuit(String id, XVariables.XVarInteger[] list, int startIndex, XVariables.XVarInteger size)
Description copied from interface:XCallbacks
Full information about the constraint (this form) in the specifications (Chapter 4).
Quick information available on the XCSP3 website (Tab Specifications) .
Select the constraint after opening the left navigation bar below heading XCSP3-core.- Specified by:
buildCtrCircuit
in interfaceXCallbacks
- Specified by:
buildCtrCircuit
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, XVariables.XVarInteger x)
Description copied from interface:XCallbacks2
Methods to be implemented for managing objectives- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, XVariables.XVarInteger x)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, XNodeParent<XVariables.XVarInteger> tree)
- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, XNodeParent<XVariables.XVarInteger> tree)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, Types.TypeObjective type, XVariables.XVarInteger[] list, int[] coeffs)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildObjToMinimize
public void buildObjToMinimize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
- Specified by:
buildObjToMinimize
in interfaceXCallbacks
- Specified by:
buildObjToMinimize
in interfaceXCallbacks2
-
buildObjToMaximize
public void buildObjToMaximize(String id, Types.TypeObjective type, XNode<XVariables.XVarInteger>[] trees, int[] coeffs)
- Specified by:
buildObjToMaximize
in interfaceXCallbacks
- Specified by:
buildObjToMaximize
in interfaceXCallbacks2
-
buildVarSymbolic
public void buildVarSymbolic(XVariables.XVarSymbolic x, String[] values)
Description copied from interface:XCallbacks2
Methods to be implemented on symbolic variables/constraints- Specified by:
buildVarSymbolic
in interfaceXCallbacks
- Specified by:
buildVarSymbolic
in interfaceXCallbacks2
-
buildCtrIntension
public void buildCtrIntension(String id, XVariables.XVarSymbolic[] scope, XNodeParent<XVariables.XVarSymbolic> tree)
- Specified by:
buildCtrIntension
in interfaceXCallbacks
- Specified by:
buildCtrIntension
in interfaceXCallbacks2
-
buildCtrExtension
public void buildCtrExtension(String id, XVariables.XVarSymbolic x, String[] values, boolean positive, Set<Types.TypeFlag> flags)
- Specified by:
buildCtrExtension
in interfaceXCallbacks
- Specified by:
buildCtrExtension
in interfaceXCallbacks2
-
buildCtrExtension
public void buildCtrExtension(String id, XVariables.XVarSymbolic[] list, String[][] tuples, boolean positive, Set<Types.TypeFlag> flags)
- Specified by:
buildCtrExtension
in interfaceXCallbacks
- Specified by:
buildCtrExtension
in interfaceXCallbacks2
-
buildCtrAllDifferent
public void buildCtrAllDifferent(String id, XVariables.XVarSymbolic[] list)
- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks
- Specified by:
buildCtrAllDifferent
in interfaceXCallbacks2
-
-