Changeset 1407


Ignore:
Timestamp:
Apr 4, 2009 10:24:27 AM (11 years ago)
Author:
pbonami
Message:

Change cutoff for iFP

Location:
trunk/Bonmin/src/Algorithms
Files:
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/Algorithms/BonBonminSetup.cpp

    r1401 r1407  
    106106    EcpCuts::registerOptions(roptions);
    107107    OaNlpOptim::registerOptions(roptions);
     108    SubMipSolver::registerOptions(roptions);
    108109
    109110
     
    421422        case LP_STRONG_BRANCHING:
    422423          chooseVariable->setTrustStrongForSolution(false);
    423           strong_solver = new LpBranchingSolver(nonlinearSolver_);
     424          strong_solver = new LpBranchingSolver(this);
    424425          //chooseVariable->setOnlyPseudoWhenTrusted(true);
    425426          chooseVariable->setOnlyPseudoWhenTrusted(false);
     
    584585    Algorithm algo = getAlgorithm();
    585586    if (algo == B_OA) {
    586       std::string o_name = prefix_ + "oa_dec_time_limit";
    587       options_->SetNumericValue(o_name.c_str(),COIN_DBL_MAX, true, true);
    588       o_name = prefix_ + "minlp_pump_time_limit";
    589       options_->SetNumericValue(o_name.c_str(),0, true, true);
     587      std::string o_name = prefix_ + "oa_decomposition";
     588      options_->SetStringValue(o_name.c_str(),"yes", true, true);
     589      o_name = prefix_ + "oa_decomposition.time_limit";
     590      options_->SetNumericValue(o_name.c_str(),DBL_MAX, true, true);
     591      o_name = prefix_ + "pump_for_minlp";
     592      options_->SetStringValue(o_name.c_str(),"no", true, true);
    590593      o_name = prefix_ + "nlp_solve_frequency";
    591594      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
     
    593596    }
    594597    if (algo == B_IFP) {
    595       std::string o_name = prefix_ + "minlp_pump_time_limit";
    596       options_->SetNumericValue(o_name.c_str(),COIN_DBL_MAX, true, true);
     598      std::string o_name = prefix_ + "oa_decomposition";
     599      options_->SetStringValue(o_name.c_str(),"no", true, true);
     600      o_name = prefix_ + "pump_for_minlp";
     601      options_->SetStringValue(o_name.c_str(),"yes", true, true);
     602      o_name = prefix_ + "pump_for_minlp.time_limit";
     603      options_->SetNumericValue(o_name.c_str(),DBL_MAX, true, true);
    597604      o_name = prefix_ + "nlp_solve_frequency";
    598605      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
     
    600607    }
    601608    else if (algo==B_QG) {
    602       std::string o_name = prefix_ + "oa_dec_time_limit";
    603       options_->SetNumericValue(o_name.c_str(),0, true, true);
    604       o_name = prefix_ + "minlp_pump_time_limit";
    605       options_->SetNumericValue(o_name.c_str(),0, true, true);
     609      std::string o_name = prefix_ + "oa_decomposition";
     610      options_->SetStringValue(o_name.c_str(),"no", true, true);
     611      o_name = prefix_ + "pump_for_minlp";
     612      options_->SetStringValue(o_name.c_str(),"no", true, true);
    606613      o_name = prefix_ + "nlp_solve_frequency";
    607614      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
    608615    }
    609616    else if (algo==B_Ecp) {
    610       std::string o_name = prefix_ + "oa_dec_time_limit";
    611       options_->SetNumericValue(o_name.c_str(),0, true, true);
    612       o_name = prefix_ + "minlp_pump_time_limit";
    613       options_->SetNumericValue(o_name.c_str(),0, true, true);
     617      std::string o_name = prefix_ + "oa_decomposition";
     618      options_->SetStringValue(o_name.c_str(),"no", true, true);
     619      o_name = prefix_ + "pump_for_minlp";
     620      options_->SetStringValue(o_name.c_str(),"no", true, true);
    614621      o_name = prefix_ + "nlp_solve_frequency";
    615622      options_->SetIntegerValue(o_name.c_str(), 0, true, true);
     
    660667      addMilpCutGenerators();
    661668
    662     double oaTime;
    663     options_->GetNumericValue("oa_dec_time_limit",oaTime,prefix_.c_str());
    664     if (oaTime > 0.) {
     669    int doFp;
     670    options_->GetEnumValue("pump_for_minlp",doFp,prefix_.c_str());
     671    if (doFp) {
     672      CuttingMethod cg;
     673      cg.frequency = -99;
     674      MinlpFeasPump * oa = new MinlpFeasPump(*this);
     675      oa->passInMessageHandler(nonlinearSolver_->messageHandler());
     676      cg.cgl = oa;
     677      cg.id = "Feasibility Pump for MINLP.";
     678      cutGenerators_.push_back(cg);
     679
     680    }
     681    int doOa;
     682    options_->GetEnumValue("oa_decomposition",doOa,prefix_.c_str());
     683    if (doOa) {
    665684      CuttingMethod cg;
    666685      cg.frequency = -99;
     
    673692    }
    674693
    675     double fp_for_minlp_time;
    676     options_->GetNumericValue("minlp_pump_time_limit",fp_for_minlp_time,prefix_.c_str());
    677     if (fp_for_minlp_time > 0.) {
    678       CuttingMethod cg;
    679       cg.frequency = -99;
    680       MinlpFeasPump * oa = new MinlpFeasPump(*this);
    681       oa->passInMessageHandler(nonlinearSolver_->messageHandler());
    682       cg.cgl = oa;
    683       cg.id = "Feasibility Pump for MINLP.";
    684       cutGenerators_.push_back(cg);
    685 
    686     }
    687694    {
    688695      CuttingMethod cg;
  • trunk/Bonmin/src/Algorithms/BonSubMipSolver.cpp

    r1399 r1407  
    1919#include "OsiCpxSolverInterface.hpp"
    2020#endif
     21
     22#include "BonRegisteredOptions.hpp"
    2123
    2224namespace Bonmin {
     
    261263   }
    262264
     265  /** Register options.*/
     266  void
     267  SubMipSolver::registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions)
     268  {
     269    roptions->SetRegisteringCategory("Options for MILP solver", RegisteredOptions::BonminCategory);
     270    roptions->AddStringOption3("milp_solver",
     271        "Choose the subsolver to solve MILP sub-problems in OA decompositions.",
     272        "Cbc_D",
     273        "Cbc_D","Coin Branch and Cut with its default",
     274        "Cbc_Par", "Coin Branch and Cut with passed parameters",
     275        "Cplex","Ilog Cplex",
     276        " To use Cplex, a valid license is required and you should have compiled OsiCpx in COIN-OR  (see Osi documentation).");
     277    roptions->setOptionExtraInfo("milp_solver",5);
     278
     279    roptions->AddBoundedIntegerOption("milp_log_level",
     280        "specify MILP solver log level.",
     281        0,3,0,
     282        "Set the level of output of the MILP subsolver in OA : "
     283        "0 - none, 1 - minimal, 2 - normal low, 3 - normal high"
     284                                     );
     285    roptions->setOptionExtraInfo("milp_log_level",5);
     286
     287
     288  }
    263289}/* Ends Bonmin namespace.*/
  • trunk/Bonmin/src/Algorithms/BonSubMipSolver.hpp

    r1395 r1407  
    1212#ifndef BonSubMipSolver_HPP
    1313#define BonSubMipSolver_HPP
    14 
     14#include "IpSmartPtr.hpp"
    1515/* forward declarations.*/
    1616class OsiSolverInterface;
     
    2121
    2222namespace Bonmin {
     23    class RegisteredOptions;
    2324    /** A very simple class to provide a common interface for solving MIPs with Cplex and Cbc.*/
    2425    class SubMipSolver
     
    8889         return lp_;
    8990      }
     91     static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
    9092    private:
    9193      /** lp (potentially mip solver). */
  • trunk/Bonmin/src/Algorithms/Branching/BonLpBranchingSolver.cpp

    r1397 r1407  
    1313{
    1414
    15   LpBranchingSolver::LpBranchingSolver(OsiTMINLPInterface * solver) :
    16       StrongBranchingSolver(solver),
     15  LpBranchingSolver::LpBranchingSolver(BabSetupBase * b) :
     16      StrongBranchingSolver(b->nonlinearSolver()),
    1717      lin_(NULL),
    1818      warm_(NULL),
     
    2020  {
    2121    SmartPtr<TNLPSolver> tnlp_solver =
    22       static_cast<TNLPSolver *> (solver->solver());
     22       static_cast<TNLPSolver *> (b->nonlinearSolver()->solver());
    2323    SmartPtr<OptionsList> options = tnlp_solver->options();
    2424
    25     options->GetIntegerValue("ecp_max_rounds_strong",
    26         maxCuttingPlaneIterations_, solver->prefix());
    27     options->GetNumericValue("ecp_abs_tol_strong", abs_ecp_tol_,solver->prefix());
    28     options->GetNumericValue("ecp_rel_tol_strong", rel_ecp_tol_,solver->prefix());
    29     int dummy;
    30     options->GetEnumValue("lp_strong_warmstart_method", dummy,solver->prefix());
    31     warm_start_mode_ = (WarmStartMethod) dummy;
    32   }
     25            options->GetIntegerValue("ecp_max_rounds_strong",
     26                                     maxCuttingPlaneIterations_,
     27                                     b->nonlinearSolver()->prefix());
     28            options->GetNumericValue("ecp_abs_tol_strong",
     29                                     abs_ecp_tol_,
     30                                     b->nonlinearSolver()->prefix());
     31            options->GetNumericValue("ecp_rel_tol_strong",
     32                                     rel_ecp_tol_,
     33                                     b->nonlinearSolver()->prefix());
     34            int dummy;
     35            options->GetEnumValue("lp_strong_warmstart_method",
     36                                  dummy,
     37                                  b->nonlinearSolver()->prefix());
     38            warm_start_mode_ = (WarmStartMethod) dummy;
     39          }
    3340
    3441  LpBranchingSolver::LpBranchingSolver(const LpBranchingSolver & rhs) :
     
    8390    lin_->resolve();
    8491    warm_ = lin_->getWarmStart();
    85     if (maxCuttingPlaneIterations_)
    86       ecp_ = new EcpCuts(tminlp_interface, maxCuttingPlaneIterations_,
    87           abs_ecp_tol_, rel_ecp_tol_, -1.);
     92    //if (maxCuttingPlaneIterations_)
     93    //  ecp_ = new EcpCuts(tminlp_interface, maxCuttingPlaneIterations_,
     94    //      abs_ecp_tol_, rel_ecp_tol_, -1.);
    8895  }
    8996
  • trunk/Bonmin/src/Algorithms/Branching/BonLpBranchingSolver.hpp

    r1129 r1407  
    1818  public:
    1919
     20#if 0
    2021    /// Constructor from solver (so we can set up arrays etc)
    2122    LpBranchingSolver (OsiTMINLPInterface * solver);
     23#endif
    2224
     25    /// Constructor from setup
     26    LpBranchingSolver (BabSetupBase *b);
    2327    /// Copy constructor
    2428    LpBranchingSolver (const LpBranchingSolver &);
  • trunk/Bonmin/src/Algorithms/Makefile.am

    r1395 r1407  
    3030         BonBonminSetup.cpp BonBonminSetup.hpp \
    3131         BonSubMipSolver.cpp BonSubMipSolver.hpp \
    32          BonSolverHelp.cpp BonSolverHelp.hpp \
    33          BonCutStorage.cpp BonCutStorage.hpp
     32         BonSolverHelp.cpp BonSolverHelp.hpp
    3433
    3534libbonalgorithms_la_LIBADD = Branching/libbonbranching.la
  • trunk/Bonmin/src/Algorithms/Makefile.in

    r1395 r1407  
    6262LTLIBRARIES = $(noinst_LTLIBRARIES)
    6363am_libbonalgorithms_la_OBJECTS = BonBabSetupBase.lo BonBonminSetup.lo \
    64         BonSubMipSolver.lo BonSolverHelp.lo BonCutStorage.lo
     64        BonSubMipSolver.lo BonSolverHelp.lo
    6565libbonalgorithms_la_OBJECTS = $(am_libbonalgorithms_la_OBJECTS)
    6666depcomp = $(SHELL) $(top_srcdir)/../depcomp
     
    355355         BonBonminSetup.cpp BonBonminSetup.hpp \
    356356         BonSubMipSolver.cpp BonSubMipSolver.hpp \
    357          BonSolverHelp.cpp BonSolverHelp.hpp \
    358          BonCutStorage.cpp BonCutStorage.hpp
     357         BonSolverHelp.cpp BonSolverHelp.hpp
    359358
    360359libbonalgorithms_la_LIBADD = Branching/libbonbranching.la \
     
    484483@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BonBabSetupBase.Plo@am__quote@
    485484@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BonBonminSetup.Plo@am__quote@
    486 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BonCutStorage.Plo@am__quote@
    487485@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BonSolverHelp.Plo@am__quote@
    488486@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BonSubMipSolver.Plo@am__quote@
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonEcpCuts.hpp

    r1395 r1407  
    3131        beta_(beta)
    3232    {}
    33 
    3433    EcpCuts(BabSetupBase & b);
    3534
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonFpForMinlp.cpp

    r1401 r1407  
    3030  {
    3131    int ivalue;
    32     b.options()->GetEnumValue("milp_subsolver",ivalue,b.prefix());
     32    std::string bonmin="bonmin.";
     33    std::string prefix = (b.prefix() == bonmin) ? "" : b.prefix();
     34    prefix += "pump_for_minlp.";
     35    b.options()->GetEnumValue("milp_solver",ivalue,prefix);
    3336    if (ivalue <= 0) {//uses cbc
    3437      //nothing to do?
     
    3639    else if (ivalue == 1) {
    3740      int nodeS, nStrong, nTrust, mig, mir, probe, cover;
    38       b.options()->GetEnumValue("node_comparison",nodeS,"fp_sub.");
    39       b.options()->GetIntegerValue("number_strong_branch",nStrong,"fp_sub.");
    40       b.options()->GetIntegerValue("number_before_trust", nTrust,"fp_sub.");
    41       b.options()->GetIntegerValue("Gomory_cuts", mig,"fp_sub.");
    42       b.options()->GetIntegerValue("probing_cuts",probe,"fp_sub.");
    43       b.options()->GetIntegerValue("mir_cuts",mir,"fp_sub.");
    44       b.options()->GetIntegerValue("cover_cuts",cover,"fp_sub.");
    45      
    46       CbcStrategy * strategy =
    47         new CbcOaStrategy(mig, probe, mir, cover, nTrust,
    48             nStrong, nodeS, parameters_.cbcIntegerTolerance_, parameters_.subMilpLogLevel_);
    49       setStrategy(*strategy);
    50       delete strategy;
    51 
    52     }
    53     else if (ivalue == 2) {
    54 #ifdef COIN_HAS_CPX
    55       OsiCpxSolverInterface * cpxSolver = new OsiCpxSolverInterface;
    56       b.nonlinearSolver()->extractLinearRelaxation(*cpxSolver);
    57       assignLpInterface(cpxSolver);
    58 #else
    59       std::cerr << "You have set an option to use CPLEX as the milp\n"
    60       << "subsolver in oa decomposition. However, apparently\n"
    61       << "CPLEX is not configured to be used in bonmin.\n"
    62       << "See the manual for configuring CPLEX\n";
    63       throw -1;
    64 #endif
    65     }
    66 
    67     double oaTime;
    68     b.options()->GetNumericValue("minlp_pump_time_limit",oaTime,b.prefix());
    69     parameter().localSearchNodeLimit_ = 1000000;
    70     parameter().maxLocalSearch_ = 100000;
    71     parameter().maxLocalSearchPerNode_ = 10000;
    72     parameter().maxLocalSearchTime_ =
    73       Ipopt::Min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
     41              b.options()->GetEnumValue("node_comparison",nodeS,prefix);
     42              b.options()->GetIntegerValue("number_strong_branch",nStrong, prefix);
     43              b.options()->GetIntegerValue("number_before_trust", nTrust, prefix);
     44              b.options()->GetIntegerValue("Gomory_cuts", mig, prefix);
     45              b.options()->GetIntegerValue("probing_cuts",probe, prefix);
     46              b.options()->GetIntegerValue("mir_cuts",mir, prefix);
     47              b.options()->GetIntegerValue("cover_cuts",cover,prefix);
     48             
     49              CbcStrategy * strategy =
     50                new CbcOaStrategy(mig, probe, mir, cover, nTrust,
     51                    nStrong, nodeS, parameters_.cbcIntegerTolerance_, parameters_.subMilpLogLevel_);
     52              setStrategy(*strategy);
     53              delete strategy;
     54
     55            }
     56            else if (ivalue == 2) {
     57        #ifdef COIN_HAS_CPX
     58              OsiCpxSolverInterface * cpxSolver = new OsiCpxSolverInterface;
     59              b.nonlinearSolver()->extractLinearRelaxation(*cpxSolver);
     60              assignLpInterface(cpxSolver);
     61        #else
     62              std::cerr << "You have set an option to use CPLEX as the milp\n"
     63              << "subsolver in oa decomposition. However, apparently\n"
     64              << "CPLEX is not configured to be used in bonmin.\n"
     65              << "See the manual for configuring CPLEX\n";
     66              throw -1;
     67        #endif
     68            }
     69
     70            double oaTime;
     71            b.options()->GetNumericValue("time_limit",oaTime,prefix);
     72            parameter().localSearchNodeLimit_ = 1000000;
     73            parameter().maxLocalSearch_ = 100000;
     74            parameter().maxLocalSearchPerNode_ = 10000;
     75            parameter().maxLocalSearchTime_ =
     76            std::min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
    7477  }
    7578  MinlpFeasPump::~MinlpFeasPump()
     
    121124    OsiBranchingInformation info(lp, false);
    122125
     126    bool milpOptimal = false;
    123127    nlp_->resolve();
    124     printf("Time limit is %g", parameters_.maxLocalSearchTime_);
     128    //printf("Time limit is %g", parameters_.maxLocalSearchTime_);
    125129    if (subMip)//Perform a local search
    126130    {
     
    128132      set_fp_objective(*lp, nlp_->getColSolution());
    129133      lp->initialSolve();
    130       printf("Objective value %g\n", lp->getObjValue());
    131134      lp->setColUpper(numcols, cutoff);
    132135      subMip->find_good_sol(DBL_MAX, parameters_.subMilpLogLevel_,
     
    134137          parameters_.localSearchNodeLimit_);
    135138
     139      milpOptimal = subMip -> optimal();
    136140      colsol = subMip->getLastSolution();
    137141      nLocalSearch_++;
     
    165169      double dist = nlp_->solveFeasibilityProblem(indices.size(), x_bar(), indices(), 1, 0, 2);
    166170
    167       printf("NLP solution is %g from MILP sol\n",dist);
     171      handler_->message(FP_DISTANCE, messages_)
     172      <<dist<<CoinMessageEol;
    168173
    169174      if(dist < 1e-06){
     
    174179           //nlp is solved and feasible
    175180           // Update the cutoff
    176            cutoff = nlp_->getObjValue() * (1 - parameters_.cbcCutoffIncrement_);
    177            // Update the lp solver cutoff
    178            lp->setDblParam(OsiDualObjectiveLimit, cutoff);
     181           //cutoff = nlp_->getObjValue() * (1 - 10*parameters_.cbcCutoffIncrement_);
     182           cutoff = nlp_->getObjValue() - parameters_.cbcCutoffIncrement_;
     183           cutoff = nlp_->getObjValue() - 0.1;
    179184           numSols_++;
    180185         }
     
    219224            parameters_.maxLocalSearchTime_ + timeBegin_ - CoinCpuTime(),
    220225            parameters_.localSearchNodeLimit_);
    221 
     226        milpOptimal = subMip -> optimal();
    222227        colsol = subMip->getLastSolution();
     228      if(colsol)
     229        handler_->message(FP_MILP_VAL, messages_)
     230        <<colsol[nlp_->getNumCols()]<<CoinMessageEol;
     231         
    223232      }/** endif localSearch*/
    224233      else if (subMip!=NULL) {
     
    228237      }
    229238    }
    230     if(colsol)
     239    if(colsol || ! milpOptimal)
    231240      return -DBL_MAX;
    232241    else
     
    239248  {
    240249    roptions->SetRegisteringCategory("Options for feasibility pump", RegisteredOptions::BonminCategory);
    241     roptions->AddLowerBoundedNumberOption("minlp_pump_time_limit",
    242         "Specify the maximum number of seconds spent overall in MINLP Feasibility Pump.",
    243         0.,0,60.,
    244         "");
    245250
    246251    roptions->AddBoundedIntegerOption("fp_log_level",
    247         "specify OA iterations log level.",
     252        "specify FP iterations log level.",
    248253        0,2,1,
    249254        "Set the level of output of OA decomposition solver : "
     
    252257
    253258    roptions->AddLowerBoundedNumberOption("fp_log_frequency",
    254         "display an update on lower and upper bounds in OA every n seconds",
     259        "display an update on lower and upper bounds in FP every n seconds",
    255260        0.,1.,100.,
    256261        "");
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOACutGenerator2.cpp

    r1403 r1407  
    3030  {
    3131    int ivalue;
    32     b.options()->GetEnumValue("milp_subsolver",ivalue,b.prefix());
     32    std::string bonmin="bonmin.";
     33    std::string prefix = (b.prefix() == bonmin) ? "" : b.prefix();
     34    prefix += "oa_decomposition.";
     35    b.options()->GetEnumValue("milp_subsolver",ivalue,prefix);
    3336    if (ivalue <= 0) {//uses cbc
    3437      //nothing to do?
     
    3639    else if (ivalue == 1) {
    3740      int nodeS, nStrong, nTrust, mig, mir, probe, cover;
    38       b.options()->GetEnumValue("node_comparison",nodeS,"milp_sub.");
    39       b.options()->GetIntegerValue("number_strong_branch",nStrong,"milp_sub.");
    40       b.options()->GetIntegerValue("number_before_trust", nTrust,"milp_sub.");
    41       b.options()->GetIntegerValue("Gomory_cuts", mig,"milp_sub.");
    42       b.options()->GetIntegerValue("probing_cuts",probe,"milp_sub.");
    43       b.options()->GetIntegerValue("mir_cuts",mir,"milp_sub.");
    44       b.options()->GetIntegerValue("cover_cuts",cover,"milp_sub.");
     41      b.options()->GetEnumValue("node_comparison",nodeS,prefix);
     42      b.options()->GetIntegerValue("number_strong_branch",nStrong,prefix);
     43      b.options()->GetIntegerValue("number_before_trust", nTrust,prefix);
     44      b.options()->GetIntegerValue("Gomory_cuts", mig,prefix);
     45      b.options()->GetIntegerValue("probing_cuts",probe,prefix);
     46      b.options()->GetIntegerValue("mir_cuts",mir,prefix);
     47      b.options()->GetIntegerValue("cover_cuts",cover,prefix);
    4548     
    4649      CbcStrategy * strategy =
     
    6669
    6770    double oaTime;
    68     b.options()->GetNumericValue("oa_dec_time_limit",oaTime,b.prefix());
     71    b.options()->GetNumericValue("time_limit",oaTime,prefix);
     72    parameter().maxLocalSearchTime_ =
     73    std::min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
    6974    parameter().localSearchNodeLimit_ = 1000000;
    7075    parameter().maxLocalSearch_ = 100000;
    7176    parameter().maxLocalSearchPerNode_ = 10000;
    72     parameter().maxLocalSearchTime_ =
    73       Ipopt::Min(b.getDoubleParameter(BabSetupBase::MaxTime), oaTime);
    7477  }
    7578  OACutGenerator2::~OACutGenerator2()
     
    285288  {
    286289    roptions->SetRegisteringCategory("Options for OA decomposition", RegisteredOptions::BonminCategory);
    287     roptions->AddLowerBoundedNumberOption("oa_dec_time_limit",
    288         "Specify the maximum number of seconds spent overall in OA decomposition iterations.",
    289         0.,0,0.,
    290         "");
    291 
     290    roptions->AddStringOption2("oa_decomposition", "If yes do initial OA decomposition",
     291                               "no",
     292                               "no","",
     293                               "yes","",
     294                               "");
    292295    roptions->AddBoundedIntegerOption("oa_log_level",
    293296        "specify OA iterations log level.",
     
    301304        0.,1.,100.,
    302305        "");
    303 
    304     roptions->SetRegisteringCategory("Options for MILP subsolver in OA decomposition", RegisteredOptions::BonminCategory);
    305     roptions->AddStringOption3("milp_subsolver",
    306         "Choose the subsolver to solve MILP sub-problems in OA decompositions.",
    307         "Cbc_D",
    308         "Cbc_D","Coin Branch and Cut with its default",
    309         "Cbc_Par", "Coin Branch and Cut with passed parameters",
    310         "Cplex","Ilog Cplex",
    311         " To use Cplex, a valid license is required and you should have compiled OsiCpx in COIN-OR  (see Osi documentation).");
    312     roptions->setOptionExtraInfo("milp_subsolver",5);
    313 
    314     roptions->AddBoundedIntegerOption("milp_log_level",
    315         "specify MILP subsolver log level.",
    316         0,3,0,
    317         "Set the level of output of the MILP subsolver in OA : "
    318         "0 - none, 1 - minimal, 2 - normal low, 3 - normal high"
    319                                      );
    320     roptions->setOptionExtraInfo("milp_log_level",5);
    321 
    322 
    323306  }
    324 
    325 
    326307}/* End namespace Bonmin. */
     308
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOAMessages.cpp

    r1240 r1407  
    3030    ADD_MSG(LP_ERROR,std_m,2,"Error of LP approximation %g");
    3131    ADD_MSG(PERIODIC_MSG, std_m,1,"After %7.1f seconds, upper bound %10g, lower bound %10g");
     32    ADD_MSG(FP_DISTANCE, std_m,1,"NLP solution is %g from MILP sol");
     33    ADD_MSG(FP_MILP_VAL, std_m,1,"MILP solution has value w.r.t original objective: %g");
    3234  }
    3335
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOAMessages.hpp

    r464 r1407  
    2525    LP_ERROR,
    2626    PERIODIC_MSG,
     27    FP_DISTANCE,
     28    FP_MILP_VAL,
    2729    DUMMY_END
    2830  };
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOaDecBase.cpp

    r1405 r1407  
    3636      CglCutGenerator(),
    3737      nlp_(nlp),
     38      s_(NULL),
    3839      nSolve_(0),
    3940      lp_(NULL),
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOaDecBase.hpp

    r1401 r1407  
    251251    /// Pointer to nlp interface
    252252    mutable OsiTMINLPInterface * nlp_;
     253    /// Pointer to setup
     254    BabSetupBase * s_;
    253255    ///Number of nlp solved done
    254256    mutable int nSolve_;
Note: See TracChangeset for help on using the changeset viewer.