[Lemon-devel] Possible BUG in lp_base.h

Alpár Jüttner alpar at cs.elte.hu
Tue Nov 1 14:45:03 CET 2011


Hi,

Thanks for reporting the issue. It was indeed a silly bug in lp_base.h.
The fix is now available in the development version.

Regards,
Alpár

On Sun, 2011-10-30 at 14:44 +0100, Gabor Retvari wrote:
> Dear all,
> 
> Based on my understanding, the below should work:
> 
> #include <lemon/lp.h>
> 
> using namespace lemon;
> 
> int main(){
>   Lp::Col v;
>   Lp::Constr c = v >= -3;
>   c = c <= 4;
>   return 0;
> }
> 
> and it should have the same effect as
> 
> c = -3 <= v <= 4
> 
> However, currently it fails with an assertion:
> 
> /export/devel/lemon/lemon/lemon/lp_base.h:1708: lemon::LpBase::Constr 
> lemon::operator<=(const lemon::LpBase::Constr&, const Value&): Wrong LP 
> constraint (assertion 'isNaN(tmp.upperBound())' failed)
> 
> The attached patch fixes it for me.
> 
> Best regards,
> Gabor
> 
> _______________________________________________
> Lemon-devel mailing list
> Lemon-devel at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-devel





More information about the Lemon-devel mailing list