[gecode-users] First contact with gecode

Chris Mears chris at cmears.id.au
Mon Oct 6 00:29:40 CEST 2014


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