Changeset 295 for trunk/CbcStrategy.cpp


Ignore:
Timestamp:
Apr 2, 2006 5:10:40 AM (14 years ago)
Author:
forrest
Message:

for ampl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcStrategy.cpp

    r277 r295  
    369369          /* model may not have created objects
    370370             If none then create
     371             NOTE - put back to original column numbers as
     372             CbcModel will pack down ALL as it doesn't know where from
    371373          */
     374          bool someObjects = model.numberObjects()>0;
    372375          if (!numberIntegers||!model.numberObjects()) {
    373376            model.findIntegers(true);
     
    401404            delete objects[iSOS];
    402405          delete [] objects;
     406          if (!someObjects) {
     407            // put back old column numbers
     408            const int * originalColumns = process_->originalColumns();
     409            // use reverse lookup to fake it
     410            int n=originalColumns[numberColumns-1]+1;
     411            int * fake = new int[n];
     412            int i;
     413            for ( i=0;i<n;i++)
     414              fake[i]=-1;
     415            for (i=0;i<numberColumns;i++)
     416              fake[originalColumns[i]]=i;
     417            for (int iObject=0;iObject<model.numberObjects();iObject++) {
     418              // redo ids etc
     419              model.modifiableObject(iObject)->redoSequenceEtc(&model,n,fake);
     420            }
     421            delete [] fake;
     422          }
    403423        }
    404424      } else {
Note: See TracChangeset for help on using the changeset viewer.