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
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to