[ The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

library(ria)

Real number Interval Arithmetic constraint solver - superseded by library(ic)

Predicates

ria:(?ExprX #< ?ExprY)
ExprX is less than ExprY with intergrality constraints.
ria:(?ExprX #= ?ExprY)
ExprX is equal to ExprY with intergrality constraints.
ria:(?ExprX #=< ?ExprY)
ExprX is less than or equal to ExprY with intergrality constraints.
ria:(?ExprX #> ?ExprY)
ExprX is greater than ExprY with intergrality constraints.
ria:(?ExprX #>= ?ExprY)
ExprX is greater or equal to ExprY with intergrality constraints.
?ExprX *= ?ExprY
Obsolete: use ria:(ExprX =:= ExprY) instead.
?ExprX *=< ?ExprY
Obsolete: use ria:(ExprX =< ExprY) instead.
?ExprX *>= ?ExprY
Obsolete: use ria:(ExprX >= ExprY) instead.
?Vars :: ++Lo..Hi
Constrain Vars to the interval between Lo and Hi.
? < ?
No description available
ria:(?ExprX =:= ?ExprY)
ExprX is equal to ExprY.
ria:(?ExprX =< ?ExprY)
ExprX is less than or equal to ExprY.
? > ?
No description available
ria:(?ExprX >= ?ExprY)
ExprX is greater than or equal to ExprY.
delta(?Var, -Width)
Returns the width of the range of Var.
get_threshold(-Threshold)
Read the current propagation threshold.
-Var giis +Expr
Performs ground interval arithmetic.
-Var iis +SimpleExpr
Internal constraint used to rewrite other constraints.
locate(+Vars, ++Precision)
Locate solution intervals for Vars by splitting and search.
locate(+Vars, ++Precision, ++lin/log)
Locate solution intervals for Vars by splitting and search.
locate(+LocateVars, +SquashVars, ++Precision, ++lin/log)
Locate solution intervals for Vars by interleaving search with squashing.
median(?Var, -Median)
Returns the median of the range of the ranged variable Var.
piecewise_linear(?X, ++Points, ?Y)
Relates X and Y according to a piecewise linear function.
ria_stat(?Parameter)
Obtain/start/stop ria statistics counters.
set_threshold(++Threshold)
Set the propagation threshold.
squash(+Vars, ++Precision, ++lin/log)
Refines the interval of Vars by the squashing algorithm.
tr_op(?, -)
Internal predicate to transform dealyed goals into readable form.

Reexports

reexport range
except :: / 2
reexport ria_
except piecewise_linear_2 / 4, fx / 6, struct(_)

Description

This library is obsolete and has been superseded by library(ic)!

The Ria library solves constraint problems over the reals. It is not limited to linear constraints. So it can be used to solve general problems like:

[eclipse 2]: ria:( ln(X) >= sin(X) ).

X = X{0.36787944117144233 .. Infinity}
yes.
The Ria library has two different algorithms built in. The default one is arc-consistency and is quite cheap, the other provides a stronger consistency but is slower.

Both algorithms work on the same data representation. That is real numbers in a closed range between (and including) two floats. The library will reduce this range if possible. It never gets as far as reducing a variable to a single float.

The following arithmetic expression can be used inside the constraints:

X
Variables. If X is not yet a ranged variable, it is turned into one via an implicit declaration X :: -inf..inf.
123
Integer constants. They are assumed to be exact and are used as is.
0.1
Floating point constants. They are assumed to be inexact and are widened into a narrow interval that is guaranteed to contain the true value.
exact(0.5)
Sometimes the programmer knows that a floating point constant is exact or meant to be taken literally. In that case, use this form.
pi, e
Intervals enclosing the constants pi and e respectively.
inf
Floating point infinity.
+Expr
Identity.
-Expr
Sign change.
+-Expr
Expr or -Expr. The result is an interval enclosing both.
abs(Expr)
The absolute value of Expr.
E1+E2
Addition.
E1-E2
Subtraction.
E1*E2
Multiplication.
E1/E2
Division.
E1^E2
Exponentiation.
min(E1,E2)
Minimum.
max(E1,E2)
Maximum.
sqr(Expr)
Square. Logically equivalent to Expr*Expr, but with better operational behaviour.
sqrt(Expr)
Square root (always positive).
exp(Expr)
Same as e^Expr.
ln(Expr)
Natural logarithm, the reverse of the exp function.
sin(Expr)
Sine.
cos(Expr)
Cosine.
atan(Expr)
Arcus tangens.
rsqr(Expr)
Reverse of the sqr function. The same as +-sqrt(Expr).
rpow(E1,E2)
Reverse of exponentiation. i.e. finds X in E1 = X^E2.
(E1;E2)
E1 or E2. Operationally, this computes the union of two intervals.
sub(Expr)
A subinterval of Expr.
sum(ExprList)
Sum of a list of expressions.
min(ExprList)
Minimum of a list of expressions.
max(ExprList)
Maximum of a list of expressions.

About


Generated from ria.eci on Sat Aug 7 01:44:32 2004