next up previous index
Next: Eplex Instances Up: EPLEX: The ECLiPSe/CPLEX Interface Previous: Usage   Index

Ranged and Typed Variables

Ranged variables in eplex can be provided by either the ic-library or the older range-library. Currently, for backwards compatibility, range is the default solver for handling eplex variables with lib(eplex). The use of ic- or range- library with eplex could be explicitly requested by lib(ic_eplex) or lib(ic_range) respectively.

The relevant predicates are:

Vars :: Lo..Hi
Define the initial bounds of variables. Note that if both bounds are specified as integers, then the variable is logically an integer variable. E.g. X::1..9 declares an integer variable while X::1.0..9.0 declares a continuous one.

If a variable is logically integral, this means that any bound updates will automatically be rounded inwards to the next integer (subject to int_tolerance, see 11.11.2.4, and the variable can only be instantiated to an integer, not to a float. However, this does not imply that the external solver considers the variable as integral - use integers/1 to achieve this!

The symbolic bounds -inf and inf can be used. The default range is -inf..inf. Mathematical Programming style nonnegative variables should be declared as X :: 0.0..inf.

integers(Vars)
Constrains Vars to be integer. The integrality is passed to the external solver as well.
get_var_bounds(+Var, -Lo, -Hi)
Retrieve a variable's range.
var_type(+Var, -Type)
Retrieve a variable's type (integer or real).


next up previous index
Next: Eplex Instances Up: EPLEX: The ECLiPSe/CPLEX Interface Previous: Usage   Index
Warwick Harvey
2002-05-15