Changeset 152


Ignore:
Timestamp:
Jul 3, 2005 12:40:47 PM (15 years ago)
Author:
forrest
Message:

stuff

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcMessage.cpp

    r143 r152  
    5353  language_=language;
    5454  strcpy(source_,"Cbc");
     55  class_ = 0; // branch and bound
    5556  Cbc_message * message = us_english;
    5657
  • trunk/CbcModel.cpp

    r150 r152  
    384384    strategy_->setupCutGenerators(*this);
    385385    strategy_->setupHeuristics(*this);
    386     strategy_->setupPrinting(*this);
     386    // Set strategy print level to models
     387    strategy_->setupPrinting(*this,handler_->logLevel());
    387388    strategy_->setupOther(*this);
    388389  }
     
    499500*/
    500501  continuousSolver_ = solver_->clone() ;
     502#ifdef COIN_USE_CLP
     503  {
     504    OsiClpSolverInterface * clpSolver
     505      = dynamic_cast<OsiClpSolverInterface *> (solver_);
     506    if (clpSolver) {
     507      ClpSimplex * clpSimplex = clpSolver->getModelPtr();
     508      // take off names
     509      clpSimplex->dropNames();
     510    }
     511  }
     512#endif
     513
    501514  numberRowsAtContinuous_ = getNumRows() ;
    502515/*
  • trunk/CbcStrategy.cpp

    r135 r152  
    223223// Do printing stuff
    224224void
    225 CbcStrategyDefault::setupPrinting(CbcModel & model)
    226 {
    227   if (!printLevel_) {
     225CbcStrategyDefault::setupPrinting(CbcModel & model,int modelLogLevel)
     226{
     227  if (!modelLogLevel) {
     228    model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
     229    model.messageHandler()->setLogLevel(0);
     230    model.solver()->messageHandler()->setLogLevel(0);
     231  } else if (modelLogLevel==1) {
    228232    model.solver()->setHintParam(OsiDoReducePrint,true,OsiHintTry);
    229233    model.messageHandler()->setLogLevel(1);
  • trunk/Samples/sample2.cpp

    r147 r152  
    184184  // go faster stripes
    185185  if (osiclp->getNumRows()<300&&osiclp->getNumCols()<500) {
    186     osiclp->setupForRepeatedUse(2,0);
    187   }
     186    //osiclp->setupForRepeatedUse(2,0);
     187    osiclp->setupForRepeatedUse(0,0);
     188  }
    188189  model.messagesPointer()->setDetailMessage(0,61);
    189190  // Allow rounding heuristic
     
    261262  // Do complete search
    262263 
    263   model.branchAndBound();
     264  model.branchAndBound(3);
    264265
    265266  std::cout<<mpsFileName<<" took "<<CoinCpuTime()-time1<<" seconds, "
  • trunk/include/CbcStrategy.hpp

    r135 r152  
    2525  virtual void setupHeuristics(CbcModel & model)=0;
    2626  /// Do printing stuff
    27   virtual void setupPrinting(CbcModel & model)=0;
     27  virtual void setupPrinting(CbcModel & model,int modelLogLevel)=0;
    2828  /// Other stuff e.g. strong branching
    2929  virtual void setupOther(CbcModel & model)=0;
     
    6767  virtual void setupHeuristics(CbcModel & model) {};
    6868  /// Do printing stuff
    69   virtual void setupPrinting(CbcModel & model) {};
     69  virtual void setupPrinting(CbcModel & model,int modelLogLevel) {};
    7070  /// Other stuff e.g. strong branching
    7171  virtual void setupOther(CbcModel & model) {};
     
    104104  virtual void setupHeuristics(CbcModel & model);
    105105  /// Do printing stuff
    106   virtual void setupPrinting(CbcModel & model);
     106  virtual void setupPrinting(CbcModel & model,int modelLogLevel) ;
    107107  /// Other stuff e.g. strong branching
    108108  virtual void setupOther(CbcModel & model);
Note: See TracChangeset for help on using the changeset viewer.