[Osi-tickets] [COIN-OR Open Solver Interface] #85: OsiXprSolverInterface::setRowType() converting constraints to equalities

COIN-OR Open Solver Interface coin-trac at coin-or.org
Sun Sep 20 14:27:13 EDT 2009

#85: OsiXprSolverInterface::setRowType() converting constraints to equalities
 Reporter:  mkaut     |       Owner:  mjs    
     Type:  defect    |      Status:  new    
 Priority:  critical  |   Milestone:         
Component:  OsiXpr    |     Version:  0.100.0
 Keywords:            |  
 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) );

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


Ticket URL: <https://projects.coin-or.org/Osi/ticket/85>
COIN-OR Open Solver Interface <http://projects.coin-or.org/Osi>
An API for a variety of LP and MIP solvers (and more).

More information about the Osi-tickets mailing list