Opened 11 years ago

Closed 20 months ago

#85 closed defect (migrated)

OsiXprSolverInterface::setRowType() converting constraints to equalities

Reported by: mkaut Owned by: mjs
Priority: critical Milestone:
Component: OsiXpr Version: 0.100.0
Keywords: Cc:

Description

OsiXprSolverInterface::setRowType() can change the sense of a constraint from L to E when called from for ex. OsiXprSolverInterface::setRowUpper(). This is caused by the difference in handling of range property in Osi and Xpress: Osi uses zero for all non-R rows, while in Xpress it is basically undefined for those rows. Hence, if provides some value, Xpress interprets it is a value. In particular, when setRowType() sends range = 0, Xpress (quite logically, actually) changes the sense of the constraint to E.

The solution is easy: replace the current line 1204

    XPRS_CHECKED( XPRSchgrhsrange, (prob_,1, mindex, rng) );

by

    if ( sense == 'R' ) {
        // range is properly defined only for range-type rows
        XPRS_CHECKED( XPRSchgrhsrange, (prob_,1, mindex, rng) );
    }

Change History (2)

comment:1 Changed 11 years ago by stefan

Fixed in trunk and stable/0.100

Thanks for finding this, Stefan

comment:2 Changed 20 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/Osi/issues/85

Note: See TracTickets for help on using tickets.