Ignore:
Timestamp:
May 5, 2015 8:53:14 AM (4 years ago)
Author:
stefan
Message:

sync with trunk

Location:
stable/2.9/Cbc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/2.9/Cbc

  • stable/2.9/Cbc/src

  • stable/2.9/Cbc/src/CbcModel.cpp

    r2165 r2186  
    70927092    if (name)
    70937093        heuristic_[where]->setHeuristicName(name) ;
     7094#ifndef SAME_HEURISTIC_SEED
    70947095    heuristic_[where]->setSeed(987654321 + where);
     7096#else
     7097    heuristic_[where]->setSeed(987654321);
     7098#endif
    70957099    numberHeuristics_++ ;
    70967100}
     
    78527856        feasible = false; // pretend infeasible
    78537857    }
     7858    //#define CHECK_KNOWN_SOLUTION
     7859#ifdef CHECK_KNOWN_SOLUTION
     7860    if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
     7861                          !feasible)) {
     7862      printf("help 1\n");
     7863    }
     7864#endif
    78547865    /*
    78557866      NEW_UPDATE_OBJECT is defined to 0 when unthreaded (CBC_THREAD undefined), 2
     
    92249235        }
    92259236        // add in any active cuts if at root node (for multiple solvers)
     9237#ifdef CHECK_KNOWN_SOLUTION
     9238    if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
     9239                          !feasible)) {
     9240      printf("help 2\n");
     9241    }
     9242#endif
    92269243        if (!numberNodes_) {
    92279244          for (i = 0; i < numberCutGenerators_; i++)
     
    96259642    }
    96269643#endif
     9644#ifdef CHECK_KNOWN_SOLUTION
     9645    if (onOptimalPath && (solver_->isDualObjectiveLimitReached()||
     9646                          !feasible)) {
     9647      printf("help\n");
     9648    }
     9649#endif
    96279650#ifdef CBC_DEBUG
    96289651    if (onOptimalPath && !solver_->isDualObjectiveLimitReached())
     
    998310006    const CoinWarmStartBasis* ws ;
    998410007    CoinWarmStartBasis::Status status ;
     10008    //#define COIN_HAS_CLP_KEEP_STATUS
     10009#ifdef COIN_HAS_CLP_KEEP_STATUS
     10010    int problemStatus=-1;
     10011    OsiClpSolverInterface * clpSolver
     10012      = dynamic_cast<OsiClpSolverInterface *> (solver_);
     10013    if (clpSolver)
     10014      problemStatus=clpSolver->getModelPtr()->status();
     10015#endif
    998510016    bool needPurge = true ;
    998610017    /*
     
    1013610167    }
    1013710168   
     10169#ifdef COIN_HAS_CLP_KEEP_STATUS
     10170    // need to check further that only zero duals dropped
     10171    if (clpSolver) // status may have got to -1
     10172      clpSolver->getModelPtr()->setProblemStatus(problemStatus);
     10173#endif
    1013810174    /*
    1013910175      Clean up and return.
     
    1431914355            }
    1432014356        }
     14357#ifdef CHECK_KNOWN_SOLUTION
     14358        bool onOptimalPath = false;
     14359        if ((specialOptions_&1) != 0) {
     14360          const OsiRowCutDebugger *debugger = solver_->getRowCutDebugger() ;
     14361          if (debugger) {
     14362            onOptimalPath = true;
     14363            printf("On optimal path before resolve\n") ;
     14364          }
     14365        }
     14366#endif
    1432114367        clpSolver->resolve();
     14368#ifdef CHECK_KNOWN_SOLUTION
     14369        if ((specialOptions_&1) != 0&&onOptimalPath) {
     14370          const OsiRowCutDebugger *debugger = solver_->getRowCutDebugger() ;
     14371          if (debugger) {
     14372            printf("On optimal path after resolve\n") ;
     14373          } else {
     14374            solver_->writeMpsNative("badSolve.mps", NULL, NULL, 2);
     14375            printf("NOT on optimal path after resolve\n") ;
     14376          }
     14377        }
     14378#endif
    1432214379        if (!numberNodes_) {
    1432314380            double error = CoinMax(clpSimplex->largestDualError(),
Note: See TracChangeset for help on using the changeset viewer.