Changeset 2546


Ignore:
Timestamp:
Apr 9, 2019 9:44:03 AM (6 months ago)
Author:
forrest
Message:

try and improve qp

Location:
trunk/Cbc/src
Files:
2 edited

Legend:

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

    r2531 r2546  
    229229        bestSolution_ = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    230230        bestObjectiveValue_ = qpTemp.objectiveValue();
    231         printf("better qp objective of %g\n", bestObjectiveValue_);
     231        //printf("better qp objective of %g\n", bestObjectiveValue_);
    232232        // If model has stored then add cut (if convex)
    233233        if (cbcModel_ && (specialOptions2_ & 4) != 0) {
     
    289289    }
    290290  }
     291  int saveLogLevel=modelPtr_->logLevel();
     292  if (saveLogLevel==1)
     293    modelPtr_->setLogLevel(0);
    291294  specialOptions_ = 0;
    292295  modelPtr_->setWhatsChanged(0);
     
    441444        }
    442445        if (value < bestObjectiveValue_ - 1.0e-3) {
    443           printf("obj of %g\n", value);
     446          // printf("obj of %g\n", value);
    444447          //modelPtr_->setDualObjectiveLimit(value);
    445448          delete[] bestSolution_;
     
    676679                qpTemp.setLogLevel(modelPtr_->logLevel());
    677680                qpTemp.primal();
    678                 assert(!qpTemp.problemStatus());
     681                // assert(!qpTemp.problemStatus());
    679682                if (qpTemp.objectiveValue() < bestObjectiveValue_ - 1.0e-3 && !qpTemp.problemStatus()) {
    680683                  solution2 = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    681684                } else {
    682                   printf("QP says expensive - kill\n");
     685                  // printf("QP says expensive - kill\n");
    683686                  modelPtr_->setProblemStatus(1);
    684687                  modelPtr_->setObjectiveValue(COIN_DBL_MAX);
     
    787790    modelPtr_->setObjectiveValue(COIN_DBL_MAX);
    788791  }
     792  modelPtr_->setLogLevel(saveLogLevel);
    789793}
    790794// Do OA cuts
     
    72167220        bestSolution_ = CoinCopyOfArray(qpTemp.primalColumnSolution(), numberColumns);
    72177221        bestObjectiveValue_ = qpTemp.objectiveValue();
    7218         printf("better qp objective of %g\n", bestObjectiveValue_);
     7222        //printf("better qp objective of %g\n", bestObjectiveValue_);
    72197223      }
    72207224    }
  • trunk/Cbc/src/CbcSolver.cpp

    r2543 r2546  
    1056010560      }
    1056110561    }
     10562    delete coinModel;
    1056210563  }
    1056310564#if CBC_QUIET == 0
Note: See TracChangeset for help on using the changeset viewer.