Bonmin::CutStrengthener::StrengtheningTNLP Class Reference

Class implementing the TNLP for strengthening one cut. More...

List of all members.

Public Member Functions

 StrengtheningTNLP (SmartPtr< TMINLP > tminlp, const CoinPackedVector &cut, bool lower_bound, Index n, const Number *starting_point, const double *x_l_orig, const double *x_u_orig, Index constr_index, Index nvar_constr, const Index *jCol)
 Contructor.
 ~StrengtheningTNLP ()
 Destructor.
Number StrengthenedBound () const
 Method for asking for the strengthened bound.
Overloaded from TNLP
virtual bool get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style)
 Method to return some info about the nlp.
virtual bool get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u)
 Method to return the bounds for my problem.
virtual bool get_starting_point (Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda)
 Method to return the starting point for the algorithm.
virtual bool eval_f (Index n, const Number *x, bool new_x, Number &obj_value)
 Method to return the objective value.
virtual bool eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f)
 Method to return the gradient of the objective.
virtual bool eval_g (Index n, const Number *x, bool new_x, Index m, Number *g)
 Method to return the constraint residuals.
virtual bool eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, 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 (Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, 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 (SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, 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 Number *x)
 Auxilliary method for updating the full x variable.
Methods to block default compiler methods.
 StrengtheningTNLP ()
 StrengtheningTNLP (const StrengtheningTNLP &)
StrengtheningTNLPoperator= (const StrengtheningTNLP &)

Private Attributes

const SmartPtr< TMINLPtminlp_
 TMINLP (with current bounds) for which the cut it to be generated.
Number * obj_grad_
 Gradient of the (linear) objective function.
const Index n_orig_
 Dimension of original problem.
Index m_orig_
 Number of constraints in original problem.
Number * starting_point_
 Starting point.
Number * x_full_
 Full dimentional x which is used to call the TMINLP evaluation routines.
Number * x_l_
 Lower bounds for constraint variables.
Number * x_u_
 Upper bounds for constraint variables.
const Index constr_index_
 Index of the constraint.
const Index nvar_constr_
 Number of variables appearing in the constraint.
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.
Number strengthened_bound_
 Final strengthened bound.
Number * grad_f_
 space for original gradient if objective function is handled


Detailed Description

Class implementing the TNLP for strengthening one cut.

We assume that the cut has a lower bound.

Definition at line 38 of file BonCutStrengthener.hpp.


Constructor & Destructor Documentation

Bonmin::CutStrengthener::StrengtheningTNLP::StrengtheningTNLP ( SmartPtr< TMINLP tminlp,
const CoinPackedVector &  cut,
bool  lower_bound,
Index  n,
const Number *  starting_point,
const double *  x_l_orig,
const double *  x_u_orig,
Index  constr_index,
Index  nvar_constr,
const Index *  jCol 
)

Contructor.

Parameters:
nvar_constr  Number of variables in constraint

Definition at line 308 of file BonCutStrengthener.cpp.

References constr_index_, grad_f_, n_orig_, nvar_constr_, obj_grad_, starting_point_, var_indices_, x_full_, x_l_, and x_u_.

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]


Member Function Documentation

bool Bonmin::CutStrengthener::StrengtheningTNLP::get_nlp_info ( Index &  n,
Index &  m,
Index &  nnz_jac_g,
Index &  nnz_h_lag,
IndexStyleEnum &  index_style 
) [virtual]

Method to return some info about the nlp.

Definition at line 397 of file BonCutStrengthener.cpp.

References m_orig_, n_orig_, nvar_constr_, and tminlp_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::get_bounds_info ( Index  n,
Number *  x_l,
Number *  x_u,
Index  m,
Number *  g_l,
Number *  g_u 
) [virtual]

Method to return the bounds for my problem.

Definition at line 423 of file BonCutStrengthener.cpp.

References constr_index_, m_orig_, n_orig_, nvar_constr_, tminlp_, x_l_, and x_u_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::get_starting_point ( Index  n,
bool  init_x,
Number *  x,
bool  init_z,
Number *  z_L,
Number *  z_U,
Index  m,
bool  init_lambda,
Number *  lambda 
) [virtual]

Method to return the starting point for the algorithm.

Definition at line 463 of file BonCutStrengthener.cpp.

References constr_index_, nvar_constr_, starting_point_, and var_indices_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_f ( Index  n,
const Number *  x,
bool  new_x,
Number &  obj_value 
) [virtual]

Method to return the objective value.

Definition at line 488 of file BonCutStrengthener.cpp.

References obj_grad_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_grad_f ( Index  n,
const Number *  x,
bool  new_x,
Number *  grad_f 
) [virtual]

Method to return the gradient of the objective.

Definition at line 498 of file BonCutStrengthener.cpp.

References obj_grad_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_g ( Index  n,
const Number *  x,
bool  new_x,
Index  m,
Number *  g 
) [virtual]

Method to return the constraint residuals.

Definition at line 505 of file BonCutStrengthener.cpp.

References constr_index_, n_orig_, tminlp_, update_x_full(), and x_full_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_jac_g ( Index  n,
const Number *  x,
bool  new_x,
Index  m,
Index  nele_jac,
Index *  iRow,
Index *  jCol,
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).

Definition at line 520 of file BonCutStrengthener.cpp.

References constr_index_, grad_f_, n_orig_, tminlp_, update_x_full(), var_indices_, and x_full_.

bool Bonmin::CutStrengthener::StrengtheningTNLP::eval_h ( Index  n,
const Number *  x,
bool  new_x,
Number  obj_factor,
Index  m,
const Number *  lambda,
bool  new_lambda,
Index  nele_hess,
Index *  iRow,
Index *  jCol,
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).

Definition at line 553 of file BonCutStrengthener.cpp.

void Bonmin::CutStrengthener::StrengtheningTNLP::finalize_solution ( SolverReturn  status,
Index  n,
const Number *  x,
const Number *  z_L,
const Number *  z_U,
Index  m,
const Number *  g,
const Number *  lambda,
Number  obj_value,
const IpoptData *  ip_data,
IpoptCalculatedQuantities *  ip_cq 
) [virtual]

This method is called when the algorithm is complete so the TNLP can store/write the solution.

Definition at line 578 of file BonCutStrengthener.cpp.

References have_final_bound_, and strengthened_bound_.

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 Number *  x  )  [private]

Auxilliary method for updating the full x variable.

Definition at line 563 of file BonCutStrengthener.cpp.

References constr_index_, nvar_constr_, var_indices_, and x_full_.

Referenced by eval_g(), and eval_jac_g().


Member Data Documentation

const SmartPtr<TMINLP> Bonmin::CutStrengthener::StrengtheningTNLP::tminlp_ [private]

TMINLP (with current bounds) for which the cut it to be generated.

Definition at line 122 of file BonCutStrengthener.hpp.

Referenced by eval_g(), eval_jac_g(), get_bounds_info(), and get_nlp_info().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::obj_grad_ [private]

Gradient of the (linear) objective function.

Definition at line 125 of file BonCutStrengthener.hpp.

Referenced by eval_f(), eval_grad_f(), StrengtheningTNLP(), and ~StrengtheningTNLP().

const Index Bonmin::CutStrengthener::StrengtheningTNLP::n_orig_ [private]

Dimension of original problem.

Definition at line 128 of file BonCutStrengthener.hpp.

Referenced by eval_g(), eval_jac_g(), get_bounds_info(), get_nlp_info(), and StrengtheningTNLP().

Index Bonmin::CutStrengthener::StrengtheningTNLP::m_orig_ [private]

Number of constraints in original problem.

Definition at line 131 of file BonCutStrengthener.hpp.

Referenced by get_bounds_info(), and get_nlp_info().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::starting_point_ [private]

Starting point.

Definition at line 134 of file BonCutStrengthener.hpp.

Referenced by get_starting_point(), StrengtheningTNLP(), and ~StrengtheningTNLP().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_full_ [private]

Full dimentional x which is used to call the TMINLP evaluation routines.

Definition at line 138 of file BonCutStrengthener.hpp.

Referenced by eval_g(), eval_jac_g(), StrengtheningTNLP(), update_x_full(), and ~StrengtheningTNLP().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_l_ [private]

Lower bounds for constraint variables.

Definition at line 141 of file BonCutStrengthener.hpp.

Referenced by get_bounds_info(), StrengtheningTNLP(), and ~StrengtheningTNLP().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::x_u_ [private]

Upper bounds for constraint variables.

Definition at line 144 of file BonCutStrengthener.hpp.

Referenced by get_bounds_info(), StrengtheningTNLP(), and ~StrengtheningTNLP().

const Index Bonmin::CutStrengthener::StrengtheningTNLP::constr_index_ [private]

Index of the constraint.

Definition at line 147 of file BonCutStrengthener.hpp.

Referenced by eval_g(), eval_jac_g(), get_bounds_info(), get_starting_point(), StrengtheningTNLP(), and update_x_full().

const Index Bonmin::CutStrengthener::StrengtheningTNLP::nvar_constr_ [private]

Number of variables appearing in the constraint.

Definition at line 150 of file BonCutStrengthener.hpp.

Referenced by get_bounds_info(), get_nlp_info(), get_starting_point(), StrengtheningTNLP(), and update_x_full().

Index* Bonmin::CutStrengthener::StrengtheningTNLP::var_indices_ [private]

List of variables appearing on the constraints.

Definition at line 153 of file BonCutStrengthener.hpp.

Referenced by eval_jac_g(), get_starting_point(), StrengtheningTNLP(), update_x_full(), and ~StrengtheningTNLP().

bool Bonmin::CutStrengthener::StrengtheningTNLP::lower_bound_ [private]

Flag indicating if the cut has a lower or upper bound.

Definition at line 156 of file BonCutStrengthener.hpp.

Referenced by StrengthenedBound().

bool Bonmin::CutStrengthener::StrengtheningTNLP::have_final_bound_ [private]

Flag indicating if we TNLP has been solved successfully.

Definition at line 159 of file BonCutStrengthener.hpp.

Referenced by finalize_solution(), and StrengthenedBound().

Number Bonmin::CutStrengthener::StrengtheningTNLP::strengthened_bound_ [private]

Final strengthened bound.

Definition at line 162 of file BonCutStrengthener.hpp.

Referenced by finalize_solution(), and StrengthenedBound().

Number* Bonmin::CutStrengthener::StrengtheningTNLP::grad_f_ [private]

space for original gradient if objective function is handled

Definition at line 165 of file BonCutStrengthener.hpp.

Referenced by eval_jac_g(), StrengtheningTNLP(), and ~StrengtheningTNLP().


The documentation for this class was generated from the following files:
Generated on Mon Aug 3 03:08:27 2009 by  doxygen 1.4.7