Changeset 1360


Ignore:
Timestamp:
Nov 7, 2008 1:26:18 PM (12 years ago)
Author:
pbonami
Message:

Make "bonmin." prefix a variable

Location:
trunk/Bonmin/src
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/Algorithms/Ampl/BonAmplSetup.cpp

    r1254 r1360  
    3434                                                options(), argv, NULL, "bonmin", NULL);
    3535    mayPrintDoc();
    36     toFill.initialize(roptions_, options_, journalist_, GetRawPtr(model));
     36    toFill.initialize(roptions_, options_, journalist_, prefix(), GetRawPtr(model));
    3737    BonminSetup::initialize(toFill, true);
    3838  }
     
    6464                                                options(), argv, NULL, "bonmin", &nl_file_content);
    6565    mayPrintDoc();
    66     toFill.initialize(roptions_, options_, journalist_, GetRawPtr(model));
     66    toFill.initialize(roptions_, options_, journalist_, prefix(), GetRawPtr(model));
    6767    BonminSetup::initialize(toFill, createContinuousSolver);
    6868  }
     
    8181          options_,
    8282          argv, NULL, "bonmin", &nl);
    83     toFill.initialize(roptions(), options_, journalist(), GetRawPtr(model));
     83    toFill.initialize(roptions(), options_, journalist(), prefix(), GetRawPtr(model));
    8484  }
    8585
  • trunk/Bonmin/src/Algorithms/BonBabSetupBase.cpp

    r1358 r1360  
    6464      roptions_(NULL),
    6565      readOptions_(false),
    66       lpMessageHandler_(NULL)
     66      lpMessageHandler_(NULL),
     67      prefix_("bonmin.")
    6768  {
    6869    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
     
    8384      options_(NULL),
    8485      roptions_(other.roptions_),
    85       readOptions_(other.readOptions_)
     86      readOptions_(other.readOptions_),
     87      prefix_(other.prefix_)
    8688  {
    8789    if (other.nonlinearSolver_) {
     
    120122  BabSetupBase::BabSetupBase(const BabSetupBase & other,
    121123                             OsiTMINLPInterface &nlp,
    122                              bool copy_all /*= true */):
     124                             bool copy_all /*= true */,
     125                             const std::string & prefix /* = "bonmin"*/):
    123126      nonlinearSolver_(NULL),
    124127      continuousSolver_(NULL),
     
    179182      objects_(0),
    180183      readOptions_(false),
    181       lpMessageHandler_(NULL)
     184      lpMessageHandler_(NULL),
     185      prefix_("bonmin.")
    182186  {
    183187    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
     
    200204    assert(IsValid(tminlp));
    201205    nonlinearSolver_ = new OsiTMINLPInterface;
    202     nonlinearSolver_->initialize(roptions_, options_, journalist_, tminlp);
     206    nonlinearSolver_->initialize(roptions_, options_, journalist_, prefix(), tminlp);
    203207  }
    204208
     
    216220      roptions_(NULL),
    217221      readOptions_(false),
    218       lpMessageHandler_(NULL)
     222      lpMessageHandler_(NULL),
     223      prefix_("bonmin.")
    219224  {
    220225    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
     
    245250      options_(app->options()),
    246251      roptions_(app->roptions()),
    247       readOptions_(true)
     252      readOptions_(true),
     253      prefix_("bonmin.")
    248254  {
    249255    CoinCopyN(defaultIntParam_, NumberIntParam, intParam_);
     
    280286  {
    281287
    282     options->GetIntegerValue("bb_log_level",intParam_[BabLogLevel],"bonmin.");
    283     options->GetIntegerValue("bb_log_interval",intParam_[BabLogInterval],"bonmin.");
    284     options->GetIntegerValue("max_consecutive_failures",intParam_[MaxFailures],"bonmin.");
    285     options->GetEnumValue("nlp_failure_behavior",intParam_[FailureBehavior],"bonmin.");
    286     options->GetIntegerValue("max_consecutive_infeasible",intParam_[MaxInfeasible],"bonmin.");
    287     options->GetIntegerValue("number_strong_branch",intParam_[NumberStrong],"bonmin.");
    288     options->GetIntegerValue("number_before_trust",intParam_[MinReliability],"bonmin.");
    289     options->GetIntegerValue("node_limit",intParam_[MaxNodes],"bonmin.");
    290     options->GetIntegerValue("solution_limit",intParam_[MaxSolutions],"bonmin.");
    291     options->GetIntegerValue("iteration_limit",intParam_[MaxIterations],"bonmin.");
    292     options->GetEnumValue("sos_constraints",intParam_[DisableSos],"bonmin.");
    293     options->GetIntegerValue("num_cut_passes",intParam_[NumCutPasses],"bonmin.");
    294     options->GetIntegerValue("num_cut_passes_at_root",intParam_[NumCutPassesAtRoot],"bonmin.");
    295 
    296     options->GetNumericValue("cutoff_decr",doubleParam_[CutoffDecr],"bonmin.");
    297     options->GetNumericValue("cutoff",doubleParam_[Cutoff],"bonmin.");
    298     options->GetNumericValue("allowable_gap",doubleParam_[AllowableGap],"bonmin.");
    299     options->GetNumericValue("allowable_fraction_gap",doubleParam_[AllowableFractionGap],"bonmin.");
    300     options->GetNumericValue("integer_tolerance",doubleParam_[IntTol],"bonmin.");
    301     options->GetNumericValue("time_limit", doubleParam_[MaxTime],"bonmin.");
     288    options->GetIntegerValue("bb_log_level",intParam_[BabLogLevel],prefix_.c_str());
     289    options->GetIntegerValue("bb_log_interval",intParam_[BabLogInterval],prefix_.c_str());
     290    options->GetIntegerValue("max_consecutive_failures",intParam_[MaxFailures],prefix_.c_str());
     291    options->GetEnumValue("nlp_failure_behavior",intParam_[FailureBehavior],prefix_.c_str());
     292    options->GetIntegerValue("max_consecutive_infeasible",intParam_[MaxInfeasible],prefix_.c_str());
     293    options->GetIntegerValue("number_strong_branch",intParam_[NumberStrong],prefix_.c_str());
     294    options->GetIntegerValue("number_before_trust",intParam_[MinReliability],prefix_.c_str());
     295    options->GetIntegerValue("node_limit",intParam_[MaxNodes],prefix_.c_str());
     296    options->GetIntegerValue("solution_limit",intParam_[MaxSolutions],prefix_.c_str());
     297    options->GetIntegerValue("iteration_limit",intParam_[MaxIterations],prefix_.c_str());
     298    options->GetEnumValue("sos_constraints",intParam_[DisableSos],prefix_.c_str());
     299    options->GetIntegerValue("num_cut_passes",intParam_[NumCutPasses],prefix_.c_str());
     300    options->GetIntegerValue("num_cut_passes_at_root",intParam_[NumCutPassesAtRoot],prefix_.c_str());
     301
     302    options->GetNumericValue("cutoff_decr",doubleParam_[CutoffDecr],prefix_.c_str());
     303    options->GetNumericValue("cutoff",doubleParam_[Cutoff],prefix_.c_str());
     304    options->GetNumericValue("allowable_gap",doubleParam_[AllowableGap],prefix_.c_str());
     305    options->GetNumericValue("allowable_fraction_gap",doubleParam_[AllowableFractionGap],prefix_.c_str());
     306    options->GetNumericValue("integer_tolerance",doubleParam_[IntTol],prefix_.c_str());
     307    options->GetNumericValue("time_limit", doubleParam_[MaxTime],prefix_.c_str());
    302308
    303309    int ival;
    304     options->GetEnumValue("node_comparison",ival,"bonmin.");
     310    options->GetEnumValue("node_comparison",ival,prefix_.c_str());
    305311    nodeComparisonMethod_ = NodeComparison(ival);
    306312
    307     options->GetEnumValue("tree_search_strategy", ival, "bonmin.");
     313    options->GetEnumValue("tree_search_strategy", ival, prefix_.c_str());
    308314    treeTraversalMethod_ = TreeTraversal(ival);
    309315
    310316    int varSelection;
    311     options->GetEnumValue("variable_selection",varSelection,"bonmin.");
     317    options->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
    312318    // Set branching strategy
    313319    if (varSelection == MOST_FRACTIONAL) {
  • trunk/Bonmin/src/Algorithms/BonBabSetupBase.hpp

    r1358 r1360  
    138138    BabSetupBase(const BabSetupBase &setup,
    139139                 OsiTMINLPInterface &nlp,
    140                  bool copy_all = true);
     140                 bool copy_all = true,
     141                 const std::string &prefix= "bonmin.");
    141142
    142143    /** Copy constructor. */
     
    195196    void mayPrintDoc();
    196197
     198
     199    /** Get prefix to use for options.*/
     200    const char * prefix() const {
     201      return prefix_.c_str();
     202    }
    197203
    198204    /** Set the value for options, output...*/
     
    351357    /** separate message handler if continuousSolver_!= nonlinearSolver.*/
    352358    CoinMessageHandler * lpMessageHandler_;
     359    /** Prefix to use when reading options.*/
     360    std::string prefix_;
    353361  };
    354362}/* End namespace Bonmin. */
  • trunk/Bonmin/src/Algorithms/BonBonminSetup.cpp

    r1358 r1360  
    7171      continuousSolver_ = new OsiClpSolverInterface;
    7272      int lpLogLevel;
    73       options_->GetIntegerValue("lp_log_level",lpLogLevel,"bonmin.");
     73      options_->GetIntegerValue("lp_log_level",lpLogLevel,prefix_.c_str());
    7474      lpMessageHandler_ = nonlinearSolver_->messageHandler()->clone();
    7575      continuousSolver_->passInMessageHandler(lpMessageHandler_);
     
    246246  {
    247247    int freq;
    248     options_->GetIntegerValue("Gomory_cuts", freq,"bonmin.");
     248    options_->GetIntegerValue("Gomory_cuts", freq,prefix_.c_str());
    249249    if (freq) {
    250250      CuttingMethod cg;
     
    257257      cutGenerators_.push_back(cg);
    258258    }
    259     options_->GetIntegerValue("probing_cuts",freq,"bonmin.");
     259    options_->GetIntegerValue("probing_cuts",freq,prefix_.c_str());
    260260    if (freq) {
    261261      CuttingMethod cg;
     
    279279      cutGenerators_.push_back(cg);
    280280    }
    281     options_->GetIntegerValue("mir_cuts",freq,"bonmin.");
     281    options_->GetIntegerValue("mir_cuts",freq,prefix_.c_str());
    282282    if (freq) {
    283283      CuttingMethod cg;
     
    290290
    291291    }
    292     options_->GetIntegerValue("2mir_cuts",freq,"bonmin.");
     292    options_->GetIntegerValue("2mir_cuts",freq,prefix_.c_str());
    293293    if (freq) {
    294294      CuttingMethod cg;
     
    299299      cutGenerators_.push_back(cg);
    300300    }
    301     options_->GetIntegerValue("cover_cuts",freq,"bonmin.");
     301    options_->GetIntegerValue("cover_cuts",freq,prefix_.c_str());
    302302    if (freq) {
    303303      CuttingMethod cg;
     
    309309    }
    310310
    311     options_->GetIntegerValue("clique_cuts",freq,"bonmin.");
     311    options_->GetIntegerValue("clique_cuts",freq,prefix_.c_str());
    312312    if (freq) {
    313313      CuttingMethod cg;
     
    322322      cutGenerators_.push_back(cg);
    323323    }
    324     options_->GetIntegerValue("flow_covers_cuts",freq,"bonmin.");
     324    options_->GetIntegerValue("flow_covers_cuts",freq,prefix_.c_str());
    325325    if (freq) {
    326326      CuttingMethod cg;
     
    331331      cutGenerators_.push_back(cg);
    332332    }
    333     options_->GetIntegerValue("lift_and_project_cuts",freq,"bonmin.");
     333    options_->GetIntegerValue("lift_and_project_cuts",freq,prefix_.c_str());
    334334    if (freq) {
    335335      CuttingMethod cg;
     
    340340      cutGenerators_.push_back(cg);
    341341    }
    342     options_->GetIntegerValue("reduce_and_split_cuts",freq,"bonmin.");
     342    options_->GetIntegerValue("reduce_and_split_cuts",freq,prefix_.c_str());
    343343    if (freq) {
    344344      CuttingMethod cg;
     
    364364
    365365    intParam_[BabSetupBase::SpecialOption] = 16;
    366     if (!options_->GetIntegerValue("number_before_trust",intParam_[BabSetupBase::MinReliability],"bonmin.")) {
     366    if (!options_->GetIntegerValue("number_before_trust",intParam_[BabSetupBase::MinReliability],prefix_.c_str())) {
    367367      intParam_[BabSetupBase::MinReliability] = 1;
    368368      options_->SetIntegerValue("bonmin.number_before_trust",intParam_[BabSetupBase::MinReliability],true,true);
    369369    }
    370     if (!options_->GetIntegerValue("number_strong_branch",intParam_[BabSetupBase::NumberStrong],"bonmin.")) {
     370    if (!options_->GetIntegerValue("number_strong_branch",intParam_[BabSetupBase::NumberStrong],prefix_.c_str())) {
    371371      intParam_[BabSetupBase::NumberStrong] = 1000;
    372372      options_->SetIntegerValue("bonmin.number_strong_branch",intParam_[BabSetupBase::NumberStrong],true,true);
    373373    }
    374374    int varSelection;
    375     bool val = options_->GetEnumValue("variable_selection",varSelection,"bonmin.");
     375    bool val = options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
    376376    if (!val){// || varSelection == STRONG_BRANCHING || varSelection == RELIABILITY_BRANCHING ) {
    377377      options_->SetStringValue("bonmin.variable_selection", "nlp-strong-branching",true,true);
     
    451451
    452452    Index doFixAndSolve = false;
    453     options()->GetEnumValue("fix_and_solve_heuristic",doFixAndSolve,"bonmin.");
     453    options()->GetEnumValue("fix_and_solve_heuristic",doFixAndSolve,prefix_.c_str());
    454454    if(doFixAndSolve){
    455455      FixAndSolveHeuristic* fix_and_solve = new FixAndSolveHeuristic(this);
     
    461461
    462462    Index doDummyPump = false;
    463     options()->GetEnumValue("dummy_pump_heuristic",doDummyPump,"bonmin.");
     463    options()->GetEnumValue("dummy_pump_heuristic",doDummyPump,prefix_.c_str());
    464464    if(doDummyPump){
    465465      DummyPump* fix_and_solve = new DummyPump(this);
     
    471471
    472472    Index doHeuristicRINS = false;
    473     options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,"bonmin.");
     473    options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,prefix_.c_str());
    474474    if(doHeuristicRINS){
    475475      HeuristicRINS* rins = new HeuristicRINS(this);
     
    481481
    482482    Index doHeuristicLocalBranching = false;
    483     options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,"bonmin.");
     483    options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,prefix_.c_str());
    484484    if(doHeuristicLocalBranching){
    485485      HeuristicLocalBranching* local_branching = new HeuristicLocalBranching(this);
     
    491491
    492492    Index doHeuristicFPump = false;
    493     options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,"bonmin.");
     493    options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str());
    494494    if(doHeuristicFPump){
    495495      HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
     
    501501
    502502    Index doHeuristicDiveFractional = false;
    503     options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,"bonmin.");
     503    options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,prefix_.c_str());
    504504    if(doHeuristicDiveFractional){
    505505      HeuristicDiveFractional* dive_fractional = new HeuristicDiveFractional(this);
     
    511511
    512512    Index doHeuristicDiveVectorLength = false;
    513     options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,"bonmin.");
     513    options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,prefix_.c_str());
    514514    if(doHeuristicDiveVectorLength){
    515515      HeuristicDiveVectorLength* dive_vectorLength = new HeuristicDiveVectorLength(this);
     
    521521
    522522    Index doHeuristicDiveMIPFractional = false;
    523     options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,"bonmin.");
     523    options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str());
    524524    if(doHeuristicDiveMIPFractional){
    525525      HeuristicDiveMIPFractional* dive_MIP_fractional = new HeuristicDiveMIPFractional(this);
     
    531531
    532532    Index doHeuristicDiveMIPVectorLength = false;
    533     options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,"bonmin.");
     533    options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,prefix_.c_str());
    534534    if(doHeuristicDiveMIPVectorLength){
    535535      HeuristicDiveMIPVectorLength* dive_MIP_vectorLength = new HeuristicDiveMIPVectorLength(this);
     
    550550
    551551    intParam_[BabSetupBase::SpecialOption] = 16;
    552     if (!options_->GetIntegerValue("number_before_trust",intParam_[BabSetupBase::MinReliability],"bonmin.")) {
     552    if (!options_->GetIntegerValue("number_before_trust",intParam_[BabSetupBase::MinReliability],prefix_.c_str())) {
    553553      intParam_[BabSetupBase::MinReliability] = 1;
    554554      options_->SetIntegerValue("bonmin.number_before_trust",intParam_[BabSetupBase::MinReliability],true,true);
    555555    }
    556     if (!options_->GetIntegerValue("number_strong_branch",intParam_[BabSetupBase::NumberStrong],"bonmin.")) {
     556    if (!options_->GetIntegerValue("number_strong_branch",intParam_[BabSetupBase::NumberStrong],prefix_.c_str())) {
    557557      intParam_[BabSetupBase::NumberStrong] = 1000;
    558558      options_->SetIntegerValue("bonmin.number_strong_branch",intParam_[BabSetupBase::NumberStrong],true,true);
    559559    }
    560560    int varSelection;
    561     bool val = options_->GetEnumValue("variable_selection",varSelection,"bonmin.");
     561    bool val = options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
    562562    if (!val){// || varSelection == STRONG_BRANCHING || varSelection == RELIABILITY_BRANCHING ) {
    563563      options_->SetStringValue("bonmin.variable_selection", "nlp-strong-branching",true,true);
     
    646646      continuousSolver_ = new OsiClpSolverInterface;
    647647      int lpLogLevel;
    648       options_->GetIntegerValue("lp_log_level",lpLogLevel,"bonmin.");
     648      options_->GetIntegerValue("lp_log_level",lpLogLevel,prefix_.c_str());
    649649      lpMessageHandler_ = nonlinearSolver_->messageHandler()->clone();
    650650      continuousSolver_->passInMessageHandler(lpMessageHandler_);
     
    682682
    683683    int varSelection;
    684     options_->GetEnumValue("variable_selection",varSelection,"bonmin.");
     684    options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
    685685    if (varSelection > RELIABILITY_BRANCHING) {
    686686      std::cout<<"Variable selection stragey not available with oa branch-and-cut."<<std::endl;
     
    688688    /* Populate cut generation and heuristic procedures.*/
    689689    int ival;
    690     options_->GetIntegerValue("nlp_solve_frequency",ival,"bonmin.");
     690    options_->GetIntegerValue("nlp_solve_frequency",ival,prefix_.c_str());
    691691    if (ival != 0) {
    692692      CuttingMethod cg;
     
    699699    }
    700700
    701     options_->GetIntegerValue("filmint_ecp_cuts",ival, "bonmin.");
     701    options_->GetIntegerValue("filmint_ecp_cuts",ival, prefix_.c_str());
    702702    if (ival != 0) {
    703703      CuttingMethod cg;
     
    714714
    715715    double oaTime;
    716     options_->GetNumericValue("oa_dec_time_limit",oaTime,"bonmin.");
     716    options_->GetNumericValue("oa_dec_time_limit",oaTime,prefix_.c_str());
    717717    if (oaTime > 0.) {
    718718      CuttingMethod cg;
     
    747747
    748748    Index doHeuristicRINS = false;
    749     options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,"bonmin.");
     749    options()->GetEnumValue("heuristic_RINS",doHeuristicRINS,prefix_.c_str());
    750750    if(doHeuristicRINS){
    751751      HeuristicRINS* rins = new HeuristicRINS(this);
     
    757757
    758758    Index doHeuristicLocalBranching = false;
    759     options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,"bonmin.");
     759    options()->GetEnumValue("heuristic_local_branching",doHeuristicLocalBranching,prefix_.c_str());
    760760    if(doHeuristicLocalBranching){
    761761      HeuristicLocalBranching* local_branching = new HeuristicLocalBranching(this);
     
    767767
    768768    Index doHeuristicFPump = false;
    769     options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,"bonmin.");
     769    options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str());
    770770    if(doHeuristicFPump){
    771771      HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
     
    777777
    778778    Index doHeuristicDiveFractional = false;
    779     options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,"bonmin.");
     779    options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,prefix_.c_str());
    780780    if(doHeuristicDiveFractional){
    781781      HeuristicDiveFractional* dive_fractional = new HeuristicDiveFractional(this);
     
    787787
    788788    Index doHeuristicDiveVectorLength = false;
    789     options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,"bonmin.");
     789    options()->GetEnumValue("heuristic_dive_vectorLength",doHeuristicDiveVectorLength,prefix_.c_str());
    790790    if(doHeuristicDiveVectorLength){
    791791      HeuristicDiveVectorLength* dive_vectorLength = new HeuristicDiveVectorLength(this);
     
    797797
    798798    Index doHeuristicDiveMIPFractional = false;
    799     options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,"bonmin.");
     799    options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str());
    800800    if(doHeuristicDiveMIPFractional){
    801801      HeuristicDiveMIPFractional* dive_MIP_fractional = new HeuristicDiveMIPFractional(this);
     
    807807
    808808    Index doHeuristicDiveMIPVectorLength = false;
    809     options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,"bonmin.");
     809    options()->GetEnumValue("heuristic_dive_MIP_vectorLength",doHeuristicDiveMIPVectorLength,prefix_.c_str());
    810810    if(doHeuristicDiveMIPVectorLength){
    811811      HeuristicDiveMIPVectorLength* dive_MIP_vectorLength = new HeuristicDiveMIPVectorLength(this);
     
    825825      continuousSolver_ = new OsiClpSolverInterface;
    826826      int lpLogLevel;
    827       options_->GetIntegerValue("lp_log_level",lpLogLevel,"bonmin.");
     827      options_->GetIntegerValue("lp_log_level",lpLogLevel,prefix_.c_str());
    828828      lpMessageHandler_ = nonlinearSolver_->messageHandler()->clone();
    829829      continuousSolver_->passInMessageHandler(lpMessageHandler_);
     
    861861
    862862    int varSelection;
    863     options_->GetEnumValue("variable_selection",varSelection,"bonmin.");
     863    options_->GetEnumValue("variable_selection",varSelection,prefix_.c_str());
    864864    if (varSelection > RELIABILITY_BRANCHING) {
    865865      std::cout<<"Variable selection stragey not available with oa branch-and-cut."<<std::endl;
     
    867867    /* Populate cut generation and heuristic procedures.*/
    868868    int ival;
    869     options_->GetIntegerValue("nlp_solve_frequency",ival,"bonmin.");
     869    options_->GetIntegerValue("nlp_solve_frequency",ival,prefix_.c_str());
    870870    if (ival != 0) {
    871871      CuttingMethod cg;
     
    878878    }
    879879
    880     options_->GetIntegerValue("filmint_ecp_cuts",ival, "bonmin.");
     880    options_->GetIntegerValue("filmint_ecp_cuts",ival, prefix_.c_str());
    881881    if (ival != 0) {
    882882      CuttingMethod cg;
     
    893893
    894894    double oaTime;
    895     options_->GetNumericValue("oa_dec_time_limit",oaTime,"bonmin.");
     895    options_->GetNumericValue("oa_dec_time_limit",oaTime,prefix_.c_str());
    896896    if (oaTime > 0.) {
    897897      CuttingMethod cg;
     
    924924    if (IsValid(options_)) {
    925925      int ival;
    926       options_->GetEnumValue("algorithm", ival,"bonmin.");
     926      options_->GetEnumValue("algorithm", ival,prefix_.c_str());
    927927      return Algorithm(ival);
    928928    }
  • trunk/Bonmin/src/Algorithms/Branching/BonChooseVariable.cpp

    r1202 r1360  
    5353    handler_ = new CoinMessageHandler;
    5454
    55     options->GetIntegerValue("bb_log_level", bb_log_level_, "bonmin.");
     55    options->GetIntegerValue("bb_log_level", bb_log_level_, b.prefix());
    5656    handler_->setLogLevel(bb_log_level_);
    57     options->GetNumericValue("setup_pseudo_frac", setup_pseudo_frac_, "bonmin.");
    58     options->GetNumericValue("maxmin_crit_no_sol", maxmin_crit_no_sol_, "bonmin.");
    59     options->GetNumericValue("maxmin_crit_have_sol", maxmin_crit_have_sol_, "bonmin.");
    60     options->GetEnumValue("trust_strong_branching_for_pseudo_cost",trustStrongForPseudoCosts_ , "bonmin.");
     57    options->GetNumericValue("setup_pseudo_frac", setup_pseudo_frac_, b.prefix());
     58    options->GetNumericValue("maxmin_crit_no_sol", maxmin_crit_no_sol_, b.prefix());
     59    options->GetNumericValue("maxmin_crit_have_sol", maxmin_crit_have_sol_, b.prefix());
     60    options->GetEnumValue("trust_strong_branching_for_pseudo_cost",trustStrongForPseudoCosts_ , b.prefix());
    6161    int sortCrit;
    62     options->GetEnumValue("candidate_sort_criterion", sortCrit, "bonmin.");
     62    options->GetEnumValue("candidate_sort_criterion", sortCrit, b.prefix());
    6363#ifndef OLD_USEFULLNESS
    6464    sortCrit_ = (CandidateSortCriterion) sortCrit;
     
    7474
    7575    /** Get values of options specific to BonChooseVariable.*/
    76     if (!options->GetIntegerValue("number_before_trust_list", numberBeforeTrustedList_, "bonmin.")) {
     76    if (!options->GetIntegerValue("number_before_trust_list", numberBeforeTrustedList_, b.prefix())) {
    7777      // default is to use the same value as for numberBeforeTrusted
    7878      numberBeforeTrustedList_ = numberBeforeTrusted;
    7979    }
    80     options->GetIntegerValue("number_strong_branch_root", numberStrongRoot_, "bonmin.");
    81     options->GetIntegerValue("min_number_strong_branch", minNumberStrongBranch_, "bonmin.");
    82     options->GetIntegerValue("number_look_ahead", numberLookAhead_, "bonmin.");
     80    options->GetIntegerValue("number_strong_branch_root", numberStrongRoot_, b.prefix());
     81    options->GetIntegerValue("min_number_strong_branch", minNumberStrongBranch_, b.prefix());
     82    options->GetIntegerValue("number_look_ahead", numberLookAhead_, b.prefix());
    8383
    8484  }
  • trunk/Bonmin/src/Algorithms/Branching/BonLpBranchingSolver.cpp

    r1129 r1360  
    2424
    2525    options->GetIntegerValue("ecp_max_rounds_strong",
    26         maxCuttingPlaneIterations_, "bonmin.");
    27     options->GetNumericValue("ecp_abs_tol_strong", abs_ecp_tol_,"bonmin.");
    28     options->GetNumericValue("ecp_rel_tol_strong", rel_ecp_tol_,"bonmin.");
     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());
    2929    int dummy;
    30     options->GetEnumValue("lp_strong_warmstart_method", dummy,"bonmin.");
     30    options->GetEnumValue("lp_strong_warmstart_method", dummy,solver->prefix());
    3131    warm_start_mode_ = (WarmStartMethod) dummy;
    3232  }
  • trunk/Bonmin/src/Algorithms/Branching/BonQpBranchingSolver.cpp

    r1143 r1360  
    5353    if (filter_solver) {
    5454      SmartPtr<BqpdSolver> qp_solver_ =
    55         new BqpdSolver(RegOptions(), Options(), Jnlst());
     55        new BqpdSolver(RegOptions(), Options(), Jnlst(), tminlp_interface->prefix());
    5656#if 1
    5757      // Solve the QP with the original bounds and set the hot start
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonEcpCuts.cpp

    r945 r1360  
    1717  {
    1818    assignLpInterface(NULL);
    19     b.options()->GetIntegerValue("ecp_max_rounds", numRounds_,"bonmin.");
    20     b.options()->GetNumericValue("ecp_abs_tol", abs_violation_tol_,"bonmin.");
    21     b.options()->GetNumericValue("ecp_rel_tol", rel_violation_tol_,"bonmin.");
    22     b.options()->GetNumericValue("ecp_propability_factor", beta_,"bonmin.");
     19    b.options()->GetIntegerValue("ecp_max_rounds", numRounds_,b.prefix());
     20    b.options()->GetNumericValue("ecp_abs_tol", abs_violation_tol_,b.prefix());
     21    b.options()->GetNumericValue("ecp_rel_tol", rel_violation_tol_,b.prefix());
     22    b.options()->GetNumericValue("ecp_propability_factor", beta_,b.prefix());
    2323  }
    2424
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOACutGenerator2.cpp

    r1318 r1360  
    3030  {
    3131    int ivalue;
    32     b.options()->GetEnumValue("milp_subsolver",ivalue,"bonmin.");
     32    b.options()->GetEnumValue("milp_subsolver",ivalue,b.prefix());
    3333    if (ivalue <= 0) {//uses cbc
    3434      //nothing to do?
     
    6666
    6767    double oaTime;
    68     b.options()->GetNumericValue("oa_dec_time_limit",oaTime,"bonmin.");
     68    b.options()->GetNumericValue("oa_dec_time_limit",oaTime,b.prefix());
    6969    parameter().localSearchNodeLimit_ = 1000000;
    7070    parameter().maxLocalSearch_ = 100000;
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOaDecBase.cpp

    r1351 r1360  
    101101    handler_ = new CoinMessageHandler();
    102102    int logLevel;
    103     b.options()->GetIntegerValue("oa_log_level",logLevel,"bonmin.");
    104     b.options()->GetNumericValue("oa_log_frequency",parameters_.logFrequency_,"bonmin.");
     103    b.options()->GetIntegerValue("oa_log_level",logLevel,b.prefix());
     104    b.options()->GetNumericValue("oa_log_frequency",parameters_.logFrequency_,b.prefix());
    105105
    106106    handler_ -> setLogLevel(logLevel);
    107     b.options()->GetIntegerValue("solution_limit", parameters_.maxSols_,"bonmin.");
     107    b.options()->GetIntegerValue("solution_limit", parameters_.maxSols_,b.prefix());
    108108
    109109    messages_ = OaMessages();
    110110    timeBegin_ = CoinCpuTime();
    111     b.options()->GetIntegerValue("milp_log_level",parameters_.subMilpLogLevel_,"bonmin.");
    112     b.options()->GetNumericValue("cutoff_decr",parameters_.cbcCutoffIncrement_,"bonmin.");
    113     b.options()->GetNumericValue("integer_tolerance",parameters_.cbcIntegerTolerance_,"bonmin.");
     111    b.options()->GetIntegerValue("milp_log_level",parameters_.subMilpLogLevel_,b.prefix());
     112    b.options()->GetNumericValue("cutoff_decr",parameters_.cbcCutoffIncrement_,b.prefix());
     113    b.options()->GetNumericValue("integer_tolerance",parameters_.cbcIntegerTolerance_,b.prefix());
    114114    int ivalue;
    115     b.options()->GetEnumValue("add_only_violated_oa", ivalue,"bonmin.");
     115    b.options()->GetEnumValue("add_only_violated_oa", ivalue,b.prefix());
    116116    parameters_.addOnlyViolated_ = ivalue;
    117     b.options()->GetEnumValue("oa_cuts_scope", ivalue,"bonmin.");
     117    b.options()->GetEnumValue("oa_cuts_scope", ivalue,b.prefix());
    118118    parameters_.global_ = ivalue;
    119119  }
  • trunk/Bonmin/src/Algorithms/OaGenerators/BonOaNlpOptim.cpp

    r1150 r1360  
    3636  {
    3737    int ivalue;
    38     b.options()->GetEnumValue("add_only_violated_oa", ivalue,"bonmin.");
     38    b.options()->GetEnumValue("add_only_violated_oa", ivalue,b.prefix());
    3939    addOnlyViolated_ = ivalue;
    40     b.options()->GetEnumValue("oa_cuts_scope", ivalue,"bonmin.");
     40    b.options()->GetEnumValue("oa_cuts_scope", ivalue,b.prefix());
    4141    global_ = ivalue;
    4242
    43     b.options()->GetIntegerValue("nlp_solve_max_depth", maxDepth_,"bonmin.");
    44     b.options()->GetNumericValue("nlp_solves_per_depth", solves_per_level_,"bonmin.");
     43    b.options()->GetIntegerValue("nlp_solve_max_depth", maxDepth_,b.prefix());
     44    b.options()->GetNumericValue("nlp_solves_per_depth", solves_per_level_,b.prefix());
    4545    handler_ = new CoinMessageHandler();
    4646    handler_ -> setLogLevel(1);
  • trunk/Bonmin/src/CbcBonmin/BonCbc.cpp

    r1344 r1360  
    343343    else if (s.treeTraversalMethod() == BabSetupBase::DiveFromBest) {
    344344      CbcDiver treeTraversal;
    345       treeTraversal.initialize(s.options());
     345      treeTraversal.initialize(s);
    346346      model_.passInTreeHandler(treeTraversal);
    347347    }
    348348    else if (s.treeTraversalMethod() == BabSetupBase::ProbedDive) {
    349349      CbcProbedDiver treeTraversal;
    350       treeTraversal.initialize(s.options());
     350      treeTraversal.initialize(s);
    351351      model_.passInTreeHandler(treeTraversal);
    352352    }
    353353    else if (s.treeTraversalMethod() == BabSetupBase::DfsDiveFromBest) {
    354354      CbcDfsDiver treeTraversal;
    355       treeTraversal.initialize(s.options());
     355      treeTraversal.initialize(s);
    356356      model_.passInTreeHandler(treeTraversal);
    357357    }
    358358    else if (s.treeTraversalMethod() == BabSetupBase::DfsDiveDynamic) {
    359359      CbcDfsDiver treeTraversal;
    360       treeTraversal.initialize(s.options());
     360      treeTraversal.initialize(s);
    361361      model_.passInTreeHandler(treeTraversal);
    362362
  • trunk/Bonmin/src/CbcBonmin/BonDiver.cpp

    r946 r1360  
    1212#include "CbcModel.hpp"
    1313#include "CbcConfig.h"
     14#include "BonBabSetupBase.hpp"
    1415//#define DIVE_DEBUG
    1516namespace Bonmin
     
    180181  /// Initialize the method (get options)
    181182  void
    182   CbcDiver::initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options)
    183   {
    184     options->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
    185         "bonmin.");
     183  CbcDiver::initialize(BabSetupBase &b)
     184  {
     185    b.options()->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
     186        b.prefix());
    186187  }
    187188
     
    436437  /// Initialize the method (get options)
    437438  void
    438   CbcProbedDiver::initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options)
    439   {
    440     options->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
    441         "bonmin.");
     439  CbcProbedDiver::initialize(BabSetupBase &b)
     440  {
     441    b.options()->GetBoolValue("stop_diving_on_cutoff", stop_diving_on_cutoff_,
     442        b.prefix());
    442443  }
    443444
     
    537538    dive_.push_front(x);
    538539    diveListSize_++;
     540#ifdef DIVE_DEBUG
     541    printf("diveListSize_ = %i == %u = dive_.size()\n",diveListSize_, dive_.size());
     542    assert(diveListSize_ == dive_.size());
     543#endif
    539544  }
    540545
     
    547552    std::cout<<"CbcDfsDiver::pop"<<std::endl;
    548553#endif
    549     if (mode_ != CbcDfsDiver::FindSolutions) {
     554    if (mode_ > CbcDfsDiver::FindSolutions) {
    550555      assert(dive_.empty());
    551556    }
     
    562567  CbcDfsDiver::bestNode(double cutoff)
    563568  {
     569#ifdef DIVE_DEBUG
     570    std::cout<<"CbcDfsDiver::bestNode"<<std::endl;
     571#endif
    564572    if (treeCleaning_) return CbcTree::bestNode(cutoff);
    565573#ifdef DIVE_DEBUG
     
    584592          //pop and return node;
    585593          dive_.pop_back();
     594          diveListSize_ --;
    586595          return node;
    587596        }
     
    592601      CbcTree::bestNode(cutoff);
    593602    }
    594 #ifdef DIVE_DEBUG
    595     std::cout<<"CbcDfsDiver::bestNode"<<std::endl;
    596 #endif
    597603    assert(nBacktracks_ < maxDiveBacktracks_);
    598604    CbcNode * node = NULL;
     
    600606#ifdef DIVE_DEBUG
    601607      std::cerr<<"CbcDfsDiver::bestNode"
    602       <<", exmining node"<<std::endl;
    603 #endif
     608      <<", examining node"<<std::endl;
     609#endif
     610      assert(!dive_.empty());
    604611      node = dive_.front();
    605612      dive_.pop_front();
     
    617624        nBacktracks_++;
    618625      }
    619       else if (node->guessedObjectiveValue() > cutoff) {//Put it on the real heap
     626      else if (0 && node->guessedObjectiveValue() > cutoff) {//Put it on the real heap
    620627#ifdef DIVE_DEBUG
    621628        std::cout<<"CbcDfsDiver::bestNode"
    622         <<", node estimates above cutoff"<<std::endl;
     629        <<", node estimates "<<node->guessedObjectiveValue()<<"above cutoff"
     630        <<cutoff<<std::endl;
    623631#endif
    624632        CbcTree::push(node);
     
    666674  void CbcDfsDiver::pushDiveOntoHeap(double cutoff)
    667675  {
    668     while (!dive_.empty() && dive_.front()->objectiveValue() >= cutoff) {
     676    while (!dive_.empty() ){//&& dive_.front()->objectiveValue() >= cutoff) {
    669677      CbcTree::push(dive_.front());
    670678      dive_.pop_front();
     
    737745  /// Initialize the method (get options)
    738746  void
    739   CbcDfsDiver::initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options)
    740   {
    741     options->GetIntegerValue("max_dive_depth", maxDiveDepth_,"bonmin.");
    742     options->GetIntegerValue("max_backtracks_in_dive", maxDiveBacktracks_,"bonmin.");
     747  CbcDfsDiver::initialize(BabSetupBase &b)
     748  {
     749    b.options()->GetIntegerValue("max_dive_depth", maxDiveDepth_,b.prefix());
     750    b.options()->GetIntegerValue("max_backtracks_in_dive", maxDiveBacktracks_,b.prefix());
    743751  }
    744752//#endif
     
    772780      }
    773781#endif
     782      CbcTree::setComparison(*comparison_.test_);
    774783    }
    775784  }
  • trunk/Bonmin/src/CbcBonmin/BonDiver.hpp

    r916 r1360  
    2121namespace Bonmin
    2222{
     23  class BabSetupBase;
    2324  /** Class to do diving in the tree. Principle is that branch-and-bound follows current branch of the tree untill it
    2425      hits the bottom at which point it goes to the best candidate (according to CbcCompare) on the heap.*/
     
    8889
    8990    /// Initialize the method (get options)
    90     void initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
     91    void initialize(BabSetupBase &b);
    9192
    9293  private:
     
    167168
    168169    /// Initialize the method (get options)
    169     void initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
     170    void initialize(BabSetupBase &b);
    170171
    171172  private:
     
    261262
    262263    /// Initialize the method (get options)
    263     void initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
     264    void initialize(BabSetupBase &b);
    264265//#endif
    265266    ///Don't know what this is yet?
  • trunk/Bonmin/src/Interfaces/Ampl/BonAmplInterface.cpp

    r1254 r1360  
    5757  {
    5858    if (!IsValid(app_)) {
    59       createApplication(roptions, options, journalist);
     59      createApplication(roptions, options, journalist, "bonmin.");
    6060    }
    6161    // set the default options... expect_infeasible, etc...
  • trunk/Bonmin/src/Interfaces/BonCutStrengthener.cpp

    r1088 r1360  
    1919    tnlp_solver_(tnlp_solver)
    2020  {
    21     options->GetIntegerValue("oa_log_level", oa_log_level_, "bonmin.");
     21    options->GetIntegerValue("oa_log_level", oa_log_level_, tnlp_solver->prefix());
    2222    options->GetEnumValue("cut_strengthening_type", cut_strengthening_type_,
    23                           "bonmin.");
     23                          tnlp_solver->prefix());
    2424    options->GetEnumValue("disjunctive_cut_type", disjunctive_cut_type_,
    25                           "bonmin.");
     25                          tnlp_solver->prefix());
    2626
    2727    tnlp_solver_->options()->clear();
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.cpp

    r1326 r1360  
    369369                               Ipopt::SmartPtr<Ipopt::OptionsList> options,
    370370                               Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     371                               const std::string & prefix,
    371372                               Ipopt::SmartPtr<TMINLP> tminlp){
    372373  if(!IsValid(app_))
    373      createApplication(roptions, options, journalist);
     374     createApplication(roptions, options, journalist, prefix);
    374375  setModel(tminlp);
    375376}
     
    383384OsiTMINLPInterface::createApplication(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    384385                                      Ipopt::SmartPtr<Ipopt::OptionsList> options,
    385                                       Ipopt::SmartPtr<Ipopt::Journalist> journalist
     386                                      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     387                                      const std::string & prefix
    386388                                      )
    387389{
    388390  assert(!IsValid(app_));
    389391  int ival;
    390   options->GetEnumValue("nlp_solver", ival, "bonmin.");
     392  options->GetEnumValue("nlp_solver", ival, prefix.c_str());
    391393  Solver s = (Solver) ival;
    392394  if(s == EFilterSQP){
    393395    testOthers_ = false;;
    394396#ifdef COIN_HAS_FILTERSQP
    395     app_ = new Bonmin::FilterSolver(roptions, options, journalist);
     397    app_ = new Bonmin::FilterSolver(roptions, options, journalist, prefix);
    396398#else
    397399   throw SimpleError("createApplication",
     
    402404    testOthers_ = false;
    403405#ifdef COIN_HAS_IPOPT
    404     app_ = new IpoptSolver(roptions, options, journalist);
     406    app_ = new IpoptSolver(roptions, options, journalist, prefix);
    405407#else
    406408   throw SimpleError("createApplication",
     
    410412  else if(s == EAll){
    411413#ifdef COIN_HAS_FILTERSQP
    412     app_ = new Bonmin::FilterSolver(roptions, options, journalist);
     414    app_ = new Bonmin::FilterSolver(roptions, options, journalist, prefix);
    413415#else
    414416   throw SimpleError("createApplication",
     
    416418#endif
    417419#ifdef COIN_HAS_IPOPT
    418    debug_apps_.push_back(new IpoptSolver(roptions, options, journalist));
     420   debug_apps_.push_back(new IpoptSolver(roptions, options, journalist, prefix));
    419421#endif
    420422    testOthers_ = true;
     
    25502552  if(!hasPrintedOptions) {
    25512553    int printOptions;
    2552     app_->options()->GetEnumValue("print_user_options",printOptions,"bonmin.");
     2554    app_->options()->GetEnumValue("print_user_options",printOptions,app_->prefix());
    25532555    if(printOptions)
    25542556      app_->options()->SetStringValue("print_user_options","yes",true,true);
     
    27052707  if (IsValid(app_)) {
    27062708    int logLevel;
    2707     app_->options()->GetIntegerValue("nlp_log_level", logLevel,"bonmin.");
     2709    app_->options()->GetIntegerValue("nlp_log_level", logLevel,app_->prefix());
    27082710    messageHandler()->setLogLevel(logLevel);
    27092711
     
    27132715    bool is_given =
    27142716#endif
    2715       app_->options()->GetNumericValue("max_random_point_radius",maxRandomRadius_,"bonmin.");
     2717      app_->options()->GetNumericValue("max_random_point_radius",maxRandomRadius_,app_->prefix());
    27162718
    27172719#ifdef COIN_HAS_FILTERSQP
     
    27232725   
    27242726   int oaCgLogLevel = 0;
    2725    app_->options()->GetIntegerValue("oa_cuts_log_level", oaCgLogLevel,"bonmin.");
     2727   app_->options()->GetIntegerValue("oa_cuts_log_level", oaCgLogLevel,app_->prefix());
    27262728   oaHandler_->setLogLevel(oaCgLogLevel);
    27272729   
    27282730    int exposeWs = false;
    2729     app_->options()->GetEnumValue("warm_start", exposeWs, "bonmin.");
     2731    app_->options()->GetEnumValue("warm_start", exposeWs, app_->prefix());
    27302732    setExposeWarmStart(exposeWs > 0);
    27312733   
    2732     app_->options()->GetIntegerValue("num_retry_unsolved_random_point", numRetryUnsolved_,"bonmin.");
    2733     app_->options()->GetIntegerValue("num_resolve_at_root", numRetryInitial_,"bonmin.");
    2734     app_->options()->GetIntegerValue("num_resolve_at_node", numRetryResolve_,"bonmin.");
    2735     app_->options()->GetIntegerValue("num_resolve_at_infeasibles", numRetryInfeasibles_,"bonmin.");
    2736     app_->options()->GetIntegerValue("num_iterations_suspect", numIterationSuspect_,"bonmin.");
    2737     app_->options()->GetEnumValue("nlp_failure_behavior",pretendFailIsInfeasible_,"bonmin.");
     2734    app_->options()->GetIntegerValue("num_retry_unsolved_random_point", numRetryUnsolved_,app_->prefix());
     2735    app_->options()->GetIntegerValue("num_resolve_at_root", numRetryInitial_,app_->prefix());
     2736    app_->options()->GetIntegerValue("num_resolve_at_node", numRetryResolve_,app_->prefix());
     2737    app_->options()->GetIntegerValue("num_resolve_at_infeasibles", numRetryInfeasibles_,app_->prefix());
     2738    app_->options()->GetIntegerValue("num_iterations_suspect", numIterationSuspect_,app_->prefix());
     2739    app_->options()->GetEnumValue("nlp_failure_behavior",pretendFailIsInfeasible_,app_->prefix());
    27382740    app_->options()->GetNumericValue
    2739     ("warm_start_bound_frac" ,pushValue_,"bonmin.");
    2740     app_->options()->GetNumericValue("tiny_element",tiny_,"bonmin.");
    2741     app_->options()->GetNumericValue("very_tiny_element",veryTiny_,"bonmin.");
    2742     app_->options()->GetNumericValue("random_point_perturbation_interval",max_perturbation_,"bonmin.");
    2743     app_->options()->GetEnumValue("random_point_type",randomGenerationType_,"bonmin.");
     2741    ("warm_start_bound_frac" ,pushValue_,app_->prefix());
     2742    app_->options()->GetNumericValue("tiny_element",tiny_,app_->prefix());
     2743    app_->options()->GetNumericValue("very_tiny_element",veryTiny_,app_->prefix());
     2744    app_->options()->GetNumericValue("random_point_perturbation_interval",max_perturbation_,app_->prefix());
     2745    app_->options()->GetEnumValue("random_point_type",randomGenerationType_,app_->prefix());
    27442746    int cut_strengthening_type;
    2745     app_->options()->GetEnumValue("cut_strengthening_type", cut_strengthening_type,"bonmin.");
     2747    app_->options()->GetEnumValue("cut_strengthening_type", cut_strengthening_type,app_->prefix());
    27462748
    27472749    if (cut_strengthening_type != CS_None) {
  • trunk/Bonmin/src/Interfaces/BonOsiTMINLPInterface.hpp

    r1254 r1360  
    136136                  Ipopt::SmartPtr<Ipopt::OptionsList> options,
    137137                  Ipopt::SmartPtr<Ipopt::Journalist> journalist_,
     138                  const std::string & prefix,
    138139                  Ipopt::SmartPtr<TMINLP> tminlp);
    139140
     
    167168  Ipopt::SmartPtr<Ipopt::OptionsList> options();
    168169
     170  const char * prefix() const{
     171  if(!IsValid(app_)) {
     172    messageHandler()->message(ERROR_NO_TNLPSOLVER, messages_)<<CoinMessageEol;
     173    return NULL;
     174  }
     175  else
     176    return app_->prefix();
     177  }
    169178  //---------------------------------------------------------------------------
    170179  /**@name Solve methods */
     
    12131222  void createApplication(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    12141223                         Ipopt::SmartPtr<Ipopt::OptionsList> options,
    1215                          Ipopt::SmartPtr<Ipopt::Journalist> journalist);
     1224                         Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     1225                         const std::string & prefix);
    12161226  ///Constructor without model only for derived classes
    12171227  OsiTMINLPInterface(Ipopt::SmartPtr<TNLPSolver> app);
  • trunk/Bonmin/src/Interfaces/BonStrongBranchingSolver.cpp

    r1072 r1360  
    1818  DBG_ASSERT(IsValid(reg_options_));
    1919
    20   options_->GetIntegerValue("bb_log_level", bb_log_level_, "bonmin.");
     20  options_->GetIntegerValue("bb_log_level", bb_log_level_, tminlp_interface->prefix());
    2121}
    2222
  • trunk/Bonmin/src/Interfaces/BonTNLPSolver.cpp

    r904 r1360  
    4545  TNLPSolver::TNLPSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    4646    Ipopt::SmartPtr<Ipopt::OptionsList> options,
    47     Ipopt::SmartPtr<Ipopt::Journalist> journalist):
     47    Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     48    const std::string & prefix):
    4849    journalist_(journalist),
    4950    options_(options),
    50     roptions_(roptions)
     51    roptions_(roptions),
     52    prefix_(prefix)
    5153  {
    5254  }
     
    236238void
    237239TNLPSolver::initializeOptionsAndJournalist(){
     240  prefix_ = "bonmin.";
    238241  options_ = new Ipopt::OptionsList();
    239242 
  • trunk/Bonmin/src/Interfaces/BonTNLPSolver.hpp

    r1223 r1360  
    103103TNLPSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    104104           Ipopt::SmartPtr<Ipopt::OptionsList> options,
    105            Ipopt::SmartPtr<Ipopt::Journalist> journalist);
     105           Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     106           const std::string & prefix);
    106107
    107108  ///virtual copy constructor
     
    165166     return options_;}
    166167
     168  /// Get the prefix
     169  const char * prefix(){
     170    return prefix_.c_str();
     171  }
    167172   /// Register this solver options into passed roptions
    168173static void RegisterOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions){}
     
    185190        (problem may be solvable).*/
    186191  bool isRecoverable(ReturnStatus &r);
     192
     193
    187194
    188195  /** Say if return status is an error.*/
     
    209216    Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions_;
    210217   
     218    /** Prefix to use for reading bonmin's options.*/
     219   std::string prefix_;
    211220   private:
    212221   /// There is no copy constructor for this class
  • trunk/Bonmin/src/Interfaces/Filter/BonBqpdSolver.cpp

    r1326 r1360  
    122122  BqpdSolver::BqpdSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    123123      Ipopt::SmartPtr<Ipopt::OptionsList> options,
    124       Ipopt::SmartPtr<Ipopt::Journalist> journalist)
     124      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     125      const std::string & prefix)
    125126      :
    126       TNLPSolver(roptions, options, journalist),
     127      TNLPSolver(roptions, options, journalist, prefix),
    127128      cached_(NULL)
    128129  {
     
    139140    retval->roptions_ = roptions_; // only copy pointers of registered options
    140141    retval->journalist_ = journalist_; // and journalist
     142    retval->prefix_ = prefix_;
    141143    retval->fillin_factor_ = fillin_factor_;
    142144    retval->kmax_ipt_ = kmax_ipt_;
  • trunk/Bonmin/src/Interfaces/Filter/BonBqpdSolver.hpp

    r1143 r1360  
    6060    BqpdSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    6161        Ipopt::SmartPtr<Ipopt::OptionsList> options,
    62         Ipopt::SmartPtr<Ipopt::Journalist> journalist
     62        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     63        const std::string & prefix
    6364              );
    6465
  • trunk/Bonmin/src/Interfaces/Filter/BonFilterSolver.cpp

    r1326 r1360  
    356356  FilterSolver::FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    357357      Ipopt::SmartPtr<Ipopt::OptionsList> options,
    358       Ipopt::SmartPtr<Ipopt::Journalist> journalist):
    359       TNLPSolver(roptions, options, journalist),
     358      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     359      const std::string & prefix):
     360      TNLPSolver(roptions, options, journalist, prefix),
    360361      warmF_(NULL),
    361362      cached_(NULL)
     
    370371    retval->roptions_ = roptions_; // only copy pointers of registered options
    371372    retval->journalist_ = journalist_; // and journalist
     373    retval->prefix_ = prefix_;
    372374    retval->warmF_ = (warmF_.IsValid()) ? dynamic_cast<FilterWarmStart *>(warmF_->clone()):NULL;
    373375    return GetRawPtr(retval);
  • trunk/Bonmin/src/Interfaces/Filter/BonFilterSolver.hpp

    r1117 r1360  
    6464    FilterSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    6565        Ipopt::SmartPtr<Ipopt::OptionsList> options,
    66         Ipopt::SmartPtr<Ipopt::Journalist> journalist
     66        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     67        const std::string & prefix
    6768                );
    6869
  • trunk/Bonmin/src/Interfaces/Ipopt/BonIpoptSolver.cpp

    r1124 r1360  
    3939  IpoptSolver::IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    4040      Ipopt::SmartPtr<Ipopt::OptionsList> options,
    41       Ipopt::SmartPtr<Ipopt::Journalist> journalist):
    42       TNLPSolver(roptions, options, journalist),
     41      Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     42      const std::string & prefix):
     43      TNLPSolver(roptions, options, journalist, prefix),
    4344      problemHadZeroDimension_(false),
    4445      warmStartStrategy_(1),
     
    5758  IpoptSolver::clone()
    5859  {
    59     SmartPtr<IpoptSolver> retval = new IpoptSolver(GetRawPtr(roptions_), new Ipopt::OptionsList(), journalist_);
     60    SmartPtr<IpoptSolver> retval = new IpoptSolver(GetRawPtr(roptions_), new Ipopt::OptionsList(), journalist_, prefix_);
    6061    *retval->options_ = *options_;
    6162    retval->warmStartStrategy_ = warmStartStrategy_;
     
    7778      return false;
    7879    }
    79     options_->GetEnumValue("warm_start",warmStartStrategy_,"bonmin.");
     80    options_->GetEnumValue("warm_start",warmStartStrategy_,prefix());
    8081    setMinlpDefaults(options_);
    8182    optimized_before_ = false;
     
    9192      return false;
    9293    }
    93     options_->GetEnumValue("warm_start",warmStartStrategy_,"bonmin.");
     94    options_->GetEnumValue("warm_start",warmStartStrategy_,prefix());
    9495    setMinlpDefaults(app_->Options());
    9596    optimized_before_ = false;
  • trunk/Bonmin/src/Interfaces/Ipopt/BonIpoptSolver.hpp

    r1104 r1360  
    5252    IpoptSolver(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
    5353        Ipopt::SmartPtr<Ipopt::OptionsList> options,
    54         Ipopt::SmartPtr<Ipopt::Journalist> journalist);
     54        Ipopt::SmartPtr<Ipopt::Journalist> journalist,
     55        const std::string & prefix);
    5556
    5657
Note: See TracChangeset for help on using the changeset viewer.