#include <BonOuterApprox.hpp>
Public Member Functions | |
OuterApprox () | |
Default constructor. | |
OuterApprox (const OuterApprox &other) | |
Copy constructor. | |
OuterApprox & | operator= (const OuterApprox &rhs) |
Assignment operator. | |
~OuterApprox () | |
Destructor. | |
void | initialize (Bonmin::BabSetupBase &b) |
Initialize using options. | |
void | extractLinearRelaxation (Bonmin::OsiTMINLPInterface &minlp, OsiSolverInterface *si, const double *x, bool getObj) |
Build the Outer approximation in minlp and put it in si. | |
void | operator() (Bonmin::OsiTMINLPInterface &minlp, OsiSolverInterface *si, const double *x, bool getObj) |
Operator() calls extractLinearRelaxation. | |
Private Member Functions | |
bool | cleanNnz (double &value, double colLower, double colUpper, double rowLower, double rowUpper, double colsol, double &lb, double &ub, double tiny, double veryTiny) |
Facilitator to clean up coefficient. | |
Private Attributes | |
double | tiny_ |
If constraint coefficient is below this, we try to remove it. | |
double | veryTiny_ |
If constraint coefficient is below this, we neglect it. | |
Static Private Attributes | |
static int | nTimesCalled = 0 |
Count the number of linear outer approximations taken. |
Definition at line 21 of file BonOuterApprox.hpp.
Bonmin::OuterApprox::OuterApprox | ( | ) | [inline] |
Bonmin::OuterApprox::OuterApprox | ( | const OuterApprox & | other | ) | [inline] |
Bonmin::OuterApprox::~OuterApprox | ( | ) | [inline] |
OuterApprox& Bonmin::OuterApprox::operator= | ( | const OuterApprox & | rhs | ) | [inline] |
void Bonmin::OuterApprox::initialize | ( | Bonmin::BabSetupBase & | b | ) |
Initialize using options.
Definition at line 20 of file BonOuterApprox.cpp.
References Bonmin::BabSetupBase::options(), tiny_, and veryTiny_.
void Bonmin::OuterApprox::extractLinearRelaxation | ( | Bonmin::OsiTMINLPInterface & | minlp, | |
OsiSolverInterface * | si, | |||
const double * | x, | |||
bool | getObj | |||
) |
Build the Outer approximation in minlp and put it in si.
Definition at line 25 of file BonOuterApprox.cpp.
References a, cleanNnz(), e, Bonmin::TMINLP2TNLP::eval_f(), Bonmin::TMINLP2TNLP::eval_g(), Bonmin::TMINLP2TNLP::eval_grad_f(), Bonmin::TMINLP2TNLP::eval_jac_g(), g, Bonmin::TMINLP2TNLP::get_bounds_info(), Bonmin::TMINLP2TNLP::get_constraints_linearity(), Bonmin::TMINLP2TNLP::get_nlp_info(), Bonmin::TMINLP2TNLP::hasLinearObjective(), infty, Bonmin::OsiTMINLPInterface::isInteger(), k, Couenne::LINEAR, m, n, nTimesCalled, Bonmin::OsiTMINLPInterface::problem(), tiny_, and veryTiny_.
Referenced by operator()().
void Bonmin::OuterApprox::operator() | ( | Bonmin::OsiTMINLPInterface & | minlp, | |
OsiSolverInterface * | si, | |||
const double * | x, | |||
bool | getObj | |||
) | [inline] |
Operator() calls extractLinearRelaxation.
Definition at line 57 of file BonOuterApprox.hpp.
References extractLinearRelaxation().
bool Bonmin::OuterApprox::cleanNnz | ( | double & | value, | |
double | colLower, | |||
double | colUpper, | |||
double | rowLower, | |||
double | rowUpper, | |||
double | colsol, | |||
double & | lb, | |||
double & | ub, | |||
double | tiny, | |||
double | veryTiny | |||
) | [inline, private] |
Facilitator to clean up coefficient.
Definition at line 78 of file BonOuterApprox.hpp.
References infty.
Referenced by extractLinearRelaxation().
double Bonmin::OuterApprox::tiny_ [private] |
If constraint coefficient is below this, we try to remove it.
Definition at line 68 of file BonOuterApprox.hpp.
Referenced by extractLinearRelaxation(), initialize(), and operator=().
double Bonmin::OuterApprox::veryTiny_ [private] |
If constraint coefficient is below this, we neglect it.
Definition at line 70 of file BonOuterApprox.hpp.
Referenced by extractLinearRelaxation(), initialize(), and operator=().
int Bonmin::OuterApprox::nTimesCalled = 0 [static, private] |
Count the number of linear outer approximations taken.
Definition at line 72 of file BonOuterApprox.hpp.
Referenced by extractLinearRelaxation().