[ library(eplex) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

EplexInstance:eplex_solver_setup(+Objective, ?Cost, ++ListOfOptions, ++Priority, +TriggerModes)

Setup an external solver state for eplex instance EplexInstance
Objective
Objective function: min(CostExpr) or max(CostExpr)
Cost
Variable bounded by the optimal solution
ListOfOptions
List of solver options
Priority
Scheduling priority
TriggerModes
List of conditions for re-triggering solver

Description

Setup a new external solver state for the eplex instance EplexInstance. The solver state will be associated with EplexInstance; EplexInstance must not already have a solver state associated with it. This predicate allow various options to be specified when setting up the solver state. ListOfOptions allows a list of solver options to be specified, and Priority and TriggerModes allows the solver state to be set up as a demon so that the external solver is automatically invoked when the conditions for re-triggering specified in TriggerModes are met. The external solver can also be invoked explicitly via eplex_solve/1.

Declaratively, this can be seen as a compound constraint representing all the individual linear constraints that have been set so far and are going to be set up later for EplexInstance. Operationally, when the external solver is invoked, the delayed constraints posted to EplexInstance are collected and taken into account.

CostExpr is a linear cost expression (or quadratic, if supported by the external solver).

Cost will be bounded by the external solver: For a minimization problem, each solution's cost becomes a lower bound, for maximization an upper bound on Cost. This technique allows for repeated re-solving with reduced bounds or added constraints.

ListOfOptions is the same as the low-level primitive lp_demon_setup/6, except that EplexInstance is implicitly associated with the new external solver state, so the collect_from option of lp_demon_setup/6 is not allowed (it is set to collect_from(pool(EplexInstance)) by the predicate). See lp_demon_setup/6 for the details on the demon specific options, and lp_setup/4 for the general solver options.

Priority is the scheduling priority with which the solver gets woken up. This priority determines whether the solver is run before or after other constraints. It is recommended to choose a priority that lies below the priority of more efficient propagation constraints, e.g. 5. 0 can also be specified, in which case the default priority for the predicate (5 unless changed) is used.

TriggerModes specifies under which conditions the external solver will be re-triggered. If no condition is specified, then the solver must be explicitly triggered, usually via eplex_solve/1. The conditions are the same as the low-level primitive lp_demon_setup/6 called by this predicate. See lp_demon_setup/6 for more details.

See Also

=:= / 2, >= / 2, =< / 2, integers / 1, eplex_solver_setup / 1, eplex_probe / 2, eplex_solve / 1, eplex_get / 2, eplex_var_get / 3, lp_demon_setup / 6, lp_setup / 4