Ignore:
Timestamp:
Jun 20, 2014 8:44:51 AM (5 years ago)
Author:
forrest
Message:

fixes for odd SOS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r2025 r2040  
    20082008    bool feasible;
    20092009    numberSolves_ = 0 ;
     2010    {
     2011      // check
     2012      int numberSOS = 0;
     2013      for (int i = 0; i < numberObjects_; i++) {
     2014        CbcSOS * obj =
     2015          dynamic_cast <CbcSOS *>(object_[i]) ;
     2016        if (obj)
     2017          numberSOS++;
     2018      }
     2019      if (numberSOS)
     2020        moreSpecialOptions_ |= 1073741824;
     2021    }
    20102022    // If NLP then we assume already solved outside branchAndbound
    20112023    if (!solverCharacteristics_->solverType() || solverCharacteristics_->solverType() == 4) {
     
    99139925    }
    99149926    // Can't happen if strong branching as would have been found before
    9915     if (!numberStrong_ && numberObjects_ > numberIntegers_) {
     9927    if ((!numberStrong_||(moreSpecialOptions_&1073741824)!=0)
     9928        && numberObjects_ > numberIntegers_) {
    99169929        int iColumn;
    99179930        int numberColumns = solver_->getNumCols();
     
    99499962        }
    99509963        if (clpSolver && (!currentNode_ || (currentNode_->depth()&2) != 0) &&
    9951                 !solverCharacteristics_->solutionAddsCuts())
     9964                !solverCharacteristics_->solutionAddsCuts() &&
     9965            (moreSpecialOptions_&1073741824)==0)
    99529966            nTightened = clpSolver->tightenBounds();
    99539967        if (nTightened) {
     
    1252312537
    1252412538{
     12539 
    1252512540    double * solution = CoinCopyOfArray(solutionIn, solver_->getNumCols());
    1252612541#ifdef JJF_ZERO
     
    1264412659                    objectiveValue = objectiveValue2;
    1264512660                }
    12646             }
     12661            } else {
     12662              // not good
     12663              messageHandler()->message(CBC_GENERAL, messages())
     12664                << "On closer inspection - solution discarded"
     12665                << CoinMessageEol ;
     12666           }
    1264712667            delete [] solution2;
    1264812668            solver_->setWarmStart(basis2);
Note: See TracChangeset for help on using the changeset viewer.