Package org.xcsp.modeler.api
Interface ProblemAPI
-
- All Superinterfaces:
ProblemAPIBase
,ProblemAPIOnVals
,ProblemAPIOnVars
,ProblemAPISymbolic
- All Known Implementing Classes:
AllInterval
,Bibd
,Blackhole
,BoardColoration
,MagicSequence
,Pic
,Pic2
,Queens
,Rack
,Rack2
,Sudoku
,Warehouse
,Zebra
public interface ProblemAPI extends ProblemAPIOnVars, ProblemAPIOnVals, ProblemAPISymbolic
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xcsp.modeler.api.ProblemAPIBase
ProblemAPIBase.Index, ProblemAPIBase.Occurrences
-
-
Field Summary
-
Fields inherited from interface org.xcsp.modeler.api.ProblemAPIBase
ANY, api2imp, BLOCKS, CHANNELING, CLOSED, CLUES, COLUMNS, DECREASING, DIAGONALS, EQ, EXPRESSION, FIRST, GE, GT, IN, INCREASING, LAST, LE, LEX, LT, MAXIMUM, MINIMUM, NE, NEGATIVE, NOGOODS, NOTIN, NVALUES, POSITIVE, PRODUCT, REDUNDANT_CONSTRAINTS, ROWS, STAR, STAR_INT, STAR_SYMBOL, STRICTLY_DECREASING, STRICTLY_INCREASING, SUM, SYMMETRY_BREAKING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default XNodeParent<IVar>
abs(Object operand)
Returns the root of a syntactic tree built with the unary operatorabs
applied to the specified operand.default XNodeParent<IVar>
add(Object... operands)
Returns the root of a syntactic tree built with the operatoradd
applied to the specified operands.default CtrEntities.CtrEntity
allDifferent(java.util.stream.Stream<XNode<IVar>> trees)
Builds a constraintallDifferent
on the specified (stream of) syntactic trees (predicates): the predicates, when evaluated, must all take different values.default CtrEntities.CtrEntity
allDifferent(IVar.Var[] list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.default CtrEntities.CtrEntity
allDifferent(IVar.Var[]... list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.default CtrEntities.CtrEntity
allDifferent(IVar.Var[][][] list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.default CtrEntities.CtrEntity
allDifferent(IVar.Var[] list, int... exceptValues)
Builds a constraintallDifferent
on the specified integer variables: the variables must take different values, except those that take one of the specified 'exceptional' values.default CtrEntities.CtrEntity
allDifferent(IVar.Var x, IVar.Var... others)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.default CtrEntities.CtrEntity
allDifferent(XNode<IVar>[] trees)
Builds a constraintallDifferent
on the specified syntactic trees (predicates): the predicates, when evaluated, must all take different values.default CtrEntities.CtrEntity
allDifferentExcept(IVar.Var[] list, int... exceptValues)
Deprecated.default CtrEntities.CtrEntity
allDifferentList(IVar.Var[]... lists)
Builds a constraintallDifferentList
on the specified lists of variables: all tuples formed by the different lists must be different.default CtrEntities.CtrEntity
allDifferentMatrix(IVar.Var[][] matrix)
Builds a constraintallDifferentMatrix
on the specified matrix of variables.default CtrEntities.CtrEntity
allEqual(IVar.Var... list)
Builds a constraintallEqual
on the specified integer variables: the variables must all take the same value.default CtrEntities.CtrEntity
allEqual(IVar.Var[][] list)
Builds a constraintallEqual
on the specified integer variables: the variables must all take the same value.default CtrEntities.CtrEntity
allEqualList(IVar.Var[]... lists)
Builds a constraintallEqualList
on the specified lists of variables: all tuples formed by the different lists must be equal.default CtrEntities.CtrEntity
among(IVar.Var[] list, int[] values, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values is exactlyk
.default CtrEntities.CtrEntity
among(IVar.Var[] list, int[] values, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values is exactlyk
.default XNodeParent<IVar>
and(Object... operands)
Returns the root of a syntactic tree built with the operatorand
applied to the specified operands.default IVar.Var[]
array(String id, Size.Size1D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, domain, note and classes.default IVar.Var[]
array(String id, Size.Size1D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, domain, and classes.default IVar.Var[]
array(String id, Size.Size1D size, FunctionalInterfaces.IntToDom f, String note, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, note (short comment) and classes.default IVar.Var[]
array(String id, Size.Size1D size, FunctionalInterfaces.IntToDom f, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, and classes.default IVar.Var[][]
array(String id, Size.Size2D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes.default IVar.Var[][]
array(String id, Size.Size2D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, domain, and classes.default IVar.Var[][]
array(String id, Size.Size2D size, FunctionalInterfaces.Intx2ToDom f, String note, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, note (short comment) and classes.default IVar.Var[][]
array(String id, Size.Size2D size, FunctionalInterfaces.Intx2ToDom f, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, and classes.default IVar.Var[][][]
array(String id, Size.Size3D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes.default IVar.Var[][][]
array(String id, Size.Size3D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, domain, and classes.default IVar.Var[][][]
array(String id, Size.Size3D size, FunctionalInterfaces.Intx3ToDom f, String note, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, note (short comment) and classes.default IVar.Var[][][]
array(String id, Size.Size3D size, FunctionalInterfaces.Intx3ToDom f, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, and classes.default IVar.Var[][][][]
array(String id, Size.Size4D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes.default IVar.Var[][][][]
array(String id, Size.Size4D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, domain, and classes.default IVar.Var[][][][]
array(String id, Size.Size4D size, FunctionalInterfaces.Intx4ToDom f, String note, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, note (short comment) and classes.default IVar.Var[][][][]
array(String id, Size.Size4D size, FunctionalInterfaces.Intx4ToDom f, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, and classes.default IVar.Var[][][][][]
array(String id, Size.Size5D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes.default IVar.Var[][][][][]
array(String id, Size.Size5D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes.default IVar.Var[][][][][]
array(String id, Size.Size5D size, FunctionalInterfaces.Intx5ToDom f, String note, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, note (short comment) and classes.default IVar.Var[][][][][]
array(String id, Size.Size5D size, FunctionalInterfaces.Intx5ToDom f, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, and classes.default CtrEntities.CtrEntity
atLeast(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least equal tok
.default CtrEntities.CtrEntity
atLeast(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least equal tok
.default CtrEntities.CtrEntity
atLeast1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least 1.default CtrEntities.CtrEntity
atMost(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most equal tok
.default CtrEntities.CtrEntity
atMost(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most equal tok
.default CtrEntities.CtrEntity
atMost1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most 1.default CtrEntities.CtrEntity
belong(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorin
applied to the specified arguments.default CtrEntities.CtrEntity
cardinality(IVar.Var[] list, int[] values, boolean mustBeClosed, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
.default CtrEntities.CtrEntity
cardinality(IVar.Var[] list, int[] values, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
.default CtrEntities.CtrEntity
cardinality(IVar.Var[] list, IVar.Var[] values, boolean mustBeClosed, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
.default CtrEntities.CtrEntity
cardinality(IVar.Var[] list, IVar.Var[] values, ProblemAPIBase.Occurrences occurs)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
.default CtrEntities.CtrEntity
cardinality(IVar.Var[] list, Range values, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer in the rangevalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
.default CtrEntities.CtrEntity
channel(IVar.Var[] list)
Builds a constraintchannel
from the specified arguments: the valuej
is assigned to the ith variable oflist
iff the valuei
is assigned to the jth variable oflist
.default CtrEntities.CtrEntity
channel(IVar.Var[] list, int startIndex)
Builds a constraintchannel
from the specified arguments: the valuej
is assigned to the ith variable oflist
iff the valuei
is assigned to the jth variable oflist
.default CtrEntities.CtrEntity
channel(IVar.Var[] list, int startIndex, IVar.Var value)
Builds a constraintchannel
from the specified arguments: the valuei
is assigned tovalue
iff only the ith variable oflist
is assigned the value 1 (0 is the value assigned to the other variables oflist
).default CtrEntities.CtrEntity
channel(IVar.Var[] list1, int startIndex1, IVar.Var[] list2, int startIndex2)
Builds a constraintchannel
from the specified arguments: assuming for simplicity that indexing start at 0, the valuej
is assigned to the ith variable oflist1
iff the valuei
is assigned to the jth variable oflist2
.default CtrEntities.CtrEntity
channel(IVar.Var[] list, IVar.Var value)
Builds a constraintchannel
from the specified arguments: the valuei
is assigned tovalue
iff only the ith variable oflist
is assigned the value 1 (0 is the value assigned to the other variables oflist
).default CtrEntities.CtrEntity
channel(IVar.Var[] list1, IVar.Var[] list2)
Builds a constraintchannel
from the specified arguments.default CtrEntities.CtrEntity
circuit(IVar.Var[] list)
Builds a constraintcircuit
on the specified array of variables.default CtrEntities.CtrEntity
circuit(IVar.Var[] list, int startIndex)
Builds a constraintcircuit
from the specified arguments.default CtrEntities.CtrEntity
circuit(IVar.Var[] list, int startIndex, int size)
Builds a constraintcircuit
from the specified arguments.default CtrEntities.CtrEntity
circuit(IVar.Var[] list, int startIndex, IVar.Var size)
Builds a constraintcircuit
from the specified arguments.default CtrEntities.CtrEntity
circuit(IVar.Var[] list, IVar.Var size)
Builds a constraintcircuit
from the specified arguments.default CtrEntities.CtrEntity
clause(IVar.Var[] list, Boolean[] phases)
Builds a constraintclause
from the specified arguments.default CtrEntities.CtrEntity
clause(IVar.Var[] pos, IVar.Var[] neg)
Builds a constraintclause
from the specified arguments.default CtrEntities.CtrEntity
conjunction(Object... operands)
Builds a constraintintension
, while considering the operatoradd
applied to the specified arguments.default CtrEntities.CtrEntity
count(IVar.Var[] list, int[] values, Condition condition)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the specified condition.default CtrEntities.CtrEntity
count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values.default CtrEntities.CtrEntity
count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
count(IVar.Var[] list, int value, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, int value, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, int value, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified set of values.default CtrEntities.CtrEntity
count(IVar.Var[] list, int value, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var[] values, Condition condition)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the specified condition.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified set of values.default CtrEntities.CtrEntity
count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
ctrFalse(IVar.Var[] scp)
Builds a disentailed integer constraint, i.e., a special constraint that always returnsfalse
.default CtrEntities.CtrEntity
ctrTrue(IVar.Var[] scp)
Builds an entailed integer constraint, i.e., a special constraint that always returnstrue
.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, int[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] ends, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] ends, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, int[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] ends, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights.default CtrEntities.CtrEntity
cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] ends, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights.default void
decisionVariables(IVar[] list)
Sets the specified variables as those on which a solver should branch in priority.default void
decisionVariables(IVar[][] list)
Sets the specified variables as those on which a solver should branch in priority.default CtrEntities.CtrEntity
decreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a decreasing order.default CtrEntities.CtrEntity
decreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a decreasing order on rows.default CtrEntities.CtrEntity
different(Object... operands)
Builds a constraintintension
, while considering the operatorne
applied to the specified arguments.default CtrEntities.CtrEntity
disjunction(Object... operands)
Builds a constraintintension
, while considering the operatoror
applied to the specified arguments.default XNodeParent<IVar>
dist(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatordist
applied to the specified operands.default XNodeParent<IVar>
div(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatordiv
applied to the specified operands.default Domains.Dom
dom(int[] values)
Returns an integer domain composed of the sorted distinct values that come from the specified array.default Domains.Dom
dom(int[][] m)
Returns an integer domain composed of the sorted distinct values that come from the specified array.default Domains.Dom
dom(int[] values, FunctionalInterfaces.Intx1Predicate p)
Returns an integer domain composed of the sorted distinct values that come from the specified array and that respect the specified predicate.default Domains.Dom
dom(int value, int... otherValues)
Returns an integer domain composed of the sorted distinct values that come from the specified values.default Domains.Dom
dom(Collection<Integer> values)
Returns an integer domain composed of the sorted distinct values that come from the specified collection.default Domains.Dom
dom(java.util.stream.IntStream values)
Returns an integer domain composed of the sorted distinct values that come from the specified streamdefault Domains.Dom
dom(Range range)
Returns an integer domain composed of the values contained in the specified range.default CtrEntities.CtrEntity
element(int[][] matrix, int startRowIndex, IVar.Var rowIndex, int startColIndex, IVar.Var colIndex, Condition condition)
default CtrEntities.CtrEntity
element(int[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
default CtrEntities.CtrEntity
element(int[] list, IVar.Var index, Condition condition)
default CtrEntities.CtrEntity
element(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
default CtrEntities.CtrEntity
element(IVar.Var[] list, Condition condition)
default CtrEntities.CtrEntity
element(IVar.Var[] list, IVar.Var index, Condition condition)
default XNodeParent<IVar>
eq(Object... operands)
Returns the root of a syntactic tree built with the operatoreq
applied to the specified operands.default CtrEntities.CtrEntity
equal(Object... operands)
Builds a constraintintension
, while considering the operatoreq
applied to the specified arguments.default CtrEntities.CtrEntity
equivalence(Object... operands)
Builds a constraintintension
, while considering the operatoriff
applied to the specified arguments.default CtrEntities.CtrEntity
exactly(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactlyk
.default CtrEntities.CtrEntity
exactly(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactlyk
.default CtrEntities.CtrEntity
exactly1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactly 1.default CtrEntities.CtrEntity
extension(IVar.Var[] scp, int[]... tuples)
Builds a constraintextension
from the specified scope and the specified array of tuples, seen as supports.default CtrEntities.CtrEntity
extension(IVar.Var[] scp, int[][] tuples, Boolean positive)
Builds a constraintextension
from the specified scope and the specified array of tuples, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
).default CtrEntities.CtrEntity
extension(IVar.Var[] scp, Collection<int[]> tuples)
Builds a constraintextension
from the specified scope and the specified collection of tuples, seen as supports.default CtrEntities.CtrEntity
extension(IVar.Var[] scp, Collection<int[]> tuples, Boolean positive)
Builds a constraintextension
from the specified scope and the specified collection of tuples, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
).default CtrEntities.CtrEntity
extension(IVar.Var[] scp, Table table)
Builds a constraintextension
from the specified scope and the specified table, whose elements are seen as supports.default CtrEntities.CtrEntity
extension(IVar.Var x, int... values)
Builds a unary constraintextension
from the specified variable and the specified array of values, seen as supports.default CtrEntities.CtrEntity
extension(IVar.Var x, int[] values, Boolean positive)
Builds a unary constraintextension
from the specified variable and the specified array of values, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
).default CtrEntities.CtrEntity
extension(IVar.Var x, Table table)
Builds a unary constraintextension
from the specified variable and the specified table.default CtrEntities.CtrAlone
extension(XNodeParent<IVar> tree)
Builds a constraintextension
from the specified syntactic tree (predicate).default CtrEntities.CtrAlone
extensionDisjunction(List<XNodeParent<IVar>> trees)
default CtrEntities.CtrAlone
extensionDisjunction(XNodeParent<IVar>... trees)
default XNodeParent<IVar>
ge(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorge
applied to the specified operands.default CtrEntities.CtrEntity
greaterEqual(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorge
applied to the specified arguments.default CtrEntities.CtrEntity
greaterThan(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorgt
applied to the specified arguments.default XNodeParent<IVar>
gt(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorgt
applied to the specified operands.default XNodeParent<IVar>
iff(Object... operands)
Returns the root of a syntactic tree built with the operatoriff
applied to the specified operands.default CtrEntities.CtrEntity
ifThen(CtrEntities.CtrEntity c1, CtrEntities.CtrEntity c2)
Builds a meta-constraintifThen
from the two specified constraints.default XNodeParent<IVar>
ifThenElse(Object operand1, Object operand2, Object operand3)
Returns the root of a syntactic tree built with the binary operatorif
applied to the specified operands.default CtrEntities.CtrEntity
ifThenElse(CtrEntities.CtrEntity c1, CtrEntities.CtrEntity c2, CtrEntities.CtrEntity c3)
Builds a meta-constraintifThenElse
from the three specified constraints.default XNodeParent<IVar>
imp(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorimp
applied to the specified operands.default CtrEntities.CtrEntity
implication(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorimp
applied to the specified arguments.default CtrEntities.CtrEntity
imply(Object operand1, Object operand2)
Deprecated.default XNodeParent<IVar>
in(Object var, Object set)
Returns the root of a syntactic tree built with the operatorin
applied to the specified operands.default CtrEntities.CtrEntity
increasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering an increasing order.default CtrEntities.CtrEntity
increasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering an increasing order on rows.default CtrEntities.CtrEntity
instantiation(java.util.stream.Stream<IVar.Var> list, java.util.stream.IntStream values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value.default CtrEntities.CtrEntity
instantiation(IVar.Var[][][] list, int[][][] values, FunctionalInterfaces.Intx3Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at index(i,j,k)
with its corresponding value at index(i,j,k)
, provided that the specified predicate accepts(i,j,k)
.default CtrEntities.CtrEntity
instantiation(IVar.Var[][] list, int[][] values, FunctionalInterfaces.Intx2Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at index(i,j)
with its corresponding value at index(i,j)
, provided that the specified predicate accepts(i,j)
.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, int value)
Builds a constraintinstantiation
, assigning each specified variable with the specified value.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, int... values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, int[] values, FunctionalInterfaces.Intx1Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at indexi
with its corresponding value at indexi
, provided that the specified predicate acceptsi
.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, Collection<Integer> values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value in the specified collection.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, java.util.stream.IntStream values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value in the specified stream.default CtrEntities.CtrEntity
instantiation(IVar.Var[] list, Range values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value (from the range).default CtrEntities.CtrEntity
intension(XNodeParent<IVar> tree)
Builds a constraintintension
from the specified argument that represents the root of a syntactic tree.default XNodeParent<IVar>
knightAttack(IVar x, IVar y, int order)
Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two cells of a flattened matrix (whose order is specified) at a knight distance.default XNodeParent<IVar>
le(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorle
applied to the specified operands.default CtrEntities.CtrEntity
lessEqual(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorle
applied to the specified arguments.default CtrEntities.CtrEntity
lessThan(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorlt
applied to the specified arguments.default CtrEntities.CtrEntity
lex(IVar.Var[][] lists, Types.TypeOperatorRel operator)
Builds a constraintlex
on the specified 2-dimensional array of variables: any two successive rows of variables must respect the specified operator.default CtrEntities.CtrEntity
lexMatrix(IVar.Var[][] matrix, Types.TypeOperatorRel operator)
Builds a constraintlexMatrix
on the specified matrix of variables.default XNodeParent<IVar>
lt(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorlt
applied to the specified operands.default XNodeParent<IVar>
max(Object... operands)
Returns the root of a syntactic tree built with the operatormax
applied to the specified operands.default ObjEntities.ObjEntity
maximize(IVar x)
Builds an objective (function) to maximize: the value of the specified variable.default ObjEntities.ObjEntity
maximize(XNode<IVar> tree)
default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar... list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][] list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][][] list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs, FunctionalInterfaces.Intx3Predicate p)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][] list, int[][] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[][] list, int[][] coeffs, FunctionalInterfaces.Intx2Predicate p)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, IVar[] list, int[] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, XNode<IVar>[] trees)
default ObjEntities.ObjEntity
maximize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
default CtrEntities.CtrEntity
maximum(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition.default CtrEntities.CtrEntity
maximum(IVar.Var[] list, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must respect the specified condition.default CtrEntities.CtrEntity
maximum(IVar.Var[] list, IVar.Var value)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be equal to the value assigned to the variablevalue
.default CtrEntities.CtrEntity
maximum(IVar.Var[] list, IVar.Var index, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition.default CtrEntities.CtrEntity
maximum(IVar.Var[] list, ProblemAPIBase.Index index)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
.default CtrEntities.CtrEntity
mdd(IVar.Var[] scp, Transition[] transitions)
Builds a constraintmdd
from the specified scope and the specified transitions.default CtrEntities.CtrEntity
mdd(IVar.Var[] scp, Transitions transitions)
default XNodeParent<IVar>
min(Object... operands)
Returns the root of a syntactic tree built with the operatormin
applied to the specified operands.default ObjEntities.ObjEntity
minimize(IVar x)
Builds an objective (function) to minimize: the value of the specified variable.default ObjEntities.ObjEntity
minimize(XNode<IVar> tree)
default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar... list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][] list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][][] list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs, FunctionalInterfaces.Intx3Predicate p)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][] list, int[][] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[][] list, int[][] coeffs, FunctionalInterfaces.Intx2Predicate p)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, IVar[] list, int[] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient.default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, XNode<IVar>[] trees)
default ObjEntities.ObjEntity
minimize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
default CtrEntities.CtrEntity
minimum(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition.default CtrEntities.CtrEntity
minimum(IVar.Var[] list, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must respect the specified condition.default CtrEntities.CtrEntity
minimum(IVar.Var[] list, IVar.Var value)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be equal to the value assigned to the variablevalue
.default CtrEntities.CtrEntity
minimum(IVar.Var[] list, IVar.Var index, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition.default CtrEntities.CtrEntity
minimum(IVar.Var[] list, ProblemAPIBase.Index index)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
.default XNodeParent<IVar>
mod(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatormod
applied to the specified operands.void
model()
Builds the model.default XNodeParent<IVar>
mul(Object... operands)
Returns the root of a syntactic tree built with the operatormul
applied to the specified operands.default XNodeParent<IVar>
ne(Object... operands)
Returns the root of a syntactic tree built with the operatorne
applied to the specified operands.default XNodeParent<IVar>
neg(Object operand)
Returns the root of a syntactic tree built with the unary operatorneg
applied to the specified operand.default CtrEntities.CtrEntity
noOverlap(IVar.Var[][] origins, int[]... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[][] origins, int[][] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[][] origins, IVar.Var[]... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[][] origins, IVar.Var[][] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[] origins, int... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[] origins, int[] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[] origins, IVar.Var... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var[] origins, IVar.Var[] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var x1, IVar.Var x2, int length1, int length2)
Builds a constraintnoOverlap
from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap.default CtrEntities.CtrEntity
noOverlap(IVar.Var x1, IVar.Var x2, IVar.Var length1, IVar.Var length2)
Builds a constraintnoOverlap
from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap.default XNodeParent<IVar>
not(Object operand)
Returns the root of a syntactic tree built with the unary operatornot
applied to the specified operand.default CtrEntities.CtrEntity
notAllEqual(IVar.Var... list)
Builds a constraintnValues
from the specified arguments: at least two distinct values are assigned to the variables of the specified list.default CtrEntities.CtrEntity
notEqual(Object... operands)
Deprecated.default XNodeParent<IVar>
notin(Object var, Object set)
Returns the root of a syntactic tree built with the operatornotin
applied to the specified operands.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Condition condition)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the specified condition.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Condition condition, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the specified condition.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, int limit, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified set of values.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified set of values.default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified interval (range).default XNodeParent<IVar>
or(Object... operands)
Returns the root of a syntactic tree built with the operatoror
applied to the specified operands.default CtrEntities.CtrEntity
ordered(IVar.Var[] list, int[] lengths, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths.default CtrEntities.CtrEntity
ordered(IVar.Var[] list, IVar.Var[] lengths, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths.default CtrEntities.CtrEntity
ordered(IVar.Var[] list, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator.default XNodeParent<IVar>
pow(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorpow
applied to the specified operands.default void
prettyDisplay(String[] values)
Called to display a solution given by the specified array.default XNodeParent<IVar>
queenAttack(IVar x, IVar y, int order)
Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two distinct cells of a flattened matrix (whose order is specified) on the same row, column or diagonal.default Range
range(int length)
Constructs an objectRange
from the specified length (using implicitly a lower bound equal to 0 and a step equal to 1).default Range
range(int startInclusive, int endExclusive)
Constructs an objectRange
from the specified bounds (using implicitly a step equal to 1).default Range
range(int startInclusive, int endExclusive, int step)
Constructs an objectRange
from the specified bounds and step (difference between each two successive numbers).default Range
rangeClosed(int startInclusive, int endInclusive)
Constructs an objectRange
from the specified bounds (using implicitly a step equal to 1).default Range
rangeClosed(int startInclusive, int endInclusive, int step)
Constructs an objectRange
from the specified bounds and step (difference between each two successive numbers).default CtrEntities.CtrEntity
regular(IVar.Var[] scp, Automaton automaton)
Builds a constraintregular
from the specified scope and the specified automaton.default XNode<IVar>
set(int[] operands)
Returns the node of a syntactic tree built with the operatorset
applied to the integers from the specified array.default XNode<IVar>
set(Object... operands)
Returns the root of a syntactic tree built with the operatorset
applied to the specified operands.default Size.Size1D
size(int length)
Builds an object that represents the size (length) of a 1-dimensional array.default Size.Size2D
size(int length0, int length1)
Builds an object that represents the size (i.e., length of each dimension) of a 2-dimensional array.default Size.Size3D
size(int length0, int length1, int length2)
Builds an object that represents the size (i.e., length of each dimension) of a 3-dimensional array.default Size.Size4D
size(int length0, int length1, int length2, int length3)
Builds an object that represents the size (i.e., length of each dimension) of a 4-dimensional array.default Size.Size5D
size(int length0, int length1, int length2, int length3, int length4)
Builds an object that represents the size (i.e., length of each dimension) of a 5-dimensional array.default CtrEntities.CtrEntity
slide(IVar[] list, Range range, java.util.function.IntFunction<CtrEntities.CtrEntity> template)
Builds a meta-constraintslide
from the specified arguments.default XNodeParent<IVar>
sqr(Object operand)
Returns the root of a syntactic tree built with the unary operatorsqr
applied to the specified operand.default CtrEntities.CtrEntity
stretch(IVar.Var[] list, int[] values, int[] widthsMin, int[] widthsMax)
default CtrEntities.CtrEntity
stretch(IVar.Var[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
default CtrEntities.CtrEntity
strictlyDecreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a strict decreasing order.default CtrEntities.CtrEntity
strictlyDecreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a strict decreasing order on rows.default CtrEntities.CtrEntity
strictlyIncreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a strict increasing order.default CtrEntities.CtrEntity
strictlyIncreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a strict increasing order on rows.default XNodeParent<IVar>
sub(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorsub
applied to the specified operands.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values.default CtrEntities.CtrEntity
sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
sum(IVar.Var[] list, Condition condition)
Builds a constraintsum
from the specified arguments: the sum must respect the specified condition.default CtrEntities.CtrEntity
sum(IVar.Var[] list, IVar.Var[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values.default CtrEntities.CtrEntity
sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
sum(IVar.Var[] list, Range coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified set of values.default CtrEntities.CtrEntity
sum(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified set operator and the specified interval (range).default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default java.util.stream.Stream<XNode<IVar>>
treesFrom(int[] t, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified array.default java.util.stream.Stream<XNode<IVar>>
treesFrom(Collection<Integer> c, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified collection.default java.util.stream.Stream<XNode<IVar>>
treesFrom(java.util.stream.IntStream stream, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified stream.default java.util.stream.Stream<XNode<IVar>>
treesFrom(IVar[] t, java.util.function.Function<IVar,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each variable of the specified array.default java.util.stream.Stream<XNode<IVar>>
treesFrom(Range r, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified range.default IVar.Var
var(String id, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a stand-alone integer variable with the specified id, domain, note (short comment) and classes.default IVar.Var
var(String id, Domains.Dom dom, Types.TypeClass... classes)
Builds a stand-alone integer variable with the specified id, domain and classes.default XNodeParent<IVar>
xor(Object... operands)
Returns the root of a syntactic tree built with the operatorxor
applied to the specified operands.-
Methods inherited from interface org.xcsp.modeler.api.ProblemAPIBase
at, automaton, automaton, automaton, block, condition, condition, condition, condition, control, exceptValue, exceptValues, finalState, finalStates, forall, forall, forall, forall, forall, forall, imp, index, index, indexing, indexing, indexing, indexingTuples, indexingTuples, isModel, modelVariant, modelVariant, name, number, occurBetween, occurExactly, occurExactly, occurrences, occurrences, occursBetween, occursEachBetween, occursEachExactly, onlyOn, readFileLines, readFileLines, startIndex, table, table, table, table, table, table, table, table, tableIntersection, tableWithNewColumn, takingValue, takingValue, takingValues, takingValues, takingValues, transitions, transitions, tuple, weightedBy, weightedBy, weightedBy, weightedBy
-
Methods inherited from interface org.xcsp.modeler.api.ProblemAPIOnVals
addInt, addInt, allCartesian, allCartesian, allCartesian, allCartesian, allCombinations, allCombinations, allPermutations, allPermutations, columnOf, contains, distinctSorted, distinctSorted, dub, dub, firstFrom, firstFrom, maxOf, minOf, repeat, select, select, select, select, select, selectFromIndexing, selectFromIndexing, selectFromIndexing, singleValuesFrom, singleValuesFrom, singleValuesFrom, singleValuesFrom, singleValuesFrom, singleValuesFrom, singleValuesIn, sumOf, sumOf, transpose, vals, valuesFrom, valuesFrom, valuesFrom, valuesFrom, valuesFrom, valuesFrom, valuesFrom, valuesFrom, valuesIn
-
Methods inherited from interface org.xcsp.modeler.api.ProblemAPIOnVars
addObject, addObject, clean, columnOf, contains, diagonalDown, diagonalDown, diagonalDown, diagonalsDown, diagonalsUp, diagonalUp, diagonalUp, diagonalUp, eliminateDim2, eliminateDim3, firstFrom, select, select, select, select, select, select, select, select, select, select, select, select, select, singleVariablesFrom, singleVariablesFrom, singleVariablesIn, transpose, variablesFrom, variablesFrom, variablesFrom, variablesFrom, variablesFrom, variablesFrom, variablesIn, vars, vars, vars, vars, vars, vars, vars, vars
-
Methods inherited from interface org.xcsp.modeler.api.ProblemAPISymbolic
allDifferent, allDifferent, allDifferent, allDifferent, allEqual, allEqual, arraySymbolic, arraySymbolic, arraySymbolic, arraySymbolic, arraySymbolic, arraySymbolic, arraySymbolic, arraySymbolic, ctrFalse, ctrTrue, dom, dom, extension, extension, extension, extension, extension, tableSymbolic, tableSymbolic, tableSymbolic, tableSymbolic, tuple, var, var
-
-
-
-
Method Detail
-
dom
default Domains.Dom dom(int[] values, FunctionalInterfaces.Intx1Predicate p)
Returns an integer domain composed of the sorted distinct values that come from the specified array and that respect the specified predicate.- Parameters:
values
- a 1-dimensional array of integersp
- a predicate allowing us to test if a valuev
must be kept in the domain- Returns:
- an integer domain composed of the sorted distinct values that come from the specified array and that respect the specified predicate
-
dom
default Domains.Dom dom(int[] values)
Returns an integer domain composed of the sorted distinct values that come from the specified array.- Parameters:
values
- a 1-dimensional array of integers- Returns:
- an integer domain composed of the sorted distinct values that come from the specified array
-
dom
default Domains.Dom dom(int value, int... otherValues)
Returns an integer domain composed of the sorted distinct values that come from the specified values.- Parameters:
value
- a first integer (value)otherValues
- a sequence of other integers (values)- Returns:
- an integer domain composed of the sorted distinct values that come from the specified values
-
dom
default Domains.Dom dom(Collection<Integer> values)
Returns an integer domain composed of the sorted distinct values that come from the specified collection.- Parameters:
values
- a collection of integers (values)- Returns:
- an integer domain composed of the sorted distinct values that come from the specified collection
-
dom
default Domains.Dom dom(java.util.stream.IntStream values)
Returns an integer domain composed of the sorted distinct values that come from the specified stream- Parameters:
values
- a stream of integer values- Returns:
- an integer domain composed of the sorted distinct values that come from the specified stream
-
dom
default Domains.Dom dom(int[][] m)
Returns an integer domain composed of the sorted distinct values that come from the specified array.- Parameters:
m
- a 2-dimensional array of variables- Returns:
- an integer domain composed of the sorted distinct values that come from the specified array
-
dom
default Domains.Dom dom(Range range)
Returns an integer domain composed of the values contained in the specified range.- Parameters:
range
- the range of values to be considered for the domain- Returns:
- an integer domain composed of the values contained in the specified range
-
size
default Size.Size1D size(int length)
Builds an object that represents the size (length) of a 1-dimensional array.- Parameters:
length
- the size (length) of the array- Returns:
- an object that represents the size (length) of a 1-dimensional array
-
size
default Size.Size2D size(int length0, int length1)
Builds an object that represents the size (i.e., length of each dimension) of a 2-dimensional array.- Parameters:
length0
- the size (length) of the first dimension of a 2-dimensional arraylength1
- the size (length) of the second dimension of a 2-dimensional array- Returns:
- an object that represents the size (i.e., length of each dimension) of a 2-dimensional array
-
size
default Size.Size3D size(int length0, int length1, int length2)
Builds an object that represents the size (i.e., length of each dimension) of a 3-dimensional array.- Parameters:
length0
- the size (length) of the first dimension of a 3-dimensional arraylength1
- the size (length) of the second dimension of a 3-dimensional arraylength2
- the size (length) of the third dimension of a 3-dimensional array- Returns:
- an object that represents the size (i.e., length of each dimension) of a 3-dimensional array
-
size
default Size.Size4D size(int length0, int length1, int length2, int length3)
Builds an object that represents the size (i.e., length of each dimension) of a 4-dimensional array.- Parameters:
length0
- the size (length) of the first dimension of a 4-dimensional arraylength1
- the size (length) of the second dimension of a 4-dimensional arraylength2
- the size (length) of the third dimension of a 4-dimensional arraylength3
- the size (length) of the fourth dimension of a 4-dimensional array- Returns:
- an object that represents the size (i.e., length of each dimension) of a 4-dimensional array
-
size
default Size.Size5D size(int length0, int length1, int length2, int length3, int length4)
Builds an object that represents the size (i.e., length of each dimension) of a 5-dimensional array.- Parameters:
length0
- the size (length) of the first dimension of a 5-dimensional arraylength1
- the size (length) of the second dimension of a 5-dimensional arraylength2
- the size (length) of the third dimension of a 5-dimensional arraylength3
- the size (length) of the fourth dimension of a 5-dimensional arraylength4
- the size (length) of the fifth dimension of a 5-dimensional array- Returns:
- an object that represents the size (i.e., length of each dimension) of a 5-dimensional array
-
range
default Range range(int startInclusive, int endExclusive, int step)
Constructs an objectRange
from the specified bounds and step (difference between each two successive numbers).- Parameters:
startInclusive
- the lower bound (inclusive) of this rangeendExclusive
- the upper bound (exclusive) of this rangestep
- the step of this range- Returns:
- the object
Range
that represents an interval of values (while considering the specified step)
-
rangeClosed
default Range rangeClosed(int startInclusive, int endInclusive, int step)
Constructs an objectRange
from the specified bounds and step (difference between each two successive numbers).- Parameters:
startInclusive
- the lower bound (inclusive) of this rangeendInclusive
- the upper bound (inclusive) of this rangestep
- the step of this range- Returns:
- the object
Range
that represents an interval of values (while considering the specified step)
-
range
default Range range(int startInclusive, int endExclusive)
Constructs an objectRange
from the specified bounds (using implicitly a step equal to 1).- Parameters:
startInclusive
- the lower bound (inclusive) of this rangeendExclusive
- the upper bound (exclusive) of this range- Returns:
- the object
Range
that represents an interval of values
-
rangeClosed
default Range rangeClosed(int startInclusive, int endInclusive)
Constructs an objectRange
from the specified bounds (using implicitly a step equal to 1).- Parameters:
startInclusive
- the lower bound (inclusive) of this rangeendInclusive
- the upper bound (inclusive) of this range- Returns:
- the object
Range
that represents an interval of values
-
range
default Range range(int length)
Constructs an objectRange
from the specified length (using implicitly a lower bound equal to 0 and a step equal to 1).- Parameters:
length
- the length of this range- Returns:
- the object
Range
that represents an interval of values, from 0 to the specified value (excluded)
-
var
default IVar.Var var(String id, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a stand-alone integer variable with the specified id, domain, note (short comment) and classes. Use methodsdom()
for building integer domains. For example:Var x = var("x", dom(range(10), "x is the number of products");
- Parameters:
id
- the id (unique name) of the variabledom
- the integer domain of the variablenote
- a short comment about the variableclasses
- the tags (possibly, none) associated with the variable- Returns:
- a stand-alone integer variable
-
var
default IVar.Var var(String id, Domains.Dom dom, Types.TypeClass... classes)
Builds a stand-alone integer variable with the specified id, domain and classes. Use methodsdom()
for building integer domains. For example:Var x = var("x", dom(range(10));
- Parameters:
id
- the id (unique name) of the variabledom
- the integer domain of the variableclasses
- the tags (possibly, none) associated with the variable- Returns:
- a stand-alone integer variable
-
array
default IVar.Var[] array(String id, Size.Size1D size, FunctionalInterfaces.IntToDom f, String note, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Methodsize(int)
for building the size (length) of the array. The specified functionf
associates an integer domain with each variable at indexi
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, the first five variables have a domain containing 10 values whereas the next five variables have a domain containing two values only:Var[] = array("x", size(10), i -> i < 5 ? dom(range(10)) : dom(0,1),"x[i] is the number of carrots eaten by the ith rabbit");
- Parameters:
id
- the id (unique name) of the arraysize
- the length of the arrayf
- a function that associates an integer domain with any possible indexi
of a variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 1-dimensional array of integer variables
-
array
default IVar.Var[] array(String id, Size.Size1D size, FunctionalInterfaces.IntToDom f, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, and classes. Use Methodsize(int)
for building the size (length) of the array. The specified functionf
associates an integer domain with each variable at indexi
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, the first five variables have a domain containing 10 values whereas the next five variables have a domain containing two values only:Var[] = array("x", size(10), i -> i < 5 ? dom(range(10)) : dom(0,1));
- Parameters:
id
- the id (unique name) of the arraysize
- the length of the arrayf
- a function that associates an integer domain with any possible indexi
of a variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 1-dimensional array of integer variables
-
array
default IVar.Var[] array(String id, Size.Size1D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, domain, note and classes. Use Methodsize(int)
for building the size (length) of the array. Each variable of the array has the specified integer domain. In the following example, the ten variables have a domain containing 10 values:Var[] = array("x", size(10), dom(range(10), "x[i] is the number of carrots eaten by the ith rabbit");
- Parameters:
id
- the id (unique name) of the arraysize
- the length of the arraydom
- the domain of each variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 1-dimensional array of integer variables
-
array
default IVar.Var[] array(String id, Size.Size1D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 1-dimensional array of integer variables with the specified id, size, domain, and classes. Use Methodsize(int)
for building the size (length) of the array. Each variable of the array has the specified integer domain. In the following example, the ten variables have a domain containing 10 values:Var[] = array("x", size(10), dom(range(10));
- Parameters:
id
- the id (unique name) of the arraysize
- the length of the arraydom
- the domain of each variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 1-dimensional array of integer variables
-
array
default IVar.Var[][] array(String id, Size.Size2D size, FunctionalInterfaces.Intx2ToDom f, String note, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Methodsize(int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][] = array("x", size(10, 5), (i,j) -> i < j ? dom(range(10)) : dom(0,1), "x[i][j] is the number of forks built by the jth worker at the ith factory");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j)
of a variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 2-dimensional array of integer variables
-
array
default IVar.Var[][] array(String id, Size.Size2D size, FunctionalInterfaces.Intx2ToDom f, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, and classes. Use Methodsize(int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][] = array("x", size(10, 5), (i,j) -> i < j ? dom(range(10)) : dom(0,1));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j)
of a variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 2-dimensional array of integer variables
-
array
default IVar.Var[][] array(String id, Size.Size2D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Methodsize(int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][] = array("x", size(10, 5), dom(range(10)), "x[i][j] is the number of forks built by the jth worker at the ith factory");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 2-dimensional array of integer variables
-
array
default IVar.Var[][] array(String id, Size.Size2D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 2-dimensional array of integer variables with the specified id, size, domain, and classes. Use Methodsize(int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][] = array("x", size(10, 5), dom(range(10)));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 2-dimensional array of integer variables
-
array
default IVar.Var[][][] array(String id, Size.Size3D size, FunctionalInterfaces.Intx3ToDom f, String note, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Methodsize(int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][] = array("x", size(10, 5, 5), (i,j,k) -> i+j == k ? dom(range(10)) : dom(0,1), "x[i][j][k] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k)
of a variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 3-dimensional array of integer variables
-
array
default IVar.Var[][][] array(String id, Size.Size3D size, FunctionalInterfaces.Intx3ToDom f, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, and classes. Use Methodsize(int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][] = array("x", size(10, 5, 5), (i,j,k) -> i+j == k ? dom(range(10)) : dom(0,1));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k)
of a variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 3-dimensional array of integer variables
-
array
default IVar.Var[][][] array(String id, Size.Size3D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Methodsize(int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][] = array("x", size(10, 5, 2), dom(range(10)), "x[i][j][k] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 3-dimensional array of integer variables
-
array
default IVar.Var[][][] array(String id, Size.Size3D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 3-dimensional array of integer variables with the specified id, size, domain, and classes. Use Methodsize(int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][] = array("x", size(10, 5, 2), dom(range(10)));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 3-dimensional array of integer variables
-
array
default IVar.Var[][][][] array(String id, Size.Size4D size, FunctionalInterfaces.Intx4ToDom f, String note, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Methodsize(int,int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k,l)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][][] = array("x", size(10, 5, 5, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1), "x[i][j][k][l] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k,l)
of a variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 4-dimensional array of integer variables
-
array
default IVar.Var[][][][] array(String id, Size.Size4D size, FunctionalInterfaces.Intx4ToDom f, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, and classes. Use Methodsize(int,int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k,l)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][][] = array("x", size(10, 5, 5, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k,l)
of a variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 4-dimensional array of integer variables
-
array
default IVar.Var[][][][] array(String id, Size.Size4D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Methodsize(int,int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][][] = array("x", size(10, 5, 2, 2), dom(range(10)), "x[i][j][k][l] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 4-dimensional array of integer variables
-
array
default IVar.Var[][][][] array(String id, Size.Size4D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 4-dimensional array of integer variables with the specified id, size, domain, and classes. Use Methodsize(int,int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][][] = array("x", size(10, 5, 2, 2), dom(range(10)));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 4-dimensional array of integer variables
-
array
default IVar.Var[][][][][] array(String id, Size.Size5D size, FunctionalInterfaces.Intx5ToDom f, String note, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Methodsize(int,int,int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k,l,m)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][][][] = array("x", size(10, 5, 5, 2, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1), "x[i][j][k][l] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k,l),m
of a variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 5-dimensional array of integer variables
-
array
default IVar.Var[][][][][] array(String id, Size.Size5D size, FunctionalInterfaces.Intx5ToDom f, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, and classes. Use Methodsize(int,int,int,int,int)
for building the size (length of each dimension) of the array. The specified functionf
associates an integer domain with each variable at index(i,j,k,l,m)
of the array. In case the specified functionf
return the valuenull
, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:Var[][][][][] = array("x", size(10, 5, 5, 2, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arrayf
- a function that associates an integer domain with any possible index(i,j,k,l,m)
of a variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 5-dimensional array of integer variables
-
array
default IVar.Var[][][][][] array(String id, Size.Size5D size, Domains.Dom dom, String note, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Methodsize(int,int,int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][][][] = array("x", size(10, 5, 2, 2, 2), dom(range(10)), "x[i][j][k][l][m] is something I can't reveal");
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arraynote
- a short comment about the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 5-dimensional array of integer variables
-
array
default IVar.Var[][][][][] array(String id, Size.Size5D size, Domains.Dom dom, Types.TypeClass... classes)
Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Methodsize(int,int,int,int,int)
for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:Var[][][][][] = array("x", size(10, 5, 2, 2, 2), dom(range(10)));
- Parameters:
id
- the id (unique name) of the arraysize
- the size (length of each dimension) of the arraydom
- the domain of each variable in the arrayclasses
- the tags (possibly, none) associated with the array- Returns:
- a 5-dimensional array of integer variables
-
ctrFalse
default CtrEntities.CtrEntity ctrFalse(IVar.Var[] scp)
Builds a disentailed integer constraint, i.e., a special constraint that always returnsfalse
.- Parameters:
scp
- the scope of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by means of method chaining.
-
ctrTrue
default CtrEntities.CtrEntity ctrTrue(IVar.Var[] scp)
Builds an entailed integer constraint, i.e., a special constraint that always returnstrue
. For example, it may be useful to achieve some sophisticated tasks related to some forms of consistency.- Parameters:
scp
- the scope of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by means of method chaining.
-
intension
default CtrEntities.CtrEntity intension(XNodeParent<IVar> tree)
Builds a constraintintension
from the specified argument that represents the root of a syntactic tree. This method can be used with integer variables but also with symbolic variables (but currently, it is not allowed to have both integer and symbolic variables involved simultaneously). As an illustration,intension(eq(x, add(y, z)))
x = y+z
- Parameters:
tree
- a syntactic tree- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining.
-
abs
default XNodeParent<IVar> abs(Object operand)
Returns the root of a syntactic tree built with the unary operatorabs
applied to the specified operand. For example, one possible call isabs(sub(x,y))
that represents|x-y|
- Parameters:
operand
- an object that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
neg
default XNodeParent<IVar> neg(Object operand)
Returns the root of a syntactic tree built with the unary operatorneg
applied to the specified operand. For example, one possible call isneg(add(x,y))
that represents-(x+y)
- Parameters:
operand
- an object that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
sqr
default XNodeParent<IVar> sqr(Object operand)
Returns the root of a syntactic tree built with the unary operatorsqr
applied to the specified operand. For example, one possible call issqr(x)
that representsx*x
- Parameters:
operand
- an object that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
add
default XNodeParent<IVar> add(Object... operands)
Returns the root of a syntactic tree built with the operatoradd
applied to the specified operands. For example, one possible call isadd(x,y,z)
that representsx+y+z
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
sub
default XNodeParent<IVar> sub(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorsub
applied to the specified operands. For example, one possible call issub(x,y)
that representsx-y
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
mul
default XNodeParent<IVar> mul(Object... operands)
Returns the root of a syntactic tree built with the operatormul
applied to the specified operands. For example, one possible call ismul(x,y)
that representsx*y
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
div
default XNodeParent<IVar> div(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatordiv
applied to the specified operands. For example, one possible call isdiv(x,y)
that representsx/y
(integer division)- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
mod
default XNodeParent<IVar> mod(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatormod
applied to the specified operands. For example, one possible call ismod(x,2)
that representsx%2
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
pow
default XNodeParent<IVar> pow(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorpow
applied to the specified operands. For example, one possible call ispow(x,3)
that representsx^3
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
min
default XNodeParent<IVar> min(Object... operands)
Returns the root of a syntactic tree built with the operatormin
applied to the specified operands. For example, one possible call ismin(x,y,z)
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
max
default XNodeParent<IVar> max(Object... operands)
Returns the root of a syntactic tree built with the operatormax
applied to the specified operands. For example, one possible call ismax(x,y,z)
.- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
dist
default XNodeParent<IVar> dist(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatordist
applied to the specified operands. For example, one possible call isdist(x,y)
that represents|x-y|
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
lt
default XNodeParent<IVar> lt(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorlt
applied to the specified operands. For example, one possible call islt(x,10
that representsx<10
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
le
default XNodeParent<IVar> le(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorle
applied to the specified operands. For example, one possible call isle(x,10)
that representsx≤10
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
ge
default XNodeParent<IVar> ge(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorge
applied to the specified operands. For example, one possible call isge(x,10)
that representsx≥10
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
gt
default XNodeParent<IVar> gt(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorgt
applied to the specified operands. For example, one possible call isgt(x,10)
that representsx>10
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
ne
default XNodeParent<IVar> ne(Object... operands)
Returns the root of a syntactic tree built with the operatorne
applied to the specified operands. For example, one possible call isne(x,y)
that representsx≠y
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
eq
default XNodeParent<IVar> eq(Object... operands)
Returns the root of a syntactic tree built with the operatoreq
applied to the specified operands. For example, one possible call iseq(x,y)
that representsx=y
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
set
default XNode<IVar> set(Object... operands)
Returns the root of a syntactic tree built with the operatorset
applied to the specified operands. For example, one possible call isset(1,2,3)
that represents{1,2,3}
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
set
default XNode<IVar> set(int[] operands)
Returns the node of a syntactic tree built with the operatorset
applied to the integers from the specified array. For example, ift
id an array containing values 1, 2 and 3, then the callset(t)
represents{1,2,3}
- Parameters:
operands
- an array of integers- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
in
default XNodeParent<IVar> in(Object var, Object set)
Returns the root of a syntactic tree built with the operatorin
applied to the specified operands. For example, one possible call isin(x,set(1,2,3))
that representsx∈{1,2,3}
- Parameters:
var
- the first operand that is typically a variable but can also can be an objectXNode
set
- the second operand that must have been built with the operatorset
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
notin
default XNodeParent<IVar> notin(Object var, Object set)
Returns the root of a syntactic tree built with the operatornotin
applied to the specified operands. For example, one possible call isnotin(x,set(1,2,3))
that representsx∉{1,2,3}
- Parameters:
var
- the first operand that is typically a variable but can also can be an objectXNode
set
- the second operand that must have been built with the operatorset
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
not
default XNodeParent<IVar> not(Object operand)
Returns the root of a syntactic tree built with the unary operatornot
applied to the specified operand. For example, one possible call isnot(eq(x,y))
that represents¬(x=y)
- Parameters:
operand
- an object that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
and
default XNodeParent<IVar> and(Object... operands)
Returns the root of a syntactic tree built with the operatorand
applied to the specified operands. For example, one possible call isand(eq(x,y),lt(z,3))
that representsx=y∧z<3
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
or
default XNodeParent<IVar> or(Object... operands)
Returns the root of a syntactic tree built with the operatoror
applied to the specified operands. For example, one possible call isor(eq(x,y),lt(z,3))
that representsx=y∨z<3
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
xor
default XNodeParent<IVar> xor(Object... operands)
Returns the root of a syntactic tree built with the operatorxor
applied to the specified operands. For example, one possible call isxor(eq(x,y),lt(z,3))
that representsx=y⨁z<3
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
iff
default XNodeParent<IVar> iff(Object... operands)
Returns the root of a syntactic tree built with the operatoriff
applied to the specified operands. For example, one possible call isiff(eq(x,y),lt(z,3))
that representsx=y⇔z<3
- Parameters:
operands
- a sequence of operands that can be integers, variables, or objectsXNode
- Returns:
- an object
XNode
that represents the node of a syntactic tree
-
imp
default XNodeParent<IVar> imp(Object operand1, Object operand2)
Returns the root of a syntactic tree built with the binary operatorimp
applied to the specified operands. For example, one possible call isimp(eq(x,y),lt(z,3)
that representsx=y⇒z<3
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
XNodeParent
that represents the root of a syntactic tree
-
ifThenElse
default XNodeParent<IVar> ifThenElse(Object operand1, Object operand2, Object operand3)
Returns the root of a syntactic tree built with the binary operatorif
applied to the specified operands. For example, one possible call isif(eq(x,y),2,4)
that representsx=y?2:4
- Parameters:
operand1
- the first operand that must correspond to a Boolean expression (values 0 or 1)operand2
- the second operand that can be an integer, a variable, or an objectXNode
operand3
- the third operand that can be an integer, a variable, or an objectXNode
- Returns:
- the root of a syntactic tree built from the specified operands
-
knightAttack
default XNodeParent<IVar> knightAttack(IVar x, IVar y, int order)
Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two cells of a flattened matrix (whose order is specified) at a knight distance.- Parameters:
x
- a first variabley
- a second variableorder
- the order of the matrix- Returns:
- the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two distinct cells of a flattened matrix (whose order is specified) at a knight distance
-
queenAttack
default XNodeParent<IVar> queenAttack(IVar x, IVar y, int order)
Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two distinct cells of a flattened matrix (whose order is specified) on the same row, column or diagonal.- Parameters:
x
- a first variabley
- a second variableorder
- the order of the matrix- Returns:
- the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two cells of a flattened matrix (whose order is specified) at a knight distance
-
lessThan
default CtrEntities.CtrEntity lessThan(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorlt
applied to the specified arguments. This is a modeling ease of use. As an illustration,lessThan(x, y);
intension(lt(x, y));
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
lessEqual
default CtrEntities.CtrEntity lessEqual(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorle
applied to the specified arguments. This is a modeling ease of use. As an illustration,lessEqual(x, y);
intension(le(x, y));
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
greaterEqual
default CtrEntities.CtrEntity greaterEqual(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorge
applied to the specified arguments. This is a modeling ease of use. As an illustration,greaterEqual(x, y);
intension(ge(x, y));
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
greaterThan
default CtrEntities.CtrEntity greaterThan(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorgt
applied to the specified arguments. This is a modeling ease of use. As an illustration,greaterThan(x, y);
intension(gt(x, y));
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
equal
default CtrEntities.CtrEntity equal(Object... operands)
Builds a constraintintension
, while considering the operatoreq
applied to the specified arguments. This is a modeling ease of use. As an illustration,equal(x, y);
intension(eq(x, y));
- Parameters:
operands
- the operands that can be integers, variables, or objectsXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
different
default CtrEntities.CtrEntity different(Object... operands)
Builds a constraintintension
, while considering the operatorne
applied to the specified arguments. This is a modeling ease of use. As an illustration,different(x, y);
intension(ne(x, y));
- Parameters:
operands
- the operands that can be integers, variables, or objectsXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
notEqual
@Deprecated default CtrEntities.CtrEntity notEqual(Object... operands)
Deprecated.
-
belong
default CtrEntities.CtrEntity belong(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorin
applied to the specified arguments. This is a modeling ease of use. As an illustration,belong(x, set(1, 2, 3));
intension(in(x, set(1, 2, 3)));
- Parameters:
operand1
- the first operand that can be a variable, or an objectXNode
operand2
- the second operand that must have been built with the operatorset
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
imply
@Deprecated default CtrEntities.CtrEntity imply(Object operand1, Object operand2)
Deprecated.
-
implication
default CtrEntities.CtrEntity implication(Object operand1, Object operand2)
Builds a constraintintension
, while considering the operatorimp
applied to the specified arguments. This is a modeling ease of use. As an illustration,implication(eq(x, y), lt(z, 3));
intension(imp(eq(x, y), lt(z, 3)));
- Parameters:
operand1
- the first operand that can be an integer, a variable, or an objectXNode
operand2
- the second operand that can be an integer, a variable, or an objectXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
equivalence
default CtrEntities.CtrEntity equivalence(Object... operands)
Builds a constraintintension
, while considering the operatoriff
applied to the specified arguments. This is a modeling ease of use. As an illustration,equivalence(eq(x, y), lt(z, 3));
intension(iff(eq(x, y), lt(z, 3)));
- Parameters:
operands
- the operands that can be integers, variables, or objectsXNode
he operands that can be integers, variables, or objectsXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
conjunction
default CtrEntities.CtrEntity conjunction(Object... operands)
Builds a constraintintension
, while considering the operatoradd
applied to the specified arguments. This is a modeling ease of use.- Parameters:
operands
- the operands that can be integers, variables, or objectsXNode
he operands that can be integers, variables, or objectsXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
disjunction
default CtrEntities.CtrEntity disjunction(Object... operands)
Builds a constraintintension
, while considering the operatoror
applied to the specified arguments. This is a modeling ease of use.- Parameters:
operands
- the operands that can be integers, variables, or objectsXNode
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
treesFrom
default java.util.stream.Stream<XNode<IVar>> treesFrom(IVar[] t, java.util.function.Function<IVar,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each variable of the specified array.null
values in the array are discarded.- Parameters:
t
- an array of variablesf
- a function mapping variables into syntactic trees (predicates)- Returns:
- a stream of syntactic trees built by applying the specified function to each variable of the specified array
-
treesFrom
default java.util.stream.Stream<XNode<IVar>> treesFrom(java.util.stream.IntStream stream, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified stream.- Parameters:
stream
- a stream of integersf
- a function mapping integers into syntactic trees (predicates)- Returns:
- a stream of syntactic trees built by applying the specified function to each integer of the specified stream
-
treesFrom
default java.util.stream.Stream<XNode<IVar>> treesFrom(Collection<Integer> c, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified collection.null
values in the collection are discarded.- Parameters:
c
- a collection of integersf
- a function mapping integers into syntactic trees (predicates)- Returns:
- a stream of syntactic trees built by applying the specified function to each integer of the specified collection
-
treesFrom
default java.util.stream.Stream<XNode<IVar>> treesFrom(int[] t, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified array.- Parameters:
t
- an array of integersf
- a function mapping integers into syntactic trees (predicates)- Returns:
- a stream of syntactic trees built by applying the specified function to each integer of the specified array
-
treesFrom
default java.util.stream.Stream<XNode<IVar>> treesFrom(Range r, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified range.- Parameters:
r
- a rangef
- a function mapping integers into syntactic trees (predicates)- Returns:
- a stream of syntactic trees built by applying the specified function to each integer of the specified range
-
extension
default CtrEntities.CtrAlone extension(XNodeParent<IVar> tree)
Builds a constraintextension
from the specified syntactic tree (predicate). The specified intentional constraint is converted in extensional form.- Parameters:
tree
- the root of a syntactic tree (predicate)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extensionDisjunction
default CtrEntities.CtrAlone extensionDisjunction(List<XNodeParent<IVar>> trees)
-
extensionDisjunction
default CtrEntities.CtrAlone extensionDisjunction(XNodeParent<IVar>... trees)
-
extension
default CtrEntities.CtrEntity extension(IVar.Var[] scp, int[][] tuples, Boolean positive)
Builds a constraintextension
from the specified scope and the specified array of tuples, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
). Note that you can use constantsPOSITIVE
andNEGATIVE
.- Parameters:
scp
- the scope of the constrainttuples
- the tuples defining the semantics of the constraintpositive
- boolean value indicating if the tuples are supports or conflicts- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var[] scp, int[]... tuples)
Builds a constraintextension
from the specified scope and the specified array of tuples, seen as supports.- Parameters:
scp
- the scope of the constrainttuples
- the tuples defining the supports of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var[] scp, Collection<int[]> tuples, Boolean positive)
Builds a constraintextension
from the specified scope and the specified collection of tuples, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
). Note that you can use constantsPOSITIVE
andNEGATIVE
.- Parameters:
scp
- the scope of the constrainttuples
- the tuples defining the semantics of the constraintpositive
- boolean value indicating if the tuples are supports or conflicts- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var[] scp, Collection<int[]> tuples)
Builds a constraintextension
from the specified scope and the specified collection of tuples, seen as supports.- Parameters:
scp
- the scope of the constrainttuples
- the tuples defining the supports of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var[] scp, Table table)
Builds a constraintextension
from the specified scope and the specified table, whose elements are seen as supports. An example of integer table that can be constructed istable("(1,2,3)(2,1,1)")
table("(1,2,3)(2,1,1)").positive(false)
- Parameters:
scp
- the scope of the constrainttable
- the table containing the tuples defining the supports of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var x, int[] values, Boolean positive)
Builds a unary constraintextension
from the specified variable and the specified array of values, seen as either supports (whenpositive
istrue
) or conflicts (whenpositive
isfalse
). Note that you can use constantsPOSITIVE
andNEGATIVE
.- Parameters:
x
- the variable involved in this unary constraintvalues
- the values defining the semantics of the constraintpositive
- boolean value indicating if the values are supports or conflicts- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var x, int... values)
Builds a unary constraintextension
from the specified variable and the specified array of values, seen as supports.- Parameters:
x
- the variable involved in this unary constraintvalues
- the values defining the semantics of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
extension
default CtrEntities.CtrEntity extension(IVar.Var x, Table table)
Builds a unary constraintextension
from the specified variable and the specified table.- Parameters:
x
- the variable involved in this unary constrainttable
- the table defining the semantics of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
regular
default CtrEntities.CtrEntity regular(IVar.Var[] scp, Automaton automaton)
Builds a constraintregular
from the specified scope and the specified automaton. Note that an automaton can be built as in the following example:Transitions transitions = Transitions.parse("(q0,0,q1)(q0,2,q2)(q1,0,q3)(q2,2,q3)"); Automaton automata = new Automaton(transitions, "q0", tuple("q2", "q3"));)
- Parameters:
scp
- the scope of the constraintautomaton
- the automaton defining the semantics of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
mdd
default CtrEntities.CtrEntity mdd(IVar.Var[] scp, Transitions transitions)
-
mdd
default CtrEntities.CtrEntity mdd(IVar.Var[] scp, Transition[] transitions)
Builds a constraintmdd
from the specified scope and the specified transitions. Note that transitions can be built as in the following example:Transitions transitions = Transitions.parse("(q0,0,q1)(q0,2,q2)(q1,0,q3)(q2,2,q3)");
- Parameters:
scp
- the scope of the constrainttransitions
- the transitions defining the MDD, and consequently the semantics of the constraint- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(IVar.Var[] list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(IVar.Var x, IVar.Var... others)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values.- Parameters:
x
- a first integer variableothers
- a sequence of other integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(IVar.Var[]... list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values. Note that the specified 2-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables). Do not mistake this form withallDifferentList
- Parameters:
list
- the involved integer variables (a 2-dimensional array)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(IVar.Var[][][] list)
Builds a constraintallDifferent
on the specified integer variables: the variables must all take different values. Note that the specified 3-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables).- Parameters:
list
- the involved integer variables (a 3-dimensional array)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferentExcept
@Deprecated default CtrEntities.CtrEntity allDifferentExcept(IVar.Var[] list, int... exceptValues)
Deprecated.
-
allDifferent
default CtrEntities.CtrEntity allDifferent(IVar.Var[] list, int... exceptValues)
Builds a constraintallDifferent
on the specified integer variables: the variables must take different values, except those that take one of the specified 'exceptional' values.- Parameters:
list
- the involved integer variablesexceptValues
- the values that must be ignored- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferentList
default CtrEntities.CtrEntity allDifferentList(IVar.Var[]... lists)
Builds a constraintallDifferentList
on the specified lists of variables: all tuples formed by the different lists must be different.- Parameters:
lists
- a 2-dimensional array of variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferentMatrix
default CtrEntities.CtrEntity allDifferentMatrix(IVar.Var[][] matrix)
Builds a constraintallDifferentMatrix
on the specified matrix of variables. On each row and on each column, the variables must all take different values.- Parameters:
matrix
- a 2-dimensional array of variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(XNode<IVar>[] trees)
Builds a constraintallDifferent
on the specified syntactic trees (predicates): the predicates, when evaluated, must all take different values.- Parameters:
trees
- an array of syntactic trees (predicates)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allDifferent
default CtrEntities.CtrEntity allDifferent(java.util.stream.Stream<XNode<IVar>> trees)
Builds a constraintallDifferent
on the specified (stream of) syntactic trees (predicates): the predicates, when evaluated, must all take different values.- Parameters:
trees
- a stream of syntactic trees (predicates)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allEqual
default CtrEntities.CtrEntity allEqual(IVar.Var... list)
Builds a constraintallEqual
on the specified integer variables: the variables must all take the same value. Basically, this is a modeling ease of use.- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allEqual
default CtrEntities.CtrEntity allEqual(IVar.Var[][] list)
Builds a constraintallEqual
on the specified integer variables: the variables must all take the same value. Basically, this is a modeling ease of use. Note that the specified 2-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables). Do not mistake this form withallEqualList
- Parameters:
list
- the involved integer variables (a 2-dimensional array)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
allEqualList
default CtrEntities.CtrEntity allEqualList(IVar.Var[]... lists)
Builds a constraintallEqualList
on the specified lists of variables: all tuples formed by the different lists must be equal.- Parameters:
lists
- a 2-dimensional array of variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
ordered
default CtrEntities.CtrEntity ordered(IVar.Var[] list, int[] lengths, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths. We have:for any i in 0..list.length-1, list[i] + lengths[i] <op> list[i+1]
lengths
is the size oflist
minus 1. But, for simplicity, it is authorized to have the size oflengths
being equal to that oflist
, in which case the last value of the integer array is simply ignored. Basically, this constraint is a modeling ease of use.- Parameters:
list
- the involved integer variableslengths
- the lengths usedoperator
- a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
ordered
default CtrEntities.CtrEntity ordered(IVar.Var[] list, IVar.Var[] lengths, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths. We have:for any i in 0..list.length-1, list[i] + lengths[i] <op> list[i+1]
lengths
is the size oflist
minus 1. But, for simplicity, it is authorized to have the size oflengths
being equal to that oflist
, in which case the last value of the integer array is simply ignored. Basically, this constraint is a modeling ease of use.- Parameters:
list
- the involved integer variableslengths
- the lengths usedoperator
- a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
ordered
default CtrEntities.CtrEntity ordered(IVar.Var[] list, Types.TypeOperatorRel operator)
Builds a constraintordered
on the specified lists of variables: any two successive variables must respect the specified operator. Basically, this is a modeling ease of use.- Parameters:
list
- the involved integer variablesoperator
- a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
strictlyIncreasing
default CtrEntities.CtrEntity strictlyIncreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a strict increasing order. This is a modeling ease of use. As an illustration,strictlyIncreasing(x);
ordered(x, STRICTLY_INCREASING);
- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
increasing
default CtrEntities.CtrEntity increasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering an increasing order. This is a modeling ease of use. As an illustration,increasing(x);
ordered(x, INCREASING);
- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
decreasing
default CtrEntities.CtrEntity decreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a decreasing order. This is a modeling ease of use. As an illustration,decreasing(x);
ordered(x, DECREASING);
- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
strictlyDecreasing
default CtrEntities.CtrEntity strictlyDecreasing(IVar.Var... list)
Builds a constraintordered
on the specified lists of variables, while considering a strict decreasing order. This is a modeling ease of use. As an illustration,strictlydecreasing(x);
ordered(x, STRICTLY_DeCREASING);
- Parameters:
list
- the involved integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
lex
default CtrEntities.CtrEntity lex(IVar.Var[][] lists, Types.TypeOperatorRel operator)
Builds a constraintlex
on the specified 2-dimensional array of variables: any two successive rows of variables must respect the specified operator. Basically, this is a modeling ease of use.- Parameters:
lists
- a 2-dimensional array of integer variablesoperator
- a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
strictlyIncreasing
default CtrEntities.CtrEntity strictlyIncreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a strict increasing order on rows. This is a modeling ease of use. As an illustration,strictlyIncreasing(x);
ordered(x, STRICTLY_INCREASING);
- Parameters:
lists
- a 2-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
increasing
default CtrEntities.CtrEntity increasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering an increasing order on rows. This is a modeling ease of use. As an illustration,increasing(x);
ordered(x, INCREASING);
- Parameters:
lists
- a 2-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
decreasing
default CtrEntities.CtrEntity decreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a decreasing order on rows. This is a modeling ease of use. As an illustration,decreasing(x);
ordered(x, DeCREASING);
- Parameters:
lists
- a 2-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
strictlyDecreasing
default CtrEntities.CtrEntity strictlyDecreasing(IVar.Var[]... lists)
Builds a constraintlex
on the specified 2-dimensional array of variables, while considering a strict decreasing order on rows. This is a modeling ease of use. As an illustration,strictlyDecreasing(x);
ordered(x, STRICTLY_DECREASING);
- Parameters:
lists
- a 2-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
lexMatrix
default CtrEntities.CtrEntity lexMatrix(IVar.Var[][] matrix, Types.TypeOperatorRel operator)
Builds a constraintlexMatrix
on the specified matrix of variables. Any two successive rows of variables and any two successive columns of variables must respect the specified operator.- Parameters:
matrix
- a 2-dimensional array of integer variablesoperator
- a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Condition condition)
Builds a constraintsum
from the specified arguments: the sum must respect the specified condition.- Parameters:
list
- the summed variablescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, t, EQ, 10);
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Range coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. The coefficients are given under the form of a range. As an illustration,sum(x, range(5), EQ, 10);
- Parameters:
list
- the summed variablescoeffs
- the range of values used as coefficients for the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, EQ, 10);
- Parameters:
list
- the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, t, GT, z);
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, GT, z);
- Parameters:
list
- the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,sum(x, t, IN, range(1, 4));
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,sum(x, IN, 1, 4);
- Parameters:
list
- the summed variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, int[] coeffs, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,sum(x, t, NOTIN, vals(1, 3, 5, 6));
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,sum(x, NOTIN, vals(1, 3, 5, 6));
- Parameters:
list
- the summed variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, IVar.Var[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, y, LE, 100);
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,sum(x, y, LE, z);
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,sum(x, y, IN, 1, 4);
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(IVar.Var[] list, IVar.Var[] coeffs, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,sum(x, y, NOTIN, vals(1, 3, 5, 6));
- Parameters:
list
- the summed variablescoeffs
- the coefficients associated with the summed variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.- Parameters:
trees
- an array of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.- Parameters:
trees
- an array of syntactic trees (usually, predicates)condition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- an array of syntactic trees (usually, predicates)op
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- an array of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- an array of syntactic trees (usually, predicates)op
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- an array of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)condition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)op
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)op
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
sum
default CtrEntities.CtrEntity sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.- Parameters:
trees
- a stream of syntactic trees (usually, predicates)coeffs
- the coefficients associated with the syntactic treesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the sum is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int[] values, Condition condition)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the specified condition.- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integerscondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, vals(0, 1), LE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int value, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, 0, LE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, vals(0, 1), LE, z);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int value, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, 0, LE, z);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,count(x, vals(0, 1), IN, 1, 4);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int value, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,count(x, 0, IN, 1, 4);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int[] values, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,count(x, vals(0, 1), IN, t);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, int value, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,count(x, 1, IN, t);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var[] values, Condition condition)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the specified condition.- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, y, LE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, y, LE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer variableop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, y, LE, z);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit. As an illustration,count(x, y, LE, z);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer variableop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the count is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,count(x, y, IN, 1, 4);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,count(x, y, IN, 1, 4);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer variableop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var[] values, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,count(x, y, IN, t);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
count
default CtrEntities.CtrEntity count(IVar.Var[] list, IVar.Var value, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,count(x, y, IN, t);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atLeast
default CtrEntities.CtrEntity atLeast(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least equal tok
. As an illustration,atLeast(x, 0, 5);
count(x, 0, GE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atMost
default CtrEntities.CtrEntity atMost(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most equal tok
. As an illustration,atMost(x, 0, 5);
count(x, 0, LE, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
exactly
default CtrEntities.CtrEntity exactly(IVar.Var[] list, int value, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactlyk
. As an illustration,exactly(x, 0, 5);
count(x, 0, EQ, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
among
default CtrEntities.CtrEntity among(IVar.Var[] list, int[] values, int k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values is exactlyk
. As an illustration,among(x, vals(2, 3, 4), 5);
count(x, vals(2, 3, 4), EQ, 5);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersk
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atLeast
default CtrEntities.CtrEntity atLeast(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least equal tok
. As an illustration,atLeast(x, 0, k);
count(x, 0, GE, k);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atMost
default CtrEntities.CtrEntity atMost(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most equal tok
. As an illustration,atMost(x, 0, k);
count(x, 0, LE, k);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
exactly
default CtrEntities.CtrEntity exactly(IVar.Var[] list, int value, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactlyk
. As an illustration,exactly(x, 0, k);
count(x, 0, EQ, k);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integerk
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
among
default CtrEntities.CtrEntity among(IVar.Var[] list, int[] values, IVar.Var k)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take one of the specified values is exactlyk
. As an illustration,among(x, vals(2, 3, 4), k);
count(x, vals(2, 3, 4), EQ, k);
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersk
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atLeast1
default CtrEntities.CtrEntity atLeast1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at least 1. As an illustration,atLeast1(x, 2);
count(x, 2, GE, 1);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
atMost1
default CtrEntities.CtrEntity atMost1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is at most 1. As an illustration,atMost1(x, 2);
count(x, 2, LE, 1);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
exactly1
default CtrEntities.CtrEntity exactly1(IVar.Var[] list, int value)
Builds a constraintcount
from the specified arguments: the number of variables in the specified list that take the specified value is exactly 1. As an illustration,exactly1(x, 2);
count(x, 2, EQ, 1);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Condition condition)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the specified condition.- Parameters:
list
- a 1-dimensional array of integer variablescondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, int limit)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit. As an illustration,nValues(x, GE, 3);
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the number is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit. As an illustration,nValues(x, GE, k);
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the number is compared- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,nValues(x, IN, range(1, 3));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set)
Builds a constraintnValues
from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,nValues(x, IN, vals(2, 3, 4));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparison- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Condition condition, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the specified condition.- Parameters:
list
- a 1-dimensional array of integer variablescondition
- an objectcondition
composed of an operator and an operandexceptValues
- a sequence of integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, int limit, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit. As an illustration,nValues(x, GT, 3, exceptValue(0));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the number is comparedexceptValues
- a sequence of integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorRel op, IVar.Var limit, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit. As an illustration,nValuesExcept(x, GT, k, exceptValue(0));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a relational operator (LT, LE, GE, GT, NE, or EQ)limit
- the right operand to which the number is comparedexceptValues
- a sequence of integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, Range range, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified interval (range). As an illustration,nValuesExcept(x, IN, range(1, 3), exceptValue(0));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)range
- a range (interval) of values involved in the comparisonexceptValues
- a sequence of integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
nValues
default CtrEntities.CtrEntity nValues(IVar.Var[] list, Types.TypeConditionOperatorSet op, int[] set, int... exceptValues)
Builds a constraintnValues
from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified set of values. As an illustration,nValuesExcept(x, IN, vals(1, 3, 5), exceptValue(0));
- Parameters:
list
- a 1-dimensional array of integer variablesop
- a set operator (IN or NOTIN)set
- the set of values involved in the comparisonexceptValues
- a sequence of integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
notAllEqual
default CtrEntities.CtrEntity notAllEqual(IVar.Var... list)
Builds a constraintnValues
from the specified arguments: at least two distinct values are assigned to the variables of the specified list.- Parameters:
list
- a 1-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cardinality
default CtrEntities.CtrEntity cardinality(IVar.Var[] list, int[] values, boolean mustBeClosed, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
. These conditions can be stated as follows:- when the object
Occurrences
represents a simple integerv
, obtained by calling MethodoccursEachExactly(int)
,k_i
must be exactlyv
- when the object
Occurrences
represents a 1-dimensional array of integerst
, obtained by calling MethodoccurExactly(int[])
,k_i
must be exactlyt[i]
- when the object
OccursEachBetweeen
represents an interval of integersv..w
, obtained by calling MethodoccursEachBetween(int,int)
,k_i
must belong tov..w
- when the object
OccursBetween
represents two 1-dimensional arrays of integerst1 and t2
, obtained by calling MethodoccurBetween(int[],int[])
,k_i
must belong tot1[i]..t2[i]
- when the object
Occurrences
represents a 1-dimensional array of integer variablesx
, obtained by calling MethodoccurExactly(Var[])
,k_i
must be the same value asx[i]
true
, it is required that all variables inlist
are assigned a value invalues
.
As an illustration, enforcing values 1 and 2 to occur exactly 5 times each is given by:cardinality(x, vals(1, 2), true, occursEachExactly(5));
cardinality(x, vals(1, 2), true, occursEachBetween(3, 5));
cardinality(x, vals(1, 2), true, occurExactly(y1, y2));
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersmustBeClosed
-true
iff all variables oflist
must necessarily be assigned to a value invalues
occurrences
- an objectOccurrences
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- when the object
-
cardinality
default CtrEntities.CtrEntity cardinality(IVar.Var[] list, int[] values, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
. These conditions can be stated as follows:- when the object
Occurrences
represents a simple integerv
, obtained by calling MethodoccursEachExactly(int)
,k_i
must be exactlyv
- when the object
Occurrences
represents a 1-dimensional array of integerst
, obtained by calling MethodoccurExactly(int[])
,k_i
must be exactlyt[i]
- when the object
OccursEachBetweeen
represents an interval of integersv..w
, obtained by calling MethodoccursEachBetween(int,int)
,k_i
must belong tov..w
- when the object
OccursBetween
represents two 1-dimensional arrays of integerst1 and t2
, obtained by calling MethodoccurBetween(int[],int[])
,k_i
must belong tot1[i]..t2[i]
- when the object
Occurrences
represents a 1-dimensional array of integer variablesx
, obtained by calling MethodoccurExactly(Var[])
,k_i
must be the same value asx[i]
cardinality(x, vals(1, 2), occursEachExactly(5));
cardinality(x, vals(1, 2), occursEachBetween(3, 5));
cardinality(x, vals(1, 2), occurExactly(y1, y2));
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integersoccurrences
- an objectOccurrences
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- when the object
-
cardinality
default CtrEntities.CtrEntity cardinality(IVar.Var[] list, Range values, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer in the rangevalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
. These conditions can be stated as follows:- when the object
Occurrences
represents a simple integerv
, obtained by calling MethodoccursEachExactly(int)
,k_i
must be exactlyv
- when the object
Occurrences
represents a 1-dimensional array of integerst
, obtained by calling MethodoccurExactly(int[])
,k_i
must be exactlyt[i]
- when the object
OccursEachBetweeen
represents an interval of integersv..w
, obtained by calling MethodoccursEachBetween(int,int)
,k_i
must belong tov..w
- when the object
OccursBetween
represents two 1-dimensional arrays of integerst1 and t2
, obtained by calling MethodoccurBetween(int[],int[])
,k_i
must belong tot1[i]..t2[i]
- when the object
Occurrences
represents a 1-dimensional array of integer variablesx
, obtained by calling MethodoccurExactly(Var[])
,k_i
must be the same value asx[i]
cardinality(x, range(1, 4), occursEachExactly(5));
cardinality(x, range(1, 4), occursEachBetween(3, 5));
cardinality(x, range(1, 4), occurExactly(y));
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a range of integersoccurrences
- an objectOccurrences
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- when the object
-
cardinality
default CtrEntities.CtrEntity cardinality(IVar.Var[] list, IVar.Var[] values, boolean mustBeClosed, ProblemAPIBase.Occurrences occurrences)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
. These conditions can be stated as follows:- when the object
Occurrences
represents a simple integerv
, obtained by calling MethodoccursEachExactly(int)
,k_i
must be exactlyv
- when the object
Occurrences
represents a 1-dimensional array of integerst
, obtained by calling MethodoccurExactly(int[])
,k_i
must be exactlyt[i]
- when the object
OccursEachBetweeen
represents an interval of integersv..w
, obtained by calling MethodoccursEachBetween(int,int)
,k_i
must belong tov..w
- when the object
OccursBetween
represents two 1-dimensional arrays of integerst1 and t2
, obtained by calling MethodoccurBetween(int[],int[])
,k_i
must belong tot1[i]..t2[i]
- when the object
Occurrences
represents a 1-dimensional array of integer variablesx
, obtained by calling MethodoccurExactly(Var[])
,k_i
must be the same value asx[i]
true
, it is required that all variables inlist
are assigned a value invalues
.
As an illustration, enforcing values from array y to occur exactly 5 times each is given by:cardinality(x, y, true, occursEachExactly(5));
cardinality(x, y, true, occursEachBetween(3, 5));
cardinality(x, y, true, occurExactly(z));
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesmustBeClosed
-true
iff all variables oflist
must necessarily be assigned to a value invalues
occurrences
- an objectOccurrences
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- when the object
-
cardinality
default CtrEntities.CtrEntity cardinality(IVar.Var[] list, IVar.Var[] values, ProblemAPIBase.Occurrences occurs)
Builds a constraintcardinality
from the specified arguments: when considering the sequence of values assigned to the variables oflist
, each integer invalues
at indexi
must occur a number of timesk_i
that respects the conditions imposed by the objectOccurrences
. These conditions can be stated as follows:- when the object
Occurrences
represents a simple integerv
, obtained by calling MethodoccursEachExactly(int)
,k_i
must be exactlyv
- when the object
Occurrences
represents a 1-dimensional array of integerst
, obtained by calling MethodoccurExactly(int[])
,k_i
must be exactlyt[i]
- when the object
OccursEachBetweeen
represents an interval of integersv..w
, obtained by calling MethodoccursEachBetween(int,int)
,k_i
must belong tov..w
- when the object
OccursBetween
represents two 1-dimensional arrays of integerst1 and t2
, obtained by calling MethodoccurBetween(int[],int[])
,k_i
must belong tot1[i]..t2[i]
- when the object
Occurrences
represents a 1-dimensional array of integer variablesx
, obtained by calling MethodoccurExactly(Var[])
,k_i
must be the same value asx[i]
cardinality(x, y, occursEachExactly(5));
cardinality(x, y, occursEachBetween(3, 5));
cardinality(x, y, occurrences(z));
- Parameters:
list
- a 1-dimensional array of integer variablesvalues
- a 1-dimensional array of integer variablesoccurs
- an objectOccurrences
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- when the object
-
maximum
default CtrEntities.CtrEntity maximum(IVar.Var[] list, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must respect the specified condition. Note that the arraylist
is cleaned (i.e.,null
values are discarded).
As an illustration, enforcing the maximum value of x to be strictly less than 10 is given by:maximum(x, condition(LT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablescondition
- an objectCondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
maximum
default CtrEntities.CtrEntity maximum(IVar.Var[] list, IVar.Var value)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be equal to the value assigned to the variablevalue
. Note that the arraylist
is cleaned (i.e.,null
values are discarded).
As an illustration, enforcing the maximum value of x to be m is given by:maximum(x, m);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
maximum
default CtrEntities.CtrEntity maximum(IVar.Var[] list, ProblemAPIBase.Index index)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
. Note thatindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with maximum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with maximum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with maximum value.
Index
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
.
As an illustration, enforcing i to be the index of any variable in x (indexing being started at 0) with maximum value is given by:maximum(x, index(i));
maximum(x, index(i, FIRST));
- Parameters:
list
- a 1-dimensional array of integer variablesindex
- an object wrapping the variable corresponding to the index of a variable inlist
with maximum value- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
maximum
default CtrEntities.CtrEntity maximum(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition. Note thatstartIndex.value
indicates the number used to access the first variable inlist
whereasindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with maximum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with maximum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with maximum value.
StartIndex
, use MethodstartIndex(int)
, for building an objectIndex
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
and for building an objectCondition
use methodscondition()
.
As an illustration, enforcing i to be the index of any variable in x (indexing being started at 1) with maximum value strictly greater than 10 is given by:maximum(x, startIndex(1), index(i), condition(GT, 10));
maximum(x, startIndex(10), index(i, FIRST), condition(GT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablesstartIndex
- the number used to access the first variable inlist
index
- an object wrapping the variable corresponding to the index of a variable inlist
with maximum valuecondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
maximum
default CtrEntities.CtrEntity maximum(IVar.Var[] list, IVar.Var index, Condition condition)
Builds a constraintmaximum
from the specified arguments: the maximum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition. Note that indexing starts at 0 and thatindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with maximum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with maximum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with maximum value.
Index
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
and for building an objectCondition
use methodscondition()
.
As an illustration, enforcing i to be the index of any variable in x (indexing starting at 0, by default) with maximum value strictly greater than 10 is given by:maximum(x, at(i), condition(GT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablesindex
- the variable corresponding to the index of a variable inlist
with maximum valuecondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
minimum
default CtrEntities.CtrEntity minimum(IVar.Var[] list, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must respect the specified condition. Note that the arraylist
is cleaned (i.e.,null
values are discarded).
As an illustration, enforcing the minimum value of x to be strictly less than 10 is given by:minimum(x, condition(LT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablescondition
- an objectCondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
minimum
default CtrEntities.CtrEntity minimum(IVar.Var[] list, IVar.Var value)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be equal to the value assigned to the variablevalue
. Note that the arraylist
is cleaned (i.e.,null
values are discarded).
As an illustration, enforcing the minimum value of x to be m is given by:minimum(x, m);
- Parameters:
list
- a 1-dimensional array of integer variablesvalue
- an integer variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
minimum
default CtrEntities.CtrEntity minimum(IVar.Var[] list, ProblemAPIBase.Index index)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
. Note thatindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with minimum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with minimum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with minimum value.
Index
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
.
As an illustration, enforcing i to be the index of any variable in x (indexing being started at 0) with minimum value is given by:minimum(x, index(i));
minimum(x, index(i, FIRST));
- Parameters:
list
- a 1-dimensional array of integer variablesindex
- an object wrapping the variable corresponding to the index of a variable inlist
with minimum value- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
minimum
default CtrEntities.CtrEntity minimum(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition. Note thatstartIndex.value
indicates the number used to access the first variable inlist
whereasindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with minimum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with minimum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with minimum value.
StartIndex
, use MethodstartIndex(int)
, for building an objectIndex
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
and for building an objectCondition
use methodscondition()
.
As an illustration, enforcing i to be the index of any variable in x (indexing being started at 1) with minimum value strictly greater than 10 is given by:minimum(x, startIndex(1), index(i), condition(GT, 10));
minimum(x, startIndex(10), index(i, FIRST), condition(GT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablesstartIndex
- the number used to access the first variable inlist
index
- an object wrapping the variable corresponding to the index of a variable inlist
with minimum valuecondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
minimum
default CtrEntities.CtrEntity minimum(IVar.Var[] list, IVar.Var index, Condition condition)
Builds a constraintminimum
from the specified arguments: the minimum of the values assigned to the variables oflist
must be the value assigned to the variable oflist
atindex.variable
and besides this value must respect the specified condition. Note that indexing starts at 0 and thatindex.rank
indicates ifindex.variable
must be:- the smallest valid number (FIRST), meaning that
index.variable
must refer to the first variable inlist
with minimum value - the greatest valid number (LAST), meaning that
index.variable
must refer to the last variable inlist
with minimum value - or any valid number (ANY), meaning that
index.variable
can refer to any variable inlist
with minimum value.
Index
, use Methodindex(Var)
or Methodindex(Var,TypeRank)
and for building an objectCondition
use methodscondition()
.
As an illustration, enforcing i to be the index of any variable in x (indexing starting at 0, by default) with minimum value strictly greater than 10 is given by:minimum(x, index(i), condition(GT, 10));
minimum(x, index(i, FIRST), condition(GT, 10));
- Parameters:
list
- a 1-dimensional array of integer variablesindex
- the variable corresponding to the index of a variable inlist
with minimum valuecondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
- the smallest valid number (FIRST), meaning that
-
element
default CtrEntities.CtrEntity element(IVar.Var[] list, Condition condition)
-
element
default CtrEntities.CtrEntity element(IVar.Var[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
-
element
default CtrEntities.CtrEntity element(IVar.Var[] list, IVar.Var index, Condition condition)
-
element
default CtrEntities.CtrEntity element(int[] list, int startIndex, ProblemAPIBase.Index index, Condition condition)
-
element
default CtrEntities.CtrEntity element(int[] list, IVar.Var index, Condition condition)
-
element
default CtrEntities.CtrEntity element(int[][] matrix, int startRowIndex, IVar.Var rowIndex, int startColIndex, IVar.Var colIndex, Condition condition)
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list, int startIndex)
Builds a constraintchannel
from the specified arguments: the valuej
is assigned to the ith variable oflist
iff the valuei
is assigned to the jth variable oflist
. Note thatstartIndex.value
indicates the number used to access the first variable inlist
. Important: for building an objectStartIndex
, use MethodstartIndex(int)
As an illustration, enforcing a channeling constraint on x (indexing starting at 1) is given by:channel(x, startIndex(1));
- Parameters:
list
- a 1-dimensional array of integer variablesstartIndex
- the number used to access the first variable inlist
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list)
Builds a constraintchannel
from the specified arguments: the valuej
is assigned to the ith variable oflist
iff the valuei
is assigned to the jth variable oflist
. Note that indexing starts at 0 (default value).
As an illustration, enforcing a channeling constraint on x (indexing starting at 0, by default) is given by:channel(x);
- Parameters:
list
- a 1-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list1, int startIndex1, IVar.Var[] list2, int startIndex2)
Builds a constraintchannel
from the specified arguments: assuming for simplicity that indexing start at 0, the valuej
is assigned to the ith variable oflist1
iff the valuei
is assigned to the jth variable oflist2
.list1[i] = j => list2|j] = i
list1
must be less than or equal to the size oflist2
. Still, assuming for simplicity that indexing starts at 0, When both arrays have the same size, we have:list1[i] = j <=> list2|j] = i
startIndex1.value
indicates the number used to access the first variable inlist1
, and similarlystartIndex2.value
indicates the number used to access the first variable inlist2
. Important: for building an objectStartIndex
, use MethodstartIndex(int)
As an illustration, enforcing a channeling constraint between x and y (indexing starting at 1 and 0, respectively) is given by:channel(x, startIndex(1), y, startIndex(0));
- Parameters:
list1
- a first 1-dimensional array of integer variablesstartIndex1
- the number used to access the first variable inlist1
list2
- a second 1-dimensional array of integer variablesstartIndex2
- the number used to access the first variable inlist2
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list1, IVar.Var[] list2)
Builds a constraintchannel
from the specified arguments. The valuej
is assigned to the ith variable oflist1
implies that the valuei
is assigned to the jth variable oflist2
.list1[i] = j => list2|j] = i
list1
must be less than or equal to the size oflist2
. When both arrays have the same size, we have:list1[i] = j <=> list2|j] = i
As an illustration, enforcing a channeling constraint between x and y (indexing starting at 0, by default) is given by:channel(x, y);
- Parameters:
list1
- a first 1-dimensional array of integer variableslist2
- a second 1-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list, int startIndex, IVar.Var value)
Builds a constraintchannel
from the specified arguments: the valuei
is assigned tovalue
iff only the ith variable oflist
is assigned the value 1 (0 is the value assigned to the other variables oflist
). Note thatlist
must only contain variables with domain 0/1 and thatstartIndex.value
indicates the number used to access the first variable inlist
. Important: for building an objectStartIndex
, use MethodstartIndex(int)
As an illustration, enforcing a channeling constraint between x (indexing starting at 1) and v is given by:channel(x, startIndex(1), v);
- Parameters:
list
- a 1-dimensional array of integer variablesstartIndex
- the number used to access the first variable inlist
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
channel
default CtrEntities.CtrEntity channel(IVar.Var[] list, IVar.Var value)
Builds a constraintchannel
from the specified arguments: the valuei
is assigned tovalue
iff only the ith variable oflist
is assigned the value 1 (0 is the value assigned to the other variables oflist
). Note thatlist
must only contain variables with domain 0/1 and that indexing starts at 0 (default value).
As an illustration, enforcing a channeling constraint between x (indexing starting at 0, by default) and v is given by:channel(x, v);
- Parameters:
list
- a 1-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
stretch
default CtrEntities.CtrEntity stretch(IVar.Var[] list, int[] values, int[] widthsMin, int[] widthsMax, int[][] patterns)
-
stretch
default CtrEntities.CtrEntity stretch(IVar.Var[] list, int[] values, int[] widthsMin, int[] widthsMax)
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[] origins, int[] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. WhenzeroIgnored
isfalse
, it means that zero-length tasks cannot be packed anywhere (cannot overlap with other tasks).
As an illustration, enforcing that tasks defined by x (origins) and t (lengths) must not overlap is given by:noOverlap(x, t, true);
- Parameters:
origins
- a 1-dimensional array of integer variableslengths
- a 1-dimensional array of integer integerszeroIgnored
- indicates if tasks of length 0 can be ignored- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[] origins, int... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
As an illustration, enforcing that tasks defined by x (origins) and t (lengths) must not overlap is given by:noOverlap(x, t);
- Parameters:
origins
- a 1-dimensional array of integer variableslengths
- a 1-dimensional array of integer integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var x1, IVar.Var x2, int length1, int length2)
Builds a constraintnoOverlap
from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap.
As an illustration, enforcing that the task of origin x1 and length 5 must not overlap with the task of origin x2 and length 3 is given by:noOverlap(x1, x2, 5, 3);
- Parameters:
x1
- a first integer variable, denoting the origin of a first taskx2
- a second integer variable, denoting the origin of a second tasklength1
- the length associated with the first variablelength2
- the length associated with the second variable- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[] origins, IVar.Var[] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. WhenzeroIgnored
isfalse
, it means that zero-length tasks cannot be packed anywhere (cannot overlap with other tasks).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y, true);
- Parameters:
origins
- a 1-dimensional array of integer variableslengths
- a 1-dimensional array of integer variableszeroIgnored
- indicates if tasks of length 0 can be ignored- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[] origins, IVar.Var... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y);
- Parameters:
origins
- a 1-dimensional array of integer variableslengths
- a 1-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var x1, IVar.Var x2, IVar.Var length1, IVar.Var length2)
Builds a constraintnoOverlap
from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
As an illustration, enforcing that the task of origin x1 and length y1 must not overlap with the task of origin x2 and length y2 is given by:noOverlap(x1, x2, y1, y2);
- Parameters:
x1
- a first integer variable, denoting the origin of a first taskx2
- a second integer variable, denoting the origin of a second tasklength1
- the length associated withx1
length2
- the length associated withx2
- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[][] origins, int[][] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its originorigins[i][j]
wrt the jth axis and its lengthlengths[i][j]
wrt the jth axis. WhenzeroIgnored
isfalse
, it means that tasks with a length 0 on some axis cannot be packed anywhere (cannot overlap with other tasks).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y, true);
- Parameters:
origins
- a 2-dimensional array of integer variableslengths
- a 2-dimensional array of integer integerszeroIgnored
- indicates if tasks of length 0 (on any axis) can be ignored- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[][] origins, int[]... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its originorigins[i][j]
wrt the jth axis and its lengthlengths[i][j]
wrt the jth axis. Note that tasks of length 0 on some axis are simply ignored (default value).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y);
- Parameters:
origins
- a 2-dimensional array of integer variableslengths
- a 2-dimensional array of integer integers- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[][] origins, IVar.Var[][] lengths, boolean zeroIgnored)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its originorigins[i][j]
wrt the jth axis and its lengthlengths[i][j]
wrt the jth axis. WhenzeroIgnored
isfalse
, it means that tasks with a length 0 on some axis cannot be packed anywhere (cannot overlap with other tasks).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y, true);
- Parameters:
origins
- a 2-dimensional array of integer variableslengths
- a 2-dimensional array of integer variableszeroIgnored
- indicates if tasks of length 0 (on any axis) can be ignored- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
noOverlap
default CtrEntities.CtrEntity noOverlap(IVar.Var[][] origins, IVar.Var[]... lengths)
Builds a constraintnoOverlap
from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its originorigins[i][j]
wrt the jth axis and its lengthlengths[i][j]
wrt the jth axis. Note that tasks of length 0 on some axis are simply ignored (default value).
As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:noOverlap(x, y);
- Parameters:
origins
- a 2-dimensional array of integer variableslengths
- a 2-dimensional array of integer variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] ends, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskends
- the end of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, int[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each tasklimit
- the limit that must not be exceeded- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] ends, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskends
- the end of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, int[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, int[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each tasklimit
- the limit that must not be exceeded- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] ends, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskends
- the end of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, int[] lengths, IVar.Var[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each tasklimit
- the limit that must not be exceeded- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] ends, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskends
- the end of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] heights, Condition condition)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each taskcondition
- an objectcondition
composed of an operator and an operand- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
cumulative
default CtrEntities.CtrEntity cumulative(IVar.Var[] origins, IVar.Var[] lengths, IVar.Var[] heights, long limit)
Builds a constraintcumulative
from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.- Parameters:
origins
- the origin (beginning) of each tasklengths
- the duration (length) of each taskheights
- the height of each tasklimit
- the limit that must not be exceeded- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
circuit
default CtrEntities.CtrEntity circuit(IVar.Var[] list, int startIndex)
Builds a constraintcircuit
from the specified arguments.- Parameters:
list
- an array of variablesstartIndex
- the index used to refer to the first variable of the array- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
circuit
default CtrEntities.CtrEntity circuit(IVar.Var[] list)
Builds a constraintcircuit
on the specified array of variables. Note that 0 is the index used to refer to the first variable of the array.- Parameters:
list
- an array of variables- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
circuit
default CtrEntities.CtrEntity circuit(IVar.Var[] list, int startIndex, int size)
Builds a constraintcircuit
from the specified arguments.- Parameters:
list
- an array of variablesstartIndex
- the index used to refer to the first variable of the arraysize
- the size of the circuit- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
circuit
default CtrEntities.CtrEntity circuit(IVar.Var[] list, int startIndex, IVar.Var size)
Builds a constraintcircuit
from the specified arguments.- Parameters:
list
- an array of variablesstartIndex
- the index used to refer to the first variable of the arraysize
- the size of the circuit- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
circuit
default CtrEntities.CtrEntity circuit(IVar.Var[] list, IVar.Var size)
Builds a constraintcircuit
from the specified arguments. Note that 0 is the index used to refer to the first variable of the array- Parameters:
list
- an array of variablessize
- the size of the circuit- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
clause
default CtrEntities.CtrEntity clause(IVar.Var[] list, Boolean[] phases)
Builds a constraintclause
from the specified arguments. For each variable and its corresponding phase (i.e., at the same index), a literal is present in the clause: a positive literal when the phase istrue
and a negative literal when the phase isfalse
.- Parameters:
list
- an array of variablesphases
- an array of boolean values- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
clause
default CtrEntities.CtrEntity clause(IVar.Var[] pos, IVar.Var[] neg)
Builds a constraintclause
from the specified arguments. For each variable, a literal is present in the clause: a positive literal when the variable belongs to the first specified array and a negative literal when the variable belongs to the second specified array.- Parameters:
pos
- a first array of variables involved in positive literalsneg
- a second array of variables involved in negative literals- Returns:
- an object
CtrEntity
that wraps the built constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, int... values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value. For example:instantiation(x, t);
- Parameters:
list
- an array of variablesvalues
- an array of integers- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, Range values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value (from the range). For example:instantiation(x, range(10));
- Parameters:
list
- an array of variablesvalues
- a range of values- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, java.util.stream.IntStream values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value in the specified stream.- Parameters:
list
- an array of variablesvalues
- a stream of integers- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, Collection<Integer> values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value in the specified collection.- Parameters:
list
- an array of variablesvalues
- a collection of integers- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, int value)
Builds a constraintinstantiation
, assigning each specified variable with the specified value. For example:instantiation(x, 0);
- Parameters:
list
- an array of variablesvalue
- an integer- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(java.util.stream.Stream<IVar.Var> list, java.util.stream.IntStream values)
Builds a constraintinstantiation
, assigning each specified variable with its corresponding value. For example:instantiation(x, t);
- Parameters:
list
- a stream of variablesvalues
- a stream of integers- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[] list, int[] values, FunctionalInterfaces.Intx1Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at indexi
with its corresponding value at indexi
, provided that the specified predicate acceptsi
. For example:instantiation(x, t, i -> i % 2 == 0);
- Parameters:
list
- a 1-dimensional array of variablesvalues
- a 1-dimensional array of integersp
- a predicate allowing us to test if a variable (and its value) at indexi
must be considered- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[][] list, int[][] values, FunctionalInterfaces.Intx2Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at index(i,j)
with its corresponding value at index(i,j)
, provided that the specified predicate accepts(i,j)
. For example:instantiation(x, t, (i, j) -> i < j);
- Parameters:
list
- a 2-dimensional array of variablesvalues
- a 2-dimensional array of integersp
- a predicate allowing us to test if a variable (and its value) at index(i,j)
must be considered- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
instantiation
default CtrEntities.CtrEntity instantiation(IVar.Var[][][] list, int[][][] values, FunctionalInterfaces.Intx3Predicate p)
Builds a constraintinstantiation
, assigning each specified variable at index(i,j,k)
with its corresponding value at index(i,j,k)
, provided that the specified predicate accepts(i,j,k)
. For example:instantiation(x, t, (i, j, k) -> i == j + k);
- Parameters:
list
- a 3-dimensional array of variablesvalues
- a 3-dimensional array of integersp
- a predicate allowing us to test if a variable (and its value) at index(i,j,k)
must be considered- Returns:
- an object
CtrEntity
that wraps the build constraint and allows us to provide note and tags by method chaining
-
slide
default CtrEntities.CtrEntity slide(IVar[] list, Range range, java.util.function.IntFunction<CtrEntities.CtrEntity> template)
Builds a meta-constraintslide
from the specified arguments. The specified template represents a sliding constraint over the specified variables. More precisely, for each value of the specified range, the specified template is called to generate a constraint using the specified variables. For example:slide(x, range(nCards - 1), i -> extension(vars(x[i], x[i + 1]), tuples));
- Parameters:
list
- a 1-dimensional array of variablesrange
- a range of valuestemplate
- a lambda used to generate a constraint for each value of the range- Returns:
- an object
CtrEntity
that wraps the build meta-constraint and allows us to provide note and tags by method chaining
-
ifThen
default CtrEntities.CtrEntity ifThen(CtrEntities.CtrEntity c1, CtrEntities.CtrEntity c2)
Builds a meta-constraintifThen
from the two specified constraints. This is equivalent to:if c1 then c2
- Parameters:
c1
- a first constraint (used as condition of the alternative)c2
- a second constraint (used as "then" part of the alternative)- Returns:
- an object
CtrEntity
that wraps the built meta-constraint and allows us to provide note and tags by method chaining
-
ifThenElse
default CtrEntities.CtrEntity ifThenElse(CtrEntities.CtrEntity c1, CtrEntities.CtrEntity c2, CtrEntities.CtrEntity c3)
Builds a meta-constraintifThenElse
from the three specified constraints. This is equivalent to:if c1 then c2 else c3
- Parameters:
c1
- a first constraint (used as condition of the alternative)c2
- a second constraint (used as "then" part of the alternative)c3
- a third constraint (used as "else" part of the alternative)- Returns:
- an object
CtrEntity
that wraps the built meta-constraint and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(IVar x)
Builds an objective (function) to minimize: the value of the specified variable.- Parameters:
x
- a variable- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(IVar x)
Builds an objective (function) to maximize: the value of the specified variable.- Parameters:
x
- a variable- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(XNode<IVar> tree)
-
maximize
default ObjEntities.ObjEntity maximize(XNode<IVar> tree)
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar... list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables. For example:minimize(SUM, x, y, z);
- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][] list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][][] list)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar... list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables. For example:maximize(SUM, x, y, z);
- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][] list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][][] list)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).- Parameters:
type
- the type of the objectivelist
- the involved variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[] list, int[] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient. For example:minimize(SUM, vars(x, y, z), vals(1, 2, 1));
- Parameters:
type
- the type of tProblemAPIhe objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][] list, int[][] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][] list, int[][] coeffs, FunctionalInterfaces.Intx2Predicate p)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:minimize(SUM, x, t, (i, j) -> i < j);
- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variablesp
- a predicate allowing us to test if a variable (and its coefficient) at index(i,j)
must be considered.- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs, FunctionalInterfaces.Intx3Predicate p)
Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:minimize(SUM, x, t, (i, j, k) -> i < j + k);
- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variablesp
- a predicate allowing us to test if a variable (and its coefficient) at index(i,j,k)
must be considered- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[] list, int[] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient. For example:maximize(SUM, vars(x, y, z), vals(1, 2, 1));
- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][] list, int[][] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][] list, int[][] coeffs, FunctionalInterfaces.Intx2Predicate p)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:maximize(SUM, x, t, (i, j) -> i < j);
- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variablesp
- a predicate allowing us to test if a variable (and its coefficient) at index(i,j)
must be considered.- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variables- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, IVar[][][] list, int[][][] coeffs, FunctionalInterfaces.Intx3Predicate p)
Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:maximize(SUM, x, t, (i, j, k) -> i < j + k);
- Parameters:
type
- the type of the objectivelist
- the involved variablescoeffs
- the coefficients associated with the variablesp
- a predicate allowing us to test if a variable (and its coefficient) at index(i,j,k)
must be considered.- Returns:
- an object
ObjEntity
that wraps the built objective and allows us to provide note and tags by method chaining
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, XNode<IVar>[] trees)
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
-
minimize
default ObjEntities.ObjEntity minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, XNode<IVar>[] trees)
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
-
maximize
default ObjEntities.ObjEntity maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
-
model
void model()
Builds the model. You have to declare variables, constraints and objectives in this method.
-
prettyDisplay
default void prettyDisplay(String[] values)
Called to display a solution given by the specified array. Advanced use: relevant if a solver is plugged. By default, it does nothing.- Parameters:
values
- the values assigned to the variables
-
decisionVariables
default void decisionVariables(IVar[] list)
Sets the specified variables as those on which a solver should branch in priority. This generates an annotation.- Parameters:
list
- a 1-dimensional array of variables
-
decisionVariables
default void decisionVariables(IVar[][] list)
Sets the specified variables as those on which a solver should branch in priority. This generates an annotation.- Parameters:
list
- a 2-dimensional array of variables
-
-