Changeset 31


Ignore:
Timestamp:
Aug 31, 2006 9:59:27 AM (13 years ago)
Author:
pbonami
Message:

Accept sos2 constraints

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/BonminAmplInterface/AmplTMINLP.cpp

    r25 r31  
    171171      for (int ii=0;ii<sos_.num;ii++) {
    172172        int ichar = sos_.types[ii];
    173         if(ichar != '1') {
     173        if(ichar != '1' && ichar!='2') {
    174174          std::cerr<<"Unsuported type of sos constraint: "<<sos_.types[ii]<<std::endl;
    175175          throw;
    176176        }
    177         sos_.types[ii]= 1;
     177        sos_.types[ii]= ichar - '0';
    178178      }
    179179    }
     
    274274      totalNumberOfNonContinuous++;
    275275    }
    276     //    std::cout<<"Number of integer and binaries : "<<totalNumberOfNonContinuous<<std::endl;
    277276    return true;
    278277  }
Note: See TracChangeset for help on using the changeset viewer.