Bonmin 1.8.9
Loading...
Searching...
No Matches
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$
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"
15#include "IpCompoundVector.hpp"
16#include <vector>
17
18namespace Ipopt {
19 //forward declarations
20 class TSymLinearSolver;
21}
22
23namespace Bonmin
24{
25 using namespace Ipopt;
26
30 {
31 public:
39 SmartPtr<TNLP> tnlp);
40
44
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
97 SmartPtr<OptionsList> options_;
100 std::string prefix_;
103 SmartPtr<TSymLinearSolver> eq_tsymlinearsolver_;
106 SmartPtr<TSymLinearSolver> all_tsymlinearsolver_;
108
111 SmartPtr<TNLP> tnlp_;
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_;
132 Index* eq_x_free_map_;
134 Index eq_ng_fixed_;
137 Index* eq_g_fixed_map_;
139
144 Index all_nx_free_;
147 Index* all_x_free_map_;
149 Index all_ng_fixed_;
152 Index* all_g_fixed_map_;
154
156 Number* lambda_;
157
161 Number* eq_projected_d_;
162
168 SmartPtr<CompoundSymMatrixSpace> eq_comp_proj_matrix_space_;
170 SmartPtr<CompoundSymMatrix> eq_comp_proj_matrix_;
173 SmartPtr<CompoundVectorSpace> eq_comp_vec_space_;
175
181 SmartPtr<CompoundSymMatrixSpace> all_comp_proj_matrix_space_;
183 SmartPtr<CompoundSymMatrix> all_comp_proj_matrix_;
186 SmartPtr<CompoundVectorSpace> all_comp_vec_space_;
188
191 std::vector<int> active_x_;
192 std::vector<int> active_g_;
194
195 bool initialized_;
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
virtual ~CurvatureEstimator()
Destructor.
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 ...
CurvatureEstimator(SmartPtr< Journalist > jnlst, SmartPtr< OptionsList > options, SmartPtr< TNLP > tnlp)
Constructor.
(C) Copyright International Business Machines Corporation 2007
ipindex Index
ipnumber Number