Bonmin
1.8.4
|
Class implementing the TNLP for strengthening one cut. More...
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. More... | |
~StrengtheningTNLP () | |
Destructor. More... | |
Ipopt::Number | StrengthenedBound () const |
Method for asking for the strengthened bound. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual bool | eval_f (Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value) |
Method to return the objective value. More... | |
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. More... | |
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. More... | |
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) More... | |
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) More... | |
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. More... | |
Private Member Functions | |
void | update_x_full (const Ipopt::Number *x) |
Auxilliary method for updating the full x variable. More... | |
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. More... | |
Ipopt::Number * | obj_grad_ |
Gradient of the (linear) objective function. More... | |
const Ipopt::Index | n_orig_ |
Dimension of original problem. More... | |
Ipopt::Index | m_orig_ |
Ipopt::Number of constraints in original problem. More... | |
Ipopt::Number * | starting_point_ |
Starting point. More... | |
Ipopt::Number * | x_full_ |
Full dimentional x which is used to call the TMINLP evaluation routines. More... | |
Ipopt::Number * | x_l_ |
Lower bounds for constraint variables. More... | |
Ipopt::Number * | x_u_ |
Upper bounds for constraint variables. More... | |
const Ipopt::Index | constr_index_ |
Ipopt::Index of the constraint. More... | |
const Ipopt::Index | nvar_constr_ |
Ipopt::Number of variables appearing in the constraint. More... | |
Ipopt::Index * | var_indices_ |
List of variables appearing on the constraints. More... | |
bool | lower_bound_ |
Flag indicating if the cut has a lower or upper bound. More... | |
bool | have_final_bound_ |
Flag indicating if we TNLP has been solved successfully. More... | |
Ipopt::Number | strengthened_bound_ |
Final strengthened bound. More... | |
Ipopt::Number * | grad_f_ |
space for original gradient if objective function is handled More... | |
Class implementing the TNLP for strengthening one cut.
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.
|
private |
|
private |
|
virtual |
Method to return some info about the nlp.
|
virtual |
Method to return the bounds for my problem.
|
virtual |
Method to return the starting point for the algorithm.
|
virtual |
Method to return the objective value.
|
virtual |
Method to return the gradient of the objective.
|
virtual |
Method to return the constraint residuals.
|
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 |
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 |
This method is called when the algorithm is complete so the TNLP can store/write the solution.
Ipopt::Number Bonmin::CutStrengthener::StrengtheningTNLP::StrengthenedBound | ( | ) | const |
Method for asking for the strengthened bound.
|
private |
|
private |
Auxilliary method for updating the full x variable.
|
private |
TMINLP (with current bounds) for which the cut it to be generated.
Definition at line 120 of file BonCutStrengthener.hpp.
|
private |
Gradient of the (linear) objective function.
Definition at line 123 of file BonCutStrengthener.hpp.
|
private |
Dimension of original problem.
Definition at line 126 of file BonCutStrengthener.hpp.
|
private |
Ipopt::Number of constraints in original problem.
Definition at line 129 of file BonCutStrengthener.hpp.
|
private |
Starting point.
Definition at line 132 of file BonCutStrengthener.hpp.
|
private |
Full dimentional x which is used to call the TMINLP evaluation routines.
Definition at line 136 of file BonCutStrengthener.hpp.
|
private |
Lower bounds for constraint variables.
Definition at line 139 of file BonCutStrengthener.hpp.
|
private |
Upper bounds for constraint variables.
Definition at line 142 of file BonCutStrengthener.hpp.
|
private |
Ipopt::Index of the constraint.
Definition at line 145 of file BonCutStrengthener.hpp.
|
private |
Ipopt::Number of variables appearing in the constraint.
Definition at line 148 of file BonCutStrengthener.hpp.
|
private |
List of variables appearing on the constraints.
Definition at line 151 of file BonCutStrengthener.hpp.
|
private |
Flag indicating if the cut has a lower or upper bound.
Definition at line 154 of file BonCutStrengthener.hpp.
|
private |
Flag indicating if we TNLP has been solved successfully.
Definition at line 157 of file BonCutStrengthener.hpp.
|
private |
Final strengthened bound.
Definition at line 160 of file BonCutStrengthener.hpp.
|
private |
space for original gradient if objective function is handled
Definition at line 163 of file BonCutStrengthener.hpp.