#include <CouenneFeasPump.hpp>
Public Types | |
FP_DIST_INT | |
FP_DIST_ALL | |
FP_DIST_POST | |
FP_CUT_NONE | |
FP_CUT_INTEGRATED | |
FP_CUT_EXTERNAL | |
FP_CUT_POST | |
FP_TABU_NONE | |
FP_TABU_POOL | |
FP_TABU_PERTURB | |
FP_TABU_CUT | |
enum | fpCompDistIntType { FP_DIST_INT, FP_DIST_ALL, FP_DIST_POST } |
enum | fpCutPlane { FP_CUT_NONE, FP_CUT_INTEGRATED, FP_CUT_EXTERNAL, FP_CUT_POST } |
enum | fpTabuMgtPolicy { FP_TABU_NONE, FP_TABU_POOL, FP_TABU_PERTURB, FP_TABU_CUT } |
Public Member Functions | |
CouenneFeasPump (CouenneProblem *couenne=NULL, CouenneCutGenerator *cg=NULL, Ipopt::SmartPtr< Ipopt::OptionsList > options=NULL) | |
Constructor with (optional) MINLP pointer. | |
CouenneFeasPump (const CouenneFeasPump &other) | |
Copy constructor. | |
virtual | ~CouenneFeasPump () |
Destructor. | |
virtual CbcHeuristic * | clone () const |
Clone. | |
CouenneFeasPump & | operator= (const CouenneFeasPump &rhs) |
Assignment operator. | |
virtual void | resetModel (CbcModel *model) |
Does nothing, but necessary as CbcHeuristic declares it pure virtual. | |
virtual int | solution (double &objectiveValue, double *newSolution) |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise. | |
void | setNumberSolvePerLevel (int value) |
set number of nlp's solved for each given level of the tree | |
CouNumber | solveMILP (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) to the current NLP-feasible (but fractional) solution nsol | |
CouNumber | solveNLP (CouNumber *nSol, CouNumber *&iSol) |
obtain solution to NLP | |
expression * | updateNLPObj (const double *) |
set new expression as the NLP objective function using argument as point to minimize distance from. | |
void | fixIntVariables (double *sol) |
admits a (possibly fractional) solution and fixes the integer components in the nonlinear problem for later re-solve | |
double | findSolution (double *&sol, int niter, int *nsuciter) |
find feasible solution (called by solveMILP ()) | |
void | init_MILP () |
initialize all solvers at the first call, where the initial MILP is built | |
void | initIpoptApp () |
Common code for initializing non-smartptr ipopt application. | |
CouenneProblem * | Problem () const |
return pointer to problem | |
enum fpCompDistIntType | compDistInt () const |
return type of MILP solved | |
double | multDistNLP () const |
Return Weights in computing distance, in both MILP and NLP (must sum up to 1 for MILP and for NLP): weight of distance in NLP. | |
double | multHessNLP () const |
weight of Hessian in NLP | |
double | multObjFNLP () const |
weight of objective in NLP | |
double | multDistMILP () const |
weight of distance in MILP | |
double | multHessMILP () const |
weight of Hessian in MILP | |
double | multObjFMILP () const |
weight of objective in MILP | |
CouenneTNLP * | nlp () const |
return NLP | |
Static Public Member Functions | |
static void | registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions >) |
initialize options to be read later | |
Private Attributes | |
CouenneProblem * | problem_ |
Couenne representation of the problem. | |
CouenneCutGenerator * | couenneCG_ |
CouenneCutGenerator for linearization cuts. | |
CouenneTNLP * | nlp_ |
Continuous relaxation of the problem, with an interface for Ipopt only. | |
Ipopt::IpoptApplication * | app_ |
Ipopt Application pointer for solving NLPs. | |
OsiSolverInterface * | milp_ |
MILP relaxation of the MINLP (used to find integer non-NLP-feasible solution). | |
OsiSolverInterface * | postlp_ |
LP relaxation of the MINLP used when fixing integer variables (used for compDistInt_ in FP_DIST_POST and possibly FP_DIST_INT). | |
CouenneFPpool * | pool_ |
Pool of solutions. | |
std::set< CouenneFPsolution, compareSol > | tabuPool_ |
Solutions to avoid. | |
int | numberSolvePerLevel_ |
Number of NLPs solved for each given level of the tree. | |
double | multDistNLP_ |
Weights in computing distance, in both MILP and NLP (must sum up to 1 for MILP and for NLP): weight of distance in NLP. | |
double | multHessNLP_ |
weight of Hessian in NLP | |
double | multObjFNLP_ |
weight of objective in NLP | |
double | multDistMILP_ |
weight of distance in MILP | |
double | multHessMILP_ |
weight of Hessian in MILP | |
double | multObjFMILP_ |
weight of objective in MILP | |
enum fpCompDistIntType | compDistInt_ |
compute distance from integer variables only, not all variables; | |
enum fpCutPlane | milpCuttingPlane_ |
Separate convexification cuts during or after MILP. | |
int | nSepRounds_ |
Number of separation rounds for MILP convexification cuts. | |
int | maxIter_ |
maximum iterations per call | |
bool | useSCIP_ |
use SCIP instead of Cbc for solving MILPs | |
int | milpMethod_ |
Which SCIP MILP method to use. | |
enum fpTabuMgtPolicy | tabuMgt_ |
Tabu management policy: none, use from pool, random perturbation of current solution. |
Definition at line 48 of file CouenneFeasPump.hpp.
Definition at line 53 of file CouenneFeasPump.hpp.
Definition at line 54 of file CouenneFeasPump.hpp.
Couenne::CouenneFeasPump::CouenneFeasPump | ( | CouenneProblem * | couenne = NULL , |
|
CouenneCutGenerator * | cg = NULL , |
|||
Ipopt::SmartPtr< Ipopt::OptionsList > | options = NULL | |||
) |
Constructor with (optional) MINLP pointer.
Couenne::CouenneFeasPump::CouenneFeasPump | ( | const CouenneFeasPump & | other | ) |
Copy constructor.
virtual Couenne::CouenneFeasPump::~CouenneFeasPump | ( | ) | [virtual] |
Destructor.
virtual CbcHeuristic* Couenne::CouenneFeasPump::clone | ( | ) | const [virtual] |
Clone.
CouenneFeasPump& Couenne::CouenneFeasPump::operator= | ( | const CouenneFeasPump & | rhs | ) |
Assignment operator.
virtual void Couenne::CouenneFeasPump::resetModel | ( | CbcModel * | model | ) | [inline, virtual] |
Does nothing, but necessary as CbcHeuristic declares it pure virtual.
Definition at line 74 of file CouenneFeasPump.hpp.
virtual int Couenne::CouenneFeasPump::solution | ( | double & | objectiveValue, | |
double * | newSolution | |||
) | [virtual] |
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
objectiveValue Best known solution in input and value of solution found in output
newSolution Solution found by heuristic.
void Couenne::CouenneFeasPump::setNumberSolvePerLevel | ( | int | value | ) | [inline] |
set number of nlp's solved for each given level of the tree
Definition at line 86 of file CouenneFeasPump.hpp.
References numberSolvePerLevel_.
CouNumber Couenne::CouenneFeasPump::solveMILP | ( | 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) to the current NLP-feasible (but fractional) solution nsol
obtain solution to NLP
expression* Couenne::CouenneFeasPump::updateNLPObj | ( | const double * | ) |
set new expression as the NLP objective function using argument as point to minimize distance from.
Return new objective function
void Couenne::CouenneFeasPump::fixIntVariables | ( | double * | sol | ) |
admits a (possibly fractional) solution and fixes the integer components in the nonlinear problem for later re-solve
static void Couenne::CouenneFeasPump::registerOptions | ( | Ipopt::SmartPtr< Bonmin::RegisteredOptions > | ) | [static] |
initialize options to be read later
double Couenne::CouenneFeasPump::findSolution | ( | double *& | sol, | |
int | niter, | |||
int * | nsuciter | |||
) |
find feasible solution (called by solveMILP ())
void Couenne::CouenneFeasPump::init_MILP | ( | ) |
initialize all solvers at the first call, where the initial MILP is built
void Couenne::CouenneFeasPump::initIpoptApp | ( | ) |
Common code for initializing non-smartptr ipopt application.
CouenneProblem* Couenne::CouenneFeasPump::Problem | ( | ) | const [inline] |
enum fpCompDistIntType Couenne::CouenneFeasPump::compDistInt | ( | ) | const [inline] |
return type of MILP solved
Definition at line 129 of file CouenneFeasPump.hpp.
References compDistInt_.
double Couenne::CouenneFeasPump::multDistNLP | ( | ) | const [inline] |
Return Weights in computing distance, in both MILP and NLP (must sum up to 1 for MILP and for NLP): weight of distance in NLP.
Definition at line 135 of file CouenneFeasPump.hpp.
References multDistNLP_.
double Couenne::CouenneFeasPump::multHessNLP | ( | ) | const [inline] |
weight of Hessian in NLP
Definition at line 136 of file CouenneFeasPump.hpp.
References multHessNLP_.
double Couenne::CouenneFeasPump::multObjFNLP | ( | ) | const [inline] |
weight of objective in NLP
Definition at line 137 of file CouenneFeasPump.hpp.
References multObjFNLP_.
double Couenne::CouenneFeasPump::multDistMILP | ( | ) | const [inline] |
weight of distance in MILP
Definition at line 139 of file CouenneFeasPump.hpp.
References multDistMILP_.
double Couenne::CouenneFeasPump::multHessMILP | ( | ) | const [inline] |
weight of Hessian in MILP
Definition at line 140 of file CouenneFeasPump.hpp.
References multHessMILP_.
double Couenne::CouenneFeasPump::multObjFMILP | ( | ) | const [inline] |
weight of objective in MILP
Definition at line 141 of file CouenneFeasPump.hpp.
References multObjFMILP_.
CouenneTNLP* Couenne::CouenneFeasPump::nlp | ( | ) | const [inline] |
CouenneProblem* Couenne::CouenneFeasPump::problem_ [private] |
Couenne representation of the problem.
Definition at line 155 of file CouenneFeasPump.hpp.
Referenced by Problem().
CouenneTNLP* Couenne::CouenneFeasPump::nlp_ [private] |
Continuous relaxation of the problem, with an interface for Ipopt only.
Definition at line 169 of file CouenneFeasPump.hpp.
Referenced by nlp().
Ipopt::IpoptApplication* Couenne::CouenneFeasPump::app_ [private] |
OsiSolverInterface* Couenne::CouenneFeasPump::milp_ [private] |
MILP relaxation of the MINLP (used to find integer non-NLP-feasible solution).
Definition at line 176 of file CouenneFeasPump.hpp.
OsiSolverInterface* Couenne::CouenneFeasPump::postlp_ [private] |
LP relaxation of the MINLP used when fixing integer variables (used for compDistInt_ in FP_DIST_POST and possibly FP_DIST_INT).
Definition at line 181 of file CouenneFeasPump.hpp.
CouenneFPpool* Couenne::CouenneFeasPump::pool_ [private] |
std::set<CouenneFPsolution, compareSol> Couenne::CouenneFeasPump::tabuPool_ [private] |
int Couenne::CouenneFeasPump::numberSolvePerLevel_ [private] |
Number of NLPs solved for each given level of the tree.
Definition at line 194 of file CouenneFeasPump.hpp.
Referenced by setNumberSolvePerLevel().
double Couenne::CouenneFeasPump::multDistNLP_ [private] |
Weights in computing distance, in both MILP and NLP (must sum up to 1 for MILP and for NLP): weight of distance in NLP.
Definition at line 199 of file CouenneFeasPump.hpp.
Referenced by multDistNLP().
double Couenne::CouenneFeasPump::multHessNLP_ [private] |
weight of Hessian in NLP
Definition at line 200 of file CouenneFeasPump.hpp.
Referenced by multHessNLP().
double Couenne::CouenneFeasPump::multObjFNLP_ [private] |
weight of objective in NLP
Definition at line 201 of file CouenneFeasPump.hpp.
Referenced by multObjFNLP().
double Couenne::CouenneFeasPump::multDistMILP_ [private] |
weight of distance in MILP
Definition at line 203 of file CouenneFeasPump.hpp.
Referenced by multDistMILP().
double Couenne::CouenneFeasPump::multHessMILP_ [private] |
weight of Hessian in MILP
Definition at line 204 of file CouenneFeasPump.hpp.
Referenced by multHessMILP().
double Couenne::CouenneFeasPump::multObjFMILP_ [private] |
weight of objective in MILP
Definition at line 205 of file CouenneFeasPump.hpp.
Referenced by multObjFMILP().
enum fpCompDistIntType Couenne::CouenneFeasPump::compDistInt_ [private] |
compute distance from integer variables only, not all variables;
Definition at line 208 of file CouenneFeasPump.hpp.
Referenced by compDistInt().
enum fpCutPlane Couenne::CouenneFeasPump::milpCuttingPlane_ [private] |
Separate convexification cuts during or after MILP.
Definition at line 211 of file CouenneFeasPump.hpp.
int Couenne::CouenneFeasPump::nSepRounds_ [private] |
Number of separation rounds for MILP convexification cuts.
Definition at line 214 of file CouenneFeasPump.hpp.
int Couenne::CouenneFeasPump::maxIter_ [private] |
bool Couenne::CouenneFeasPump::useSCIP_ [private] |
int Couenne::CouenneFeasPump::milpMethod_ [private] |
enum fpTabuMgtPolicy Couenne::CouenneFeasPump::tabuMgt_ [private] |
Tabu management policy: none, use from pool, random perturbation of current solution.
Definition at line 226 of file CouenneFeasPump.hpp.