Bonmin  1.7
Public Member Functions | Private Member Functions | Private Attributes
Bonmin::CurvatureEstimator Class Reference

#include <BonCurvatureEstimator.hpp>

List of all members.

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.
Constructor/Destructor
 CurvatureEstimator (SmartPtr< Journalist > jnlst, SmartPtr< OptionsList > options, SmartPtr< TNLP > tnlp)
 Constructor.
virtual ~CurvatureEstimator ()
 Destructor.

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.
 CurvatureEstimator (const CurvatureEstimator &)
 Copy Constructor.
void operator= (const CurvatureEstimator &)
 Overloaded Equals Operator.

Private Attributes

Number * lambda_
 Space for most recent computed least-square multipliers.
Number * eq_projected_d_
 Space for storing the direction projected into the equality constraints only.
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
SmartPtr< OptionsList > options_
 prefix to be used when parsion the options for the linear solver
std::string prefix_
 prefix to be used when parsion the options for the linear solver
SmartPtr< TSymLinearSolver > eq_tsymlinearsolver_
 Strategy object for solving the projection matrix for equality constraints only.
SmartPtr< TSymLinearSolver > all_tsymlinearsolver_
 Strategy object for solving the projection matrix for all active constraints.
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.
Index * eq_x_free_map_
 Map for pointing from the original x space to the one without fixed variables.
Index eq_ng_fixed_
 Number of active constraints.
Index * eq_g_fixed_map_
 Map for pointing from the original constraint space to the one with only active constraints.
Information about activities for projection

with respect to all active constraints

Index all_nx_free_
 Number of free x variables.
Index * all_x_free_map_
 Map for pointing from the original x space to the one without fixed variables.
Index all_ng_fixed_
 Number of active constraints.
Index * all_g_fixed_map_
 Map for pointing from the original constraint space to the one with only active constraints.
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.
SmartPtr< CompoundSymMatrix > eq_comp_proj_matrix_
 Compound Matrix storing the current projection matrix.
SmartPtr< CompoundVectorSpace > eq_comp_vec_space_
 Compound Vector space for storing right hand side and solution for the projection system.
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.
SmartPtr< CompoundSymMatrix > all_comp_proj_matrix_
 Compound Matrix storing the current projection matrix.
SmartPtr< CompoundVectorSpace > all_comp_vec_space_
 Compound Vector space for storing right hand side and solution for the projection system.
std::vector< int > active_x_
 Storing the activities.
std::vector< int > active_g_
 Storing the activities.

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.

virtual Bonmin::CurvatureEstimator::~CurvatureEstimator ( ) [virtual]

Destructor.

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.

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

Overloaded Equals Operator.

bool Bonmin::CurvatureEstimator::Initialize ( ) [private]
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]
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]
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]
bool Bonmin::CurvatureEstimator::Compute_dTHLagd ( const Number *  d,
const Number *  x,
bool  new_x,
const Number *  lambda,
bool  new_lambda,
Number &  dTHLagd 
) [private]

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.

Definition at line 112 of file BonCurvatureEstimator.hpp.

Definition at line 113 of file BonCurvatureEstimator.hpp.

Definition at line 114 of file BonCurvatureEstimator.hpp.

Definition at line 115 of file BonCurvatureEstimator.hpp.

Definition at line 116 of file BonCurvatureEstimator.hpp.

Definition at line 117 of file BonCurvatureEstimator.hpp.

Definition at line 118 of file BonCurvatureEstimator.hpp.

Definition at line 119 of file BonCurvatureEstimator.hpp.

Definition at line 120 of file BonCurvatureEstimator.hpp.

Definition at line 121 of file BonCurvatureEstimator.hpp.

Definition at line 122 of file BonCurvatureEstimator.hpp.

Number of free x variables.

Definition at line 129 of file BonCurvatureEstimator.hpp.

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

Definition at line 132 of file BonCurvatureEstimator.hpp.

Number of active constraints.

Definition at line 134 of file BonCurvatureEstimator.hpp.

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

Definition at line 137 of file BonCurvatureEstimator.hpp.

Number of free x variables.

Definition at line 144 of file BonCurvatureEstimator.hpp.

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

Definition at line 147 of file BonCurvatureEstimator.hpp.

Number of active constraints.

Definition at line 149 of file BonCurvatureEstimator.hpp.

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

Definition at line 152 of file BonCurvatureEstimator.hpp.

Space for most recent computed least-square multipliers.

Definition at line 156 of file BonCurvatureEstimator.hpp.

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.

Definition at line 195 of file BonCurvatureEstimator.hpp.


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