[Lemon-devel] Possible BUG in lp_base.h
Gabor Retvari
retvari at tmit.bme.hu
Sun Oct 30 14:44:05 CET 2011
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
--
Gábor Rétvári, Ph.D.
Research Fellow, BME-TMIT
Phone: +36-1-463-1060
Fax: +36-1-463-1763
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_lp_base_constr.diff
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lemon.cs.elte.hu/pipermail/lemon-devel/attachments/20111030/3b70af3f/attachment.diff>
More information about the Lemon-devel
mailing list