[gecode-users] How to use FloatVar ?

Christian Schulte cschulte at kth.se
Wed Dec 3 15:26:11 CET 2014


Please read MPG more carefully, that will help.

 

Best

Christian

 

--

Christian Schulte, Professor of Computer Science, KTH,
www.gecode.org/~schulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of mehdi m
Sent: Wednesday, December 03, 2014 2:46 PM
To: users at gecode.org
Subject: [gecode-users] How to use FloatVar ?

 

Hello, 

I have in my model a three variables t1,t2,t3.

t1 t2 are IntVar. c and d are constant (int).

i want to calculate 

t3 = c*t1 / d*t2 // i need to store it variable t3

t3 > threshold.

So i declared  t3 like FloatVar.

and i posted these constraints :

rel (*this, t3, FRT_EQ, c*t1/d*t2);

rel (*this, t3, FRT_GE, threshold);

 

but it does't work, i tried to channel (c*t1/d*t2) to FloatVar but it didn't
work.

So, have you an idea to fix it ?  thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20141203/34b63b97/attachment.html>


More information about the users mailing list