[gecode-users] First contact with gecode
Frederic C
frederic.ant.c at gmail.com
Mon Oct 6 08:19:21 CEST 2014
I changed IRT_LE for IRT_LQ and it works, thank you. I'm silly, if
coefficients are all zeros, it helps if the right hand size can also be
zero!
Fred
Le 06/10/2014 00:29, Chris Mears a écrit :
> Hello Fred,
>
>> { // 1A + 1B > 0
>> IntArgs coeffs(2); coeffs[0] = 1; coeffs[1] = 1;
>> linear(*this, coeffs, s, IRT_GT, int(0));
>> }
> I am not sure how you got this to compile, because this should be
> "IRT_GR".
>
>> { // 1A + 0B > 0
>> IntArgs coeffs(2); coeffs[0] = 1; coeffs[1] = 0;
>> linear(*this, coeffs, s, IRT_GT, int(0));
>> }
>> { // 1A + 1B > 0
>> IntArgs coeffs(2); coeffs[0] = 0; coeffs[1] = 1;
>> linear(*this, coeffs, s, IRT_GT, int(0));
>> }
>> { // 0A + 0B <= 0
>> IntArgs coeffs(2); coeffs[0] = 0; coeffs[1] = 0;
>> linear(*this, coeffs, s, IRT_LE, int(0));
>> }
> Here you want IRT_LQ ( <= ) instead of IRT_LE ( < ).
More information about the users
mailing list