COIN-OR::LEMON - Graph Library

Opened 13 years ago

Closed 13 years ago

#430 closed defect (fixed)

Bug in LpBase::Constr

Reported by: Alpar Juttner Owned by: Alpar Juttner
Priority: major Milestone: LEMON 1.3 release
Component: core Version:
Keywords: Cc: Gabor Retvari <retvari@…>
Revision id: 4dd3dc8eb5a7

Description

From: Gábor Rétvári

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

Attachments (1)

fix_lp_base_constr.diff (1.2 KB) - added by Alpar Juttner 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Alpar Juttner

Attachment: fix_lp_base_constr.diff added

comment:1 Changed 13 years ago by Alpar Juttner

Resolution: fixed
Status: newclosed

The attached patch (as chgset [2eebc8f7dca5]) has been merged to branches 1.1, 1.2 and main.

Note: See TracTickets for help on using tickets.