10 #include "CbcModel.hpp"
11 #include "OsiBranchingObject.hpp"
37 double * newSolution){
38 if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1)
return 0;
39 if(model_->getSolutionCount())
return 0;
45 OsiBranchingInformation
info = model_->usefulInformation();
47 double cutoff = info.cutoff_;
48 int r_val =
doLocalSearch(nlp, newSolution, objectiveValue, cutoff,
"pump_for_minlp.");
55 std::string
prefix =
"pump_for_minlp.";
64 roptions->AddStringOption2(
66 "whether to run the feasibility pump heuristic for MINLP",
71 roptions->setOptionExtraInfo(
"pump_for_minlp", 63);
void fint fint fint real fint real real real real real real real real real fint real fint fint fint real fint fint fint fint * info
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
int solution(double &objectiveValue, double *newSolution)
Runs heuristic.
OsiSolverInterface * clone(bool copyData=true) const
Virtual copy constructor.
int doLocalSearch(OsiTMINLPInterface *solver, double *solution, double &solValue, double cutoff, std::string prefix="local_solver.") const
Do a local search based on setup and passed solver.
void Initialize(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Initiaize using passed options.
PumpForMinlp()
Default constructor.
virtual ~PumpForMinlp()
Destructor.
static void changeIfNotSet(Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const std::string &value)
OsiTMINLPInterface * nonlinearSolver()
Pointer to the non-linear solver used.
Ipopt::SmartPtr< Ipopt::OptionsList > options()
Acces list of Options.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register the options common to all local search based heuristics.
virtual void setupDefaults(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Setup the defaults.
BonminSetup * setup_
Setup to use for local searches (will make copies).