Re: PAKCS, problem with module CLPFD -> solved

From: Steffen Mazanek <steffen.mazanek_at_unibw.de>
Date: Tue, 12 Feb 2008 10:47:56 +0100

Now all is fine. This problem also was caused by a "wrong order" of
evaluation. Thanks again.

Steffen

2008/2/11, Steffen Mazanek <steffen.mazanek_at_unibw.de>:
> 2008/2/8, Michael Hanus <mh_at_informatik.uni-kiel.de>:
>
> >
> > Sorry for the insufficient explanation, but PAKCS does not
> > provide any specific implementation for FD constraints
> > but just reuses the implementation which is available
> > in SICStus Prolog. So, look at the documention at
> >
> > http://www.sics.se/sicstus/docs/latest3/html/sicstus.html/Enumeration-Predicates.html
> >
> > for more details. As far as I understand, it is not possible
> > to minimize and maximize several variables at the same time
> > since the labeling function commits to one solution if
> > maximize/minimize is used. A solution to your problem is
> > to define a single variable that represents the overall cost
> > which should be maximized. For instance, you can define
> > c=y-x-z and maximize c:
> >
> > CLPFD> domain [x,y,z] 0 100 & c =# y -# x -# z & labeling [Maximize c] [x,y,z]
> > Free variables in goal: x, y, z, c
> >
> > Result: success
> > Bindings:
> > x=0
> >
> > y=100
> > z=0
> > c=100 ? ;
> > No more solutions.
> >
> > I hope that helps.
>
>
> Thank you for your help with that. I have tried your example and it
> works as expected. With my more complex constraints unfortunately
> I get no solution. I try to break this down to give a simple example.
>
> Thanks again,
>
> Steffen
>
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Feb 12 2008 - 12:14:56 CET

This archive was generated by hypermail 2.3.0 : Do Dez 12 2019 - 07:15:09 CET