Changeset 2476 for trunk/Cbc


Ignore:
Timestamp:
Jan 27, 2019 3:51:34 PM (10 months ago)
Author:
unxusr
Message:

keeping names in preprocess

Location:
trunk/Cbc/src
Files:
4 edited

Legend:

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

    r2467 r2476  
    20002000      if ((specialOptions_ & 32) == 0) {
    20012001        // take off names (unless going to be saving)
    2002         if (numberAnalyzeIterations_ >= 0 || (-numberAnalyzeIterations_ & 64) == 0)
     2002        int nameDisc; solver_->getIntParam( OsiNameDiscipline, nameDisc );
     2003        if ( (numberAnalyzeIterations_ >= 0 || (-numberAnalyzeIterations_ & 64) == 0) && (!nameDisc) )
    20032004          clpSimplex->dropNames();
    20042005      }
     
    56405641  , master_(NULL)
    56415642  , masterThread_(NULL)
     5643  , keepNamesPreproc(false)
    56425644{
    56435645  memset(intParam_, 0, sizeof(intParam_));
     
    66156617    currentNumberCuts_ = rhs.currentNumberCuts_;
    66166618    maximumDepth_ = rhs.maximumDepth_;
     6619    keepNamesPreproc = rhs.keepNamesPreproc;
     6620    mipStart_ = rhs.mipStart_;
    66176621    delete[] addedCuts_;
    66186622    delete[] walkback_;
  • trunk/Cbc/src/CbcModel.hpp

    r2467 r2476  
    26962696  }
    26972697
     2698  /** if original column names will be preserved in preprocessed problem
     2699   */
     2700  void setKeepNamesPreproc( bool _keep )
     2701  {
     2702    this->keepNamesPreproc = _keep;
     2703  }
     2704
     2705  bool getKeepNamesPreproc() const
     2706  {
     2707    return keepNamesPreproc;
     2708  }
     2709
    26982710  /** may be safer to use this overload method: c++ string libraries
    26992711     * implementation may not be binary compatible */
    27002712  void setMIPStart(int count, const char **colNames, const double colValues[]);
     2713
    27012714
    27022715  const std::vector< std::pair< std::string, double > > &getMIPStart()
     
    27832796    */
    27842797  std::vector< std::pair< std::string, double > > mipStart_;
     2798
     2799  /** keepNamesPreproc
     2800   *  if variables names will be preserved in the pre-processed problem
     2801   *  (usefull in callbacks)
     2802   **/
     2803  bool keepNamesPreproc;
     2804
    27852805  /** Warm start object produced by heuristic or strong branching
    27862806
  • trunk/Cbc/src/CbcSolver.cpp

    r2467 r2476  
    43504350                    process.setKeepColumnNames(keepPPN);
    43514351                    process.setTimeLimit(babModel_->getMaximumSeconds() - babModel_->getCurrentSeconds(), babModel_->useElapsedTime());
     4352                    if (model.getKeepNamesPreproc())
     4353                      process.setKeepColumnNames(true);
    43524354                    solver2 = process.preProcessNonDefault(*saveSolver, translate[preProcess], numberPasses,
    43534355                      tunePreProcess);
     
    43634365                  preProcessPointer = &process; // threadsafe
    43644366                  redoSOS = true;
     4367                  if (model.getKeepNamesPreproc())
     4368                    process.setKeepColumnNames(true);
    43654369                  solver2 = process.preProcessNonDefault(*saveSolver, translate[preProcess], numberPasses,
    43664370                    tunePreProcess);
  • trunk/Cbc/src/Cbc_C_Interface.cpp

    r2473 r2476  
    871871
    872872  CbcModel *cbcModel = model->model_;
     873  cbcModel->setKeepNamesPreproc(true);
    873874
    874875  CglCallback cglCb;
Note: See TracChangeset for help on using the changeset viewer.