Public Member Functions | |
StrengtheningTNLP (Ipopt::SmartPtr< TMINLP > tminlp, const CoinPackedVector &cut, bool lower_bound, Ipopt::Index n, const Ipopt::Number *starting_point, const double *x_l_orig, const double *x_u_orig, Ipopt::Index constr_index, Ipopt::Index nvar_constr, const Ipopt::Index *jCol) | |
Contructor. | |
~StrengtheningTNLP () | |
Destructor. | |
Ipopt::Number | StrengthenedBound () const |
Method for asking for the strengthened bound. | |
Overloaded from TNLP | |
virtual bool | get_nlp_info (Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, Ipopt::TNLP::IndexStyleEnum &index_style) |
Method to return some info about the nlp. | |
virtual bool | get_bounds_info (Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u) |
Method to return the bounds for my problem. | |
virtual bool | get_starting_point (Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda) |
Method to return the starting point for the algorithm. | |
virtual bool | eval_f (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value) |
Method to return the objective value. | |
virtual bool | eval_grad_f (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f) |
Method to return the gradient of the objective. | |
virtual bool | eval_g (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g) |
Method to return the constraint residuals. | |
virtual bool | eval_jac_g (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values) |
Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL). | |
virtual bool | eval_h (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number *lambda, bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values) |
Method to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The values of the hessian of the lagrangian (if "values" is not NULL). | |
Solution Methods | |
virtual void | finalize_solution (Ipopt::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, const Ipopt::Number *z_L, const Ipopt::Number *z_U, Ipopt::Index m, const Ipopt::Number *g, const Ipopt::Number *lambda, Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq) |
This method is called when the algorithm is complete so the TNLP can store/write the solution. | |
Private Member Functions | |
void | update_x_full (const Ipopt::Number *x) |
Auxilliary method for updating the full x variable. | |
Methods to block default compiler methods. | |
StrengtheningTNLP () | |
StrengtheningTNLP (const StrengtheningTNLP &) | |
StrengtheningTNLP & | operator= (const StrengtheningTNLP &) |
Private Attributes | |
const Ipopt::SmartPtr< TMINLP > | tminlp_ |
TMINLP (with current bounds) for which the cut it to be generated. | |
Ipopt::Number * | obj_grad_ |
Gradient of the (linear) objective function. | |
const Ipopt::Index | n_orig_ |
Dimension of original problem. | |
Ipopt::Index | m_orig_ |
Ipopt::Number of constraints in original problem. | |
Ipopt::Number * | starting_point_ |
Starting point. | |
Ipopt::Number * | x_full_ |
Full dimentional x which is used to call the TMINLP evaluation routines. | |
Ipopt::Number * | x_l_ |
Lower bounds for constraint variables. | |
Ipopt::Number * | x_u_ |
Upper bounds for constraint variables. | |
const Ipopt::Index | constr_index_ |
Ipopt::Index of the constraint. | |
const Ipopt::Index | nvar_constr_ |
Ipopt::Number of variables appearing in the constraint. | |
Ipopt::Index * | var_indices_ |
List of variables appearing on the constraints. | |
bool | lower_bound_ |
Flag indicating if the cut has a lower or upper bound. | |
bool | have_final_bound_ |
Flag indicating if we TNLP has been solved successfully. | |
Ipopt::Number | strengthened_bound_ |
Final strengthened bound. | |
Ipopt::Number * | grad_f_ |
space for original gradient if objective function is handled |
We assume that the cut has a lower bound.
Definition at line 36 of file BonCutStrengthener.hpp.
Bonmin::CutStrengthener::StrengtheningTNLP::StrengtheningTNLP | ( | Ipopt::SmartPtr< TMINLP > | tminlp, | |
const CoinPackedVector & | cut, | |||
bool | lower_bound, | |||
Ipopt::Index | n, | |||
const Ipopt::Number * | starting_point, | |||
const double * | x_l_orig, | |||
const double * | x_u_orig, | |||
Ipopt::Index | constr_index, | |||
Ipopt::Index | nvar_constr, | |||
const Ipopt::Index * | jCol | |||
) |
Contructor.
nvar_constr | Ipopt::Number of variables in constraint |
Bonmin::CutStrengthener::StrengtheningTNLP::~StrengtheningTNLP | ( | ) |
Destructor.
Definition at line 385 of file BonCutStrengthener.cpp.
References grad_f_, obj_grad_, starting_point_, var_indices_, x_full_, x_l_, and x_u_.
Bonmin::CutStrengthener::StrengtheningTNLP::StrengtheningTNLP | ( | ) | [private] |
Bonmin::CutStrengthener::StrengtheningTNLP::StrengtheningTNLP | ( | const StrengtheningTNLP & | ) | [private] |
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::get_nlp_info | ( | Ipopt::Index & | n, | |
Ipopt::Index & | m, | |||
Ipopt::Index & | nnz_jac_g, | |||
Ipopt::Index & | nnz_h_lag, | |||
Ipopt::TNLP::IndexStyleEnum & | index_style | |||
) | [virtual] |
Method to return some info about the nlp.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::get_bounds_info | ( | Ipopt::Index | n, | |
Ipopt::Number * | x_l, | |||
Ipopt::Number * | x_u, | |||
Ipopt::Index | m, | |||
Ipopt::Number * | g_l, | |||
Ipopt::Number * | g_u | |||
) | [virtual] |
Method to return the bounds for my problem.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::get_starting_point | ( | Ipopt::Index | n, | |
bool | init_x, | |||
Ipopt::Number * | x, | |||
bool | init_z, | |||
Ipopt::Number * | z_L, | |||
Ipopt::Number * | z_U, | |||
Ipopt::Index | m, | |||
bool | init_lambda, | |||
Ipopt::Number * | lambda | |||
) | [virtual] |
Method to return the starting point for the algorithm.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_f | ( | Ipopt::Index | n, | |
const Ipopt::Number * | x, | |||
bool | new_x, | |||
Ipopt::Number & | obj_value | |||
) | [virtual] |
Method to return the objective value.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_grad_f | ( | Ipopt::Index | n, | |
const Ipopt::Number * | x, | |||
bool | new_x, | |||
Ipopt::Number * | grad_f | |||
) | [virtual] |
Method to return the gradient of the objective.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_g | ( | Ipopt::Index | n, | |
const Ipopt::Number * | x, | |||
bool | new_x, | |||
Ipopt::Index | m, | |||
Ipopt::Number * | g | |||
) | [virtual] |
Method to return the constraint residuals.
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_jac_g | ( | Ipopt::Index | n, | |
const Ipopt::Number * | x, | |||
bool | new_x, | |||
Ipopt::Index | m, | |||
Ipopt::Index | nele_jac, | |||
Ipopt::Index * | iRow, | |||
Ipopt::Index * | jCol, | |||
Ipopt::Number * | values | |||
) | [virtual] |
Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL).
virtual bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_h | ( | Ipopt::Index | n, | |
const Ipopt::Number * | x, | |||
bool | new_x, | |||
Ipopt::Number | obj_factor, | |||
Ipopt::Index | m, | |||
const Ipopt::Number * | lambda, | |||
bool | new_lambda, | |||
Ipopt::Index | nele_hess, | |||
Ipopt::Index * | iRow, | |||
Ipopt::Index * | jCol, | |||
Ipopt::Number * | values | |||
) | [virtual] |
Method to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The values of the hessian of the lagrangian (if "values" is not NULL).
virtual void Bonmin::CutStrengthener::StrengtheningTNLP::finalize_solution | ( | Ipopt::SolverReturn | status, | |
Ipopt::Index | n, | |||
const Ipopt::Number * | x, | |||
const Ipopt::Number * | z_L, | |||
const Ipopt::Number * | z_U, | |||
Ipopt::Index | m, | |||
const Ipopt::Number * | g, | |||
const Ipopt::Number * | lambda, | |||
Ipopt::Number | obj_value, | |||
const Ipopt::IpoptData * | ip_data, | |||
Ipopt::IpoptCalculatedQuantities * | ip_cq | |||
) | [virtual] |
This method is called when the algorithm is complete so the TNLP can store/write the solution.
Number Bonmin::CutStrengthener::StrengtheningTNLP::StrengthenedBound | ( | ) | const |
Method for asking for the strengthened bound.
Definition at line 594 of file BonCutStrengthener.cpp.
References have_final_bound_, lower_bound_, and strengthened_bound_.
StrengtheningTNLP& Bonmin::CutStrengthener::StrengtheningTNLP::operator= | ( | const StrengtheningTNLP & | ) | [private] |
void Bonmin::CutStrengthener::StrengtheningTNLP::update_x_full | ( | const Ipopt::Number * | x | ) | [private] |
Auxilliary method for updating the full x variable.
const Ipopt::SmartPtr<TMINLP> Bonmin::CutStrengthener::StrengtheningTNLP::tminlp_ [private] |
TMINLP (with current bounds) for which the cut it to be generated.
Definition at line 120 of file BonCutStrengthener.hpp.
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::obj_grad_ [private] |
Gradient of the (linear) objective function.
Definition at line 123 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
const Ipopt::Index Bonmin::CutStrengthener::StrengtheningTNLP::n_orig_ [private] |
Ipopt::Index Bonmin::CutStrengthener::StrengtheningTNLP::m_orig_ [private] |
Ipopt::Number of constraints in original problem.
Definition at line 129 of file BonCutStrengthener.hpp.
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::starting_point_ [private] |
Starting point.
Definition at line 132 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_full_ [private] |
Full dimentional x which is used to call the TMINLP evaluation routines.
Definition at line 136 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_l_ [private] |
Lower bounds for constraint variables.
Definition at line 139 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_u_ [private] |
Upper bounds for constraint variables.
Definition at line 142 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
const Ipopt::Index Bonmin::CutStrengthener::StrengtheningTNLP::constr_index_ [private] |
const Ipopt::Index Bonmin::CutStrengthener::StrengtheningTNLP::nvar_constr_ [private] |
Ipopt::Number of variables appearing in the constraint.
Definition at line 148 of file BonCutStrengthener.hpp.
Ipopt::Index* Bonmin::CutStrengthener::StrengtheningTNLP::var_indices_ [private] |
List of variables appearing on the constraints.
Definition at line 151 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().
bool Bonmin::CutStrengthener::StrengtheningTNLP::lower_bound_ [private] |
Flag indicating if the cut has a lower or upper bound.
Definition at line 154 of file BonCutStrengthener.hpp.
Referenced by StrengthenedBound().
Flag indicating if we TNLP has been solved successfully.
Definition at line 157 of file BonCutStrengthener.hpp.
Referenced by StrengthenedBound().
Ipopt::Number Bonmin::CutStrengthener::StrengtheningTNLP::strengthened_bound_ [private] |
Final strengthened bound.
Definition at line 160 of file BonCutStrengthener.hpp.
Referenced by StrengthenedBound().
Ipopt::Number* Bonmin::CutStrengthener::StrengtheningTNLP::grad_f_ [private] |
space for original gradient if objective function is handled
Definition at line 163 of file BonCutStrengthener.hpp.
Referenced by ~StrengtheningTNLP().