Re: mindomain

From: Jesper Hansen Ph.D.Student (jc 1/2002) <jha_at_imm.dtu.dk>
Date: Wed 16 Oct 2002 09:04:16 AM GMT
Message-ID: <3DAD2B90.8622DAC9@imm.dtu.dk>
When can we expect the release of 5.5?

'Jesper

Warwick Harvey wrote:

> [Apologies to Karen for receiving multiple copies of this; I accidentally
> replied directly to her rather than to the whole list.]
>
> Hi Karen,
>
> On Fri, Oct 11, 2002 at 06:13:24PM +0100, Karen E Petrie wrote:
> > Dear all,
> >
> > The mindomain(Var, Min) predicate in the fd library, sets a variable Min
> > to the minimum value in the domain of Var. Is there an equivalent for the
> > ic library, as I can't find one in the documentation.
> >
> > I have tried using get_ic_bounds(Var, Lo, Hi), but it returns a number in
> > floating point format, whereas I need an integer!
>
> So convert it to an integer!  :)  You might find fix/2 useful for this.
>
> In the current unreleased version of ECLiPSe (5.5), get_ic_bounds/3 returns
> integral bounds if Var is integral (unless the bounds are infinite, in which
> case it returns the relevant float infinity) so you would not have this
> problem.
>
> 5.5 also defines get_ic_min/2 and get_ic_max/2 (convenience predicates
> defined in terms of get_ic_bounds/3 if you just want one of the bounds) as
> well as get_ic_float_bounds/3 (always returns float bounds, like the old
> get_ic_bounds/3 in 5.4).  But these predicates are in something of a state
> of flux; we are considering dropping the "ic" from their names, and changing
> some aspects of their semantics (e.g. failing if the variable is not an IC
> variable, rather than making it an IC variable) so you may wish to avoid
> them for now.
>
> Cheers,
> Warwick

--
_______________________________________
Jesper Hansen
Ph.D. student
Telephone: (+45) 45 25 33 88
Telefax.:  (+45) 45 25 26 73
E-mail: mailto:jha@imm.dtu.dk
Homepage: http://www.imm.dtu.dk/~jha/
Department of Mathematical Modelling
Building 305
Technical University of Denmark
DK-2800 Lyngby
Received on Wed Oct 16 10:05:12 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:17 PM GMT GMT