gravatar
retvari@tmit.bme.hu
retvari@tmit.bme.hu
Fix LpBase::Constr two-side limit bug (#430)
0 2 0
default
2 files changed with 12 insertions and 4 deletions:
↑ Collapse diff ↑
Ignore white space 4 line context
... ...
@@ -1605,5 +1605,5 @@
1605 1605
  inline LpBase::Constr operator<=(const LpBase::Expr &e,
1606 1606
                                   const LpBase::Expr &f) {
1607
    return LpBase::Constr(0, f - e, LpBase::INF);
1607
    return LpBase::Constr(0, f - e, LpBase::NaN);
1608 1608
  }
1609 1609

	
... ...
@@ -1623,5 +1623,5 @@
1623 1623
  inline LpBase::Constr operator<=(const LpBase::Expr &e,
1624 1624
                                   const LpBase::Value &f) {
1625
    return LpBase::Constr(- LpBase::INF, e, f);
1625
    return LpBase::Constr(LpBase::NaN, e, f);
1626 1626
  }
1627 1627

	
... ...
@@ -1632,5 +1632,5 @@
1632 1632
  inline LpBase::Constr operator>=(const LpBase::Expr &e,
1633 1633
                                   const LpBase::Expr &f) {
1634
    return LpBase::Constr(0, e - f, LpBase::INF);
1634
    return LpBase::Constr(0, e - f, LpBase::NaN);
1635 1635
  }
1636 1636

	
... ...
@@ -1652,5 +1652,5 @@
1652 1652
  inline LpBase::Constr operator>=(const LpBase::Expr &e,
1653 1653
                                   const LpBase::Value &f) {
1654
    return LpBase::Constr(f, e, LpBase::INF);
1654
    return LpBase::Constr(f, e, LpBase::NaN);
1655 1655
  }
1656 1656

	
Ignore white space 4 line context
... ...
@@ -167,4 +167,12 @@
167 167
    c = ((2 >= p1) >= 3);
168 168

	
169
    { //Tests for #430
170
      LP::Col v=lp.addCol();
171
      LP::Constr c = v >= -3;
172
      c = c <= 4;
173
      LP::Constr c2;
174
      c2 = -3 <= v <= 4;
175
    }
176

	
169 177
    e[x[3]]=2;
170 178
    e[x[3]]=4;
0 comments (0 inline)