[ library(eplex) | Reference Manual | Alphabetic Index ]
eplex_set(++ParamName, -Value)
EplexInstance:eplex_set(++ParamName, -Value)
Change initial options for solver state associated with EplexInstance
- ParamName
- Name of parameter (atom)
- Value
- New value for ParamName
Description
This primitive can be used to change some of the initial options
even after setup of a solver for eplex instance EplexInstance.
What can be one of the following:
- method
- Set the method that will be used to solve the problem. Value
is one of default, auto, primal, dual, net, net(Simplex), barrier,
barrier(Crossover), sifting, sifting(SubMethod), concurrent,
concurrent_det. Simplex can be one of default, auto, primal, dual,
specifying the Simplex method to use in the Network Simplex algorithm.
Crossover can be one of default, auto, primal, dual, none,
specifying the crossover method to use for the barrier method.
SubMethod could be one of default, auto, primal, dual, net, barrier,
specifying the method to use for the subproblems in the sifting method.
Note that not every method is available on every external solver.
In case of MIP solving, this is the start algorithm (the one that
is used to solve the initial relaxation). This method setting will
override similar settings done via optimizer_param(_).
- node_method
- Applicable to MIP problems only. Set the method that will be
used to solve the problem at the nodes (except the root) of the
branch-and-bound tree. Note that the method for solving the root
node is controlled by the method option. Value can be set
to the same values as in the method option, although
there may be more restrictions on what the actual methods/auxiliary
methods that are allowed in combination with the root method,
due to limitations/restrictions from the external solver. A warning
will be given when the problem is solved if this is the case, and
the default method used instead. This node_method setting will
override similar settings done via optimizer_param(_).
- solution
- Make the solutions available each time the problem has been
(re-)solved successfully.
Value is one of the atoms yes or no.
- reduced_cost
- Make the reduced costs available each time the problem has been
(re-)solved successfully. If the problem is a MIP, then depending on
the external solver, this is either unavailable or are the values
for the optimal LP node.
Value is one of the atoms yes or no.
- slack
- Make the constraint slacks available each time the problem has been
(re-)solved successfully.
Value is one of the atoms yes or no.
- dual_solution
- Make the dual solutions available each time the problem has been
(re-)solved successfully. If the problem is a MIP, then depending on
the external solver, this is either unavailable or are the values
for the optimal LP node.
Value is one of the atoms yes or no.
- keep_basis
- Store the basis each time the problem has been solved successfully,
and use this basis as a starting point for re-solving next time.
Value is one of the atoms yes or no.
- mipstart
- Use the previous solution values as a warm-start heuristics for
the MIP search. This only has an effect for certain solvers (e.g.
Gurobi), if there are integrality constraints, and if there is a
previous solution available. Possible values are none
(no mipstart values, the default), all (use previous
solution for all variables), or integers (use previous
solution for all variables that are now constrained to be integral).
- cache_iis
- When a problem is found to be infeasible, compute an IIS for the problem
(if supported by the external solver), and store it so that it can bee retrieved
by eplex_get_iis/4 or lp_get_iis/5. This will be done before the problem can
be modified and make the computing of the IIS impossible. The IIS will only
be available before the problem is solved again, and before the infeasible
solve is backtracked. This option has no effect if the external solver does not
support the finding of IIS. Note that if this option is set, eplex will always ask
for an IIS to computed for an infeasible problem, even if it is immediately backtracked
by the infeasible handler failing, and that the option is only needed if the problem
instance in the external solver is modified before eplex_get_iis/4 or lp_get_iis/5 is called.
Value is one of the atoms yes or no.
- demon_tolerance
- Specify how far outside a variable's range an lp-solution
can fall before lp_demon_setup/5 re-triggers.
Value is a comma-separated pair (RealTol,IntTol) of
floating-point values (default (0.00001,0.5)).
- use_var_names
- Specify if variable names (set using set_var_name/2 of the
var_name library) should be passed to the external solver. If a
particular variable does not have a name, a solver's default name
would be used. Note that for XPRESS-MP, there is a limit on the
length of the name, which can be changed between 8 and 64 in steps
of 8 with the parameter N_NAMLEN. Variable names longer
than this limit are truncated to the limit. Note also that only
new variables from constraints added after the lp_set/3 call
will pass their names to the external solver.
Value is one of the atoms yes or no.
- timeout
- Set the external solver to time-out after Value
seconds. The solver will abort (in either the abort or suboptimal
state, depending on if a suboptimal solution was found) if the
optimal solution was not found within the time limit. In cases
where the solver expects an integer for the time-out interval, the
time given is rounded up to the next integer value. This should be
used instead of the solver specific optimizer_param(Param) for
setting timeouts, as eplex sets these parameter(s) itself. Note
that the exact behaviour of the timeout setting is solver dependent.
Value is a positive number.
- suboptimal_handler
- Value is a user defined goal to handle the case when the
external solver returned a suboptimal solution (because the problem
was aborted). Value would replace any existing suboptimal handler,
and would also be run in place of raising the default
eplex_suboptimal event.
- unbounded_handler
- Value is a user defined goal to handle the case when the
problem is unbounded. Value would replace any existing unbounded
handler, and would be run in place of raising the default
eplex_unbounded event.
- infeasible_handler
- Value is a user defined goal to handle the case when the
external solver found the problem to be infeasible. Value would
replace any existing infeasible handler, and would be run in place
of raising the default eplex_infeasible event. Note that
the default and logically correct behaviour is to fail, this
handler is provided to allow the user to analyse the cause of the
infeasibility. It is recommended that the handler should also fail
after performing the analysis.
- unknown_handler
- Value is a user defined goal to handle the case when the
external solver was not able to determine if the problem is
unbounded Value would replace any existing unknown handler, and
would be run in place of raising the default eplex_unknown
event.
- abort_handler
- Value is a user defined goal to handle the case when the
external solver aborted without finding any solution. Value would
replace any existing abort handler, and would be run in place of
raising the default eplex_abort event.
- optimizer_param(Param)
- Set the external solver's control parameter Param for the problem
Handle. If the solver's parameters are global and not
problem specific, an unimplemented functionality exception would
be raised. See lp_get/3 for more details on the external solver's
parameters. Note that the new setting is not undone on
backtracking.
- write_before_solve
- Value can be the pair (Format,File) or the atom no. If
(Format,File) is given, Eplex will ask the external solver to dump
the problem each time the solver is solved. This allows the problem
in an eplex_probe/2 or lp_probe/3 to be dumped. As
in lp_write/3, Format is the format of the dumped
problem, and File is the filename. See for more details. Note that
the problem is dumped each time the external solver is invoked if
the problem has cutpool constraints, where there may be multiple
invocations of the solver per solver call. `no' for Value will turn
off this dumping.
- post_equality_when_unified
- Value can be the atoms yes or no. Determines if an equality
constraint will be posted to a solver when two of its variables are
unified. Setting Value to no means that the constraint will not be
posted. Note that this could mean that the
solver's problem may become inconsistent with ECLiPSe's.
Making solutions available means that they can be retrieved using
lp_get/3 or lp_var_get/4 after the solver has been run successfully.
All settings apart from optimizer_param(Param) will be undone on backtracking!
Resatisfiable
no
Exceptions
- (5) type error
- EplexInstance does not a solver setup for it.
- (40) stale object handle
- Solver state had been previously destroyed.
See Also
eplex_solver_setup / 4, eplex_set / 2, eplex_get_iis / 4, lp_set / 3, lp_get / 3