[ library(eplex) | Reference Manual | Alphabetic Index ]

EplexInstance:eplex_probe(+Probes, -Cost)

Invoke EplexInstance's external solver, probing the problem temporarily modified by the probe specifications.
Probes
Temporary probe specification(s)
Cost
Value of solution

Description

Similar to eplex_solve/1, but the problem is first temporarily modified as specified in Probes. Probes is a list of one or more probe specifications that specifies how the problem is modified. After the call to this predicate, the problem is restored for the external solver. However, the results from the probe (obtainable from eplex_var_get/3 and eplex_get/2) are retained.

The following probe specifications are allowed:

min(Expr)/max(Expr)
Minimise/maximise the problem with the objective function Expr. Only existing problem variables can be given in Expr. Cannot be used in conjunction with objsense, objexpr or perturb_obj.
objsense(Sense)
Sense is either min or max. Solves the problem with the original objective function, but with the sense given in Sense rather than that specified at setup. If only the sense of the objective is to be changed, this changes the objective more efficiently than using min(Expr)/max(Expr). Cannot be used in conjunction with min/max.
objexpr(Expr)
Optimise the problem with respect to the objective function Expr, without changing the optimisation direction specified at problem setup. Cannot be used in conjunction with min/max or perturb_obj.
perturb_obj(ObjDeltas)
Perturb the existing linear objective coefficients as specified by ObjDeltas. ObjDeltas is a (possibly empty) list of specifications Var : Delta, where Var is a problem variable and Delta is the amount its existing objective coefficient should be changed by. For example, if the existing objective is 2*X + 3*Y + Z, perturb_obj([X : 1, Y : -0.5]) will modify the objective to 3*X + 2.5*Y + Z for the probe. If a variable occurs more than once in ObjDeltas, the change to the objective coefficient is cumulative. Perturb_obj is not strictly needed, as its effect can be achieved by constructing the whole objective and then probing with that. However, this can be expensive if most of the objective stays unchanged, with only a few of its coefficients changed. It is recommended that perturb_obj probe be used in such cases. Cannot be used in conjunction with objexpr or min/max.
rhscoeffs(RhsCoeffs)
Alter the rhs coefficients of the matrix as specified by RhsCoeffs. RhsCoeffs is a (possibly empty) list of rhs coefficient specifications of the form Idx : Rhs, where Idx is the index of the expandable constraint obtained from using lp_add_constraints/4, and Rhs is the value for the right-hand side constant to use during the probe. Any constraints not specified in RhsCoeffs remain unchanged during the probe. If Idx occurs more than once in RhsCoeffs, the result is undefined.
bounds(BoundsChanges)
Alter the bounds of problem variables as specified by BoundsChanges. BoundsChanges is a (possibly empty) list of bounds changes of the form Var $:: Lo..Hi, where Var is a problem variable and Lo and Hi are the new lower and upper bounds to use for the variable during the probe. Unlike normal bound changes, the bounds can be widened as well narrowed, although failure will still occur if Hi < Lo. Variables not specified in BoundsChanges retain their bounds during the probe. If Var occurs more than once in BoundsChanges, the result is undefined.
fixed
The problem is solved as an LP problem by `fixing' the integer variables to their optimal MIP solution values. If there is an existing MIP solution for the problem, eplex will try to use that; otherwise, a MIP solution is obtained first. `Fixed' probing is useful for providing reduced costs for MIP problems. Note that reduced costs for the variables will only be available if the reduced_cost option for the problem is set to yes (this can be done either at problem setup, or by using eplex_set/2). For a problem without integer variables, the original problem is solved without change. Note that this probe specification is not available if the mip_use_copy option is set to no for external solvers that cannot modify a MIP problem. Cannot be used in conjunction with `relaxed'.
relaxed
The problem is solved as an LP problem by relaxing all the integer constraints. For a problem with integer variables, this should be equivalent to the initial relaxation solved at the start of the MIP search. Depending on the solver, the discreteness of the integer variables may still be taken into account during presolve. To ensure that the problem solved is exactly the LP problem without any integer constraints, presolve should be off. For a problem without integer variables, the original problem is solved without change. Note that this probe specification is not available if the mip_use_copy option is set to no for external solvers that cannot modify a MIP problem. Cannot be used in conjunction with `fixed'.

Fail Conditions

External solver was unable to find a solution, or bounds probe used and the specified interval for some variable is empty

Exceptions

(5) type error
EplexInstance does not have a solver setup for it.
(eplex_suboptimal)
Solution was found, but is possibly suboptimal
(eplex_unbounded)
Problem is unbounded, no solution values
(eplex_unknown)
Result is unknown (infeasible or unbounded)
(eplex_abort)
External solver aborted for some reason
(abort)
Incorrect specification for the probe(s)
(6) out of range
mip_use_copy option was set to no (solver dependent) for probes that require yes.
(40) stale object handle
Solver state had been previously destroyed.

See Also

eplex_solve / 1, eplex_solver_setup / 1, eplex_solver_setup / 4, eplex_get / 2, eplex_var_get / 3, eplex_set / 2, lp_add_constraints / 4