[gecode-users] channeling of FloatVar and IntVar, FloatVar for Gecode 3?

Christian Schulte cschulte at kth.se
Mon Dec 14 10:28:06 CET 2009


Hi Jan,

yes you are right. But, after all, the float vars have not made it into
Gecode officcially, so that will have to wait until then. But anyway, I'll
keep that in mind.

Best
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 jkrause at gmx.net
Sent: Friday, December 11, 2009 9:12 PM
To: gecode list
Subject: [gecode-users] channeling of FloatVar and IntVar, FloatVar for
Gecode 3?

Dear all,

thanks for your wonderful framework. It solves a lot of my problems. But 
I have a problem, that I can't solve until now.

Assuming that we have a variable 'x' of type 'float' and a constraint:

x<=10, x>=2.5

For "x>=12,5" we can use:

FloatVar x_float(this, double_interval(this, double_interval::whole()), 
twelf_five(this, double_interval(12.5,12.5));
Float::Relational_post(this, x_float, Gecode::Float::FLOAT_REL_GQ,  
twelf_five);

and for "x<=10" we can use:

IntVar x_int(this,IntMin,IntMax), ten(this,10,10);
rel(this, x_int, Gecode::IRT_LQ, ten);

I know I can handle "10" also as a FloatVar. But in general, neglecting 
the conversation problems, I need a channel between "x_int" and 
"x_float", doesn't it? Is there another possibility to handle this 
problem? By the way, is there an update of the FloatVar-library for 
Gecode 3 out there or in planning?

Thanx again and cheers
Jan


_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list