Changeset 688


Ignore:
Timestamp:
Jul 15, 2007 5:47:48 PM (12 years ago)
Author:
forrest
Message:

at least get some of cpu time correct with threads

File:
1 edited

Legend:

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

    r641 r688  
    19511951    */
    19521952
    1953     double startTime = CoinCpuTime();
    1954     model->setMaximumNodes(200000);
     1953    double startTime = CoinCpuTime()+CoinCpuTimeJustChildren();
     1954    if (model->getMaximumNodes()>200000)
     1955      model->setMaximumNodes(200000);
    19551956    OsiClpSolverInterface * si =
    19561957      dynamic_cast<OsiClpSolverInterface *>(model->solver()) ;
     
    20162017    else
    20172018      model->setMaximumCutPassesAtRoot(20);
     2019    // If defaults then increase trust for small models
     2020    if (model->numberStrong()==5&&model->numberBeforeTrust()==10) {
     2021      int numberColumns = model->getNumCols();
     2022      if (numberColumns<=50)
     2023        model->setNumberBeforeTrust(1000);
     2024      else if (numberColumns<=100)
     2025        model->setNumberBeforeTrust(100);
     2026      else if (numberColumns<=300)
     2027        model->setNumberBeforeTrust(50);
     2028    }
    20182029    model->branchAndBound();
    20192030     
    2020     double timeOfSolution = CoinCpuTime()-startTime;
     2031    double timeOfSolution = CoinCpuTime()+CoinCpuTimeJustChildren()-startTime;
    20212032    // Print more statistics
    20222033    std::cout<<"Cuts at root node changed objective from "<<model->getContinuousObjective()
Note: See TracChangeset for help on using the changeset viewer.