[gecode-users] Disjunction in a Propagator::propagate
Christian Schulte
cschulte at kth.se
Tue May 6 10:20:03 CEST 2008
Hi David,
I guess with "Boolean" you mean BoolView. For Boolean variables another view
exists: NegBoolView which implements Boolean negation (without any cost). So
what you could do is the following:
NegBoolView na(A), nb(B);
Bool::BinOrTrue<NegBoolView,NegBoolView>::post(home,na,nb);
Cheers
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of David Rijsman
Sent: Tuesday, May 06, 2008 9:28 AM
To: users at gecode.org
Subject: [gecode-users] Disjunction in a Propagator::propagate
I am writing a propagator and I want to create a disjunction in the
propagate method. Specifically I have a boolean A and B and want to
post the following:
A = 0 \/ B = 0
I know we have the binary boolean disjunction propagator for true (A=1
\/ B=1), now I am lost how to post the propagator for binary boolean
disjunction false given A and B?
Can I do the following in the propagate method:
Bool::BinOrTrue<BoolView,BoolView>::post(home,!A,!B)
which requires the minimodel which I think is more than I should need.
David
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list