Changeset 1983


Ignore:
Timestamp:
May 27, 2012 7:09:02 AM (7 years ago)
Author:
pbonami
Message:

Another bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.6/Bonmin/src/Interfaces/BonTMINLP2OsiLP.hpp

    r1967 r1983  
    132132  bool pos =  value > 0;
    133133
    134   if(colLoBounded && pos && rowNotUpBounded) {
     134  if(colLoBounded && !pos && rowNotUpBounded) {
    135135    lb += value * (colsol - colLower);
    136136    return 0;
    137137  }
    138138  else
    139     if(colLoBounded && !pos && rowNotLoBounded) {
     139    if(colLoBounded && pos && rowNotLoBounded) {
    140140      ub += value * (colsol - colLower);
    141141      return 0;
    142142    }
    143143    else
    144       if(colUpBounded && !pos && rowNotUpBounded) {
     144      if(colUpBounded && pos && rowNotUpBounded) {
    145145        lb += value * (colsol - colUpper);
    146146        return 0;
    147147      }
    148148      else
    149         if(colUpBounded && pos && rowNotLoBounded) {
     149        if(colUpBounded && !pos && rowNotLoBounded) {
    150150          ub += value * (colsol - colUpper);
    151151          return 0;
    152152        }
    153   //can not remove coefficient increase it to smallest non zero
    154   if(pos) value = tiny;
    155   else
    156     value = - tiny;
     153  //can not remove coefficient
    157154  return 1;
    158155}
Note: See TracChangeset for help on using the changeset viewer.