[ ECLiPSe Rational Library Predicate|Group Index| Full Index]

rmax(?Func)

The objective function Func is maximized with respect to a set of constraints in normal form.

?Func
A rational term.

Description

This is one of two optimization predicates provided by the ECLiPSe compiler, the other being rmin/1.

rmax/1 amounts to finding a feasible solution where the objective function Func is maximal with respect to the constraints store.

Fail Conditions

None

Resatisfiable

Exceptions

Examples


Success:
X $=< 3, 2 * X $= Y, rmax(X + Y).
Succeeds if X = 3 and Y = 6.

Fail:
X $=< 3, rmax(X+Y), X $= 2 * Y.
Here rmax/1 fails because insufficient information
is available to find a solution when it is called.


See Also

rmin / 1