- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Steffen Mazanek <steffen.mazanek_at_unibw.de>

Date: Mon, 11 Feb 2008 05:03:00 -0500

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 Mo Feb 11 2008 - 12:03:15 CET

Date: Mon, 11 Feb 2008 05:03:00 -0500

2008/2/8, Michael Hanus <mh_at_informatik.uni-kiel.de>:

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 Mo Feb 11 2008 - 12:03:15 CET

*
This archive was generated by hypermail 2.3.0
: Mi Okt 27 2021 - 07:15:04 CEST
*