Bounds constraints intended for an eplex instance should be posted to
that instance, e.g.
[eclipse 3]: eplex_instance(instance).
...
[eclipse 4]: instance: eplex_solver_setup(min(X)),
instance: (X:: 0.0..10.0), instance: eplex_solve(C).
X = X{0.0 .. 10.0 @ 0.0}
C = 0.0
Yes (0.00s cpu)
The ::/2 ($::/2) constraints are treated like other eplex constraints,
that is, the bounds for the variables are specific to their eplex
instance. Other eplex instances (and indeed any other bounds-keeping
solver) can have different and even incompatible bounds set for the same
variable. Also, if the variable(s) do not already occur in the eplex
instance, they will be added. Both of these are different from the
non-standalone eplex, where bound constraints were treated
separately from the eplex constraints.
Like other eplex constraints, inconsistency within the same eplex instance
will lead to failure, i.e. if the upper bound of a variable becomes
smaller than its lower bound, this will result in failure, either
immediately or when the solver is invoked.
One potential problem is that with the non-standalone eplex, the bound
keeper's ::/2
was re-exported through the eplex module (but not
through the eplex instances). One was able to write
eplex: (X :: 1.0..2.0)
and affect the bounds of the variable for all instances,
even though this was not posting a constraint to any eplex instance.
With the standalone eplex, the same code, eplex: (X :: 1.0..2.0)
has
different semantics and is a constraint for the eplex instance
eplex
only.
A variable never becomes ground as a result of an eplex instance bound
constraint, even when the upper and lower bounds are identical.
Posting eplex arithmetic constraints involving one variable is the
same as posting a bounds constraint. Unlike the non-standalone eplex, the
variable will be added to the eplex instance even if it does not occur in
any other constraints.
No propagation of the bounds is performed at the ECLiPSe level: the bounds
are simply passed on to the external solver. In general, the external
solver also does not do any bounds propagation that may be implied by the
other constraints in the eplex instance.
Note that the generic get_var_bounds/3 and set_var_bounds/3
applies to all the eplex instances/solver states. If set_var_bounds/3
is called, then failure will occur if the bounds are inconsistent between
the eplex instances.