Public Member Functions | Private Member Functions | Private Attributes | List of all members
Bonmin::CurvatureEstimator Class Reference

#include <BonCurvatureEstimator.hpp>

Inheritance diagram for Bonmin::CurvatureEstimator:
Inheritance graph
[legend]
Collaboration diagram for Bonmin::CurvatureEstimator:
Collaboration graph
[legend]

Public Member Functions

bool ComputeNullSpaceCurvature (int n, const Number *x, bool new_x, const Number *x_l, const Number *x_u, const Number *g_l, const Number *g_u, bool new_bounds, const Number *z_L, const Number *z_U, int m, const Number *lam, bool new_mults, const Number *orig_d, Number *projected_d, Number &gradLagTd, Number &dTHLagd)
 Method for computing a direction projected_d related to the given direction orig_d and the two-sided product of projected_d with Hessian of Lagrangian. More...
 
Constructor/Destructor
 CurvatureEstimator (SmartPtr< Journalist > jnlst, SmartPtr< OptionsList > options, SmartPtr< TNLP > tnlp)
 Constructor. More...
 
virtual ~CurvatureEstimator ()
 Destructor. More...
 

Private Member Functions

bool Initialize ()
 
bool PrepareNewMatrixStructure (const Number *x_l, const Number *x_u, const Number *g_l, const Number *g_u, std::vector< int > &active_x, std::vector< int > &active_g, Index &nx_free, Index *x_free_map, Index &ng_fixed, Index *g_fixed_map, SmartPtr< CompoundSymMatrixSpace > &comp_proj_matrix_space, SmartPtr< CompoundVectorSpace > &comp_vec_space)
 
bool PrepareNewMatrixValues (const Index *x_free_map, const Index *g_fixed_map, SmartPtr< CompoundSymMatrixSpace > &comp_proj_matrix_space, SmartPtr< CompoundSymMatrix > &comp_proj_matrix, SmartPtr< TSymLinearSolver > &tsymlinearsolver)
 
bool SolveSystem (const Number *rhs_x, const Number *rhs_g, Number *sol_x, Number *sol_g, const Index *x_free_map, const Index *g_fixed_map, SmartPtr< CompoundVectorSpace > &comp_vec_space, SmartPtr< CompoundSymMatrix > &comp_proj_matrix, SmartPtr< TSymLinearSolver > &tsymlinearsolver)
 
bool Compute_dTHLagd (const Number *d, const Number *x, bool new_x, const Number *lambda, bool new_lambda, Number &dTHLagd)
 
Default Compiler Generated Methods

(Hidden to avoid implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 CurvatureEstimator ()
 Default Constructor. More...
 
 CurvatureEstimator (const CurvatureEstimator &)
 Copy Constructor. More...
 
void operator= (const CurvatureEstimator &)
 Overloaded Equals Operator. More...
 

Private Attributes

Number * lambda_
 Space for most recent computed least-square multipliers. More...
 
Number * eq_projected_d_
 Space for storing the direction projected into the equality constraints only. More...
 
bool initialized_
 
Items related to handling the linear solver object
SmartPtr< Journalist > jnlst_
 prefix to be used when parsion the options for the linear solver More...
 
SmartPtr< OptionsList > options_
 prefix to be used when parsion the options for the linear solver More...
 
std::string prefix_
 prefix to be used when parsion the options for the linear solver More...
 
SmartPtr< TSymLinearSolver > eq_tsymlinearsolver_
 Strategy object for solving the projection matrix for equality constraints only. More...
 
SmartPtr< TSymLinearSolver > all_tsymlinearsolver_
 Strategy object for solving the projection matrix for all active constraints. More...
 
Information about the tnlp
SmartPtr< TNLP > tnlp_
 
Index n_
 
Number * grad_f_
 
Index m_
 
Index nnz_jac_
 
Index * irows_jac_
 
Index * jcols_jac_
 
Number * jac_vals_
 
Index nnz_hess_
 
Index * irows_hess_
 
Index * jcols_hess_
 
Number * hess_vals_
 
Information about activities for equality projection

only

Index eq_nx_free_
 Number of free x variables. More...
 
Index * eq_x_free_map_
 Map for pointing from the original x space to the one without fixed variables. More...
 
Index eq_ng_fixed_
 Number of active constraints. More...
 
Index * eq_g_fixed_map_
 Map for pointing from the original constraint space to the one with only active constraints. More...
 
Information about activities for projection

with respect to all active constraints

Index all_nx_free_
 Number of free x variables. More...
 
Index * all_x_free_map_
 Map for pointing from the original x space to the one without fixed variables. More...
 
Index all_ng_fixed_
 Number of active constraints. More...
 
Index * all_g_fixed_map_
 Map for pointing from the original constraint space to the one with only active constraints. More...
 
Items for handling the projection system for equality

constraints only

SmartPtr< CompoundSymMatrixSpace > eq_comp_proj_matrix_space_
 Compound Matrix space for storing the linear system for the projection. More...
 
SmartPtr< CompoundSymMatrix > eq_comp_proj_matrix_
 Compound Matrix storing the current projection matrix. More...
 
SmartPtr< CompoundVectorSpace > eq_comp_vec_space_
 Compound Vector space for storing right hand side and solution for the projection system. More...
 
Items for handling the projection system for all

constraints

SmartPtr< CompoundSymMatrixSpace > all_comp_proj_matrix_space_
 Compound Matrix space for storing the linear system for the projection. More...
 
SmartPtr< CompoundSymMatrix > all_comp_proj_matrix_
 Compound Matrix storing the current projection matrix. More...
 
SmartPtr< CompoundVectorSpace > all_comp_vec_space_
 Compound Vector space for storing right hand side and solution for the projection system. More...
 
std::vector< intactive_x_
 Storing the activities. More...
 
std::vector< intactive_g_
 Storing the activities. More...
 

Detailed Description

Definition at line 29 of file BonCurvatureEstimator.hpp.

Constructor & Destructor Documentation

Bonmin::CurvatureEstimator::CurvatureEstimator ( SmartPtr< Journalist >  jnlst,
SmartPtr< OptionsList >  options,
SmartPtr< TNLP >  tnlp 
)

Constructor.

It is given the options list to extract options specifying linear solver options.

Definition at line 46 of file BonCurvatureEstimator.cpp.

Bonmin::CurvatureEstimator::~CurvatureEstimator ( )
virtual

Destructor.

Definition at line 179 of file BonCurvatureEstimator.cpp.

Bonmin::CurvatureEstimator::CurvatureEstimator ( )
private

Default Constructor.

Bonmin::CurvatureEstimator::CurvatureEstimator ( const CurvatureEstimator )
private

Copy Constructor.

Member Function Documentation

bool Bonmin::CurvatureEstimator::ComputeNullSpaceCurvature ( int  n,
const Number *  x,
bool  new_x,
const Number *  x_l,
const Number *  x_u,
const Number *  g_l,
const Number *  g_u,
bool  new_bounds,
const Number *  z_L,
const Number *  z_U,
int  m,
const Number *  lam,
bool  new_mults,
const Number *  orig_d,
Number *  projected_d,
Number &  gradLagTd,
Number &  dTHLagd 
)

Method for computing a direction projected_d related to the given direction orig_d and the two-sided product of projected_d with Hessian of Lagrangian.

The arrays x, y_c, and y_d constain the primal and dual variables definiting the Lagrangian Hessian. The vectors active_d and active_x contain the indices of active inequality and bound constraints, respectively. A positive index number is interpreted to belong to an upper bound, and a negative number to a lower bound. The return status is false if the computation was not possible, and true otherwise.

Definition at line 287 of file BonCurvatureEstimator.cpp.

void Bonmin::CurvatureEstimator::operator= ( const CurvatureEstimator )
private

Overloaded Equals Operator.

bool Bonmin::CurvatureEstimator::Initialize ( )
private

Definition at line 198 of file BonCurvatureEstimator.cpp.

bool Bonmin::CurvatureEstimator::PrepareNewMatrixStructure ( const Number *  x_l,
const Number *  x_u,
const Number *  g_l,
const Number *  g_u,
std::vector< int > &  active_x,
std::vector< int > &  active_g,
Index &  nx_free,
Index *  x_free_map,
Index &  ng_fixed,
Index *  g_fixed_map,
SmartPtr< CompoundSymMatrixSpace > &  comp_proj_matrix_space,
SmartPtr< CompoundVectorSpace > &  comp_vec_space 
)
private

Definition at line 543 of file BonCurvatureEstimator.cpp.

bool Bonmin::CurvatureEstimator::PrepareNewMatrixValues ( const Index *  x_free_map,
const Index *  g_fixed_map,
SmartPtr< CompoundSymMatrixSpace > &  comp_proj_matrix_space,
SmartPtr< CompoundSymMatrix > &  comp_proj_matrix,
SmartPtr< TSymLinearSolver > &  tsymlinearsolver 
)
private

Definition at line 662 of file BonCurvatureEstimator.cpp.

bool Bonmin::CurvatureEstimator::SolveSystem ( const Number *  rhs_x,
const Number *  rhs_g,
Number *  sol_x,
Number *  sol_g,
const Index *  x_free_map,
const Index *  g_fixed_map,
SmartPtr< CompoundVectorSpace > &  comp_vec_space,
SmartPtr< CompoundSymMatrix > &  comp_proj_matrix,
SmartPtr< TSymLinearSolver > &  tsymlinearsolver 
)
private

Definition at line 690 of file BonCurvatureEstimator.cpp.

bool Bonmin::CurvatureEstimator::Compute_dTHLagd ( const Number *  d,
const Number *  x,
bool  new_x,
const Number *  lambda,
bool  new_lambda,
Number &  dTHLagd 
)
private

Definition at line 788 of file BonCurvatureEstimator.cpp.

Member Data Documentation

SmartPtr<Journalist> Bonmin::CurvatureEstimator::jnlst_
private

prefix to be used when parsion the options for the linear solver

Definition at line 96 of file BonCurvatureEstimator.hpp.

SmartPtr<OptionsList> Bonmin::CurvatureEstimator::options_
private

prefix to be used when parsion the options for the linear solver

Definition at line 97 of file BonCurvatureEstimator.hpp.

std::string Bonmin::CurvatureEstimator::prefix_
private

prefix to be used when parsion the options for the linear solver

Definition at line 100 of file BonCurvatureEstimator.hpp.

SmartPtr<TSymLinearSolver> Bonmin::CurvatureEstimator::eq_tsymlinearsolver_
private

Strategy object for solving the projection matrix for equality constraints only.

Definition at line 103 of file BonCurvatureEstimator.hpp.

SmartPtr<TSymLinearSolver> Bonmin::CurvatureEstimator::all_tsymlinearsolver_
private

Strategy object for solving the projection matrix for all active constraints.

Definition at line 106 of file BonCurvatureEstimator.hpp.

SmartPtr<TNLP> Bonmin::CurvatureEstimator::tnlp_
private

Definition at line 111 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::n_
private

Definition at line 112 of file BonCurvatureEstimator.hpp.

Number* Bonmin::CurvatureEstimator::grad_f_
private

Definition at line 113 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::m_
private

Definition at line 114 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::nnz_jac_
private

Definition at line 115 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::irows_jac_
private

Definition at line 116 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::jcols_jac_
private

Definition at line 117 of file BonCurvatureEstimator.hpp.

Number* Bonmin::CurvatureEstimator::jac_vals_
private

Definition at line 118 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::nnz_hess_
private

Definition at line 119 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::irows_hess_
private

Definition at line 120 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::jcols_hess_
private

Definition at line 121 of file BonCurvatureEstimator.hpp.

Number* Bonmin::CurvatureEstimator::hess_vals_
private

Definition at line 122 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::eq_nx_free_
private

Number of free x variables.

Definition at line 129 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::eq_x_free_map_
private

Map for pointing from the original x space to the one without fixed variables.

Definition at line 132 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::eq_ng_fixed_
private

Number of active constraints.

Definition at line 134 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::eq_g_fixed_map_
private

Map for pointing from the original constraint space to the one with only active constraints.

Definition at line 137 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::all_nx_free_
private

Number of free x variables.

Definition at line 144 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::all_x_free_map_
private

Map for pointing from the original x space to the one without fixed variables.

Definition at line 147 of file BonCurvatureEstimator.hpp.

Index Bonmin::CurvatureEstimator::all_ng_fixed_
private

Number of active constraints.

Definition at line 149 of file BonCurvatureEstimator.hpp.

Index* Bonmin::CurvatureEstimator::all_g_fixed_map_
private

Map for pointing from the original constraint space to the one with only active constraints.

Definition at line 152 of file BonCurvatureEstimator.hpp.

Number* Bonmin::CurvatureEstimator::lambda_
private

Space for most recent computed least-square multipliers.

Definition at line 156 of file BonCurvatureEstimator.hpp.

Number* Bonmin::CurvatureEstimator::eq_projected_d_
private

Space for storing the direction projected into the equality constraints only.

Having this array around all the time means that we don't have to be so careful about memory leaks.

Definition at line 161 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundSymMatrixSpace> Bonmin::CurvatureEstimator::eq_comp_proj_matrix_space_
private

Compound Matrix space for storing the linear system for the projection.

Definition at line 168 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundSymMatrix> Bonmin::CurvatureEstimator::eq_comp_proj_matrix_
private

Compound Matrix storing the current projection matrix.

Definition at line 170 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundVectorSpace> Bonmin::CurvatureEstimator::eq_comp_vec_space_
private

Compound Vector space for storing right hand side and solution for the projection system.

Definition at line 173 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundSymMatrixSpace> Bonmin::CurvatureEstimator::all_comp_proj_matrix_space_
private

Compound Matrix space for storing the linear system for the projection.

Definition at line 181 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundSymMatrix> Bonmin::CurvatureEstimator::all_comp_proj_matrix_
private

Compound Matrix storing the current projection matrix.

Definition at line 183 of file BonCurvatureEstimator.hpp.

SmartPtr<CompoundVectorSpace> Bonmin::CurvatureEstimator::all_comp_vec_space_
private

Compound Vector space for storing right hand side and solution for the projection system.

Definition at line 186 of file BonCurvatureEstimator.hpp.

std::vector<int> Bonmin::CurvatureEstimator::active_x_
private

Storing the activities.

Definition at line 191 of file BonCurvatureEstimator.hpp.

std::vector<int> Bonmin::CurvatureEstimator::active_g_
private

Storing the activities.

Definition at line 192 of file BonCurvatureEstimator.hpp.

bool Bonmin::CurvatureEstimator::initialized_
private

Definition at line 195 of file BonCurvatureEstimator.hpp.


The documentation for this class was generated from the following files: