Changeset 2995


Ignore:
Timestamp:
Apr 18, 2020 4:19:34 AM (3 months ago)
Author:
forrest
Message:

changes to make ampl work a bit better

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CbcModel.cpp

    r2993 r2995  
    1229312293    OsiClpSolverInterface *clpContinuousSolver
    1229412294      = dynamic_cast< OsiClpSolverInterface * >(continuousSolver_);
     12295    // But not if odd solver
     12296    if(dynamic_cast< CbcOsiSolver * >(continuousSolver_))
     12297      clpContinuousSolver = NULL;
    1229512298    int modifiedTolerances = 0;
    1229612299#ifndef CBC_LEAVE_PERTURBATION_ON_CHECK_SOLUTION
  • trunk/src/CbcSolver.cpp

    r2984 r2995  
    15131513        if (returnCode)
    15141514          return returnCode;
     1515        if (info.numberSos) {
     1516          numberSOS = info.numberSos;
     1517          sosStart = info.sosStart;
     1518          sosIndices = info.sosIndices;
     1519          sosType = info.sosType;
     1520          sosReference = info.sosReference;
     1521          sosPriority = info.sosPriority;
     1522        }
    15151523        setCbcOrClpReadMode(2); // so will start with parameters
    15161524        // see if log in list (including environment)
     
    22752283              int returnCode;
    22762284              const char *message = parameters_[iParam].setIntParameterWithMessage(lpSolver, value, returnCode);
     2285              if (parameters_[iParam].type() == CLP_PARAM_INT_SOLVERLOGLEVEL)
     2286                clpSolver->messageHandler()->setLogLevel(value); // as well
     2287               
    22772288              if (!noPrinting_ && strlen(message)) {
    22782289                generalMessageHandler->message(CLP_GENERAL, generalMessages)
     
    50765087              if (clqStrMethod >= 1) {
    50775088                  CglCliqueStrengthening clqStr;
     5089                  // Printing should be at babModel level not solver
     5090                  int logLevel = babModel_->messageHandler()->logLevel();
     5091                  int slogLevel = babModel_->solver()->messageHandler()->logLevel();
     5092                  logLevel = CoinMin(logLevel,slogLevel);
     5093                  babModel_->solver()->messageHandler()->setLogLevel(logLevel);
    50785094                  clqStr.strengthenCliques(*babModel_->solver(), clqStrMethod);
     5095                  babModel_->solver()->messageHandler()->setLogLevel(slogLevel);
    50795096
    50805097                  if (clqStr.constraintsExtended() + clqStr.constraintsDominated() > 0) {
     
    79317948                  delete basis;
    79327949                  originalSolver->setDblParam(OsiDualObjectiveLimit, COIN_DBL_MAX);
     7950#ifdef COIN_HAS_LINK
     7951                  if (originalSolver->getMatrixByCol())
     7952                    originalSolver->setHintParam(OsiDoPresolveInResolve, true, OsiHintTry);
     7953#else
    79337954                  originalSolver->setHintParam(OsiDoPresolveInResolve, true, OsiHintTry);
     7955#endif
    79347956                  originalSolver->resolve();
    79357957                  if (!originalSolver->isProvenOptimal()) {
  • trunk/src/CbcSymmetry.cpp

    r2939 r2995  
    8585  if (level > maxLevel) {
    8686    printf("Level %d after %d calls\n", level, calls);
    87     fprintf(stderr, "Level %d after %d calls\n", level, calls);
    8887    maxLevel = level;
    8988  }
Note: See TracChangeset for help on using the changeset viewer.