[gecode-users] Posting boolean clauses -little precision-
Christian Schulte
schulte at imit.kth.se
Mon May 29 09:50:55 CEST 2006
Dear Jeremie,
what you can do is the following:
- for each negative literal, create a new var and post a propagator
bool_not
- for the disjunction: just create a Boolean variable that is
assigned 1 and use that as
result for bool_or.
An example how to use the minimodel stuff is (assuming that b0, b1, b2 are
Boolean variables):
post(<some space>, b0 | !b1 | b2)
returns a BoolVar reflecting the formula. If you want to state the formula
is true, just write
post(<some space>, tt(b0 | !b1 | b2))
Hope that helps
Christian
--
Christian Schulte, http://www.imit.kth.se/~schulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of jeremie.vautard
Sent: Sunday, May 28, 2006 9:29 PM
To: users
Subject: [gecode-users] Posting boolean clauses -little precision-
Hi again !
Having had a look at my previous message, I realise that it is not perfectly
clear. The constraint I want to post is a disjunction of litterals, i.e. a
boolean variable or its negation. (so, maybe the propagator I mentionned is
not the right one ?)
I noticed that minimodel has a boolean expressions support,
but I didn't find any example using it. Is such an example available
anywhere ?
Jeremie Vautard
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
_______________________________________________
Gecode users mailing list
users at gecode.org https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list