Changeset 1537


Ignore:
Timestamp:
Jan 14, 2010 4:11:16 PM (9 years ago)
Author:
pbonami
Message:

Try and put Heuristics by default

Location:
trunk/Bonmin/src
Files:
2 edited

Legend:

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

    r1514 r1537  
    467467
    468468
    469     Index doHeuristicFPump = false;
    470     options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str());
    471     if(doHeuristicFPump){
    472       HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
    473       HeuristicMethod h;
    474       h.heuristic = feasibility_pump;
    475       h.id = "FPump";
    476       heuristics_.push_back(h);
    477     }
    478 
    479469    Index doHeuristicDiveFractional = false;
    480470    options()->GetEnumValue("heuristic_dive_fractional",doHeuristicDiveFractional,prefix_.c_str());
     
    498488
    499489    Index doHeuristicDiveMIPFractional = false;
    500     options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str());
     490    if(!options()->GetEnumValue("heuristic_dive_MIP_fractional",doHeuristicDiveMIPFractional,prefix_.c_str())){
     491      doHeuristicDiveMIPFractional = true;
     492      std::string o_name = prefix_ + "heuristic_dive_MIP_fractional";
     493      options_->SetStringValue(o_name.c_str(), "yes",true,true);
     494    }
    501495    if(doHeuristicDiveMIPFractional){
    502496      HeuristicDiveMIPFractional* dive_MIP_fractional = new HeuristicDiveMIPFractional(this);
     
    516510      heuristics_.push_back(h);
    517511    }
     512    Index doHeuristicFPump = false;
     513    if(!options()->GetEnumValue("heuristic_feasibility_pump",doHeuristicFPump,prefix_.c_str())){
     514      doHeuristicFPump = true;
     515      std::string o_name = prefix_ + "heuristic_feasibility_pump";
     516      options_->SetStringValue(o_name.c_str(), "yes",true,true);
     517    }
     518    if(doHeuristicFPump){
     519      HeuristicFPump* feasibility_pump = new HeuristicFPump(this);
     520      HeuristicMethod h;
     521      h.heuristic = feasibility_pump;
     522      h.id = "FPump";
     523      heuristics_.push_back(h);
     524    }
     525
    518526    Index doFixAndSolve = false;
    519527    options()->GetEnumValue("fix_and_solve_heuristic",doFixAndSolve,prefix_.c_str());
  • trunk/Bonmin/src/CbcBonmin/Heuristics/BonHeuristicFPump.cpp

    r1357 r1537  
    401401                                      1, 2, 1,"");
    402402    roptions->AddStringOption2("heuristic_feasibility_pump", "whether the heuristic feasibility pump should be used",
    403       "no", "no", "don't use it", "yes", "use it", "Someone should fix this entry...");
     403      "no", "no", "don't use it", "yes", "use it", "");
    404404  }
    405405
Note: See TracChangeset for help on using the changeset viewer.