Uses of Interface
org.maxicp.cp.engine.core.CPIntVar
Packages that use CPIntVar
Package
Description
Constraint Programming Solver Implementation
Constraints implementation (propagators)
Constraints implementation for Scheduling over Interval Variables and Cumulative Functions
Constraints implementation for Sequence Variables
Constraints implementation for Set Variables
Solver objects
Examples of models using the implementation object API
CP Instantiation of the Symbolic Modeling API
-
Uses of CPIntVar in org.maxicp.cp
Methods in org.maxicp.cp that return CPIntVarModifier and TypeMethodDescriptionstatic CPIntVarComputes a variable that is the absolute value of the given variable.static CPIntVarReturns a variable representing the value in a matrix at the position specified by the two given row and column index variables This relation is enforced by theElement2Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPIntVarCPFactory.end(CPIntervalVar var) Returns a CPIntVar that is equal to the start of interval.static CPIntVarCPFactory.endOr(CPIntervalVar interval, int val) Returns a CPIntVar that is equal to the end of interval if it is present, or equal to val if interval is absentstatic CPIntVarCPFactory.length(CPIntervalVar var) Returns a CPIntVar that is equal to the length of interval.static CPIntVarCPFactory.lengthOr(CPIntervalVar interval, int val) Returns a CPIntVar that is equal to the length of interval if it is present, or equal to val if interval is absentstatic CPIntVarCPFactory.makeIntVar(CPSolver cp, int sz) Creates a variable with a domain of specified arity.static CPIntVarCPFactory.makeIntVar(CPSolver cp, int min, int max) Creates a variable with a domain equal to the specified range.static CPIntVarCPFactory.makeIntVar(CPSolver cp, Set<Integer> values) Creates a variable with a domain equal to the specified set of values.static CPIntVar[]CPFactory.makeIntVarArray(int n, Function<Integer, CPIntVar> body) Creates an array of variables with specified lambda functionstatic CPIntVar[]CPFactory.makeIntVarArray(CPSolver cp, int n, int sz) Creates an array of variables with specified domain size.static CPIntVar[]CPFactory.makeIntVarArray(CPSolver cp, int n, int min, int max) Creates an array of variables with specified domain bounds.static CPIntVarCPFactory.makespan(CPIntervalVar... vars) Returns a CPIntVar that is equal to the makespan (the latest end) of the intervals.static CPIntVarComputes a variable that is the maximum of a set of variables.static CPIntVarComputes a variable that is the minimum of a set of variables.static CPIntVarA variable that is a view of-x.static CPIntVarA variable that is a view ofx-v.static CPIntVarReturns a variable representing the multiplication of a given set of variables.static CPIntVarA variable that is a view ofx*a.static CPIntVarA variable that isx*b.static CPIntVarstatic CPIntVarA variable that is a view ofx+v.static CPIntVarCPFactory.start(CPIntervalVar var) Returns a CPIntVar that is equal to the start of interval.static CPIntVarCPFactory.startOr(CPIntervalVar interval, int val) Returns a CPIntVar that is equal to the start of interval if it is present, or equal to val if interval is absentstatic CPIntVarCPFactory.status(CPIntervalVar var) Returns a CPBoolVar that is equal to the status of the interval.static CPIntVarReturns a variable representing the sum of a given set of variables.Methods in org.maxicp.cp with parameters of type CPIntVarModifier and TypeMethodDescriptionstatic CPIntVarComputes a variable that is the absolute value of the given variable.static CPConstraintCPFactory.allDifferent(CPIntVar[] x) Returns an allDifferent constraint using forward checking algostatic CPConstraintCPFactory.allDifferentDC(CPIntVar[] x) Returns an allDifferent constraint that enforces global arc consistency.static CPConstraintCPFactory.alternative(CPIntervalVar interval, CPIntervalVar[] alternatives, CPIntVar cardinality) Returns an Alternative constraint: Enforces that if the interval variable interval is present, then cardinality intervals from the array alternatives must be present and synchronized with a.static CPConstraintReturn a constraint that enforce that N is the number of indices i such that x[i] is in valsstatic CPConstraintCPFactory.atLeastNValue(CPIntVar[] x, CPIntVar nValue) Returns an atLeastNValue constraint using a forward checking algostatic CPConstraintReturns a circuit constraint (using the successor model)static CPIntVarReturns a variable representing the value in a matrix at the position specified by the two given row and column index variables This relation is enforced by theElement2Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPIntVarReturns a variable representing the value in an array at the position specified by the given index variable This relation is enforced by theElement1Dconstraint posted by calling this method.static CPConstraintReturns a constraint imposing that the variable is equal to some given value.static CPConstraintReturns a constraint imposing that the two different variables must take the value.static CPConstraintReturns a constraint imposing that the variable is larger or equal to some given value.static CPConstraintReturns a constraint imposing that the a first variable is larger or equal to a second one.static CPConstraintReturns a constraint imposing that the variable is larger to some given value.static CPConstraintReturns a constraint imposing that the a first variable is larger to a second one.static CPBoolVarReturns a boolean variable representing whether one variable is equal to the given constant.static CPBoolVarReturns a boolean variable representing whether two variables are equal This relation is enforced by theIsEqualVarconstraint posted by calling this method.static CPBoolVarReturns a boolean variable representing whether one variable is larger or equal to the given constant.static CPBoolVarReturns a boolean variable representing whether one variable is larger or equal to another.static CPBoolVarReturns a boolean variable representing whether one variable is larger than the given constant.static CPBoolVarReturns a boolean variable representing whether one variable is larger than the given constant.static CPConstraintReturns the reified version of the constraintx <= y, i.e. the boolean variable that is set to true if and only ifx <= y.static CPBoolVarReturns a boolean variable representing whether one variable is less or equal to the given constant.static CPBoolVarReturns a boolean variable representing whether one variable is less or equal to another.static CPConstraintReturns the reified version of the constraintx < y, i.e. the boolean variable that is set to true if and only ifx < y.static CPBoolVarReturns a boolean variable representing whether one variable is less than the given constant.static CPBoolVarReturns a boolean variable representing whether one variable is less than the given constant.static CPBoolVarReturns a boolean variable representing whether one variable is not equal to the given constant.static CPBoolVarReturns a boolean variable representing whether two variables are not equalstatic CPConstraintReturns a constraint imposing that the variable is less or equal to some given value.static CPConstraintReturns a constraint imposing that the first variable is less or equal to a second one.static CPConstraintReturns a constraint imposing that the variable is less to some given value.static CPConstraintReturns a constraint imposing that the first variable is less to a second one.static CPIntVarComputes a variable that is the maximum of a set of variables.static CPIntVarComputes a variable that is the minimum of a set of variables.static CPIntVarA variable that is a view of-x.static CPIntVarA variable that is a view ofx-v.static CPIntVarReturns a variable representing the multiplication of a given set of variables.static CPIntVarA variable that is a view ofx*a.static CPIntVarA variable that isx*b.static CPIntVarstatic CPConstraintReturns a short table constraintstatic CPConstraintReturns a constraint imposing that the variable is different from some given value.static CPConstraintReturns a constraint imposing that the two different variables must take different values.static CPConstraintReturns a constraint imposing that the first variable differs from the second one minus a constant value.static CPIntVarA variable that is a view ofx+v.static CPConstraintCPFactory.shortTable(CPIntVar[] x, int[][] table, int star) Returns a short table constraintstatic CPBoolVarCPFactory.strictOrder(CPIntVar x, CPIntVar y) Creates a Boolean variable b encoding the strict ordering between x and y.static CPConstraintReturns a sum constraint.static CPIntVarReturns a variable representing the sum of a given set of variables.static CPConstraintReturns a sum constraint.static CPConstraintReturns a sum constraint.static CPConstraintReturns a table constraintMethod parameters in org.maxicp.cp with type arguments of type CPIntVarModifier and TypeMethodDescriptionstatic CPIntVar[]CPFactory.makeIntVarArray(int n, Function<Integer, CPIntVar> body) Creates an array of variables with specified lambda function -
Uses of CPIntVar in org.maxicp.cp.engine.constraints
Methods in org.maxicp.cp.engine.constraints with parameters of type CPIntVarConstructors in org.maxicp.cp.engine.constraints with parameters of type CPIntVarModifierConstructorDescriptionCreates the absolute value constrainty = |x|.AllDifferentDC(CPIntVar... x) AllDifferentFWC(CPIntVar... x) AtLeastNValueDC(CPIntVar[] x, CPIntVar nVal) AtLeastNValueDC(CPIntVar[] x, CPIntVar nval, boolean dontPostFWC) AtLeastNValueFWC(CPIntVar[] x, CPIntVar nValue) The number of values that are used in the array x is at least nValue #{x[i] | i in 0..x.length-1} >= nValueBinaryKnapsack(CPBoolVar[] b, int[] weights, CPIntVar load) A Binary Knapsack constraint ensures that the total load is equal to the sum of the weights of the selected items.BinaryKnapsack(CPBoolVar[] b, int[] weights, CPIntVar load, int n) BinPacking(CPIntVar[] x, int[] w, CPIntVar[] load) Constructs aBinPackingconstraint that ensures a set of weighted items are assigned to bins such that the total weight in each bin matches its specified load.CardinalityMaxFWC(CPIntVar[] x, int[] upper) Constraint the maximum number of occurrences of a range of values in X.CardinalityMinFWC(CPIntVar[] x, int[] lower) Constraint the minimum number of occurences of a range of values in X.Creates a Hamiltonian Circuit Constraint with a successor model.CostAllDifferentDC(CPIntVar[] x, int[][] costs, CPIntVar H) CostCardinalityMaxDC(CPIntVar[] x, int[] upper, int[][] costs, CPIntVar H) Constraint the maximum number of occurrences of a range of values in x.CostCardinalityMaxDC(CPIntVar[] x, int[] upper, int[][] costs, CPIntVar H, CostCardinalityMaxDC.Algorithm algorithm) Constraint the maximum number of occurrences of a range of values in x.Creates an element constraintarray[y] = zwith a domain consistent filteringElement1DDC(int[] array, CPIntVar y, CPIntVar z) Element1DVar(CPIntVar[] array, CPIntVar y, CPIntVar z) Creates an element constraintmat[x][y] = zCreates a constraint such thatx = yInversePerm(CPIntVar[] x, CPIntVar[] y) Creates a constraint that enforces that one permutation is the inverse of another.Returns a boolean variable representing whether one variable is equal to the given constant.IsEqualVar(CPBoolVar b, CPIntVar x, CPIntVar y) Returns a boolean variable representing whether two variables are equalIsLessOrEqual(CPBoolVar b, CPIntVar x, int v) Creates a constraint that link a boolean variable representing whether one variable is less or equal to the given constant.IsLessOrEqualVar(CPBoolVar b, CPIntVar x, CPIntVar y) Creates a reified is less or equal constraintb <=> x <= y.LessOrEqual(CPIntVar x, CPIntVar y) LightBinaryKnapsack(CPBoolVar[] items, int[] weights, CPIntVar load) Creates the maximum constraint y = maximum(x[0],x[1],...,x[n])?MaximumMatching(CPIntVar... x) Creates the constraint x * b = yx * c == zx * y == cx * y == zNegTableCT(CPIntVar[] x, int[][] table) Negative Table constraint.Creates a constraint such thatx != yCreates a constraint such thatx != y + vShortTableCT(CPIntVar[] x, int[][] table, int star) Create a Table constraint with short tuples.SoftCardinalityDC(CPIntVar[] x, int[] low, int[] up, CPIntVar viol) Constraint the values i to appear between low[i] and up[i] times in x but accept some violations to this rule.SoftCardinalityDC(CPIntVar[] x, int minval, int[] low, int[] up, CPIntVar viol) Constraint the values minval+i to appear between low[i] and up[i] times in x but accept some violations to this rule.x is sorted in y according to permutation o y[0] invalid input: '<'= y[1] invalid input: '<'= ...x*x == ySubCircuit(CPIntVar[] x) Creates a SubCircuit Constraint.Creates a sum constraint.Creates a sum constraint.Creates a sum constraint.Table constraint. -
Uses of CPIntVar in org.maxicp.cp.engine.constraints.scheduling
Fields in org.maxicp.cp.engine.constraints.scheduling declared as CPIntVarModifier and TypeFieldDescriptionCPPulseCumulFunction.heightCPStepAtEndCumulFunction.heightCPStepAtStartCumulFunction.heightMethods in org.maxicp.cp.engine.constraints.scheduling that return CPIntVarModifier and TypeMethodDescriptionActivity.height()Returns the value of theheightrecord component.CPCumulFunction.heightAtEnd(IntervalVar interval) CPFlatCumulFunction.heightAtEnd(IntervalVar interval) CPMinusCumulFunction.heightAtEnd(IntervalVar interval) CPPlusCumulFunction.heightAtEnd(IntervalVar interval) CPPulseCumulFunction.heightAtEnd(IntervalVar interval) CPStepAtEndCumulFunction.heightAtEnd(IntervalVar interval) CPStepAtStartCumulFunction.heightAtEnd(IntervalVar interval) CPSumCumulFunction.heightAtEnd(IntervalVar interval) CPCumulFunction.heightAtStart(IntervalVar interval) CPFlatCumulFunction.heightAtStart(IntervalVar interval) CPMinusCumulFunction.heightAtStart(IntervalVar interval) CPPlusCumulFunction.heightAtStart(IntervalVar interval) CPPulseCumulFunction.heightAtStart(IntervalVar interval) CPStepAtEndCumulFunction.heightAtStart(IntervalVar interval) CPStepAtStartCumulFunction.heightAtStart(IntervalVar interval) CPSumCumulFunction.heightAtStart(IntervalVar interval) Constructors in org.maxicp.cp.engine.constraints.scheduling with parameters of type CPIntVarModifierConstructorDescriptionActivity(CPIntervalVar interval, CPIntVar height) Creates an instance of aActivityrecord class.Alternative(CPIntervalVar a, CPIntervalVar[] alts, CPIntVar c) CumulativeDecomposition(CPIntVar[] start, int[] duration, int[] demand, int capa) Creates a cumulative constraint with a decomposition into sum constraint.EndAfter(CPIntervalVar interval, CPIntVar var) Enforces that the end of an interval comes after or at a given variableEndBefore(CPIntervalVar interval, CPIntVar var) Enforces that the end of an interval comes before or at a given variableIntervalVarEnd(CPIntervalVar var, CPIntVar end) IntervalVarEndOrValue(CPIntervalVar var, CPIntVar end, int value) IntervalVarLength(CPIntervalVar var, CPIntVar length) IntervalVarLengthOrValue(CPIntervalVar var, CPIntVar length, int value) IntervalVarStart(CPIntervalVar var, CPIntVar start) IntervalVarStartOrValue(CPIntervalVar var, CPIntVar start, int value) IsEndAfter(CPBoolVar boolVar, CPIntervalVar intervalVar, CPIntVar var) true iff end >= varIsEndBefore(CPBoolVar boolVar, CPIntervalVar intervalVar, CPIntVar var) IsStartBefore(CPBoolVar boolVar, CPIntervalVar intervalVar, CPIntVar var) StartAfter(CPIntervalVar interval, CPIntVar var) Enforces that the start of an interval comes after or at a given variableStartBefore(CPIntervalVar interval, CPIntVar var) Enforces that the start of an interval comes before or at a given variable -
Uses of CPIntVar in org.maxicp.cp.engine.constraints.seqvar
Constructors in org.maxicp.cp.engine.constraints.seqvar with parameters of type CPIntVarModifierConstructorDescriptionTransitionTimes(CPSeqVar seqVar, CPIntVar[] time, int[][] dist) TransitionTimes(CPSeqVar seqVar, CPIntVar[] time, int[][] dist, int[] serviceTime) TransitionTimes(CPSeqVar seqVar, CPIntVar[] time, int[][] dist, Optional<int[]> serviceTime) -
Uses of CPIntVar in org.maxicp.cp.engine.constraints.setvar
Constructors in org.maxicp.cp.engine.constraints.setvar with parameters of type CPIntVar -
Uses of CPIntVar in org.maxicp.cp.engine.core
Subinterfaces of CPIntVar in org.maxicp.cp.engine.coreModifier and TypeInterfaceDescriptioninterfaceBoolean variable, that can be used as a 0-1 IntVar.Classes in org.maxicp.cp.engine.core that implement CPIntVarModifier and TypeClassDescriptionclassclassclassclassImplementation of a variable with aSparseSetDomain.classA view on a variable of typea*xclassA view on a variable of typex+oclassA view on a variable of type-xMethods in org.maxicp.cp.engine.core that return CPIntVarModifier and TypeMethodDescriptionCPFixedSetVar.card()CPSetVar.card()Returns a variable that represents the cardinality of the set.CPSetVarImpl.card()DeltaCPIntVar.variable()The variable related to this delta setDeltaCPIntVarImpl.variable()Methods in org.maxicp.cp.engine.core with parameters of type CPIntVarModifier and TypeMethodDescriptionCreates a maximization objective on the given variable.Creates a minimization objective on the given variable.Constructors in org.maxicp.cp.engine.core with parameters of type CPIntVarModifierConstructorDescriptionCPBoolVarImpl(CPIntVar binaryVar) Create a boolean variable view from the binary variableCPBoolVarIsEqual(CPIntVar x, int v) CPConstraintClosureWithDelta(CPSolver cp, CPIntVar x, Consumer<DeltaCPIntVar> filtering) CPIntVarViewMul(CPIntVar x, int a) CPIntVarViewOffset(CPIntVar x, int offset) Maximize(CPIntVar x, AtomicInteger bound) Minimize(CPIntVar x, AtomicInteger bound) MinimizeObjectiveSum(CPIntVar... x) Create a new objective to minimize x[0] + x[1] + ... + x[n-1] -
Uses of CPIntVar in org.maxicp.cp.examples.raw
Methods in org.maxicp.cp.examples.raw that return CPIntVarMethods in org.maxicp.cp.examples.raw with parameters of type CPIntVar -
Uses of CPIntVar in org.maxicp.cp.examples.raw.darp
Methods in org.maxicp.cp.examples.raw.darp that return CPIntVarMethods in org.maxicp.cp.examples.raw.darp with parameters of type CPIntVar -
Uses of CPIntVar in org.maxicp.cp.examples.raw.jobshop
Methods in org.maxicp.cp.examples.raw.jobshop with parameters of type CPIntVarModifier and TypeMethodDescriptionJobShopSeqVar.rankBinarySlack(CPSeqVar seqVar, CPIntervalVar[] intervals, CPIntVar makespan) -
Uses of CPIntVar in org.maxicp.cp.modeling
Methods in org.maxicp.cp.modeling that return CPIntVarModifier and TypeMethodDescriptionConcreteCPModel.getCPVar(IntExpression v) CPIntVar[]ConcreteCPModel.getCPVar(IntExpression[] v) Methods in org.maxicp.cp.modeling with parameters of type CPIntVarModifier and TypeMethodDescriptionvoidConcreteCPModel.enforceEqualityIntExpression(IntExpression expr, CPIntVar v) Enforce that v == expr, without using Equal/NotEqual if possible.