XpressProblem
- java.lang.Object
-
- com.dashoptimization.XPRSobject
-
- com.dashoptimization.XPRSprob
-
- com.dashoptimization.objects.XpressProblem
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class XpressProblem extends XPRSprob
Optimizer interface that allows modeling by objects.
-
-
Nested Class Summary
Modifier and Type Class Description static classXpressProblem.BranchObjectSubclass ofXPRSbranchobjectthat allows usingVariableinstances to specify bounds and constraints.static classXpressProblem.CallbackAPIAPI for adding and removing callbacks to this problem.-
Nested classes/interfaces inherited from class com.dashoptimization.XPRSprob
XPRSprob.AbstractUserFunction, XPRSprob.AttributeInfo, XPRSprob.Attributes, XPRSprob.BasisValue, XPRSprob.CannotPerformOperationException, XPRSprob.CannotReferenceVariablesException, XPRSprob.ControlInfo, XPRSprob.Controls, XPRSprob.GeneralConstraintInfo, XPRSprob.GlobalInfo, XPRSprob.IISData, XPRSprob.IISStatusInfo, XPRSprob.InfeasInfo, XPRSprob.InvalidStateException, XPRSprob.MapDeltaFunction, XPRSprob.MapDeltaFunctor, XPRSprob.MapFunction, XPRSprob.MapFunctor, XPRSprob.MatrixInfo, XPRSprob.MatrixTriplets, XPRSprob.MIPEntityInfo, XPRSprob.MultiMapDeltaFunction, XPRSprob.MultiMapDeltaFunctor, XPRSprob.MultiMapFunction, XPRSprob.MultiMapFunctor, XPRSprob.PWLInfo, XPRSprob.RowInfo, XPRSprob.Solution, XPRSprob.SolVal, XPRSprob.StatusSolution, XPRSprob.VecMapDeltaFunction, XPRSprob.VecMapDeltaFunctor, XPRSprob.VecMapFunction, XPRSprob.VecMapFunctor
-
-
Field Summary
Modifier and Type Field Description XpressProblem.CallbackAPIcallbacksProperty through which callbacks for this instance can be accessed.static VariableNULL_VARIABLEVariable object that is used to indicate a constant term in expressions that are implemented as maps.
-
Constructor Summary
Constructor Description XpressProblem()Create a new problem without internal name.XpressProblem(java.lang.String problemName)Create a new problem with internal name.XpressProblem(java.lang.String problemName, java.lang.String licensePath)Create a new problem with internal name and non-default license.
-
Method Summary
Modifier and Type Method Description <C extends Index>
CaddConstraint(ConstraintDefinition<C> def)Add a single constraint to this problem.<C extends Index>
java.util.stream.Stream<C>addConstraints(int[] data, java.util.function.IntFunction<ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<C extends Index>
voidaddConstraints(int count1, int count2, int count3, int count4, int count5, Function5<java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<C extends Index>
voidaddConstraints(int count1, int count2, int count3, int count4, Function4<java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<C extends Index>
voidaddConstraints(int count1, int count2, int count3, Function3<java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<C extends Index>
voidaddConstraints(int count1, int count2, java.util.function.BiFunction<java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<C extends Index>
java.util.stream.Stream<C>addConstraints(int count, java.util.function.IntFunction<ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<C extends Index>
java.util.stream.Stream<C>addConstraints(ConstraintDefinition<C>[] defs)Add multiple of the same type constraints to the problem.<K1,K2,K3,C extends Index>
voidaddConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, Function3<K1,K2,K3,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,K3,K4,C extends Index>
voidaddConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, Function4<K1,K2,K3,K4,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,K3,K4,K5,C extends Index>
voidaddConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, java.lang.Iterable<K5> iterable5, Function5<K1,K2,K3,K4,K5,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,C extends Index>
voidaddConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.util.function.BiFunction<K1,K2,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<C extends Index,T extends ConstraintDefinition<C>>
java.util.stream.Stream<C>addConstraints(java.lang.Iterable<T> defs)Add multiple constraints of the same type to the problem.<T,C extends Index>
java.util.stream.Stream<C>addConstraints(java.lang.Iterable<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<T,C extends Index>
java.util.stream.Stream<java.util.Map.Entry<T,C>>addConstraints(java.util.Iterator<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<C extends Index>
java.util.stream.Stream<C>addConstraints(java.util.stream.IntStream data, java.util.function.IntFunction<ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<C extends Index,T extends ConstraintDefinition<C>>
java.util.stream.Stream<C>addConstraints(java.util.stream.Stream<T> defs)Add multiple constraints of the same type to the problem.<T,C extends Index>
java.util.stream.Stream<C>addConstraints(java.util.stream.Stream<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.<K1,K2,C extends Index>
voidaddConstraints(K1[] array1, K2[] array2, java.util.function.BiFunction<K1,K2,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,K3,C extends Index>
voidaddConstraints(K1[] array1, K2[] array2, K3[] array3, Function3<K1,K2,K3,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,K3,K4,C extends Index>
voidaddConstraints(K1[] array1, K2[] array2, K3[] array3, K4[] array4, Function4<K1,K2,K3,K4,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<K1,K2,K3,K4,K5,C extends Index>
voidaddConstraints(K1[] array1, K2[] array2, K3[] array3, K4[] array4, K5[] array5, Function5<K1,K2,K3,K4,K5,ConstraintDefinition<C>> makeConstraint)Add multiple constraints to this problem.<T,C extends Index>
java.util.stream.Stream<C>addConstraints(T[] data, java.util.function.Function<T,ConstraintDefinition<C>> defs)Add multiple constraints of the same type to the problem.intaddCut(int cuttype, Inequality.Definition cut)Add a cut at the current node.voidaddManagedCut(boolean globallyValid, Inequality.Definition cut)Add a managed cut at the current node.voidaddManagedCuts(boolean globallyValid, Inequality.Definition... cuts)Add managed cuts at the current node.voidaddManagedCuts(boolean globallyValid, java.lang.Iterable<Inequality.Definition> cuts)Add managed cuts at the current node.voidaddManagedCuts(boolean globallyValid, java.util.stream.Stream<Inequality.Definition> cuts)Add managed cuts at the current node.voidaddMipSol(double[] values, Variable[] variables, java.lang.String name)Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.voidaddObjective(Expression obj, int priority, double weight)Add a new objective function.VariableaddVariable()Add a single variable to this problem.VariableaddVariable(double lb, double ub, ColumnType type)Add a single variable to this problem.VariableaddVariable(double lb, double ub, ColumnType type, double limit, java.lang.String name)Add a single variable to this problem.VariableaddVariable(double lb, double ub, ColumnType type, java.lang.String name)Add a single variable to this problem.VariableaddVariable(ColumnType type)Add a single variable to this problem.VariableaddVariable(ColumnType type, java.lang.String name)Add a single variable to this problem.VariableaddVariable(java.lang.String name)Add a single variable to this problem.VariableBuilder.VariableArrayBuilderaddVariables(int dim)Create an 1-dimensional array of variables.VariableBuilder.VariableArray2BuilderaddVariables(int dim1, int dim2)Create an 2-dimensional array of variables.VariableBuilder.VariableArray3BuilderaddVariables(int dim1, int dim2, int dim3)Create an 3-dimensional array of variables.VariableBuilder.VariableArray4BuilderaddVariables(int dim1, int dim2, int dim3, int dim4)Create an 4-dimensional array of variables.VariableBuilder.VariableArray5BuilderaddVariables(int dim1, int dim2, int dim3, int dim4, int dim5)Create an 5-dimensional array of variables.<K1> VariableBuilder.VariableMapBuilder<K1>addVariables(java.lang.Iterable<K1> iterable1)Create an 1-dimensional map of variables.<K1,K2>
VariableBuilder.VariableMap2Builder<K1,K2>addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2)Create an 2-dimensional map of variables.<K1,K2,K3>
VariableBuilder.VariableMap3Builder<K1,K2,K3>addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3)Create an 3-dimensional map of variables.<K1,K2,K3,K4>
VariableBuilder.VariableMap4Builder<K1,K2,K3,K4>addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4)Create an 4-dimensional map of variables.<K1,K2,K3,K4,K5>
VariableBuilder.VariableMap5Builder<K1,K2,K3,K4,K5>addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, java.lang.Iterable<K5> iterable5)Create an 5-dimensional map of variables.<K1> VariableBuilder.VariableMapBuilder<K1>addVariables(java.util.stream.Stream<K1> strm)Create an 1-dimensional map of variables.<K1> VariableBuilder.VariableMapBuilder<K1>addVariables(K1[] arr1)Create an 1-dimensional map of variables.<K1,K2>
VariableBuilder.VariableMap2Builder<K1,K2>addVariables(K1[] arr1, K2[] arr2)Create an 2-dimensional map of variables.<K1,K2,K3>
VariableBuilder.VariableMap3Builder<K1,K2,K3>addVariables(K1[] arr1, K2[] arr2, K3[] arr3)Create an 3-dimensional map of variables.<K1,K2,K3,K4>
VariableBuilder.VariableMap4Builder<K1,K2,K3,K4>addVariables(K1[] arr1, K2[] arr2, K3[] arr3, K4[] arr4)Create an 4-dimensional map of variables.<K1,K2,K3,K4,K5>
VariableBuilder.VariableMap5Builder<K1,K2,K3,K4,K5>addVariables(K1[] arr1, K2[] arr2, K3[] arr3, K4[] arr4, K5[] arr5)Create an 5-dimensional map of variables.voidbndSA(int len, Variable[] variables, double[] lblower, double[] lbupper, double[] ublower, double[] ubupper)Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds.voidbndSA(Variable[] variables, double[] lblower, double[] lbupper, double[] ublower, double[] ubupper)Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds.voidchgBounds(Variable[] variables, byte[] bndType, double[] bndValue)Change bounds for multiple variables.XpressProblemchgCoef(Inequality row, Variable variable, double coefficient)Changes the coefficient forvariableinrowin the linear matrix.XpressProblemchgCoefs(Inequality[] row, Variable[] variable, double[] coefficient)Change coefficients in the linear matrix.voidchgColType(Variable[] variables, ColumnType[] colType)Change types for multiple variables.XpressProblemchgObj(Variable[] variables, double[] coefficients)Change objective function coefficients.XpressProblemchgObj(Variable variable, double coefficient)Change objective function coefficient.XpressProblemchgObjN(int objidx, Variable[] variables, double[] coefficients)Change objective function coefficients for a multi-objective problem.XpressProblemchgObjN(int objidx, Variable variable, double coefficient)Change an objective function coefficient for a multi-objective problem.voidchgRHS(Inequality[] rows, double[] newRHS)Change right-hand side for multiple rows.voidchgRHSrange(Inequality[] rows, double[] newRange)Change right-hand side ranges for multiple rows.voidchgRowType(Inequality[] rows, RowType[] rowType)Change types for multiple rows.XpressProblem.BranchObjectcreateBranchObject()Create a new branch object.voiddelCols(int ncols, int[] colind)Delete columns from this problem.voiddelGenCons(int nconstraints, int[] conind)Delete constraints from this problem.voiddelGeneralConstraints(GeneralConstraint[] constraints)Delete general constraints from this problem.voiddelIndicator(Inequality row)Delete a single indicator constraint.voiddelInequalities(Inequality[] rows)Delete inequality constraints from this problem.voiddelPwlCons(int npwls, int[] pwlind)Delete piecewise linear constraints from this problem.voiddelPwlConstraints(PWL[] pwls)Delete PWL constraints from this problem.voiddelRows(int nrows, int[] rowind)Delete rows from this problem.voiddelSets(int nsets, int[] sosind)Delete sets from this problem.voiddelSOS(SOS sos)Delete a single SOS from the problem.voiddelSOS(SOS[] soss)Delete special ordered set constraints.voiddelVariables(Variable[] vars)Delete variables from this problem.GeneralConstraintgeneralConstraintForIndex(int index)Map a general constraint index to aGeneralConstraintobject.GeneralConstraint[]generalConstraintForIndices(int first, int last)Map a range of general constraint indices toGeneralConstraintobjects.doublegetCallbackDual(Inequality r)Get the dual associated with the current callback for a single row.double[]getCallbackDuals(Inequality[] rows)Get the duals associated with the current callback for an array of rows.double[]getCallbackDuals(java.lang.Iterable<Inequality> rows)Get the duals associated with the current callback for a collection of rows.double[]getCallbackDuals(java.util.stream.Stream<Inequality> rows)Get the duals associated with the current callback for a collection of rows.doublegetCallbackRedCost(Variable v)Get the reduced cost associated with the current callbackfor a single variable.double[]getCallbackRedCosts(Variable[] vars)Get the reduced costs associated with the current callback for an array of variables.double[]getCallbackRedCosts(java.lang.Iterable<Variable> vars)Get the reduced costs associated with the current callback for a collection of variables.double[]getCallbackRedCosts(java.util.stream.Stream<Variable> vars)Get the reduced costs associated with the current callback for a collection of variables.doublegetCallbackSlack(Inequality r)Get the slack associated with the current callback for a single row.double[]getCallbackSlacks(Inequality[] rows)Get the slacks associated with the current callback for an array of rows.double[]getCallbackSlacks(java.lang.Iterable<Inequality> rows)Get the slacks associated with the current callback for a collection of rows.double[]getCallbackSlacks(java.util.stream.Stream<Inequality> rows)Get the slacks associated with the current callback for a collection of rows.doublegetCallbackSolution(Variable v)Get the solution associated with the current callback for a single variable.double[]getCallbackSolution(Variable[] vars)Get the solution associated with the current callback for an array of variables.double[]getCallbackSolution(java.lang.Iterable<Variable> vars)Get the solution associated with the current callback for a collection of variables.double[]getCallbackSolution(java.util.stream.Stream<Variable> vars)Get the solution associated with the current callback for a collection of variables.doublegetCoef(Inequality row, Variable variable)Query a single coefficient from the linear matrix.doublegetDual(Inequality r)Get the dual for a single row.double[]getDuals(Inequality[] rows)Get the duals for an array of rows.double[]getDuals(java.lang.Iterable<Inequality> rows)Get the duals for a collection of rows.double[]getDuals(java.util.stream.Stream<Inequality> rows)Get the duals for a collection of rows.GeneralConstraint[]getGeneralConstraints()Get all the general constraints currently defined in this problem.IISgetIIS(int iis)Get the specified IIS.IndicatorObjectsgetIndicator(Inequality row)Get indicator information for a single row.Inequality[]getInequalities()Get all the inequalities currently defined in this problem.LinTermListgetInequalityLinear(Inequality row)Deprecated.since 44.00, Use getLhs() insteadLinExpressiongetInequalityLinear(Inequality row, java.util.function.Supplier<LinExpression> expression)Get the linear part of the left-hand side of a row.ExpressiongetLhsExpression(int row)Get the left-hand side of a row as an expression.doublegetObj(Variable variable)Query an objective function coefficient.doublegetObjN(int objidx, Variable variable)Query an objective function coefficient.PWL[]getPWLs()Get all piecewise linear constraints currently defined in this problem.doublegetRedCost(Variable v)Get the reduced cost for a single variable.double[]getRedCosts(Variable[] vars)Get the reduced costs for an array of variables.double[]getRedCosts(java.lang.Iterable<Variable> vars)Get the reduced costs for a collection of variables.double[]getRedCosts(java.util.stream.Stream<Variable> vars)Get the reduced costs for a collection of variables.doublegetSlack(Inequality r)Get the current slack for a single row.double[]getSlacks(Inequality[] rows)Get the current slacks for an array of rows.double[]getSlacks(java.lang.Iterable<Inequality> rows)Get the current slacks for a collection of rows.double[]getSlacks(java.util.stream.Stream<Inequality> rows)Get the current slacks for a collection of rows.doublegetSolution(Variable v)Get the current solution for a single variable.double[]getSolution(Variable[] vars)Get the current solution for an array of variables.double[]getSolution(java.lang.Iterable<Variable> vars)Get the current solution for a collection of variables.double[]getSolution(java.util.stream.Stream<Variable> vars)Get the current solution for a collection of variables.SOS[]getSOSs()Get all the special ordered set constraints currently defined in this problem.Variable[]getVariables()Get all the variables currently defined in this problem.Inequality[]inequalitiesForIndices(int first, int last)Map a range of inequality indices to inequality objects.InequalityinequalityForIndex(int index)Map an inequality index to an inequality object.static booleanisNullVariable(Variable v)Check whether a variable is the same asNULL_VARIABLE.booleanisOriginal()Check whether this model instance is in the original state.voidloadDelayedRows(Inequality[] rows)Marks a set of rows as delayed rows.voidloadModelCuts(Inequality[] rows)Marks a set of rows as model cuts.voidnlpSetInitVal(Variable[] variables, double[] values)Set initial values of variables for a non-linear solve.voidnlpSetInitVal(java.util.Map<Variable,java.lang.Double> values)Set initial values of variables for a non-linear solve.voidobjSA(int len, Variable[] variables, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified objective function coefficients.voidobjSA(Variable[] variables, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified objective function coefficients.PWLpwlForIndex(int index)Map a PWL index to a PWL object.PWL[]pwlsForIndices(int first, int last)Map a range of PWL indices to PWL objects.intrepairWeightedInfeas(java.util.Map<Inequality,java.lang.Double> lepref, java.util.Map<Inequality,java.lang.Double> gepref, java.util.Map<Variable,java.lang.Double> lbpref, java.util.Map<Variable,java.lang.Double> ubpref, char phase2, double delta, java.lang.String flags)Repair infeasibilities using weights.voidrhsSA(int len, Inequality[] rows, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients.voidrhsSA(Inequality[] rows, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients.voidsetIndicator(Variable indicatorVariable, boolean indicatorValue, Inequality row)Add an indicator constraint to this model.voidsetIndicators(int[] data, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model.voidsetIndicators(int count, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model.voidsetIndicators(Variable[] indicatorVariable, boolean[] indicatorValue, Inequality[] row)Add indicator constraints to this model.<T> voidsetIndicators(java.lang.Iterable<T> data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model.voidsetIndicators(java.util.stream.IntStream data, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model.<T> voidsetIndicators(java.util.stream.Stream<T> data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model.<T> voidsetIndicators(T[] data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model.voidsetObjective(int idx, Expression obj, int priority, double weight, double abstol, double reltol)Set an objective function and its controls.voidsetObjective(Expression obj)Set the objective function to a new expression.voidsetObjective(Expression obj, XPRSenumerations.ObjSense sense)Set the objective function to a new expression.voidslpSetDetRow(Variable v, Inequality i)Set the determining row of a variable.SOSsosForIndex(int index)Map an SOS index to an SOS object.SOS[]sosForIndices(int first, int last)Map a range of SOS indices to SOS objects.VariablevariableForIndex(int index)Map a variable index to a variable object.Variable[]variablesForIndices(int first, int last)Map a range of variable indices to variable objects.-
Methods inherited from class com.dashoptimization.XPRSprob
addAfterObjectiveListener, addAfterObjectiveListener, addAfterObjectiveListener, addAfterObjectiveListener, addBarIterationListener, addBarIterationListener, addBarIterationListener, addBarIterationListener, addBarLogListener, addBarLogListener, addBarLogListener, addBarLogListener, addBeforeObjectiveListener, addBeforeObjectiveListener, addBeforeObjectiveListener, addBeforeObjectiveListener, addChangeBranchObjectListener, addChangeBranchObjectListener, addChangeBranchObjectListener, addChangeBranchObjectListener, addCheckTimeListener, addCheckTimeListener, addCheckTimeListener, addCheckTimeListener, addCol, addCol, addCol, addCol, addCol, addCol, addCols, addCols, addColumn, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addColumns, addComputeRestartListener, addComputeRestartListener, addComputeRestartListener, addComputeRestartListener, addCut, addCut, addCutLogListener, addCutLogListener, addCutLogListener, addCutLogListener, addCutRoundListener, addCutRoundListener, addCutRoundListener, addCutRoundListener, addCuts, addCuts, addDestroyMTListener, addDestroyMTListener, addDestroyMTListener, addDestroyMTListener, addGapNotifyListener, addGapNotifyListener, addGapNotifyListener, addGapNotifyListener, addGenCons, addGenCons, addInfNodeListener, addInfNodeListener, addInfNodeListener, addInfNodeListener, addIntSolListener, addIntSolListener, addIntSolListener, addIntSolListener, addLpLogListener, addLpLogListener, addLpLogListener, addLpLogListener, addManagedCuts, addManagedCuts, addMessageListener, addMessageListener, addMessageListener, addMessageListener, addMipLogListener, addMipLogListener, addMipLogListener, addMipLogListener, addMipSol, addMipSol, addMipSol, addMipThreadListener, addMipThreadListener, addMipThreadListener, addMipThreadListener, addMsgHandlerListener, addMsgHandlerListener, addMsgHandlerListener, addMsgHandlerListener, addMsJobEndListener, addMsJobEndListener, addMsJobEndListener, addMsJobEndListener, addMsJobStartListener, addMsJobStartListener, addMsJobStartListener, addMsJobStartListener, addMsWinnerListener, addMsWinnerListener, addMsWinnerListener, addMsWinnerListener, addNames, addNames, addNewnodeListener, addNewnodeListener, addNewnodeListener, addNewnodeListener, addNlpCoefEvalErrorListener, addNlpCoefEvalErrorListener, addNlpCoefEvalErrorListener, addNlpCoefEvalErrorListener, addNodeCutoffListener, addNodeCutoffListener, addNodeCutoffListener, addNodeCutoffListener, addNodeLPSolvedListener, addNodeLPSolvedListener, addNodeLPSolvedListener, addNodeLPSolvedListener, addObj, addOptNodeListener, addOptNodeListener, addOptNodeListener, addOptNodeListener, addPreIntsolListener, addPreIntsolListener, addPreIntsolListener, addPreIntsolListener, addPreNodeListener, addPreNodeListener, addPreNodeListener, addPreNodeListener, addPresolveListener, addPresolveListener, addPresolveListener, addPresolveListener, addPwlCons, addPwlCons, addQMatrix, addQMatrix, addRow, addRow, addRow, addRow, addRow, addRows, addRows, addRows, addRows, addSet, addSetNames, addSets, addSets, addSets, addSets, addSlpCascadeEndListener, addSlpCascadeEndListener, addSlpCascadeEndListener, addSlpCascadeEndListener, addSlpCascadeStartListener, addSlpCascadeStartListener, addSlpCascadeStartListener, addSlpCascadeStartListener, addSlpCascadeVarFailListener, addSlpCascadeVarFailListener, addSlpCascadeVarFailListener, addSlpCascadeVarFailListener, addSlpCascadeVarListener, addSlpCascadeVarListener, addSlpCascadeVarListener, addSlpCascadeVarListener, addSlpConstructListener, addSlpConstructListener, addSlpConstructListener, addSlpConstructListener, addSlpDrColListener, addSlpDrColListener, addSlpDrColListener, addSlpDrColListener, addSlpIntSolListener, addSlpIntSolListener, addSlpIntSolListener, addSlpIntSolListener, addSlpIterEndListener, addSlpIterEndListener, addSlpIterEndListener, addSlpIterEndListener, addSlpIterStartListener, addSlpIterStartListener, addSlpIterStartListener, addSlpIterStartListener, addSlpIterVarListener, addSlpIterVarListener, addSlpIterVarListener, addSlpIterVarListener, addSlpPreUpdateLinearizationListener, addSlpPreUpdateLinearizationListener, addSlpPreUpdateLinearizationListener, addSlpPreUpdateLinearizationListener, addUserSolNotifyListener, addUserSolNotifyListener, addUserSolNotifyListener, addUserSolNotifyListener, alter, attributes, basisCondition, basisStability, basisStability, basisStability, binVar, binVar, binVarArray, binVarArray, binVarMap, binVarMap, bndsa, btran, calcObjective, calcObjective, calcObjN, calcObjN, calcReducedCosts, calcSlacks, calcSolInfo, calcSolInfo, chgBounds, chgBounds, chgCoef, chgColType, chgColType, chgGlbLimit, chgGlbLimit, chgLB, chgMCoef, chgMCoef, chgMQObj, chgMQObj, chgObj, chgObj, chgObjN, chgObjSense, chgObjSense, chgQObj, chgQRowCoeff, chgRHS, chgRHS, chgRHSrange, chgRHSrange, chgRowType, chgRowType, chgUB, clearIIS, clearObjective, clearRowFlags, close, controls, contVar, contVar, contVar, contVar, contVarArray, contVarArray, contVarArray, contVarArray, contVarArray, contVarMap, contVarMap, copyCallBacks, copyControls, copyProb, createBranchObject, createBranchObjectFromGlobal, crossoverLpSol, crossoverLpSol, delCPCuts, delCPCuts, delCPCuts, delCPCuts, delCuts, delCuts, delCuts, delCuts, delCuts, delIndicator, delIndicators, delObj, delQMatrix, destroyProb, dumpControls, estimateRowDualRanges, firstIIS, firstIIS, fixGlobals, fixMIPEntities, ftran, getAttribInfo, getAttribInfo, getBarNumStability, getBasis, getBasisVal, getBasisVal, getCallbackDual, getCallbackDual, getCallbackDuals, getCallbackDuals, getCallbackDuals, getCallbackDuals, getCallbackDuals, getCallbackPresolveDual, getCallbackPresolveDual, getCallbackPresolveDuals, getCallbackPresolveDuals, getCallbackPresolveDuals, getCallbackPresolveDuals, getCallbackPresolveDuals, getCallbackPresolveRedCost, getCallbackPresolveRedCost, getCallbackPresolveRedCosts, getCallbackPresolveRedCosts, getCallbackPresolveRedCosts, getCallbackPresolveRedCosts, getCallbackPresolveRedCosts, getCallbackPresolveSlack, getCallbackPresolveSlack, getCallbackPresolveSlacks, getCallbackPresolveSlacks, getCallbackPresolveSlacks, getCallbackPresolveSlacks, getCallbackPresolveSlacks, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackPresolveSolution, getCallbackRedCost, getCallbackRedCost, getCallbackRedCosts, getCallbackRedCosts, getCallbackRedCosts, getCallbackRedCosts, getCallbackRedCosts, getCallbackSlack, getCallbackSlack, getCallbackSlacks, getCallbackSlacks, getCallbackSlacks, getCallbackSlacks, getCallbackSlacks, getCallbackSolution, getCallbackSolution, getCallbackSolution, getCallbackSolution, getCallbackSolution, getCallbackSolution, getCallbackSolution, getCoef, getCoef, getColBasisVal, getCols, getCols, getCols, getCols, getCols, getColType, getColType, getColType, getColumnName, getColumnNames, getControlInfo, getControlInfo, getCPCutList, getCPCutList, getCPCutList, getCPCuts, getCPCuts, getCutList, getCutList, getCutList, getCutList, getCutMap, getCutSlack, getCutSlack, getDblAttrib, getDblAttrib, getDblControl, getDblControl, getDirs, getDirs, getDirs, getDiscreteCols, getDual, getDual, getDualRay, getDualRay, getDuals, getDuals, getDuals, getDuals, getDuals, getGenCons, getGenCons, getGenCons, getGenConsName, getGenConsNames, getGlobal, getGlobal, getGlobalEntities, getGlobalSets, getIISData, getIISData, getIndex, getIndex, getIndicator, getIndicators, getIndicators, getInfeas, getInfeas, getIntAttrib, getIntAttrib, getIntControl, getIntControl, getLastBarSol, getLastBarSol, getLastBarSol, getLastBarSolDjs, getLastBarSolDuals, getLastBarSolSlack, getLastBarSolX, getLastError, getLastError, getLB, getLB, getLB, getLongAttrib, getLongAttrib, getLongControl, getLongControl, getLpSol, getLpSol, getLpSol, getLpSolDjs, getLpSolDuals, getLpSolSlack, getLpSolVal, getLpSolVal, getLpSolX, getMessageStatus, getMessageStatus, getMIPEntities, getMIPEntities, getMIPEntities, getMIPEntities, getMIPEntities, getMipSol, getMipSol, getMipSol, getMipSolSlack, getMipSolVal, getMipSolVal, getMipSolX, getMQObj, getMQObj, getMQObj, getMQObj, getMQObj, getName, getName, getNameListObject, getNames, getNames, getNames, getNames, getNlpsol, getObj, getObj, getObj, getObjDblAttrib, getObjDblAttrib, getObjDblControl, getObjDblControl, getObjIntAttrib, getObjIntAttrib, getObjIntAttrib, getObjIntControl, getObjIntControl, getObjLongAttrib, getObjN, getPivotOrder, getPivots, getPresolveBasis, getPresolveMap, getPresolveSol, getPresolveSol, getPresolveSol, getPresolveSolDjs, getPresolveSolDuals, getPresolveSolSlack, getPresolveSolX, getPrimalRay, getPrimalRay, getProbName, getProbName, getPwlCons, getPwlCons, getPwlCons, getPWLName, getPWLNames, getQObj, getQObj, getQRowCoeff, getQRowCoeff, getQRowIndices, getQRowQMatrix, getQRowQMatrix, getQRowQMatrixTriplets, getQRowQMatrixTriplets, getQRowQMatrixTriplets, getQRows, getQRows, getQRows, getRedCost, getRedCost, getRedCosts, getRedCosts, getRedCosts, getRedCosts, getRedCosts, getRHS, getRHS, getRHS, getRHSrange, getRHSrange, getRHSrange, getRowBasisVal, getRowFlags, getRowFlags, getRowFlags, getRowName, getRowNames, getRows, getRows, getRows, getRows, getRows, getRowType, getRowType, getRowType, getScale, getScaledInfeas, getScaledInfeas, getSetDefinitions, getSetName, getSetNames, getSets, getSlack, getSlack, getSlacks, getSlacks, getSlacks, getSlacks, getSlacks, getSol, getSol, getSol, getSolDjs, getSolDuals, getSolSlack, getSolution, getSolution, getSolution, getSolution, getSolution, getSolution, getSolution, getSolX, getStrAttrib, getStrAttrib, getStrControl, getStrControl, getStringControl, getStrStringAttrib, getUB, getUB, getUB, getUnbVec, getUnbVec, iISAll, IISAll, iISIsolations, IISIsolations, iISStatus, IISStatus, IISStatus, interrupt, interrupt, interrupt, intVar, intVar, intVar, intVar, intVarArray, intVarArray, intVarArray, intVarArray, intVarArray, intVarMap, intVarMap, loadBasis, loadBranchDirs, loadBranchDirs, loadCuts, loadCuts, loadCuts, loadDelayedRows, loadDirs, loadGlobal, loadGlobal, loadLp, loadLp, loadLp, loadLp, loadLPSol, loadLPSol, loadMIP, loadMIP, loadMipSol, loadMipSol, loadMIQCQP, loadMIQCQP, loadMIQP, loadMIQP, loadModelCuts, loadPresolveBasis, loadPresolveDirs, loadQCQP, loadQCQP, loadQCQPGlobal, loadQCQPGlobal, loadQGlobal, loadQGlobal, loadQP, loadQP, loadSecureVecs, lpOptimize, lpOptimize, maxim, maxim, minim, minim, mipOptimize, mipOptimize, msAddCustomPreset, msAddJob, msAddPreset, msClear, nextIIS, nextIIS, nlpAddFormulas, nlpAddUserFunction, nlpAddUserFunction, nlpAddUserFunction, nlpAddUserFunction, nlpAddUserFunction, nlpAddUserFunction, nlpCalcSlacks, nlpChgFormula, nlpChgFormulaStr, nlpChgFormulaString, nlpCurrentIV, nlpDelFormulas, nlpDelUserFunction, nlpEvaluateFormula, nlpEvaluateFormula, nlpGetFormula, nlpGetFormulaRows, nlpGetFormulaStr, nlpGetFormulaString, nlpImportLibFunc, nlpLoadFormulas, nlpOptimize, nlpPostsolveProb, nlpPrintEvalInfo, nlpSetFunctionError, nlpSetInitVal, nlpSetInitVal, nlpValidate, nlpValidateKKT, nlpValidateRow, nlpValidateVector, objSA, optimize, optimize, optimize, pivot, postSolve, postSolveSol, presolveRow, presolveRow, presolveRow, presolveSol, printIIS, readBasis, readBasis, readBasis, readBinSol, readBinSol, readBinSol, readDirs, readDirs, readProb, readProb, readSlxSol, readSlxSol, readSlxSol, removeAfterObjectiveListener, removeAfterObjectiveListener, removeAfterObjectiveListeners, removeBarIterationListener, removeBarIterationListener, removeBarIterationListeners, removeBarLogListener, removeBarLogListener, removeBarLogListeners, removeBeforeObjectiveListener, removeBeforeObjectiveListener, removeBeforeObjectiveListeners, removeChangeBranchObjectListener, removeChangeBranchObjectListener, removeChangeBranchObjectListeners, removeCheckTimeListener, removeCheckTimeListener, removeCheckTimeListeners, removeComputeRestartListener, removeComputeRestartListener, removeComputeRestartListeners, removeCutLogListener, removeCutLogListener, removeCutLogListeners, removeCutRoundListener, removeCutRoundListener, removeCutRoundListeners, removeDestroyMTListener, removeDestroyMTListener, removeDestroyMTListeners, removeGapNotifyListener, removeGapNotifyListener, removeGapNotifyListeners, removeInfNodeListener, removeInfNodeListener, removeInfNodeListeners, removeIntSolListener, removeIntSolListener, removeIntSolListeners, removeLpLogListener, removeLpLogListener, removeLpLogListeners, removeMessageListener, removeMessageListener, removeMessageListeners, removeMipLogListener, removeMipLogListener, removeMipLogListeners, removeMipThreadListener, removeMipThreadListener, removeMipThreadListeners, removeMsgHandlerListener, removeMsgHandlerListener, removeMsgHandlerListeners, removeMsJobEndListener, removeMsJobEndListener, removeMsJobEndListeners, removeMsJobStartListener, removeMsJobStartListener, removeMsJobStartListeners, removeMsWinnerListener, removeMsWinnerListener, removeMsWinnerListeners, removeNewnodeListener, removeNewnodeListener, removeNewnodeListeners, removeNlpCoefEvalErrorListener, removeNlpCoefEvalErrorListener, removeNlpCoefEvalErrorListeners, removeNodeCutoffListener, removeNodeCutoffListener, removeNodeCutoffListeners, removeNodeLPSolvedListener, removeNodeLPSolvedListener, removeNodeLPSolvedListeners, removeOptNodeListener, removeOptNodeListener, removeOptNodeListeners, removePreIntsolListener, removePreIntsolListener, removePreIntsolListeners, removePreNodeListener, removePreNodeListener, removePreNodeListeners, removePresolveListener, removePresolveListener, removePresolveListeners, removeSlpCascadeEndListener, removeSlpCascadeEndListener, removeSlpCascadeEndListeners, removeSlpCascadeStartListener, removeSlpCascadeStartListener, removeSlpCascadeStartListeners, removeSlpCascadeVarFailListener, removeSlpCascadeVarFailListener, removeSlpCascadeVarFailListeners, removeSlpCascadeVarListener, removeSlpCascadeVarListener, removeSlpCascadeVarListeners, removeSlpConstructListener, removeSlpConstructListener, removeSlpConstructListeners, removeSlpDrColListener, removeSlpDrColListener, removeSlpDrColListeners, removeSlpIntSolListener, removeSlpIntSolListener, removeSlpIntSolListeners, removeSlpIterEndListener, removeSlpIterEndListener, removeSlpIterEndListeners, removeSlpIterStartListener, removeSlpIterStartListener, removeSlpIterStartListeners, removeSlpIterVarListener, removeSlpIterVarListener, removeSlpIterVarListeners, removeSlpPreUpdateLinearizationListener, removeSlpPreUpdateLinearizationListener, removeSlpPreUpdateLinearizationListeners, removeUserSolNotifyListener, removeUserSolNotifyListener, removeUserSolNotifyListeners, repairInfeas, repairInfeas, repairWeightedInfeas, repairWeightedInfeas, repairWeightedInfeasBounds, repairWeightedInfeasBounds, restore, restore, restore, rhsSA, save, saveAs, scale, setDblControl, setDefaultControl, setDefaults, setIndicator, setIndicators, setIntControl, setLogFile, setLongControl, setMessageStatus, setObjDblControl, setObjective, setObjective, setObjIntControl, setProbname, setStrControl, slpAddCoefs, slpCascadeOrder, slpCascadeSol, slpChgCascadeNLimit, slpChgCCoef, slpChgCoef, slpChgCoefStr, slpChgDeltaType, slpChgRowStatus, slpChgRowWt, slpConstruct, slpDelCoefs, slpDelCoefs, slpEvaluateCoef, slpEvaluateCoef, slpFixPenalties, slpGetCCoef, slpGetCoefFormula, slpGetCoefs, slpGetCoefStr, slpGetRowStatus, slpGetRowStatus, slpGetRowWT, slpGetRowWT, slpLoadCoefs, slpReInitialize, slpSetDetRow, slpSetDetRow, slpUnConstruct, slpUpdateLinearization, sparseBTran, sparseFTran, storeCuts, storeCuts, strongBranch, strongBranchCB, tune, tuneProbSetFile, tunerReadMethod, tunerWriteMethod, unloadProb, varArray, varArray, varArray, varArray, varArray, varMap, varMap, writeBasis, writeBasis, writeBasis, writeBinSol, writeBinSol, writeBinSol, writeDirs, writeDirs, writeIIS, writeIIS, writeProb, writeProb, writeProb, writePrtSol, writePrtSol, writePrtSol, writeSlxSol, writeSlxSol, writeSlxSol, writeSol, writeSol, writeSol
-
Methods inherited from class com.dashoptimization.XPRSobject
addMsgHandlerListener, addMsgHandlerListener, destroy, isDestroyed
-
-
-
-
Field Detail
-
NULL_VARIABLE
public static final Variable NULL_VARIABLE
Variable object that is used to indicate a constant term in expressions that are implemented as maps.- Since:
- 43.00
-
callbacks
public final XpressProblem.CallbackAPI callbacks
Property through which callbacks for this instance can be accessed.
-
-
Constructor Detail
-
XpressProblem
public XpressProblem()
Create a new problem without internal name. If not yet done then Xpress is initialized with the license found at the default license location. If Xpress is initialized this way then it will be automatically de-initialized once the newly created problem instance is closed.Examples using
XpressProblem:- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Since:
- 43.00
-
XpressProblem
public XpressProblem(java.lang.String problemName)
Create a new problem with internal name. If not yet done then Xpress is initialized with the license found at the default license location. If Xpress is initialized this way then it will be automatically de-initialized once the newly created problem instance is closed.Examples using
XpressProblem:- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Parameters:
-
problemName- Internal name of new problem, can benull. - Since:
- 43.00
-
XpressProblem
public XpressProblem(java.lang.String problemName, java.lang.String licensePath)Create a new problem with internal name and non-default license. If not yet done then Xpress is initialized with the license found atlicensePath. If Xpress is initialized this way then it will be automatically de-initialized once the newly created problem instance is closed.Examples using
XpressProblem:- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Parameters:
-
problemName- Internal name of new problem, can benull. -
licensePath- Path to license location. Can benullor the empty string to indicate that the license is in the default location. - Since:
- 43.00
-
-
Method Detail
-
variableForIndex
public Variable variableForIndex(int index)
Map a variable index to a variable object.- Parameters:
-
index- Index to map. - Returns:
-
The variable for
index. - Since:
- 43.00
- See Also:
-
getVariables()
-
variablesForIndices
public Variable[] variablesForIndices(int first, int last)
Map a range of variable indices to variable objects.- Parameters:
-
first- First index to map. -
last- Last index to map. - Returns:
-
The variables from
first(inclusive) throughlast(inclusive). - Since:
- 43.00
-
delCols
public void delCols(int ncols, int[] colind)Delete columns from this problem. Note that this may be expensive if you useVariableinstances to formulate your problem since indices of remaining variables will have to be updated after columns were deleted from the underlying model. If you have to delete multiple variables then it is best to collect all variables to be deleted in an array and then delete all of them with a single call to this function.
-
delVariables
public void delVariables(Variable[] vars)
Delete variables from this problem.- Parameters:
-
vars- Variables to be deleted. - Since:
- 43.00
-
getSolution
public double[] getSolution(Variable[] vars)
Get the current solution for an array of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.- Parameters:
-
vars- Variables for which solution is queried. - Since:
- 43.00
-
getSolution
public double[] getSolution(java.lang.Iterable<Variable> vars)
Get the current solution for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getSolution:- AddMipSol.java
- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- GoalProg.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- Polygon.java
- PolygonMap.java
- PolygonMapDelta.java
- PolygonMultiMap.java
- PolygonMultiMapDelta.java
- PolygonObjects.java
- PolygonVecMap.java
- PolygonVecMapDelta.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Repair.java
- RoundInt.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- Tableau.java
- TravelingSalesPerson.java
- Trimloss.java
- Wagon.java
- Parameters:
-
vars- Variables for which solution is queried. - Returns:
-
Solution values for
vars. - Since:
- 45.00
-
getSolution
public double[] getSolution(java.util.stream.Stream<Variable> vars)
Get the current solution for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getSolution:- AddMipSol.java
- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- GoalProg.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- Polygon.java
- PolygonMap.java
- PolygonMapDelta.java
- PolygonMultiMap.java
- PolygonMultiMapDelta.java
- PolygonObjects.java
- PolygonVecMap.java
- PolygonVecMapDelta.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Repair.java
- RoundInt.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- Tableau.java
- TravelingSalesPerson.java
- Trimloss.java
- Wagon.java
- Parameters:
-
vars- Variables for which solution is queried. - Returns:
-
Solution values for
vars. - Since:
- 43.00
-
getSolution
public double getSolution(Variable v)
Get the current solution for a single variable.Examples using
getSolution:- AddMipSol.java
- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- GoalProg.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- Polygon.java
- PolygonMap.java
- PolygonMapDelta.java
- PolygonMultiMap.java
- PolygonMultiMapDelta.java
- PolygonObjects.java
- PolygonVecMap.java
- PolygonVecMapDelta.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Repair.java
- RoundInt.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- Tableau.java
- TravelingSalesPerson.java
- Trimloss.java
- Wagon.java
- Parameters:
-
v- Variable for which solution is queried. - Returns:
-
Solution for
v. - Since:
- 43.00
-
getRedCosts
public double[] getRedCosts(Variable[] vars)
Get the reduced costs for an array of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 43.00
-
getRedCosts
public double[] getRedCosts(java.lang.Iterable<Variable> vars)
Get the reduced costs for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 45.00
-
getRedCosts
public double[] getRedCosts(java.util.stream.Stream<Variable> vars)
Get the reduced costs for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 45.00
-
getRedCost
public double getRedCost(Variable v)
Get the reduced cost for a single variable.- Parameters:
-
v- Variable for which reduced cost is queried. - Returns:
-
Reduced cost for
v. - Since:
- 43.00
-
getCallbackSolution
public double[] getCallbackSolution(Variable[] vars)
Get the solution associated with the current callback for an array of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackSolution:- Parameters:
-
vars- Variables for which solution is queried. - Returns:
-
Solution values for
vars. - Since:
- 44.00
-
getCallbackSolution
public double[] getCallbackSolution(java.lang.Iterable<Variable> vars)
Get the solution associated with the current callback for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackSolution:- Parameters:
-
vars- Variables for which solution is queried. - Returns:
-
Solution values for
vars. - Since:
- 45.00
-
getCallbackSolution
public double[] getCallbackSolution(java.util.stream.Stream<Variable> vars)
Get the solution associated with the current callback for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackSolution:- Parameters:
-
vars- Variables for which solution is queried. - Returns:
-
Solution values for
vars. - Since:
- 45.00
-
getCallbackSolution
public double getCallbackSolution(Variable v)
Get the solution associated with the current callback for a single variable.Examples using
getCallbackSolution:- Parameters:
-
v- Variable for which solution is queried. - Returns:
-
Solution for
v. - Since:
- 44.00
-
getCallbackRedCosts
public double[] getCallbackRedCosts(Variable[] vars)
Get the reduced costs associated with the current callback for an array of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackRedCosts:- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 44.00
-
getCallbackRedCosts
public double[] getCallbackRedCosts(java.lang.Iterable<Variable> vars)
Get the reduced costs associated with the current callback for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackRedCosts:- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 44.00
-
getCallbackRedCosts
public double[] getCallbackRedCosts(java.util.stream.Stream<Variable> vars)
Get the reduced costs associated with the current callback for a collection of variables. The values in the returned array are in 1-to-1 correspondence with the variables invars.Examples using
getCallbackRedCosts:- Parameters:
-
vars- Variables for which reduced costs are queried. - Returns:
-
Reduced costs for variables in
vars. - Since:
- 44.00
-
getCallbackRedCost
public double getCallbackRedCost(Variable v)
Get the reduced cost associated with the current callbackfor a single variable.- Parameters:
-
v- Variable for which reduced cost is queried. - Returns:
-
Reduced cost for
v. - Since:
- 44.00
-
objSA
public void objSA(int len, Variable[] variables, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified objective function coefficients. If the objective coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.- Parameters:
-
len- Sensitivity analysis is performed only on the firstlenvariables invariables. -
variables- Variables on which to perform sensitivity analysis. -
lower- Array of length at leastlenthat receives the sensitivity analysis lower bounds. -
upper- Array of length at leastlenthat receives the sensitivity analysis upper bounds. - Since:
- 43.00
-
objSA
public void objSA(Variable[] variables, double[] lower, double[] upper)
Returns upper and lower sensitivity ranges for specified objective function coefficients. If the objective coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.- Parameters:
-
variables- Variables on which to perform sensitivity analysis. -
lower- Array at least as long asvariablesthat receives the sensitivity analysis lower bounds. -
upper- Array at least as long asvariablesthat receives the sensitivity analysis upper bounds. - Since:
- 43.00
-
bndSA
public void bndSA(int len, Variable[] variables, double[] lblower, double[] lbupper, double[] ublower, double[] ubupper)Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds. If the bounds are varied within these ranges the current basis remains optimal and feasible.- Parameters:
-
len- Sensitivity analysis is performed only on the firstlenvariables invariables. -
variables- Variables on which to perform sensitivity analysis. -
lblower- Array of length at leastlenthat receives the sensitivity analysis lower bounds for the variables' lower bound constraints. -
lbupper- Array of length at leastlenthat receives the sensitivity analysis upper bounds for the variables' lower bound constraints. -
ublower- Array of length at leastlenthat receives the sensitivity analysis lower bounds for the variables' upper bound constraints. -
ubupper- Array of length at leastlenthat receives the sensitivity analysis upper bounds for the variables' upper bound constraints. - Since:
- 43.00
-
bndSA
public void bndSA(Variable[] variables, double[] lblower, double[] lbupper, double[] ublower, double[] ubupper)
Returns upper and lower sensitivity ranges for specified variables' lower and upper bounds. If the bounds are varied within these ranges the current basis remains optimal and feasible.- Parameters:
-
variables- Variables on which to perform sensitivity analysis. -
lblower- Array at least as long asvariablesthat receives the sensitivity analysis lower bounds for the variables' lower bound constraints. -
lbupper- Array at least as long asvariablesthat receives the sensitivity analysis upper bounds for the variables' lower bound constraints. -
ublower- Array at least as long asvariablesthat receives the sensitivity analysis lower bounds for the variables' upper bound constraints. -
ubupper- Array at least as long asvariablesthat receives the sensitivity analysis upper bounds for the variables' upper bound constraints. - Since:
- 43.00
-
addMipSol
public void addMipSol(double[] values, Variable[] variables, java.lang.String name)Adds a new feasible, infeasible or partial MIP solution for the problem to the Optimizer.Examples using
addMipSol:- Parameters:
-
values- Values forvariables. -
variables- Variables in the solution. -
name- Name for solution, can benull. - Since:
- 43.00
-
getVariables
public Variable[] getVariables()
Get all the variables currently defined in this problem.Examples using
getVariables:- Returns:
- All the variables in this problem.
- Since:
- 43.00
- See Also:
-
variableForIndex(int)
-
chgBounds
public void chgBounds(Variable[] variables, byte[] bndType, double[] bndValue)
Change bounds for multiple variables.Examples using
chgBounds:- Parameters:
-
variables- Variables for which to change bounds. -
bndType- Type of bounds to change. -
bndValue- New bounds. - Since:
- 43.00
-
chgColType
public void chgColType(Variable[] variables, ColumnType[] colType)
Change types for multiple variables.Examples using
chgColType:- Parameters:
-
variables- Variables for which to change types. -
colType- New column types. - Since:
- 43.00
-
isNullVariable
public static boolean isNullVariable(Variable v)
Check whether a variable is the same asNULL_VARIABLE. TheNULL_VARIABLEis used in certain places to indicate the absence of a variable. For example, when iterating over the linear terms of an expression, a term with aNULL_VARIABLEindicates a constant term in the expression.- Parameters:
-
v- The variable to check. - Returns:
-
trueifvis the null variable. - Since:
- 44.00
-
slpSetDetRow
public void slpSetDetRow(Variable v, Inequality i)
Set the determining row of a variable.- Parameters:
-
v- Variable for which the determining row is set. -
i- Determining row forv. - Since:
- 44.00
-
delIndicator
public void delIndicator(Inequality row)
Delete a single indicator constraint. This only deletes the "indicator property from the specified row. Neither the associated variable nor the row are deleted.- Parameters:
-
row- Row from which to delete the indicator constraint. - Since:
- 43.00
-
getIndicator
public IndicatorObjects getIndicator(Inequality row)
Get indicator information for a single row.- Parameters:
-
row- The row to query. - Returns:
-
Indicator information for
row. This will benullifrowis not an indicator row. - Since:
- 43.00
-
setIndicator
public void setIndicator(Variable indicatorVariable, boolean indicatorValue, Inequality row)
Add an indicator constraint to this model. Both variable and row must exist.Examples using
setIndicator:- Parameters:
-
indicatorVariable- Indicator variable. -
indicatorValue- Whetherrowbecomes active ifindicatorVariableis non-zero (indicatorValueistrue) or ifindicatorVariableis zero (indicatorValueisfalse). -
row- The implied row for the indicator constraint. - Since:
- 43.00
-
setIndicators
public void setIndicators(Variable[] indicatorVariable, boolean[] indicatorValue, Inequality[] row)
Add indicator constraints to this model. The provided arrays must all have length at leastcountand for anyiin 0..count-1an indicator constraint is constructed fromindicatorVariable[i],indicatorValue[i]androw[i]. IfindicatorValue[i]istruethen the constraints states that ifindicatorVariable[i]is 1 (one), thenrow[i]must be satisfied (and ifindicatoris 0 (zero) thenrow[i]is ignored). Otherwise,row[i]must be satisfied ifindicator[i]is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Parameters:
-
indicatorVariable- Indicator variables. -
indicatorValue- Whether rows become active if indicator variables are non-zero (indicatorValue[.]istrue) or if indicator variables are zero (indicatorValueisfalse). If this isnullor empty then rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public <T> void setIndicators(java.lang.Iterable<T> data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model. The function iterates throughdataand calls the provided functions for each element found. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Type Parameters:
-
T- Data type. - Parameters:
-
data- Data for which constraints are created. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public <T> void setIndicators(T[] data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model. The function iterates throughdataand calls the provided functions for each element found. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Type Parameters:
-
T- Data type. - Parameters:
-
data- Data for which constraints are created. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public <T> void setIndicators(java.util.stream.Stream<T> data, java.util.function.Function<T,Variable> indicatorVariable, java.util.function.Function<T,java.lang.Boolean> indicatorValue, java.util.function.Function<T,Inequality> row)Add indicator constraints to this model. The function iterates throughdataand calls the provided functions for each element found. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Type Parameters:
-
T- Data type. - Parameters:
-
data- Data for which constraints are created. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public void setIndicators(int count, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model. The function iterates through[0, ... ,count[and calls the provided functions for each in this interval. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Parameters:
-
count- How many constraint to add. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public void setIndicators(int[] data, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model. The function iterates throughdataand calls the provided functions for each element found. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Parameters:
-
data- Data for which constraints are created. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
setIndicators
public void setIndicators(java.util.stream.IntStream data, java.util.function.IntFunction<Variable> indicatorVariable, java.util.function.IntFunction<java.lang.Boolean> indicatorValue, java.util.function.IntFunction<Inequality> row)Add indicator constraints to this model. The function iterates throughdataand calls the provided functions for each element found. The return values of the functions are used to construct an indicator constraint. For a fixedt, ifindicatorValue(t)returnstruethen the created constraint states that ifindicatorVariable(t)is 1 (one), thenrow(t)must be satisfied and is ignored otherwise. Otherwise,row(t)must be satisfied ifindicatorVariable(t)is 0 (zero) and is ignored otherwise. All referenced variables and rows must exist.- Parameters:
-
data- Data for which constraints are created. -
indicatorVariable- Indicator variables. -
indicatorValue- Whether indicator variables should be non-zero or zero for rows to become active. If this isnullthen rows become active if indicator variables are non-zero. -
row- The implied rows for the indicator constraints. - Since:
- 43.00
-
chgObj
public XpressProblem chgObj(Variable variable, double coefficient)
Change objective function coefficient. This changes the linear coefficient in the first/primary objective function. In order to delete a coefficient from the objective set it to 0 (zero).Examples using
chgObj:- Parameters:
-
variable- Variable for which to change coefficient. -
coefficient- New coefficient for variables. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
chgObj
public XpressProblem chgObj(Variable[] variables, double[] coefficients)
Change objective function coefficients. This changes the linear coefficients in the first/primary objective function. In order to delete a coefficient from the objective set it to 0 (zero).Examples using
chgObj:- Parameters:
-
variables- Variables for which to change coefficients. -
coefficients- New coefficients for variables. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
chgObjN
public XpressProblem chgObjN(int objidx, Variable variable, double coefficient)
Change an objective function coefficient for a multi-objective problem. This changes the linear coefficient in the objective functionobjidx. In order to delete a coefficient from the objective set it to 0 (zero).Examples using
chgObjN:- Parameters:
-
objidx- Index of objective function to change, -
variable- Variable for which to change coefficient. -
coefficient- New coefficient for variable. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
chgObjN
public XpressProblem chgObjN(int objidx, Variable[] variables, double[] coefficients)
Change objective function coefficients for a multi-objective problem. This changes tje linear coefficients in the objective functionobjidx. In order to delete a coefficient from the obejctive set it to 0 (zero).Examples using
chgObjN:- Parameters:
-
objidx- Index of objective function to change, -
variables- Variables for which to change coefficients. -
coefficients- New coefficients for variables. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
chgCoef
public XpressProblem chgCoef(Inequality row, Variable variable, double coefficient)
Changes the coefficient forvariableinrowin the linear matrix.Examples using
chgCoef:- Parameters:
-
row- Inequality in which to change coefficient. -
variable- Variable for which to change coefficient. -
coefficient- The new coefficient. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
chgCoefs
public XpressProblem chgCoefs(Inequality[] row, Variable[] variable, double[] coefficient)
Change coefficients in the linear matrix. The function changes the coefficients as indicated by the triplets given byrow,variable,coefficient.- Parameters:
-
row- Inequality in which to change coefficient. -
variable- Variable for which to change coefficient. -
coefficient- The new coefficient. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
repairWeightedInfeas
public int repairWeightedInfeas(java.util.Map<Inequality,java.lang.Double> lepref, java.util.Map<Inequality,java.lang.Double> gepref, java.util.Map<Variable,java.lang.Double> lbpref, java.util.Map<Variable,java.lang.Double> ubpref, char phase2, double delta, java.lang.String flags)
Repair infeasibilities using weights. By relaxing a set of selected constraints and bounds of an infeasible problem, it attempts to identify a 'solution' that violates the selected set of constraints and bounds minimally, while satisfying all other constraints and bounds. Among such solution candidates, it selects one that is optimal regarding the original objective function.Examples using
repairWeightedInfeas:- Parameters:
-
lepref- Map with preferences for relaxing the less-than-or-equal direction of rows. Inequalities without preference will not be relaxed. Can benull. -
gepref- Map with preferences for relaxing the greater-than-or-equal direction of rows. Inequalities without preference will not be relaxed. Can benull. -
lbpref- Map with preferences for relaxing the lower bounds of variables. Variables without preference will not be relaxed. Can benull. -
ubpref- Map with preferences for relaxing the upper bounds of variables. Variables without preference will not be relaxed. Can benull. -
phase2- Controls the second phase of optimization. -
delta- Relaxation multiplier in second phase - 1. -
flags- Flags passed to the optimizer. - Returns:
- Result status.
- Since:
- 43.00
-
getSOSs
public SOS[] getSOSs()
Get all the special ordered set constraints currently defined in this problem.- Returns:
- All special ordered set constraints in this problem.
- Since:
- 44.00
- See Also:
-
sosForIndex(int)
-
sosForIndex
public SOS sosForIndex(int index)
Map an SOS index to an SOS object.- Parameters:
-
index- Index to map. - Returns:
-
The SOS for
index. - Since:
- 43.00
- See Also:
-
getSOSs()
-
sosForIndices
public SOS[] sosForIndices(int first, int last)
Map a range of SOS indices to SOS objects.- Parameters:
-
first- First index to map. -
last- Last index to map. - Since:
- 43.00
-
delSets
public void delSets(int nsets, int[] sosind)Delete sets from this problem. Note that this may be expensive if you useSOSinstances to formulate your problem since indices of remaining sets will have to be updated after sets were deleted from the underlying model. If you have to delete multiple sets then it is best to collect all sets to be deleted in an array and then delete all of them with a single call to this function.
-
delSOS
public void delSOS(SOS[] soss)
Delete special ordered set constraints. Removes all the specified special ordered set constraints from this problem.- Parameters:
-
soss- SOS to be deleted. - Since:
- 43.00
-
delSOS
public void delSOS(SOS sos)
Delete a single SOS from the problem.- Parameters:
-
sos- SOS to delete. - Since:
- 43.00
-
getPWLs
public PWL[] getPWLs()
Get all piecewise linear constraints currently defined in this problem.- Returns:
- All piecewise linear constraints in this problem.
- Since:
- 44.00
- See Also:
-
pwlForIndex(int)
-
pwlForIndex
public PWL pwlForIndex(int index)
Map a PWL index to a PWL object.- Parameters:
-
index- Index to map. - Returns:
-
The PWL for
index. - Since:
- 43.00
- See Also:
-
getPWLs()
-
pwlsForIndices
public PWL[] pwlsForIndices(int first, int last)
Map a range of PWL indices to PWL objects.- Parameters:
-
first- First index to map. -
last- Last index to map. - Returns:
-
The SOSs from
first(inclusive). - Since:
- 43.00
-
delPwlCons
public void delPwlCons(int npwls, int[] pwlind)Delete piecewise linear constraints from this problem. Note that this may be expensive if you usePWLinstances to formulate your problem since indices of remaining variables will have to be updated after columns were deleted from the underlying model. If you have to delete multiple variables then it is best to collect all variables to be deleted in an array and then delete all of them with a single call to this function.- Overrides:
-
delPwlConsin classXPRSprob - Parameters:
-
npwls- Number of constraints to delete. -
pwlind- Indices of constraints to delete. - Since:
- 43.00
-
delPwlConstraints
public void delPwlConstraints(PWL[] pwls)
Delete PWL constraints from this problem.- Parameters:
-
pwls- Piecewise linear constraints to be deleted. - Since:
- 43.00
-
getIIS
public IIS getIIS(int iis)
Get the specified IIS.Examples using
getIIS:- Parameters:
-
iis- The index of the IIS for which data is queried. - Returns:
-
The IIS specified by
iis. - Since:
- 43.00
-
inequalityForIndex
public Inequality inequalityForIndex(int index)
Map an inequality index to an inequality object.- Parameters:
-
index- Index to map. - Returns:
-
The inequality for
index. - Since:
- 43.00
- See Also:
-
getInequalities()
-
inequalitiesForIndices
public Inequality[] inequalitiesForIndices(int first, int last)
Map a range of inequality indices to inequality objects.- Parameters:
-
first- First index to map. -
last- Last index to map. - Since:
- 43.00
-
getInequalities
public Inequality[] getInequalities()
Get all the inequalities currently defined in this problem.Examples using
getInequalities:- Returns:
- All the inequalities in this problem.
- Since:
- 43.00
- See Also:
-
inequalityForIndex(int)
-
delRows
public void delRows(int nrows, int[] rowind)Delete rows from this problem. Note that this may be expensive if you useInequalityinstances to formulate your problem since indices of remaining rows will have to be updated after rows were deleted from the underlying model. If you have to delete multiple rows then it is best to collect all rows to be deleted in an array and then delete all of them with a single call to this function.
-
delInequalities
public void delInequalities(Inequality[] rows)
Delete inequality constraints from this problem.Examples using
delInequalities:- Parameters:
-
rows- Inequalities to be deleted. - Since:
- 43.00
-
getSlacks
public double[] getSlacks(Inequality[] rows)
Get the current slacks for an array of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 43.00
-
getSlacks
public double[] getSlacks(java.lang.Iterable<Inequality> rows)
Get the current slacks for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 45.00
-
getSlacks
public double[] getSlacks(java.util.stream.Stream<Inequality> rows)
Get the current slacks for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 43.00
-
getSlack
public double getSlack(Inequality r)
Get the current slack for a single row.Examples using
getSlack:- Parameters:
-
r- Inequality for which to query slack. - Returns:
-
Slack for
r. - Since:
- 43.00
-
getDuals
public double[] getDuals(Inequality[] rows)
Get the duals for an array of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getDuals:- Parameters:
-
rows- Inequalities for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 43.00
-
getDuals
public double[] getDuals(java.lang.Iterable<Inequality> rows)
Get the duals for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the row inrow.Examples using
getDuals:- Parameters:
-
rows- Inequalties for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 43.00
-
getDuals
public double[] getDuals(java.util.stream.Stream<Inequality> rows)
Get the duals for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the row inrow.Examples using
getDuals:- Parameters:
-
rows- Inequalties for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 43.00
-
getDual
public double getDual(Inequality r)
Get the dual for a single row.Examples using
getDual:- Parameters:
-
r- Inequality for which to query dual. - Returns:
-
Dual for
r. - Since:
- 43.00
-
getCallbackSlacks
public double[] getCallbackSlacks(Inequality[] rows)
Get the slacks associated with the current callback for an array of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getCallbackSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 44.00
-
getCallbackSlacks
public double[] getCallbackSlacks(java.lang.Iterable<Inequality> rows)
Get the slacks associated with the current callback for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getCallbackSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 45.00
-
getCallbackSlacks
public double[] getCallbackSlacks(java.util.stream.Stream<Inequality> rows)
Get the slacks associated with the current callback for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getCallbackSlacks:- Parameters:
-
rows- Inequalities for which to query slacks. - Returns:
-
Slacks for inequalities in
rows. - Since:
- 44.00
-
getCallbackSlack
public double getCallbackSlack(Inequality r)
Get the slack associated with the current callback for a single row.- Parameters:
-
r- Inequality for which to query slack. - Returns:
-
Slack for
r. - Since:
- 44.00
-
getCallbackDuals
public double[] getCallbackDuals(Inequality[] rows)
Get the duals associated with the current callback for an array of rows. The values in the returned array are in 1-to-1 correspondence with the rows inrows.Examples using
getCallbackDuals:- Parameters:
-
rows- Inequalities for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 44.00
-
getCallbackDuals
public double[] getCallbackDuals(java.lang.Iterable<Inequality> rows)
Get the duals associated with the current callback for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the row inrow.Examples using
getCallbackDuals:- Parameters:
-
rows- Inequalties for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 43.00
-
getCallbackDuals
public double[] getCallbackDuals(java.util.stream.Stream<Inequality> rows)
Get the duals associated with the current callback for a collection of rows. The values in the returned array are in 1-to-1 correspondence with the row inrow.Examples using
getCallbackDuals:- Parameters:
-
rows- Inequalties for which to query duals. - Returns:
-
Duals for inequalities in
rows. - Since:
- 43.00
-
getCallbackDual
public double getCallbackDual(Inequality r)
Get the dual associated with the current callback for a single row.- Parameters:
-
r- Inequality for which to query dual. - Returns:
-
Dual for
r. - Since:
- 44.00
-
rhsSA
public void rhsSA(int len, Inequality[] rows, double[] lower, double[] upper)Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients. If the RHS coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.- Parameters:
-
len- Sensitity analysis is only performed for the firstlenelements inrows. -
rows- The rows for which to perform sensitivity analysis. -
lower- Array of length at leastlenthat receives the sensitivity lower bounds. -
upper- Array of length at leastlenthat receives the sensitivity upper bounds. - Since:
- 43.00
-
rhsSA
public void rhsSA(Inequality[] rows, double[] lower, double[] upper)
Returns upper and lower sensitivity ranges for specified right hand side (RHS) function coefficients. If the RHS coefficients are varied within these ranges the current basis remains optimal and the reduced costs remain valid.- Parameters:
-
rows- The rows for which to perform sensitivity analysis. -
lower- Array at least as long asrowsthat receives the sensitivity lower bounds. -
upper- Array at least as long asrowsthat receives the sensitivity upper bounds. - Since:
- 43.00
-
chgRHS
public void chgRHS(Inequality[] rows, double[] newRHS)
Change right-hand side for multiple rows.Examples using
chgRHS:- Parameters:
-
rows- Inequalities for which to change right-hand sides. -
newRHS- New right-hand side values. - Since:
- 43.00
-
chgRowType
public void chgRowType(Inequality[] rows, RowType[] rowType)
Change types for multiple rows.Examples using
chgRowType:- Parameters:
-
rows- Inequalities for which to change types. -
rowType- New row types. - Since:
- 43.00
-
chgRHSrange
public void chgRHSrange(Inequality[] rows, double[] newRange)
Change right-hand side ranges for multiple rows.Examples using
chgRHSrange:- Parameters:
-
rows- Inequalities for which to right-hand side ranges. -
newRange- New right-hand side range values. - Since:
- 43.00
-
loadDelayedRows
public void loadDelayedRows(Inequality[] rows)
Marks a set of rows as delayed rows.- Parameters:
-
rows- Inequalities to mark as delayed. - Since:
- 43.00
-
loadModelCuts
public void loadModelCuts(Inequality[] rows)
Marks a set of rows as model cuts.- Parameters:
-
rows- Inequalities to mark as model cuts. - Since:
- 43.00
-
getGeneralConstraints
public GeneralConstraint[] getGeneralConstraints()
Get all the general constraints currently defined in this problem.- Returns:
- All general constraints in this problem.
- Since:
- 43.00
- See Also:
-
generalConstraintForIndex(int)
-
generalConstraintForIndex
public GeneralConstraint generalConstraintForIndex(int index)
Map a general constraint index to aGeneralConstraintobject.- Parameters:
-
index- The index to map. - Returns:
-
The
GeneralConstraintobject forindex. - Since:
- 43.00
- See Also:
-
getGeneralConstraints()
-
generalConstraintForIndices
public GeneralConstraint[] generalConstraintForIndices(int first, int last)
Map a range of general constraint indices toGeneralConstraintobjects.- Parameters:
-
first- First index in range (inclusive). -
last- Last index in range (inclusive). - Returns:
-
The
GeneralConstraintobjects in the specified range. - Since:
- 43.00
-
delGenCons
public void delGenCons(int nconstraints, int[] conind)Delete constraints from this problem. Note that this may be expensive if you useGeneralConstraintinstances to formulate your problem since indices of remaining constraints will have to be updated after constraints were deleted from the underlying model. If you have to delete multiple constraints then it is best to collect all constraints to be deleted in an array and then delete all of them with a single call to this function.- Overrides:
-
delGenConsin classXPRSprob - Parameters:
-
nconstraints- Number of constraints to delete. -
conind- Indices of constraints to delete. - Since:
- 43.00
-
delGeneralConstraints
public void delGeneralConstraints(GeneralConstraint[] constraints)
Delete general constraints from this problem.- Parameters:
-
constraints- The constraints to be deleted. - Since:
- 43.00
-
getCoef
public double getCoef(Inequality row, Variable variable)
Query a single coefficient from the linear matrix. Retrieves the coefficient ofvariableinrowin the linear matrix. Note that the coefficient will be 0 (zero) in case the variable has no coefficient in that row.- Parameters:
-
row- The row in which to query the coefficient. -
variable- The variable for which to query the coefficient. - Returns:
- The queried coefficient.
- Since:
- 43.00
-
getObj
public double getObj(Variable variable)
Query an objective function coefficient. Retrieves the linear objective coefficient for the specified variable from the first/primary objective.Examples using
getObj:- Parameters:
-
variable- The variable for which to query the objective. - Returns:
-
The objective coefficient for
variable. - Since:
- 43.00
-
getObjN
public double getObjN(int objidx, Variable variable)Query an objective function coefficient. Retrieves the linear objective coefficient for the specified variable from objectiveobjidx.- Parameters:
-
objidx- objects.Index of objective function to query. -
variable- The variable for which to query the objective. - Returns:
-
The objective coefficient for
variable. - Since:
- 43.00
-
addConstraints
public <T,C extends Index> java.util.stream.Stream<java.util.Map.Entry<T,C>> addConstraints(java.util.Iterator<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified functions for each element indataand adds a constraint as specified by the return values of the functions.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T- Data type. -
C- Constraint type. - Parameters:
-
data- Data to generate constraints. -
defs- Function to produce the constraint definitions. - Returns:
- The created constraint indexed by data.
- Since:
- 43.00
-
addConstraint
public <C extends Index> C addConstraint(ConstraintDefinition<C> def)
Add a single constraint to this problem.Examples using
addConstraint:- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- CuttingStock.java
- ELS.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Type Parameters:
-
C- Constraint type. - Parameters:
-
def- Definition of the constraint to add. - Returns:
- The new constraint.
- Since:
- 43.00
-
addConstraints
public <C extends Index,T extends ConstraintDefinition<C>> java.util.stream.Stream<C> addConstraints(java.util.stream.Stream<T> defs)
Add multiple constraints of the same type to the problem.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. -
T- Definition type. - Parameters:
-
defs- The constraints to add. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <C extends Index,T extends ConstraintDefinition<C>> java.util.stream.Stream<C> addConstraints(java.lang.Iterable<T> defs)
Add multiple constraints of the same type to the problem.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. -
T- Definition type. - Parameters:
-
defs- The constraints to add. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <C extends Index> java.util.stream.Stream<C> addConstraints(ConstraintDefinition<C>[] defs)
Add multiple of the same type constraints to the problem.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. - Parameters:
-
defs- The constraints to add. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <C extends Index> java.util.stream.Stream<C> addConstraints(int count, java.util.function.IntFunction<ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element in[0, ..., count[and adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. - Parameters:
-
count- Number of constraints to add. -
defs- Function to produce the constraints to add. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <T,C extends Index> java.util.stream.Stream<C> addConstraints(java.util.stream.Stream<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element indataand adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T- Data type. -
C- Constraint type. - Parameters:
-
data- Data to generate constraints. -
defs- Function to generate a constraint for each data element. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <T,C extends Index> java.util.stream.Stream<C> addConstraints(T[] data, java.util.function.Function<T,ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element indataand adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T- Data type -
C- Constraint type. - Parameters:
-
data- Data to generate constraints. -
defs- Function to generate a constraint for each data element. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <T,C extends Index> java.util.stream.Stream<C> addConstraints(java.lang.Iterable<T> data, java.util.function.Function<T,ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element indataand adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T- Data type -
C- Constraint type. - Parameters:
-
data- Data for the constraints. -
defs- Function to generate a constraint for each data element. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <C extends Index> java.util.stream.Stream<C> addConstraints(int[] data, java.util.function.IntFunction<ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element indataand adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. - Parameters:
-
data- Data to generate constraints. -
defs- Function to generate a constraint for each data item. - Returns:
- The new constraints.
- Since:
- 43.00
-
addConstraints
public <C extends Index> java.util.stream.Stream<C> addConstraints(java.util.stream.IntStream data, java.util.function.IntFunction<ConstraintDefinition<C>> defs)
Add multiple constraints of the same type to the problem. Calls the specified function for each element indataand adds a constraint as specified by the return value of the function.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- Constraint type. - Parameters:
-
data- Data to generate constraints. -
defs- Function to generate a constraint for each data element. - Returns:
- The new constraints.
- Since:
- 43.00
-
getInequalityLinear
@Deprecated public LinTermList getInequalityLinear(Inequality row)
Deprecated.since 44.00, Use getLhs() insteadGet the linear part of the left-hand side of a row.- Parameters:
-
row- The row for which the linear part is queried. - Returns:
- The linear part of the row. This is guaranteed to not have any duplicates.
- Since:
- 43.00
-
getInequalityLinear
public LinExpression getInequalityLinear(Inequality row, java.util.function.Supplier<LinExpression> expression)
Get the linear part of the left-hand side of a row. The function adds the linear part ofrowto the expression provided byexpression. Ifexpressionisnullthen the function allocates a newcom.dashoptimization.objects.LinTermListfor it. If the function allocates a newcom.dashoptimization.objects.LinTermListthen it also returns that new object. In that case the list is guaranteed to not have any duplicates.- Parameters:
-
row- The row for which the linear part is queried. -
expression- Creates the expression that is returned by this function. Can benullin which case a newcom.dashoptimization.objects.LinTermListis created. - Returns:
- An expression that represent the linear part of the given row.
- Since:
- 43.00
-
isOriginal
public boolean isOriginal()
Check whether this model instance is in the original state. A model is not in the original state if it is a callback problem or its problem state indicates being presolved.Examples using
isOriginal:- Returns:
-
trueif this instance is in original state. - Since:
- 43.00
-
addCut
public int addCut(int cuttype, Inequality.Definition cut)Add a cut at the current node. It is assumed that the left-hand side (lhs) is formulated in terms of the original model. So you can useVariableinstances to formulate it. When using plain variable indices, be sure these indices are for the original model. The function will automatically transform (presolve) the cut to the presolved space. If presolving the cut fails then the cut is not added and the reason for failure is returned. Failing to presolve (and thus adding) a cut is not a problem in every context. That is why this does not raise an exception but instead leaves it to the caller to decide whether this is an error or not.Examples using
addCut:- Parameters:
-
cuttype- User defined cut type. -
cut- The inequality to add as cut. - Returns:
-
0 (zero) if the cut was successfully added. Otherwise the status code from
presolveRowthat indicates why the cut could not be presolved. It is up to the caller to decide whether not being able to presolve the cut is a problem or not. - Since:
- 43.00
-
addManagedCut
public void addManagedCut(boolean globallyValid, Inequality.Definition cut)Add a managed cut at the current node. It is assumed that the left-hand side (lhs) is formulated in terms of the original model. So you can useVariableinstances to formulate it. The function will automatically transform (presolve) the cut to the presolved space. If presolving the cut fails then the cut is not added.Examples using
addManagedCut:- Parameters:
-
globallyValid- Whether the cut is globally valid. -
cut- The inequality to add as cut. - Since:
- 43.00
-
addManagedCuts
public void addManagedCuts(boolean globallyValid, java.util.stream.Stream<Inequality.Definition> cuts)Add managed cuts at the current node. It is assumed that the left-hand sides (lhs) are formulated in terms of the original model. So you can useVariableinstances to formulate them. The function will automatically transform (presolve) the cuts to the presolved space. If presolving a cut fails then the cut is not added.- Parameters:
-
globallyValid- Whether the cut is globally valid. -
cuts- The inequality to add as cut. - Since:
- 46.00
-
addManagedCuts
public void addManagedCuts(boolean globallyValid, Inequality.Definition... cuts)Add managed cuts at the current node. It is assumed that the left-hand sides (lhs) are formulated in terms of the original model. So you can useVariableinstances to formulate them. The function will automatically transform (presolve) the cuts to the presolved space. If presolving a cut fails then the cut is not added.- Parameters:
-
globallyValid- Whether the cut is globally valid. -
cuts- The inequality to add as cut. - Since:
- 46.00
-
addManagedCuts
public void addManagedCuts(boolean globallyValid, java.lang.Iterable<Inequality.Definition> cuts)Add managed cuts at the current node. It is assumed that the left-hand sides (lhs) are formulated in terms of the original model. So you can useVariableinstances to formulate them. The function will automatically transform (presolve) the cuts to the presolved space. If presolving a cut fails then the cut is not added.- Parameters:
-
globallyValid- Whether the cut is globally valid. -
cuts- The inequality to add as cut. - Since:
- 46.00
-
createBranchObject
public XpressProblem.BranchObject createBranchObject()
Create a new branch object. This is different from the super class's createBranchObject() function in two aspects: - it returns an instance ofBranchObject, notXPRSbranchobject. The former is a subclass of the latter and has functions to add bounds and constraints that referenceVariableobjects. - the returned object always operates in the original space.Examples using
createBranchObject:- Returns:
- The new branch object.
- Since:
- 43.00
-
setObjective
public void setObjective(Expression obj)
Set the objective function to a new expression.Examples using
setObjective:- BinBurglar.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
obj- The new objective - Since:
- 43.00
-
setObjective
public void setObjective(Expression obj, XPRSenumerations.ObjSense sense)
Set the objective function to a new expression.Examples using
setObjective:- BinBurglar.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
obj- The new objective -
sense- The new objective sense (minimize or maximize). - Since:
- 43.00
-
addObjective
public void addObjective(Expression obj, int priority, double weight)
Add a new objective function. This turns the problem into a multi-objective problem.Examples using
addObjective:- Parameters:
-
obj- The new objective -
priority- Priority for new objective. -
weight- Weight for new objective. - Since:
- 43.00
-
setObjective
public void setObjective(int idx, Expression obj, int priority, double weight, double abstol, double reltol)Set an objective function and its controls. In case of error: - if the function created new objectives then all newly created objectives will be removed, - if an existing objective was modified then that objective function will be cleared and all controls will be unchanged.Examples using
setObjective:- BinBurglar.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TSP.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
idx- Index of objective to set. -
obj- New objective foridx. -
priority- New objective priority. -
weight- New objective weight. -
abstol- New absolute tolerance for objectiveidx. -
reltol- New relative tolerance for objectiveidx. - Since:
- 43.00
-
nlpSetInitVal
public void nlpSetInitVal(java.util.Map<Variable,java.lang.Double> values)
Set initial values of variables for a non-linear solve.Examples using
nlpSetInitVal:- Parameters:
-
values- Values to be set. For each variable/value pair in this map the corresponding initial value is set. - Since:
- 43.00
-
nlpSetInitVal
public void nlpSetInitVal(Variable[] variables, double[] values)
Set initial values of variables for a non-linear solve.Examples using
nlpSetInitVal:- Parameters:
-
variables- Variables for which to set values. -
values- Values forvariables. This must have the same length asvariables. The initial value forvariables[i]isvalues[i]. - Since:
- 43.00
-
getLhsExpression
public Expression getLhsExpression(int row)
Get the left-hand side of a row as an expression.- Parameters:
-
row- Index of row to fetch. - Returns:
-
The left-hand side of row
row. - Since:
- 43.00
-
addConstraints
public <C extends Index> void addConstraints(int count1, int count2, java.util.function.BiFunction<java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of[0,count1[, ..., [0,countN[and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- The type of constraints. - Parameters:
-
count1- Length of dimension 1. -
count2- Length of dimension 2. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,C extends Index> void addConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.util.function.BiFunction<K1,K2,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the iterables and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
C- The type of constraints. - Parameters:
-
iterable1- Keys for dimension 1. -
iterable2- Keys for dimension 2. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,C extends Index> void addConstraints(K1[] array1, K2[] array2, java.util.function.BiFunction<K1,K2,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the arrays and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
C- The type of constraints. - Parameters:
-
array1- Data for dimension 1. -
array2- Data for dimension 2. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <C extends Index> void addConstraints(int count1, int count2, int count3, Function3<java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of[0,count1[, ..., [0,countN[and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- The type of constraints. - Parameters:
-
count1- Length of dimension 1. -
count2- Length of dimension 2. -
count3- Length of dimension 3. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,C extends Index> void addConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, Function3<K1,K2,K3,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the iterables and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
C- The type of constraints. - Parameters:
-
iterable1- Keys for dimension 1. -
iterable2- Keys for dimension 2. -
iterable3- Keys for dimension 3. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,C extends Index> void addConstraints(K1[] array1, K2[] array2, K3[] array3, Function3<K1,K2,K3,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the arrays and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
C- The type of constraints. - Parameters:
-
array1- Data for dimension 1. -
array2- Data for dimension 2. -
array3- Data for dimension 3. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <C extends Index> void addConstraints(int count1, int count2, int count3, int count4, Function4<java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of[0,count1[, ..., [0,countN[and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- The type of constraints. - Parameters:
-
count1- Length of dimension 1. -
count2- Length of dimension 2. -
count3- Length of dimension 3. -
count4- Length of dimension 4. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,K4,C extends Index> void addConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, Function4<K1,K2,K3,K4,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the iterables and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
K4- Data for dimension 4. -
C- The type of constraints. - Parameters:
-
iterable1- Keys for dimension 1. -
iterable2- Keys for dimension 2. -
iterable3- Keys for dimension 3. -
iterable4- Keys for dimension 4. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,K4,C extends Index> void addConstraints(K1[] array1, K2[] array2, K3[] array3, K4[] array4, Function4<K1,K2,K3,K4,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the arrays and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
K4- Data for dimension 4. -
C- The type of constraints. - Parameters:
-
array1- Data for dimension 1. -
array2- Data for dimension 2. -
array3- Data for dimension 3. -
array4- Data for dimension 4. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <C extends Index> void addConstraints(int count1, int count2, int count3, int count4, int count5, Function5<java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of[0,count1[, ..., [0,countN[and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
C- The type of constraints. - Parameters:
-
count1- Length of dimension 1. -
count2- Length of dimension 2. -
count3- Length of dimension 3. -
count4- Length of dimension 4. -
count5- Length of dimension 5. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,K4,K5,C extends Index> void addConstraints(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, java.lang.Iterable<K5> iterable5, Function5<K1,K2,K3,K4,K5,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the iterables and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
K4- Data for dimension 4. -
K5- Data for dimension 5. -
C- The type of constraints. - Parameters:
-
iterable1- Keys for dimension 1. -
iterable2- Keys for dimension 2. -
iterable3- Keys for dimension 3. -
iterable4- Keys for dimension 4. -
iterable5- Keys for dimension 5. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addConstraints
public <K1,K2,K3,K4,K5,C extends Index> void addConstraints(K1[] array1, K2[] array2, K3[] array3, K4[] array4, K5[] array5, Function5<K1,K2,K3,K4,K5,ConstraintDefinition<C>> makeConstraint)
Add multiple constraints to this problem. CallsmakeConstraintfor each element in the cartesian product of the arrays and adds the constraint that is produced by this function call. A deep copy is made of each constraint, thus modifying the constraint later will not alter the model.Examples using
addConstraints:- BoolVars.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioMip1.java
- FolioMipIIS.java
- FolioQP.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
K1- Data for dimension 1. -
K2- Data for dimension 2. -
K3- Data for dimension 3. -
K4- Data for dimension 4. -
K5- Data for dimension 5. -
C- The type of constraints. - Parameters:
-
array1- Data for dimension 1. -
array2- Data for dimension 2. -
array3- Data for dimension 3. -
array4- Data for dimension 4. -
array5- Data for dimension 5. -
makeConstraint- Function to generate a constraint. - Since:
- 43.00
-
addVariables
public VariableBuilder.VariableArrayBuilder addVariables(int dim)
Create an 1-dimensional array of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoArray()function.// Create a multi-dimensional array of binary variables com.dashoptimization.objects.Variable[] = prob.addVariables(dim) .withType(com.dashoptimization.objects.ColumnType.Binary) .toArray();SeeVariableBuilder.VariableArrayBuilderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Parameters:
-
dim- Dimension. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1> VariableBuilder.VariableMapBuilder<K1> addVariables(java.lang.Iterable<K1> iterable1)
Create an 1-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional map of binary variables java.util.HashMap<K1 ,com.dashoptimization.objects.Variable> x = prob.addVariables(iterable1 ) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMapBuilderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. - Parameters:
-
iterable1- Data for dimension 1. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1> VariableBuilder.VariableMapBuilder<K1> addVariables(K1[] arr1)
Create an 1-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns java.util.HashMap<K1 ,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMapBuilderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. - Parameters:
-
arr1- Data for the builder. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1> VariableBuilder.VariableMapBuilder<K1> addVariables(java.util.stream.Stream<K1> strm)
Create an 1-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns java.util.HashMap<K1 ,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMapBuilderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. - Parameters:
-
strm- Stream with data from which to generate variables. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariable
public Variable addVariable(double lb, double ub, ColumnType type, java.lang.String name)
Add a single variable to this problem.Examples using
addVariable:- Parameters:
-
lb- Lower bound for new variable. -
ub- Upper bound for new variable. -
type- Type for new variable. -
name- Name for new variable, can benull. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable(double lb, double ub, ColumnType type, double limit, java.lang.String name)
Add a single variable to this problem.Examples using
addVariable:- Parameters:
-
lb- Lower bound for new variable. -
ub- Upper bound for new variable. -
type- Type for new variable. -
limit- Global limit for the variable. This is ignored unless the variable is semi-continuous, semi-integer or partial integer. -
name- Name for new variable, can benull. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable(double lb, double ub, ColumnType type)
Add a single variable to this problem.Examples using
addVariable:- Parameters:
-
lb- Lower bound for new variable. -
ub- Upper bound for new variable. -
type- Type for new variable. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable(java.lang.String name)
Add a single variable to this problem. The variable will have default type (continuous) and bounds (0 and infinity).Examples using
addVariable:- Parameters:
-
name- Name for new variable. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable(ColumnType type)
Add a single variable to this problem. The variable will have default bounds and no name.Examples using
addVariable:- Parameters:
-
type- Type for new variable. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable(ColumnType type, java.lang.String name)
Add a single variable to this problem. The variable will have default bounds.Examples using
addVariable:- Parameters:
-
type- Type for new variable. -
name- Name for new variable. - Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariable
public Variable addVariable()
Add a single variable to this problem. This variable will be continuous, have default bounds (0 and infinity) and will not have a name.Examples using
addVariable:- Returns:
- The newly created variable.
- Since:
- 43.00
-
addVariables
public VariableBuilder.VariableArray2Builder addVariables(int dim1, int dim2)
Create an 2-dimensional array of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoArray()function.// Create a multi-dimensional array of binary variables com.dashoptimization.objects.Variable[] [] = prob.addVariables(dim1 ,dim2) .withType(com.dashoptimization.objects.ColumnType.Binary) .toArray();SeeVariableBuilder.VariableArray2Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Parameters:
-
dim1- Dimension 1. -
dim2- Dimension 2. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2> VariableBuilder.VariableMap2Builder<K1,K2> addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2)
Create an 2-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional map of binary variables com.dashoptimization.maps.HashMap2<K1 ,K2,com.dashoptimization.objects.Variable> x = prob.addVariables(iterable1 ,iterable2) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap2Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. - Parameters:
-
iterable1- Data for dimension 1. -
iterable2- Data for dimension 2. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2> VariableBuilder.VariableMap2Builder<K1,K2> addVariables(K1[] arr1, K2[] arr2)
Create an 2-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns com.dashoptimization.maps.HashMap2<K1 ,K2,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap2Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. - Parameters:
-
arr1- Data for the builder. -
arr2- Data for the builder. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public VariableBuilder.VariableArray3Builder addVariables(int dim1, int dim2, int dim3)
Create an 3-dimensional array of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoArray()function.// Create a multi-dimensional array of binary variables com.dashoptimization.objects.Variable[] [] [] = prob.addVariables(dim1 ,dim2 ,dim3) .withType(com.dashoptimization.objects.ColumnType.Binary) .toArray();SeeVariableBuilder.VariableArray3Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Parameters:
-
dim1- Dimension 1. -
dim2- Dimension 2. -
dim3- Dimension 3. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3> VariableBuilder.VariableMap3Builder<K1,K2,K3> addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3)
Create an 3-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional map of binary variables com.dashoptimization.maps.HashMap3<K1 ,K2 ,K3,com.dashoptimization.objects.Variable> x = prob.addVariables(iterable1 ,iterable2 ,iterable3) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap3Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. - Parameters:
-
iterable1- Data for dimension 1. -
iterable2- Data for dimension 2. -
iterable3- Data for dimension 3. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3> VariableBuilder.VariableMap3Builder<K1,K2,K3> addVariables(K1[] arr1, K2[] arr2, K3[] arr3)
Create an 3-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns com.dashoptimization.maps.HashMap3<K1 ,K2 ,K3,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap3Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. - Parameters:
-
arr1- Data for the builder. -
arr2- Data for the builder. -
arr3- Data for the builder. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public VariableBuilder.VariableArray4Builder addVariables(int dim1, int dim2, int dim3, int dim4)
Create an 4-dimensional array of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoArray()function.// Create a multi-dimensional array of binary variables com.dashoptimization.objects.Variable[] [] [] [] = prob.addVariables(dim1 ,dim2 ,dim3 ,dim4) .withType(com.dashoptimization.objects.ColumnType.Binary) .toArray();SeeVariableBuilder.VariableArray4Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Parameters:
-
dim1- Dimension 1. -
dim2- Dimension 2. -
dim3- Dimension 3. -
dim4- Dimension 4. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3,K4> VariableBuilder.VariableMap4Builder<K1,K2,K3,K4> addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4)
Create an 4-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional map of binary variables com.dashoptimization.maps.HashMap4<K1 ,K2 ,K3 ,K4,com.dashoptimization.objects.Variable> x = prob.addVariables(iterable1 ,iterable2 ,iterable3 ,iterable4) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap4Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. -
K4- Data type for dimension 4. - Parameters:
-
iterable1- Data for dimension 1. -
iterable2- Data for dimension 2. -
iterable3- Data for dimension 3. -
iterable4- Data for dimension 4. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3,K4> VariableBuilder.VariableMap4Builder<K1,K2,K3,K4> addVariables(K1[] arr1, K2[] arr2, K3[] arr3, K4[] arr4)
Create an 4-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns com.dashoptimization.maps.HashMap4<K1 ,K2 ,K3 ,K4,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap4Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. -
K4- Data type for dimension 4. - Parameters:
-
arr1- Data for the builder. -
arr2- Data for the builder. -
arr3- Data for the builder. -
arr4- Data for the builder. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public VariableBuilder.VariableArray5Builder addVariables(int dim1, int dim2, int dim3, int dim4, int dim5)
Create an 5-dimensional array of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoArray()function.// Create a multi-dimensional array of binary variables com.dashoptimization.objects.Variable[] [] [] [] [] = prob.addVariables(dim1 ,dim2 ,dim3 ,dim4 ,dim5) .withType(com.dashoptimization.objects.ColumnType.Binary) .toArray();SeeVariableBuilder.VariableArray5Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Parameters:
-
dim1- Dimension 1. -
dim2- Dimension 2. -
dim3- Dimension 3. -
dim4- Dimension 4. -
dim5- Dimension 5. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3,K4,K5> VariableBuilder.VariableMap5Builder<K1,K2,K3,K4,K5> addVariables(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, java.lang.Iterable<K3> iterable3, java.lang.Iterable<K4> iterable4, java.lang.Iterable<K5> iterable5)
Create an 5-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional map of binary variables com.dashoptimization.maps.HashMap5<K1 ,K2 ,K3 ,K4 ,K5,com.dashoptimization.objects.Variable> x = prob.addVariables(iterable1 ,iterable2 ,iterable3 ,iterable4 ,iterable5) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap5Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. -
K4- Data type for dimension 4. -
K5- Data type for dimension 5. - Parameters:
-
iterable1- Data for dimension 1. -
iterable2- Data for dimension 2. -
iterable3- Data for dimension 3. -
iterable4- Data for dimension 4. -
iterable5- Data for dimension 5. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
addVariables
public <K1,K2,K3,K4,K5> VariableBuilder.VariableMap5Builder<K1,K2,K3,K4,K5> addVariables(K1[] arr1, K2[] arr2, K3[] arr3, K4[] arr4, K5[] arr5)
Create an 5-dimensional map of variables. This function returns a builder that generates variables according to a specification. The specification can be modified. In order to actually create the variables, you have to call the returned builder'stoMap()function.// Create a multi-dimensional array of binary columns com.dashoptimization.maps.HashMap5<K1 ,K2 ,K3 ,K4 ,K5,com.dashoptimization.objects.Variable> x = prob.addVariables(COLL_PASS) .withType(com.dashoptimization.objects.ColumnType.Binary) .toMap();SeeVariableBuilder.VariableMap5Builderfor details of how to modify the specification in the builder.Examples using
addVariables:- BinBurglar.java
- Boxes02.java
- ELSManagedCuts.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- Pplan2.java
- PurchaseSOS2.java
- Sangraalind.java
- TravelingSalesPerson.java
- Type Parameters:
-
K1- Data type for dimension 1. -
K2- Data type for dimension 2. -
K3- Data type for dimension 3. -
K4- Data type for dimension 4. -
K5- Data type for dimension 5. - Parameters:
-
arr1- Data for the builder. -
arr2- Data for the builder. -
arr3- Data for the builder. -
arr4- Data for the builder. -
arr5- Data for the builder. - Returns:
- A builder that will create the variables.
- Since:
- 43.00
-
-
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
