Changeset 99


Ignore:
Timestamp:
Oct 30, 2006 11:55:45 PM (12 years ago)
Author:
pbonami
Message:

Add option to choose branching strategy,
include cmath in BonCurvatureEstimator?

Location:
branches/devel/Bonmin/src
Files:
4 edited

Legend:

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

    r98 r99  
    4444    // Branch & bound setting
    4545    success &= Options->GetEnumValue("nodeselect_stra",nodeSelection,"bonmin.");
     46    success &= Options->GetEnumValue("varseselect_stra",varSelection,"bonmin.");
    4647    success &= Options->GetIntegerValue("number_strong_branch",numberStrong,"bonmin.");
    4748    success &= Options->GetIntegerValue("number_before_trust", minReliability,"bonmin.");
     
    7677    if (algo==0)//B-BB
    7778    {
    78       // AW minReliability=0;
    79       minReliability=10000;
    80       //AW numberStrong=0;
     79      if(varSelection == 1 || varSelection == 2){
     80        std::cout<<"Variable selection strategy not available with B-BB.\nSetting to most fractional."<<std::endl;
     81        varSelection = 0;
     82      }
    8183    }
    8284    else if (algo==1)//B-OA
     
    9799    {
    98100    }
    99 
     101   
     102    // Set branching strategy
     103    if(varSelection == 0){
     104      minReliability = 0;
     105      numberStrong = 0;
     106    }
     107    else if(varSelection == 1){
     108      minReliability = 0;
     109    }
     110    else if(varSelection == 3){
     111      minReliability = 10000;
     112    }
    100113    return success;
    101114  }
  • branches/devel/Bonmin/src/CbcBonmin/BonCbcParam.hpp

    r62 r99  
    5959    /** Node selection strategy :
    6060        <ul>
    61         <li> 0: best boud,
     61        <li> 0: best bound,
    6262        <li> 1: DFS,
    6363        <li> 2: BFS,
     
    6868    */
    6969    int nodeSelection;
     70    /** Variable selection strategy :
     71        <ul>
     72        <li> 0: most fractional,
     73        <li> 1: strong branching,
     74        <li> 2: reliability branching,
     75        <li> 3: Curvature estimation.
     76        </ul>
     77    */
     78    int varSelection;
    7079    /** Number of candidates for strong branching.*/
    7180    int numberStrong;
  • branches/devel/Bonmin/src/Interfaces/BonCurvatureEstimator.cpp

    r98 r99  
    1313#include "IpDenseVector.hpp"
    1414#include "IpBlas.hpp"
    15 
     15#include <cmath>
    1616#ifdef HAVE_MA27
    1717# include "IpMa27TSolverInterface.hpp"
  • branches/devel/Bonmin/src/Interfaces/BonOsiTMINLPInterface.cpp

    r96 r99  
    148148      "integer feasible solutions have been found).",
    149149      "Choose the strategy for selecting the next node to be processed.");
     150
     151  roptions->AddStringOption4("varselect_stra",
     152      "Chooses variable selection strategy",
     153      "strong_branching",
     154      "most_fractional", "Choose most fractional variable",
     155      "strong_branching", "Perform strong branching",
     156      "reliability_branching", "Use reliability branching",
     157      "curvature_estimator", "Use curvature estimation to select branching variable","");
    150158
    151159  roptions->AddLowerBoundedIntegerOption("number_strong_branch",
Note: See TracChangeset for help on using the changeset viewer.