Next: Using the constraints
Up: Common Solver Interface
Previous: Introduction
  Index
The constraints can be divided into the following groups:
- the numeric type constraints reals/1 and integers/1.
Note that in this context, integers are considered a subset of the reals.
- the range constraint ::/2 which gives upper and lower bounds on
the variables and can also imply integrality.
- arithmetic equality, inequality and disequality over the mathematical
real numbers, e.g.
=:=, =\=, <. Note that in this context,
integers are considered a subset of the reals and can therefore
occur in these constraints.
- arithmetic equality, inequality and disequality which in addition to
the above constrain all variables within their arguments to integers.
Syntactically, these generally have a leading
#,
e.g. #=, #\=, #<.
Table 2.1:
Supported constraints for various solvers
| |
=:=/2 |
|
|
|
#=/2 |
|
|
|
|
| |
>=/2 |
>/2 |
|
|
#>=/2 |
#>/2 |
|
|
|
| |
=</2 |
</2 |
=\=/2 |
::/2 |
#=</2 |
#</2 |
#\=/2 |
integers/1 |
reals/1 |
| suspend |
yes |
yes |
yes |
yes |
yes |
yes |
yes |
yes |
yes |
| fd |
-- |
-- |
-- |
yes |
yes |
yes |
yes |
yes |
-- |
| ic |
yes |
-- |
yes |
yes |
yes |
yes |
yes |
yes |
yes |
| eplex |
yes |
-- |
-- |
yes |
-- |
-- |
-- |
yes |
yes |
| fdplex |
-- |
-- |
-- |
yes |
yes |
yes |
-- |
-- |
-- |
| arith |
yes |
yes |
yes |
-- |
-- |
-- |
-- |
-- |
-- |
- The fd and fdplex versions of
::/2 allow only integer bounds.
- If integer bounds are given to the eplex version of
::/2
the variables can only be
instantiated to integer values. However, the external solver
does not consider this as an integrality constraint and
only solves the continuous relaxation which can then be rounded
to the next integer. To make the external solver solve a mixed
integer problem, use the eplex version of integers/1.
|
Not all constraints are supported by all the solvers. For example, the
finite domain solver does not support any of the constraints that can take
floats. Table 2.1 shows the constraints that are available
from the various constraint solvers.
In the table, a `yes' entry indicates that the
particular constraint is supported by the particular solver. Note
that some further restrictions may apply for a particular solver. For
example, the finite domain solver can handle only linear expressions. Refer
to the documentation for each individual solver to see what restrictions
might apply.
Note that the last line, labelled `arith', is not really a constraint
solver but represents just the standard arithmetic tests which require
all variables to be instantiated. This behaviour is provided by the
(automatically imported) module eclipse_language.
Next: Using the constraints
Up: Common Solver Interface
Previous: Introduction
  Index
Warwick Harvey
2002-05-15