public abstract static class IloCplex.Callback.Context
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IloCplex.Callback.Context.Id
Places in which a CPLEX callback can be invoked.
|
static class |
IloCplex.Callback.Context.Info
Constants to query information from a CPLEX callback.
|
static class |
IloCplex.Callback.Context.RelaxationFlags
Flags that can be used with
getRelaxationStatus(long). |
static class |
IloCplex.Callback.Context.SolutionStrategy
Identifiers for the different strategies that can be passed to
postHeuristicSolution(ilog.concert.IloNumVar[], double[], int, int, double, ilog.cplex.IloCplex.Callback.Context.SolutionStrategy). |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
abort()
Stops optimization.
|
void |
addUserCut(IloRange cut,
int cutmanagement,
boolean local)
Adds a user cut.
|
abstract void |
addUserCuts(IloRange[] cuts,
int[] cutmanagement,
boolean[] local)
Adds user cuts.
|
abstract void |
exitCutLoop()
Ask CPLEX to stop cutting plane speration at the current node.
|
abstract double |
getCandidateObjective()
Gets the objective of the current candidate solution.
|
double |
getCandidatePoint(IloNumVar var)
Gets the candidate solution.
|
double[] |
getCandidatePoint(IloNumVar[] vars)
Gets the candidate solution.
|
abstract double[] |
getCandidatePoint(IloNumVar[] vars,
int start,
int length)
Gets the candidate solution.
|
abstract IloLinearNumExpr |
getCandidateRay()
Gets the unbounded ray for
IloCplex.Callback.Context.Id.Candidate. |
int |
getCandidateSource()
This method returns the source of the current candidate solution.
|
abstract double |
getCandidateValue(IloNumExpr expr)
Evaluates
expr with respect to the current candidate solution. |
abstract IloCplex |
getCplex()
Get the
IloCplex instance currently running this callback. |
abstract double |
getDoubleInfo(IloCplex.Callback.Context.Info what)
Gets double-precision valued information.
|
double |
getGlobalLB(IloNumVar var)
Gets the global lower bound for a variable.
|
double[] |
getGlobalLB(IloNumVar[] vars)
Gets the global lower bounds for an array of variables.
|
abstract double[] |
getGlobalLB(IloNumVar[] vars,
int start,
int length)
Gets the global lower bounds for variables.
|
double |
getGlobalUB(IloNumVar var)
Gets the global upper bound for a variable.
|
double[] |
getGlobalUB(IloNumVar[] vars)
Gets the global upper bounds for an array of variables.
|
abstract double[] |
getGlobalUB(IloNumVar[] vars,
int start,
int length)
Gets the global upper bounds for variables.
|
abstract long |
getId()
Gets the context in which the corresponding callback was invoked.
|
double |
getIncumbent(IloNumVar var)
Gets the current incumbent solution.
|
double[] |
getIncumbent(IloNumVar[] vars)
Gets the current incumbent solution.
|
abstract double[] |
getIncumbent(IloNumVar[] vars,
int start,
int length)
Gets the current incumbent solution.
|
abstract double |
getIncumbentObjective()
Gets the objective value for the current incumbent.
|
abstract double |
getIncumbentValue(IloNumExpr expr)
Evaluates
expr with respect to the current incumbent solution. |
abstract int |
getIntInfo(IloCplex.Callback.Context.Info what)
Gets 32-bit signed, integer-valued information.
|
double |
getLocalLB(IloNumVar var)
Gets the local lower bound for a variable.
|
double[] |
getLocalLB(IloNumVar[] vars)
Gets the local lower bounds for an array of variables.
|
abstract double[] |
getLocalLB(IloNumVar[] vars,
int start,
int length)
Gets the local lower bounds for variables.
|
double |
getLocalUB(IloNumVar var)
Gets the local upper bound for a variable.
|
double[] |
getLocalUB(IloNumVar[] vars)
Gets the local upper bounds for an array of variables.
|
abstract double[] |
getLocalUB(IloNumVar[] vars,
int start,
int length)
Gets the local upper bounds for variables.
|
abstract long |
getLongInfo(IloCplex.Callback.Context.Info what)
Gets 64-bit signed, integer-valued information.
|
abstract double |
getRelaxationObjective()
Gets the objective of the current relaxation.
|
double |
getRelaxationPoint(IloNumVar var)
Gets the current relaxation.
|
double[] |
getRelaxationPoint(IloNumVar[] vars)
Gets the current relaxation.
|
abstract double[] |
getRelaxationPoint(IloNumVar[] vars,
int start,
int length)
Gets the current relaxation.
|
IloCplex.CplexStatus |
getRelaxationStatus()
Convenience wrapper for
getRelaxationStatus(long)(0). |
abstract IloCplex.CplexStatus |
getRelaxationStatus(long flags)
Get the solution status of the current relaxation.
|
abstract int |
getRelaxationStatusInt(long flags) |
abstract double |
getRelaxationValue(IloNumExpr expr)
Evaluates
expr with respect to the current relaxation. |
boolean |
inBranching()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.Branching. |
boolean |
inCandidate()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.Candidate. |
boolean |
inGlobalProgress()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.GlobalProgress. |
boolean |
inLocalProgress()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.LocalProgress. |
boolean |
inRelaxation()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.Relaxation. |
boolean |
inThreadDown()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.ThreadDown. |
boolean |
inThreadUp()
Tests whether the callback was invoked in context
IloCplex.Callback.Context.Id.ThreadUp. |
abstract boolean |
isCandidatePoint()
Tests if callback is invoked for a finite solution.
|
abstract boolean |
isCandidateRay()
Tests if callback is invoked for an unbounded relaxation.
|
long |
makeBranch(IloNumVar[] x,
double[] bound,
IloCplex.BranchDirection[] dir,
double objest)
Convenience wrapper for
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(x, bound, dir, null, objest). |
abstract long |
makeBranch(IloNumVar[] x,
double[] bounds,
IloCplex.BranchDirection[] dirs,
IloRange[] ranges,
double objest)
Create a new branch at the current node.
|
long |
makeBranch(IloNumVar x,
double bound,
IloCplex.BranchDirection dir,
double objest)
Convenience wrapper for
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch([x], [bound], [dir], null, objest). |
long |
makeBranch(IloRange[] ranges,
double objest)
Convenience wrapper for
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(null, null, null, ranges, objest) |
long |
makeBranch(IloRange range,
double objest)
Convenience wrapper for
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(null, null, null, [range], objest) |
abstract void |
postHeuristicSolution(IloNumVar[] vars,
double[] vals,
int start,
int length,
double obj,
IloCplex.Callback.Context.SolutionStrategy strategy)
Posts a (heuristic) solution to CPLEX.
|
abstract void |
pruneCurrentNode()
Prune the current node.
|
void |
rejectCandidate()
Rejects the current candidate solution.
|
void |
rejectCandidate(IloRange violated)
Rejects the current candidate solution.
|
abstract void |
rejectCandidate(IloRange[] violated)
Rejects the current candidate solution.
|
void |
rejectCandidateLocal(IloRange violated)
Rejects the current candidate solution.
|
abstract void |
rejectCandidateLocal(IloRange[] violated)
Rejects the current candidate solution.
|
public abstract long getId()
IloCplex.Callback.Context.Id that specifies the context in which
this instance was invoked.public final boolean inThreadUp()
IloCplex.Callback.Context.Id.ThreadUp.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.ThreadUp
true if the callback was invoked in context
IloCplex.Callback.Context.Id.ThreadUp and false otherwise.public final boolean inThreadDown()
IloCplex.Callback.Context.Id.ThreadDown.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.ThreadDown
true if the callback was invoked in context
IloCplex.Callback.Context.Id.ThreadDown and false otherwise.public final boolean inLocalProgress()
IloCplex.Callback.Context.Id.LocalProgress.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.LocalProgress
true if the callback was invoked in context
IloCplex.Callback.Context.Id.LocalProgress and false otherwise.public final boolean inGlobalProgress()
IloCplex.Callback.Context.Id.GlobalProgress.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.GlobalProgress
true if the callback was invoked in context
IloCplex.Callback.Context.Id.GlobalProgress and false otherwise.public final boolean inCandidate()
IloCplex.Callback.Context.Id.Candidate.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.Candidate
true if the callback was invoked in context
IloCplex.Callback.Context.Id.Candidate and false otherwise.public final boolean inRelaxation()
IloCplex.Callback.Context.Id.Relaxation.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.Relaxation
true if the callback was invoked in context
IloCplex.Callback.Context.Id.Relaxation and false otherwise.public final boolean inBranching()
IloCplex.Callback.Context.Id.Branching.
It is a shortcut for
getId() == IloCplex.Callback.Context.Id.Branching
true if the callback was invoked in context
IloCplex.Callback.Context.Id.Branching and false otherwise.public abstract IloCplex getCplex()
IloCplex instance currently running this callback.
The returned IloCplex object can be used, for example,
to create new constraints that cut off candidate solutions in
rejectCandidate(ilog.concert.IloRange[]).or rejectCandidateLocal(ilog.concert.IloRange[])
Important: Do not use anything other than the factory methods of the returned
IloCplex object. In particular, do not modify
this instance. Doing so is unsupported and results in undefined
behavior.
public abstract void abort()
throws IloException
This method instructs CPLEX to stop optimization as soon as possible after the callback returns.
IloExceptionpublic abstract int getIntInfo(IloCplex.Callback.Context.Info what) throws IloException
See the documentation of IloCplex.Callback.Context.Info for details about information that
can be queried.
IloException - if an error occurs.what - The information to be queried.public abstract long getLongInfo(IloCplex.Callback.Context.Info what) throws IloException
See the documentation of IloCplex.Callback.Context.Info for details about information
that can be queried.
IloException - if an error occurs.what - The information to be queried.public abstract double getDoubleInfo(IloCplex.Callback.Context.Info what) throws IloException
See the documentation of IloCplex.Callback.Context.Info for details about information
that can be queried.
IloException - if an error occurs.what - The information to be queried.public abstract void postHeuristicSolution(IloNumVar[] vars, double[] vals, int start, int length, double obj, IloCplex.Callback.Context.SolutionStrategy strategy) throws IloException
This method posts a solution vector to CPLEX. The vector is queued internally. The next time CPLEX plans to invoke a heuristic, CPLEX looks at the queue and attempts to create feasible solution from each vector. This procedure can result in new incumbent solutions.
IloException - if an error occurs.vars - Variables that constitute the solution to be posted.vals - Values for variables in vars.start - Index of first variable in vars and vals
that constitutes the solution.length - Number of variables in vars and vals
that constitute the solution.obj - (Estimated) objective value for the new solution.strategy - Strategy for completing partial solutions.public abstract boolean isCandidatePoint()
throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate;
it throws an exception when invoked from another context.
If the method returns true then the candidate feasible
point can be examined using
getCandidatePoint(ilog.concert.IloNumVar[], int, int),
getCandidateValue(ilog.concert.IloNumExpr), and
getCandidateObjective().
IloExceptiontrue if the callback was invoked for a candidate
feasible point.public int getCandidateSource()
throws IloException
getIntInfo(CandidateSource).
It returns a value from IloCplex.MIPCallback.SolutionSource.IloExceptionpublic abstract double[] getCandidatePoint(IloNumVar[] vars, int start, int length) throws IloException
This method retrieves the values for vars[start], ..., vars[start+length-1]
in the current candidate and returns them.
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate
and if isCandidatePoint() returns true;
it throws an exception when invoked from another context.
IloException - if any error occurs during the query.vars - The variables for which values are to be queried.start - First variable to query in vars.length - Number of variables to query from vars.vars[start], . . . , vars[start+length-1].
The first value in this array is for vars[start] and so on.public abstract boolean isCandidateRay()
throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate;
it throws an exception when invoked from another context.
If the method returns true then the unbounded ray
can be obtained using
getCandidateRay().
IloExceptiontrue if the callback was invoked for an
unbounded relaxation.public abstract IloLinearNumExpr getCandidateRay() throws IloException
IloCplex.Callback.Context.Id.Candidate.
This method returns the unbounded ray as a sparse expression.
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate
and if isCandidateRay() returns true;
it throws an exception when invoked from another context.
IloException - if any error occurs during the query.public double[] getCandidatePoint(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getCandidatePoint(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the candidate solution.vars in the candidate solution.getCandidatePoint(IloNumVar[],int,int)public double getCandidatePoint(IloNumVar var) throws IloException
This method is a convenience wrapper for getCandidatePoint(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the candidate solution.var in the candidate solution.getCandidatePoint(IloNumVar[],int,int)public abstract double getCandidateValue(IloNumExpr expr) throws IloException
expr with respect to the current candidate solution.
This method can be invoked only in the context IloCplex.Callback.Context.Id.Candidate
and if isCandidatePoint() returns true.
IloException - if an error occurs.java.lang.NullPointerException - if expr is null.expr - The expression to evaluate.expr with respect to the current candidate solution.public abstract double getCandidateObjective()
throws IloException
This method can be invoked only from the context IloCplex.Callback.Context.Id.Candidate
and if isCandidatePoint() returns true;
it throws an exception when invoked from another context.
IloException - if an error occurs.public abstract void rejectCandidate(IloRange[] violated) throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate;
it throws an exception when invoked from another context.
The argument of this method consists of a set of constraints that CPLEX treats as lazy constraints.
IloException - if an error occurs.java.lang.NullPointerException - if any of the elements in violated is null.violated - A set of constraints that cut off the candidate solution.
This set can potentially be empty. This argument can also be null.
If not null and not empty, then CPLEX can use
these constraints to cut off further candidate solutions that CPLEX
finds. (There is no guarantee that CPLEX does so, though.)public void rejectCandidate(IloRange violated) throws IloException
This method is a convenience wrapper for rejectCandidate(IloRange[]).
IloException - if an error occurs.violated - A constraint that cuts of the candidate solution. This argument can be null.rejectCandidate(IloRange[])public void rejectCandidate()
throws IloException
This method is a convenience wrapper for rejectCandidate(IloRange[]).
With this you can reject the current candidate solution without adding
a constraint that cuts it off.
IloException - if an error occurs.rejectCandidate(IloRange[])public abstract void rejectCandidateLocal(IloRange[] violated) throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Candidate and if getCandidateSource() indicates a node solution;
it throws an exception when invoked from another context.
The argument of this method consists of a set of constraints that CPLEX treats as lazy constraints. This constraint is only required to be locally valid (in the current subtree). It is not required to be globally valid.
IloException - if an error occurs.java.lang.NullPointerException - if any of the elements in violated is null.violated - A set of constraints that cut off the candidate solution.
This set can potentially be empty. This argument can also be null.
If not null and not empty, then CPLEX can use
these constraints to cut off further candidate solutions that CPLEX
finds. (There is no guarantee that CPLEX does so, though.) The
constraint is assumed to be valid only locally (in the subtree in
which the callback was invoked).public void rejectCandidateLocal(IloRange violated) throws IloException
This method is a convenience wrapper for rejectCandidateLocal(IloRange[]).
IloException - if an error occurs.violated - A constraint that cuts of the candidate solution. This
argument can be null The constraint is assumed to be
only locally valid (in the subtree in which the callback was
invoked).rejectCandidate(IloRange[])public abstract double[] getRelaxationPoint(IloNumVar[] vars, int start, int length) throws IloException
This method retrieves the values for vars[start], . . . , vars[start+length-1]
in the current relaxation, and returns them.
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation;
it throws an exception when invoked from another context.
IloException - if any error occurs during the query.vars - The variables for which relaxation values are to be queried.start - First variable to query in vars.length - Number of variables to query from vars.vars[start], . . . , vars[start+length-1].
The first value in this array is for vars[start] and so on.public double[] getRelaxationPoint(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getRelaxationPoint(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the current relaxation.vars in the current relaxation.getRelaxationPoint(IloNumVar[],int,int)public double getRelaxationPoint(IloNumVar var) throws IloException
This method is a convenience wrapper for getRelaxationPoint(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the current relaxation.var in the current relaxation.getRelaxationPoint(IloNumVar[],int,int)public abstract double getRelaxationValue(IloNumExpr expr) throws IloException
expr with respect to the current relaxation.
This method can be invoked only in the context IloCplex.Callback.Context.Id.Relaxation.
IloException - if an error occurs.java.lang.NullPointerException - if expr is null.expr - The expression to evaluate.expr with respect to the current relaxation.public abstract double getRelaxationObjective()
throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation;
it will throw an exception when invoked from another context.
IloException - if an error occurs.public abstract IloCplex.CplexStatus getRelaxationStatus(long flags) throws IloException
This is mainly for the Branching context: in that
context, the node relaxation may be in a non-optimal state or may
require reoptimization. This can be done using this function.
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation and IloCplex.Callback.Context.Id.Branching
it will throw an exception when invoked from another context.
IloException - if an error occurs.flags - See CPXXcallbackgetrelaxationstatus in
the callable library reference manual.public abstract int getRelaxationStatusInt(long flags)
throws IloException
IloExceptionpublic IloCplex.CplexStatus getRelaxationStatus() throws IloException
getRelaxationStatus(long)(0).IloExceptionpublic abstract void pruneCurrentNode()
throws IloException
The function tells CPLEX that the current node does not require
further processing and can be pruned.
Do not mix calls to pruneCurrentNode() and
makeBranch. Pruning a node will override any branching
requests.
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation and IloCplex.Callback.Context.Id.Branching
it will throw an exception when invoked from another context.
IloException - if an error occurs.public abstract long makeBranch(IloNumVar[] x, double[] bounds, IloCplex.BranchDirection[] dirs, IloRange[] ranges, double objest) throws IloException
The function creates a new child node of the current node. The
child node is defined by augmenting the current node with the
restrictions specified in the arguments. Note that a branching
direction of Global is treated the same as
Down. The values in x, bounds,
and dirs must be aligned: for a valid n,
bounds[n] specifies the bound in direction
dirs[n] for variables x[n].
The function can be invoked at most twice per node, i.e., at most two child nodes can be created at any given node.
The function can branch exclusively on variables, exclusively on
constraints or on a combination of both. Pass null for
any arguments you don't want to use.
This method can be invoked only from IloCplex.Callback.Context.Id.Branching
it will throw an exception when invoked from another context.
IloException - if an error occurs.x - The variables on which to branch.bounds - Bounds for the branching on variables in x.dirs - Directions for the branching on variables in x.ranges - The contraints to be used for the new child node.objest - An estimate for the objective function value of the newly
created child. If in doubt use the value returned by
getRelaxationObjective().public long makeBranch(IloNumVar x, double bound, IloCplex.BranchDirection dir, double objest) throws IloException
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch([x], [bound], [dir], null, objest).IloExceptionpublic long makeBranch(IloNumVar[] x, double[] bound, IloCplex.BranchDirection[] dir, double objest) throws IloException
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(x, bound, dir, null, objest).IloExceptionpublic long makeBranch(IloRange range, double objest) throws IloException
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(null, null, null, [range], objest)IloExceptionpublic long makeBranch(IloRange[] ranges, double objest) throws IloException
#makeBranch(IloNumVar[],double[],IloCplex.BranchDirection[],IloRange[] makeBranch(null, null, null, ranges, objest)IloExceptionpublic abstract void exitCutLoop()
throws IloException
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation;
it throws an exception when invoked from another context.
IloException - if an error occurs.public abstract double[] getIncumbent(IloNumVar[] vars, int start, int length) throws IloException
This method retrieves the values for vars[start], . . . , vars[start+length-1]
in the current incumbent solution and returns them.
The method raises an exception if there is no incumbent solution
available. Use getIntInfo(Info) and IloCplex.Callback.Context.Info.Feasible
to check whether an incumbent is available.
IloException - if any error occurs during the query.vars - The variables for which incumbent values are to be queried.start - First variable to query in vars.length - Number of variables to query from vars.vars[start], . . . , vars[start+length-1].
The first value in this array is for vars[start] and so on.public double[] getIncumbent(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getIncumbent(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the current incumbent solution.vars in the current incumbent solution.getIncumbent(IloNumVar[],int,int)public double getIncumbent(IloNumVar var) throws IloException
This method is a convenience wrapper for getIncumbent(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the current incumbent solution.var in the current incumbent solution.getIncumbent(IloNumVar[],int,int)public abstract double getIncumbentValue(IloNumExpr expr) throws IloException
expr with respect to the current incumbent solution.IloException - if an error occurs.java.lang.NullPointerException - if expr is null.expr - The expression to evaluate.expr with respect to the current incumbent solution.public abstract double getIncumbentObjective()
throws IloException
IloException - if an error occurs.public abstract double[] getLocalLB(IloNumVar[] vars, int start, int length) throws IloException
This methods queries the local bounds that were in place when the current relaxation was computed. These bounds may be tighter than global bounds due to presolve, branching, and other computations.
This method can be invoked only from IloCplex.Callback.Context.Id.Relaxation;
it will throw an exception when invoked from another context.
IloException - if an error occurs.vars - The variables for which lower bounds will be queried.start - Index of first variable in vars for which lower
bound will be queried.length - Number of variables in vars for which lower
bounds will be queried.vars[start], . . . , vars[start + length - 1].public double[] getLocalLB(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getLocalLB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the local bounds.vars.getLocalLB(IloNumVar[],int,int)public double getLocalLB(IloNumVar var) throws IloException
This method is a convenience wrapper for getLocalLB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the bound.var.getLocalLB(IloNumVar[],int,int)public abstract double[] getLocalUB(IloNumVar[] vars, int start, int length) throws IloException
This method queries the local bounds that were in place when the current relaxation was computed. These bounds can be tighter than global bounds due to presolve, branching, and other computations.
This method can be invoked only from the context IloCplex.Callback.Context.Id.Relaxation;
it will throw an exception when invoked from another context.
IloException - if an error occurs.vars - The variables for which upper bounds will be queried.start - Index of first variable in vars for which upper
bound will be queried.length - Number of variables in vars for which upper
bounds will be queried.vars[start], . . . , vars[start + length - 1].public double[] getLocalUB(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getLocalUB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the local bounds.vars.getLocalUB(IloNumVar[],int,int)public double getLocalUB(IloNumVar var) throws IloException
This method is a convenience wrapper for getLocalUB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the bound.var.getLocalUB(IloNumVar[],int,int)public abstract double[] getGlobalLB(IloNumVar[] vars, int start, int length) throws IloException
This methods queries the best known globally valid bounds.
This method cannot be invoked from
IloCplex.Callback.Context.Id.ThreadUp or
IloCplex.Callback.Context.Id.ThreadDown.
IloException - if an error occurs.vars - The variables for which upper bounds will be queried.start - Index of first variable in vars for which lower
bound will be queried.length - Number of variables in vars for which lower
bounds will be queried.vars[start], . . . , vars[start + length - 1].public double[] getGlobalLB(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getGlobalLB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the global bounds.vars.getGlobalLB(IloNumVar[],int,int)public double getGlobalLB(IloNumVar var) throws IloException
This method is a convenience wrapper for getGlobalLB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the bound.var.getGlobalLB(IloNumVar[],int,int)public abstract double[] getGlobalUB(IloNumVar[] vars, int start, int length) throws IloException
This method queries the best known globally valid bounds.
This method cannot be invoked from
IloCplex.Callback.Context.Id.ThreadUp or
IloCplex.Callback.Context.Id.ThreadDown.
IloException - if an error occurs.vars - The variables for which upper bounds will be queried.start - Index of first variable in vars for which upper
bound will be queried.length - Number of variables in vars for which upper
bounds will be queried.vars[start], . . . , vars[start + length - 1].public double[] getGlobalUB(IloNumVar[] vars) throws IloException
This method is a convenience wrapper for getGlobalUB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if vars or any of its elements is null.vars - The variables for which to query the global bounds.vars.getGlobalUB(IloNumVar[],int,int)public double getGlobalUB(IloNumVar var) throws IloException
This method is a convenience wrapper for getGlobalUB(IloNumVar[],int,int).
See the reference documentation of that method for further details.
IloException - if an error occurs.var - The variable for which to query the bound.var.getGlobalUB(IloNumVar[],int,int)public abstract void addUserCuts(IloRange[] cuts, int[] cutmanagement, boolean[] local) throws IloException
IloException - if an error occurs.java.lang.NullPointerException - if any of the arrays or any of its elements is null.cuts - The cuts to be added.cutmanagement - An array with values from IloCplex.CutManagement, one for each cut.local - An array with Boolean flags (one for each cut) that indicate whether the cut is only locally valid.public void addUserCut(IloRange cut, int cutmanagement, boolean local) throws IloException
This method is a convenience wrapper for addUserCuts(IloRange[],int[],boolean[]).
See that method for further details.
IloException - if an error occurs.java.lang.NullPointerException - if cut is null.cut - The cut to add.cutmanagement - A value from IloCplex.CutManagement that
specifies how CPLEX should manage the cut.local - A Boolean value indicating whether this cut is locally or globally valid.addUserCuts(IloRange[],int[],boolean[])