Changeset 111


Ignore:
Timestamp:
Nov 10, 2006 3:09:07 PM (13 years ago)
Author:
pbonami
Message:

Expose parameter for using Osi branching class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Bonmin/src/CbcBonmin/BonCbc.cpp

    r100 r111  
    6161
    6262// Code to enable user interuption
    63 static CbcModel * currentBranchModel = NULL;
    64 static Bonmin::OACutGenerator2 * currentOA = NULL;
    65 CbcModel * OAModel = NULL;
     63static CbcModel * currentBranchModel = NULL; //pointer to the main b&b
     64static Bonmin::OACutGenerator2 * currentOA = NULL; //pointer to the OA generator
     65CbcModel * OAModel = NULL; // pointer to the submip if using Cbc
     66//#ifdef COIN_HAS_CPX
     67//OsiCpxSolverInterface * CpxModel = NULL;//pointer to the submip if using cplex
     68//#endif
    6669
    6770#include "CoinSignal.hpp"
     
    7578      OAModel->setMaximumNodes(0); // stop at next node
    7679    if (currentOA!=NULL)
    77       currentOA->setMaxLocalSearchTime(0.); // stop at next node
     80      currentOA->setMaxLocalSearchTime(0.); // stop OA
    7881    return;
    7982  }
     
    394397      chooseVariable.setNumberStrong(model.numberStrong());
    395398      branch.setChooseMethod(chooseVariable);}
    396 
     399     else if(par.varSelection == 4){
     400      OsiChooseVariable choose(model.solver());
     401      branch.setChooseMethod(choose);
     402    }
     403    else if(par.varSelection == 5){
     404      OsiChooseStrong choose(model.solver());
     405      choose.setNumberBeforeTrusted(par.minReliability);
     406      choose.setNumberStrong(par.numberStrong);
     407      branch.setChooseMethod(choose);
     408    }
    397409    model.setBranchingMethod(&branch);
    398410
Note: See TracChangeset for help on using the changeset viewer.