BonCurvatureEstimator.hpp
Go to the documentation of this file.
1 // Copyright (C) 2006 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: BonCurvatureEstimator.hpp 2106 2015-01-20 10:33:55Z stefan $
6 //
7 // Author: Andreas Waechter IBM 2006-10-11
8 
9 #ifndef __BONCURVATUREESTIMATOR_HPP__
10 #define __BONCURVATUREESTIMATOR_HPP__
11 #error "Not supported currently"
12 #include "IpTNLP.hpp"
13 #include "IpOptionsList.hpp"
14 #include "IpCompoundSymMatrix.hpp"
15 #include "IpCompoundVector.hpp"
16 #include <vector>
17 
18 namespace Ipopt {
19  //forward declarations
20  class TSymLinearSolver;
21 }
22 
23 namespace Bonmin
24 {
25  using namespace Ipopt;
26 
29  class CurvatureEstimator: public ReferencedObject
30  {
31  public:
38  SmartPtr<OptionsList> options,
39  SmartPtr<TNLP> tnlp);
40 
42  virtual ~CurvatureEstimator();
44 
56  bool ComputeNullSpaceCurvature(
57  int n,
58  const Number* x,
59  bool new_x,
60  const Number* x_l,
61  const Number* x_u,
62  const Number* g_l,
63  const Number* g_u,
64  bool new_bounds,
65  const Number* z_L,
66  const Number* z_U,
67  int m,
68  const Number* lam,
69  bool new_mults,
70  const Number* orig_d,
71  Number* projected_d,
72  Number& gradLagTd,
73  Number& dTHLagd);
74 
75  private:
86 
89 
91  void operator=(const CurvatureEstimator&);
93 
100  std::string prefix_;
108 
112  Index n_;
113  Number* grad_f_;
114  Index m_;
115  Index nnz_jac_;
116  Index* irows_jac_;
117  Index* jcols_jac_;
118  Number* jac_vals_;
119  Index nnz_hess_;
120  Index* irows_hess_;
121  Index* jcols_hess_;
122  Number* hess_vals_;
124 
129  Index eq_nx_free_;
139 
154 
156  Number* lambda_;
157 
162 
175 
188 
191  std::vector<int> active_x_;
192  std::vector<int> active_g_;
194 
196 
197  bool Initialize();
198 
199  bool PrepareNewMatrixStructure(
200  const Number* x_l,
201  const Number* x_u,
202  const Number* g_l,
203  const Number* g_u,
204  std::vector<int>& active_x,
205  std::vector<int>& active_g,
206  Index& nx_free,
207  Index* x_free_map,
208  Index& ng_fixed,
209  Index* g_fixed_map,
210  SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
211  SmartPtr<CompoundVectorSpace>& comp_vec_space);
212 
213  bool PrepareNewMatrixValues(
214  const Index* x_free_map,
215  const Index* g_fixed_map,
216  SmartPtr<CompoundSymMatrixSpace>& comp_proj_matrix_space,
217  SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
218  SmartPtr<TSymLinearSolver>& tsymlinearsolver);
219 
220  bool SolveSystem(
221  const Number* rhs_x,
222  const Number* rhs_g,
223  Number* sol_x, Number* sol_g,
224  const Index* x_free_map,
225  const Index* g_fixed_map,
226  SmartPtr<CompoundVectorSpace>& comp_vec_space,
227  SmartPtr<CompoundSymMatrix>& comp_proj_matrix,
228  SmartPtr<TSymLinearSolver>& tsymlinearsolver);
229 
230  bool Compute_dTHLagd(
231  const Number* d, const Number* x, bool new_x, const Number* lambda,
232  bool new_lambda, Number& dTHLagd);
233  };
234 
235 } // namespace Ipopt
236 #endif
Index eq_ng_fixed_
Number of active constraints.
Index * eq_x_free_map_
Map for pointing from the original x space to the one without fixed variables.
std::string prefix_
prefix to be used when parsion the options for the linear solver
SmartPtr< CompoundSymMatrix > eq_comp_proj_matrix_
Compound Matrix storing the current projection matrix.
SmartPtr< CompoundSymMatrixSpace > eq_comp_proj_matrix_space_
Compound Matrix space for storing the linear system for the projection.
SmartPtr< TSymLinearSolver > all_tsymlinearsolver_
Strategy object for solving the projection matrix for all active constraints.
SmartPtr< TSymLinearSolver > eq_tsymlinearsolver_
Strategy object for solving the projection matrix for equality constraints only.
SmartPtr< Journalist > jnlst_
prefix to be used when parsion the options for the linear solver
SmartPtr< CompoundVectorSpace > eq_comp_vec_space_
Compound Vector space for storing right hand side and solution for the projection system...
SmartPtr< CompoundSymMatrix > all_comp_proj_matrix_
Compound Matrix storing the current projection matrix.
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.
std::vector< int > active_x_
Storing the activities.
SmartPtr< CompoundVectorSpace > all_comp_vec_space_
Compound Vector space for storing right hand side and solution for the projection system...
Number * eq_projected_d_
Space for storing the direction projected into the equality constraints only.
void fint fint fint fint fint fint fint fint fint fint real real real real real real real real real fint real fint real * lam
Index all_nx_free_
Number of free x variables.
Index * all_g_fixed_map_
Map for pointing from the original constraint space to the one with only active constraints.
SmartPtr< CompoundSymMatrixSpace > all_comp_proj_matrix_space_
Compound Matrix space for storing the linear system for the projection.
std::vector< int > active_g_
Storing the activities.
void fint * m
SmartPtr< OptionsList > options_
prefix to be used when parsion the options for the linear solver
Index * eq_g_fixed_map_
Map for pointing from the original constraint space to the one with only active constraints.
Number * lambda_
Space for most recent computed least-square multipliers.
void fint * n
void fint fint fint real fint real * x
Index eq_nx_free_
Number of free x variables.