1.1 --- a/lemon/lp_base.h Mon Oct 24 21:40:31 2011 +0200
1.2 +++ b/lemon/lp_base.h Tue Nov 01 13:53:06 2011 +0100
1.3 @@ -1618,7 +1618,7 @@
1.4 ///
1.5 inline LpBase::Constr operator<=(const LpBase::Expr &e,
1.6 const LpBase::Expr &f) {
1.7 - return LpBase::Constr(0, f - e, LpBase::INF);
1.8 + return LpBase::Constr(0, f - e, LpBase::NaN);
1.9 }
1.10
1.11 ///Create constraint
1.12 @@ -1636,7 +1636,7 @@
1.13 ///
1.14 inline LpBase::Constr operator<=(const LpBase::Expr &e,
1.15 const LpBase::Value &f) {
1.16 - return LpBase::Constr(- LpBase::INF, e, f);
1.17 + return LpBase::Constr(LpBase::NaN, e, f);
1.18 }
1.19
1.20 ///Create constraint
1.21 @@ -1645,7 +1645,7 @@
1.22 ///
1.23 inline LpBase::Constr operator>=(const LpBase::Expr &e,
1.24 const LpBase::Expr &f) {
1.25 - return LpBase::Constr(0, e - f, LpBase::INF);
1.26 + return LpBase::Constr(0, e - f, LpBase::NaN);
1.27 }
1.28
1.29
1.30 @@ -1665,7 +1665,7 @@
1.31 ///
1.32 inline LpBase::Constr operator>=(const LpBase::Expr &e,
1.33 const LpBase::Value &f) {
1.34 - return LpBase::Constr(f, e, LpBase::INF);
1.35 + return LpBase::Constr(f, e, LpBase::NaN);
1.36 }
1.37
1.38 ///Create constraint
2.1 --- a/test/lp_test.cc Mon Oct 24 21:40:31 2011 +0200
2.2 +++ b/test/lp_test.cc Tue Nov 01 13:53:06 2011 +0100
2.3 @@ -166,6 +166,14 @@
2.4 c = ((2 >= e) >= 3);
2.5 c = ((2 >= p1) >= 3);
2.6
2.7 + { //Tests for #430
2.8 + LP::Col v=lp.addCol();
2.9 + LP::Constr c = v >= -3;
2.10 + c = c <= 4;
2.11 + LP::Constr c2;
2.12 + c2 = -3 <= v <= 4;
2.13 + }
2.14 +
2.15 e[x[3]]=2;
2.16 e[x[3]]=4;
2.17 e[x[3]]=1;