Bonmin
1.7
|
A transformer class to build outer approximations i.e. More...
#include <BonTMINLP2OsiLP.hpp>
Public Member Functions | |
TMINLP2OsiLP () | |
Default constructor. | |
TMINLP2OsiLP (const TMINLP2OsiLP &other) | |
Copy constructor. | |
virtual TMINLP2OsiLP * | clone () const =0 |
virtual copy constructor | |
void | set_tols (double tiny, double very_tiny, double rhs_relax, double infty) |
void | set_model (Bonmin::TMINLP2TNLP *model) |
TMINLP2OsiLP & | operator= (const TMINLP2OsiLP &rhs) |
Assignment operator. | |
~TMINLP2OsiLP () | |
Destructor. | |
virtual void | extract (OsiSolverInterface *si, const double *x, bool getObj)=0 |
Build the Outer approximation of model_ in x and put it in si. | |
virtual void | get_refined_oa (OsiCuts &cs) const =0 |
Get OAs of nonlinear constraints in x. | |
virtual void | get_oas (OsiCuts &cs, const double *x, bool getObj, bool global) const =0 |
Get OAs of nonlinear constraints in x. | |
Protected Member Functions | |
bool | cleanNnz (double &value, double colLower, double colUpper, double rowLower, double rowUpper, double colsol, double &lb, double &ub, double tiny, double veryTiny) const |
Facilitator to clean up coefficient. | |
void | initialize_jac_storage () |
Protected Attributes | |
double | tiny_ |
If constraint coefficient is below this, we try to remove it. | |
double | very_tiny_ |
If constraint coefficient is below this, we neglect it. | |
double | rhs_relax_ |
Amount by which to relax OA constraints RHSes. | |
double | infty_ |
infinity. | |
vector< int > | jCol_ |
Cache Jacobian matrix. | |
vector< int > | iRow_ |
Rows of jacobian. | |
vector< double > | value_ |
Values of jacobian. | |
vector < Ipopt::TNLP::LinearityType > | const_types_ |
Ipopt::SmartPtr < Bonmin::TMINLP2TNLP > | model_ |
Static Protected Attributes | |
static int | nTimesCalled |
Count the number of linear outer approximations taken. |
A transformer class to build outer approximations i.e.
transfomrs nonlinear programs into linear programs.
Definition at line 26 of file BonTMINLP2OsiLP.hpp.
Bonmin::TMINLP2OsiLP::TMINLP2OsiLP | ( | ) | [inline] |
Default constructor.
Definition at line 31 of file BonTMINLP2OsiLP.hpp.
Bonmin::TMINLP2OsiLP::TMINLP2OsiLP | ( | const TMINLP2OsiLP & | other | ) | [inline] |
Copy constructor.
Definition at line 37 of file BonTMINLP2OsiLP.hpp.
Bonmin::TMINLP2OsiLP::~TMINLP2OsiLP | ( | ) | [inline] |
Destructor.
Definition at line 69 of file BonTMINLP2OsiLP.hpp.
virtual TMINLP2OsiLP* Bonmin::TMINLP2OsiLP::clone | ( | ) | const [pure virtual] |
virtual copy constructor
void Bonmin::TMINLP2OsiLP::set_tols | ( | double | tiny, |
double | very_tiny, | ||
double | rhs_relax, | ||
double | infty | ||
) | [inline] |
Definition at line 46 of file BonTMINLP2OsiLP.hpp.
References infty_, rhs_relax_, tiny_, and very_tiny_.
void Bonmin::TMINLP2OsiLP::set_model | ( | Bonmin::TMINLP2TNLP * | model | ) | [inline] |
Definition at line 53 of file BonTMINLP2OsiLP.hpp.
References initialize_jac_storage(), and model_.
TMINLP2OsiLP& Bonmin::TMINLP2OsiLP::operator= | ( | const TMINLP2OsiLP & | rhs | ) | [inline] |
Assignment operator.
Definition at line 59 of file BonTMINLP2OsiLP.hpp.
References model_, tiny_, and very_tiny_.
virtual void Bonmin::TMINLP2OsiLP::extract | ( | OsiSolverInterface * | si, |
const double * | x, | ||
bool | getObj | ||
) | [pure virtual] |
Build the Outer approximation of model_ in x and put it in si.
virtual void Bonmin::TMINLP2OsiLP::get_refined_oa | ( | OsiCuts & | cs | ) | const [pure virtual] |
Get OAs of nonlinear constraints in x.
virtual void Bonmin::TMINLP2OsiLP::get_oas | ( | OsiCuts & | cs, |
const double * | x, | ||
bool | getObj, | ||
bool | global | ||
) | const [pure virtual] |
Get OAs of nonlinear constraints in x.
bool Bonmin::TMINLP2OsiLP::cleanNnz | ( | double & | value, |
double | colLower, | ||
double | colUpper, | ||
double | rowLower, | ||
double | rowUpper, | ||
double | colsol, | ||
double & | lb, | ||
double & | ub, | ||
double | tiny, | ||
double | veryTiny | ||
) | const [inline, protected] |
Facilitator to clean up coefficient.
Definition at line 120 of file BonTMINLP2OsiLP.hpp.
void Bonmin::TMINLP2OsiLP::initialize_jac_storage | ( | ) | [protected] |
Referenced by set_model().
double Bonmin::TMINLP2OsiLP::tiny_ [protected] |
If constraint coefficient is below this, we try to remove it.
Definition at line 92 of file BonTMINLP2OsiLP.hpp.
Referenced by operator=(), and set_tols().
double Bonmin::TMINLP2OsiLP::very_tiny_ [protected] |
If constraint coefficient is below this, we neglect it.
Definition at line 94 of file BonTMINLP2OsiLP.hpp.
Referenced by operator=(), and set_tols().
double Bonmin::TMINLP2OsiLP::rhs_relax_ [protected] |
Amount by which to relax OA constraints RHSes.
Definition at line 96 of file BonTMINLP2OsiLP.hpp.
Referenced by set_tols().
double Bonmin::TMINLP2OsiLP::infty_ [protected] |
int Bonmin::TMINLP2OsiLP::nTimesCalled [static, protected] |
Count the number of linear outer approximations taken.
Definition at line 100 of file BonTMINLP2OsiLP.hpp.
vector<int> Bonmin::TMINLP2OsiLP::jCol_ [mutable, protected] |
vector<int> Bonmin::TMINLP2OsiLP::iRow_ [mutable, protected] |
Rows of jacobian.
Definition at line 106 of file BonTMINLP2OsiLP.hpp.
vector<double> Bonmin::TMINLP2OsiLP::value_ [mutable, protected] |
Values of jacobian.
Definition at line 108 of file BonTMINLP2OsiLP.hpp.
vector<Ipopt::TNLP::LinearityType> Bonmin::TMINLP2OsiLP::const_types_ [protected] |
Definition at line 110 of file BonTMINLP2OsiLP.hpp.
Ipopt::SmartPtr<Bonmin::TMINLP2TNLP> Bonmin::TMINLP2OsiLP::model_ [protected] |
Definition at line 114 of file BonTMINLP2OsiLP.hpp.
Referenced by operator=(), and set_model().