10 #include "CbcModel.hpp"
11 #include "OsiBranchingObject.hpp"
36 double * newSolution){
37 if(model_->getNodeCount() || model_->getCurrentPassNumber() > 1)
return 0;
43 OsiBranchingInformation
info = model_->usefulInformation();
44 info.solution_ = model_->getColSolution();
45 int numcols = model_->getNumCols();
49 for(
int i = 0 ;i < numcols ; i++){
51 vals.push_back(info.solution_[i]);
55 nlp->switchToFeasibilityProblem(inds.size(), vals(), inds(), 1., 0., 1);
57 double cutoff = info.cutoff_;
58 int r_val =
doLocalSearch(nlp, newSolution, objectiveValue, cutoff);
66 roptions->AddStringOption2(
67 "dummy_pump_heuristic",
68 "if yes runs a heuristic which looks like a dummy FP",
71 "yes",
"runs the heuristic",
73 roptions->setOptionExtraInfo(
"dummy_pump_heuristic", 63);
For undocumented options.
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 ...
virtual bool isInteger(int columnNumber) const
Return true if column is integer.
DummyPump()
Default constructor.
OsiSolverInterface * clone(bool copyData=true) const
Virtual copy constructor.
int solution(double &objectiveValue, double *newSolution)
Runs heuristic.
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.
virtual ~DummyPump()
Destructor.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register the options common to all local search based heuristics.
void Initialize(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Initiaize using passed options.
OsiTMINLPInterface * nonlinearSolver()
Pointer to the non-linear solver used.
BonminSetup * setup_
Setup to use for local searches (will make copies).