12 #ifndef CouenneFeasPump_HPP 13 #define CouenneFeasPump_HPP 23 #include "scip/scip.h" 36 {
return (a<0) ? a+1 : a;}
39 class IpoptApplication;
43 class RegisteredOptions;
50 class CouenneCutGenerator;
52 class CouenneSparseMatrix;
92 virtual int solution (
double &objectiveValue,
double *newSolution);
96 {numberSolvePerLevel_ = value;}
99 void checkInfinity (
struct Scip *scip,
double val,
double infinity);
125 double findSolution (
const double *nSol,
double *&sol,
int niter,
int* nsuciter);
140 {
return compDistInt_;}
162 int milpPhase (
double *nSol,
double *iSol);
165 int nlpPhase (
double *iSol,
double *nSol);
168 SCIP_RETCODE ScipSolve (
const double *nSol,
double* &sol,
int niter,
int* nsuciter,
CouNumber &obj);
211 std::set <CouenneFPsolution, compareSol> tabuPool_;
221 int numberSolvePerLevel_;
230 double multDistMILP_;
231 double multHessMILP_;
232 double multObjFMILP_;
virtual CouNumber solveMILP(const CouNumber *nSol, CouNumber *&iSol, int niter, int *nsuciter)
find integer (possibly NLP-infeasible) point isol closest (according to the l-1 norm of the hessian) ...
virtual void resetModel(CbcModel *model)
Does nothing, but necessary as CbcHeuristic declares it pure virtual.
double fadingCoeff(double a)
void initIpoptApp()
Common code for initializing non-smartptr ipopt application.
double multHessNLP() const
weight of Hessian in NLP
virtual int solution(double &objectiveValue, double *newSolution)
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
Cut Generator for linear convexifications.
Class for handling NLPs using CouenneProblem.
double multObjFMILP() const
weight of objective in MILP
void setNumberSolvePerLevel(int value)
set number of nlp's solved for each given level of the tree
expression * updateNLPObj(const double *)
set new expression as the NLP objective function using argument as point to minimize distance from.
double CouNumber
main number type in Couenne
double multHessMILP() const
weight of Hessian in MILP
CouenneProblem * Problem() const
return pointer to problem
void init_MILP()
initialize all solvers at the first call, where the initial MILP is built
double findSolution(const double *nSol, double *&sol, int niter, int *nsuciter)
find feasible solution (called by solveMILP ())
virtual CbcHeuristic * clone() const
Clone.
double multDistNLP() const
Return Weights in computing distance, in both MILP and NLP (must sum up to 1 for MILP and for NLP):
Class for MINLP problems with symbolic information.
bool fixIntVariables(const double *sol)
admits a (possibly fractional) solution and fixes the integer components in the nonlinear problem for...
CouenneFeasPump(CouenneProblem *couenne=NULL, CouenneCutGenerator *cg=NULL, Ipopt::SmartPtr< Ipopt::OptionsList > options=NULL)
Constructor with (optional) MINLP pointer.
double multDistMILP() const
weight of distance in MILP
int & nCalls()
return number of calls (can be changed)
int nlpPhase(double *iSol, double *nSol)
NLP phase of the FP.
CouenneTNLP * nlp() const
return NLP
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions >)
initialize options to be read later
An implementation of the Feasibility pump that uses linearization and Ipopt to find the two sequences...
virtual CouNumber solveNLP(const CouNumber *nSol, CouNumber *&iSol)
obtain solution to NLP
CouenneFeasPump & operator=(const CouenneFeasPump &rhs)
Assignment operator.
virtual ~CouenneFeasPump()
Destructor.
double multObjFNLP() const
weight of objective in NLP
general include file for different compilers
enum fpCompDistIntType compDistInt() const
return type of MILP solved
int milpPhase(double *nSol, double *iSol)
MILP phase of the FP.