Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpQualityFunctionMuOracle.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2006 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpQualityFunctionMuOracle.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Andreas Waechter IBM 2004-11-12
8
9 #ifndef __IPQUALITYFUNCTIONMUORACLE_HPP__
10 #define __IPQUALITYFUNCTIONMUORACLE_HPP__
11
12 #include "IpMuOracle.hpp"
13 #include "IpPDSystemSolver.hpp"
14 #include "IpIpoptCalculatedQuantities.hpp"
15
16 namespace Ipopt
17 {
18
22 class QualityFunctionMuOracle : public MuOracle
23 {
24 public:
28 QualityFunctionMuOracle(const SmartPtr<PDSystemSolver>& pd_solver);
30 virtual ~QualityFunctionMuOracle();
32
34 virtual bool InitializeImpl(const OptionsList& options,
35 const std::string& prefix);
36
40 virtual bool CalculateMu(Number mu_min, Number mu_max, Number& new_mu);
41
44 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
46
51 enum NormEnum
52 {
53 NM_NORM_1=0,
54 NM_NORM_2_SQUARED,
55 NM_NORM_MAX,
56 NM_NORM_2
57 };
59 enum CentralityEnum
60 {
61 CEN_NONE=0,
62 CEN_LOG,
63 CEN_RECIPROCAL,
64 CEN_CUBED_RECIPROCAL
65 };
67 enum BalancingTermEnum
68 {
69 BT_NONE=0,
70 BT_CUBIC
71 };
73
74 private:
83
85 QualityFunctionMuOracle();
87 QualityFunctionMuOracle(const QualityFunctionMuOracle&);
88
90 void operator=(const QualityFunctionMuOracle&);
92
96 SmartPtr<PDSystemSolver> pd_solver_;
97
101 // ToDo Replace pointers by references
102 Number CalculateQualityFunction(Number sigma,
103 const Vector& step_aff_x_L,
104 const Vector& step_aff_x_U,
105 const Vector& step_aff_s_L,
106 const Vector& step_aff_s_U,
107 const Vector& step_aff_y_c,
108 const Vector& step_aff_y_d,
109 const Vector& step_aff_z_L,
110 const Vector& step_aff_z_U,
111 const Vector& step_aff_v_L,
112 const Vector& step_aff_v_U,
113 const Vector& step_cen_x_L,
114 const Vector& step_cen_x_U,
115 const Vector& step_cen_s_L,
116 const Vector& step_cen_s_U,
117 const Vector& step_cen_y_c,
118 const Vector& step_cen_y_d,
119 const Vector& step_cen_z_L,
120 const Vector& step_cen_z_U,
121 const Vector& step_cen_v_L,
122 const Vector& step_cen_v_U);
123
125 Number PerformGoldenSection(Number sigma_up,
126 Number q_up,
127 Number sigma_lo,
128 Number q_lo,
129 Number sigma_tol,
130 Number qf_tol,
131 const Vector& step_aff_x_L,
132 const Vector& step_aff_x_U,
133 const Vector& step_aff_s_L,
134 const Vector& step_aff_s_U,
135 const Vector& step_aff_y_c,
136 const Vector& step_aff_y_d,
137 const Vector& step_aff_z_L,
138 const Vector& step_aff_z_U,
139 const Vector& step_aff_v_L,
140 const Vector& step_aff_v_U,
141 const Vector& step_cen_x_L,
142 const Vector& step_cen_x_U,
143 const Vector& step_cen_s_L,
144 const Vector& step_cen_s_U,
145 const Vector& step_cen_y_c,
146 const Vector& step_cen_y_d,
147 const Vector& step_cen_z_L,
148 const Vector& step_cen_z_U,
149 const Vector& step_cen_v_L,
150 const Vector& step_cen_v_U);
151
155 Number ScaleSigma(Number sigma);
156 Number UnscaleSigma(Number scaled_sigma);
158
161 /* This doesn't seem to work well, so I took it out for now (AW)
162 Number PerformGoldenSectionLog(Number sigma_up,
163 Number sigma_lo,
164 Number tol,
165 const Vector& step_aff_x_L,
166 const Vector& step_aff_x_U,
167 const Vector& step_aff_s_L,
168 const Vector& step_aff_s_U,
169 const Vector& step_aff_y_c,
170 const Vector& step_aff_y_d,
171 const Vector& step_aff_z_L,
172 const Vector& step_aff_z_U,
173 const Vector& step_aff_v_L,
174 const Vector& step_aff_v_U,
175 const Vector& step_cen_x_L,
176 const Vector& step_cen_x_U,
177 const Vector& step_cen_s_L,
178 const Vector& step_cen_s_U,
179 const Vector& step_cen_y_c,
180 const Vector& step_cen_y_d,
181 const Vector& step_cen_z_L,
182 const Vector& step_cen_z_U,
183 const Vector& step_cen_v_L,
184 const Vector& step_cen_v_U);
185 */
186
190 Number sigma_max_;
192 Number sigma_min_;
194 NormEnum quality_function_norm_;
197 CentralityEnum quality_function_centrality_;
201 BalancingTermEnum quality_function_balancing_term_;
204 Number quality_function_section_sigma_tol_;
207 Number quality_function_section_qf_tol_;
210 Index quality_function_max_section_steps_;
212
216 SmartPtr<Vector> tmp_step_x_L_;
217 SmartPtr<Vector> tmp_step_x_U_;
218 SmartPtr<Vector> tmp_step_s_L_;
219 SmartPtr<Vector> tmp_step_s_U_;
220 SmartPtr<Vector> tmp_step_z_L_;
221 SmartPtr<Vector> tmp_step_z_U_;
222 SmartPtr<Vector> tmp_step_v_L_;
223 SmartPtr<Vector> tmp_step_v_U_;
224
225 SmartPtr<Vector> tmp_slack_x_L_;
226 SmartPtr<Vector> tmp_slack_x_U_;
227 SmartPtr<Vector> tmp_slack_s_L_;
228 SmartPtr<Vector> tmp_slack_s_U_;
229 SmartPtr<Vector> tmp_z_L_;
230 SmartPtr<Vector> tmp_z_U_;
231 SmartPtr<Vector> tmp_v_L_;
232 SmartPtr<Vector> tmp_v_U_;
234
235 /* Counter for the qualify function evaluations */
236 Index count_qf_evals_;
237
243 bool initialized_;
244 Index n_dual_;
245 Index n_pri_;
246 Index n_comp_;
247
248 SmartPtr<const Vector> curr_slack_x_L_;
249 SmartPtr<const Vector> curr_slack_x_U_;
250 SmartPtr<const Vector> curr_slack_s_L_;
251 SmartPtr<const Vector> curr_slack_s_U_;
252
253 SmartPtr<const Vector> curr_z_L_;
254 SmartPtr<const Vector> curr_z_U_;
255 SmartPtr<const Vector> curr_v_L_;
256 SmartPtr<const Vector> curr_v_U_;
257
258 Number curr_grad_lag_x_asum_;
259 Number curr_grad_lag_s_asum_;
260 Number curr_c_asum_;
261 Number curr_d_minus_s_asum_;
262
263 Number curr_grad_lag_x_nrm2_;
264 Number curr_grad_lag_s_nrm2_;
265 Number curr_c_nrm2_;
266 Number curr_d_minus_s_nrm2_;
267
268 Number curr_grad_lag_x_amax_;
269 Number curr_grad_lag_s_amax_;
270 Number curr_c_amax_;
271 Number curr_d_minus_s_amax_;
273 };
274
275 } // namespace Ipopt
276
277 #endif
Ipopt::QualityFunctionMuOracle::quality_function_max_section_steps_
Index quality_function_max_section_steps_
Maximal number of bi-section steps in the golden section search for sigma.
Definition: IpQualityFunctionMuOracle.hpp:210
Ipopt::QualityFunctionMuOracle::BT_NONE
Definition: IpQualityFunctionMuOracle.hpp:69
Ipopt::QualityFunctionMuOracle::CEN_RECIPROCAL
Definition: IpQualityFunctionMuOracle.hpp:63
Ipopt::QualityFunctionMuOracle::tmp_z_U_
SmartPtr< Vector > tmp_z_U_
Definition: IpQualityFunctionMuOracle.hpp:230
Ipopt::QualityFunctionMuOracle::curr_grad_lag_x_amax_
Number curr_grad_lag_x_amax_
Definition: IpQualityFunctionMuOracle.hpp:268
Ipopt::QualityFunctionMuOracle
Implementation of the probing strategy for computing the barrier parameter.
Definition: IpQualityFunctionMuOracle.hpp:22
IpPDSystemSolver.hpp
Ipopt::QualityFunctionMuOracle::curr_slack_s_L_
SmartPtr< const Vector > curr_slack_s_L_
Definition: IpQualityFunctionMuOracle.hpp:250
Ipopt::QualityFunctionMuOracle::tmp_step_z_L_
SmartPtr< Vector > tmp_step_z_L_
Definition: IpQualityFunctionMuOracle.hpp:220
IpIpoptCalculatedQuantities.hpp
Ipopt::QualityFunctionMuOracle::tmp_step_v_U_
SmartPtr< Vector > tmp_step_v_U_
Definition: IpQualityFunctionMuOracle.hpp:223
Ipopt::QualityFunctionMuOracle::quality_function_centrality_
CentralityEnum quality_function_centrality_
Flag indicating how centrality should be involved in the quality function.
Definition: IpQualityFunctionMuOracle.hpp:197
Ipopt::QualityFunctionMuOracle::curr_grad_lag_x_asum_
Number curr_grad_lag_x_asum_
Definition: IpQualityFunctionMuOracle.hpp:258
Ipopt::QualityFunctionMuOracle::CEN_NONE
Definition: IpQualityFunctionMuOracle.hpp:61
Ipopt::QualityFunctionMuOracle::curr_slack_s_U_
SmartPtr< const Vector > curr_slack_s_U_
Definition: IpQualityFunctionMuOracle.hpp:251
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::QualityFunctionMuOracle::n_dual_
Index n_dual_
Definition: IpQualityFunctionMuOracle.hpp:244
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:47
Ipopt::QualityFunctionMuOracle::sigma_max_
Number sigma_max_
Upper bound on centering parameter sigma.
Definition: IpQualityFunctionMuOracle.hpp:190
Ipopt::QualityFunctionMuOracle::PerformGoldenSection
Number PerformGoldenSection(Number sigma_up, Number q_up, Number sigma_lo, Number q_lo, Number sigma_tol, Number qf_tol, const Vector &step_aff_x_L, const Vector &step_aff_x_U, const Vector &step_aff_s_L, const Vector &step_aff_s_U, const Vector &step_aff_y_c, const Vector &step_aff_y_d, const Vector &step_aff_z_L, const Vector &step_aff_z_U, const Vector &step_aff_v_L, const Vector &step_aff_v_U, const Vector &step_cen_x_L, const Vector &step_cen_x_U, const Vector &step_cen_s_L, const Vector &step_cen_s_U, const Vector &step_cen_y_c, const Vector &step_cen_y_d, const Vector &step_cen_z_L, const Vector &step_cen_z_U, const Vector &step_cen_v_L, const Vector &step_cen_v_U)
Auxilliary function performing the golden section.
Ipopt::QualityFunctionMuOracle::quality_function_section_sigma_tol_
Number quality_function_section_sigma_tol_
Relative tolerance for golden bi-section algorithm in sigma space.
Definition: IpQualityFunctionMuOracle.hpp:204
Ipopt::QualityFunctionMuOracle::n_comp_
Index n_comp_
Definition: IpQualityFunctionMuOracle.hpp:246
Ipopt::QualityFunctionMuOracle::curr_c_amax_
Number curr_c_amax_
Definition: IpQualityFunctionMuOracle.hpp:270
Ipopt::QualityFunctionMuOracle::tmp_slack_x_L_
SmartPtr< Vector > tmp_slack_x_L_
Definition: IpQualityFunctionMuOracle.hpp:225
Ipopt::QualityFunctionMuOracle::curr_z_U_
SmartPtr< const Vector > curr_z_U_
Definition: IpQualityFunctionMuOracle.hpp:254
Ipopt::QualityFunctionMuOracle::tmp_step_s_U_
SmartPtr< Vector > tmp_step_s_U_
Definition: IpQualityFunctionMuOracle.hpp:219
Ipopt::QualityFunctionMuOracle::curr_d_minus_s_asum_
Number curr_d_minus_s_asum_
Definition: IpQualityFunctionMuOracle.hpp:261
Ipopt::QualityFunctionMuOracle::curr_grad_lag_s_amax_
Number curr_grad_lag_s_amax_
Definition: IpQualityFunctionMuOracle.hpp:269
Ipopt::MuOracle
Abstract Base Class for classes that are able to compute a suggested value of the barrier parameter t...
Definition: IpMuOracle.hpp:21
Ipopt::QualityFunctionMuOracle::sigma_min_
Number sigma_min_
Lower bound on centering parameter sigma.
Definition: IpQualityFunctionMuOracle.hpp:192
Ipopt::QualityFunctionMuOracle::curr_slack_x_L_
SmartPtr< const Vector > curr_slack_x_L_
Definition: IpQualityFunctionMuOracle.hpp:248
Ipopt::QualityFunctionMuOracle::curr_slack_x_U_
SmartPtr< const Vector > curr_slack_x_U_
Definition: IpQualityFunctionMuOracle.hpp:249
Ipopt::QualityFunctionMuOracle::ScaleSigma
Number ScaleSigma(Number sigma)
Auxilliary functions for scaling the sigma axis in the golden section procedure.
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::QualityFunctionMuOracle::CEN_LOG
Definition: IpQualityFunctionMuOracle.hpp:62
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::QualityFunctionMuOracle::tmp_step_v_L_
SmartPtr< Vector > tmp_step_v_L_
Definition: IpQualityFunctionMuOracle.hpp:222
Ipopt::QualityFunctionMuOracle::tmp_step_s_L_
SmartPtr< Vector > tmp_step_s_L_
Definition: IpQualityFunctionMuOracle.hpp:218
Ipopt::QualityFunctionMuOracle::curr_c_asum_
Number curr_c_asum_
Definition: IpQualityFunctionMuOracle.hpp:260
Ipopt::QualityFunctionMuOracle::curr_grad_lag_s_nrm2_
Number curr_grad_lag_s_nrm2_
Definition: IpQualityFunctionMuOracle.hpp:264
Ipopt::QualityFunctionMuOracle::tmp_step_z_U_
SmartPtr< Vector > tmp_step_z_U_
Definition: IpQualityFunctionMuOracle.hpp:221
Ipopt::QualityFunctionMuOracle::tmp_v_L_
SmartPtr< Vector > tmp_v_L_
Definition: IpQualityFunctionMuOracle.hpp:231
Ipopt::QualityFunctionMuOracle::curr_z_L_
SmartPtr< const Vector > curr_z_L_
Definition: IpQualityFunctionMuOracle.hpp:253
Ipopt::QualityFunctionMuOracle::tmp_v_U_
SmartPtr< Vector > tmp_v_U_
Definition: IpQualityFunctionMuOracle.hpp:232
Ipopt::QualityFunctionMuOracle::QualityFunctionMuOracle
QualityFunctionMuOracle()
Default Constructor.
Ipopt::QualityFunctionMuOracle::CEN_CUBED_RECIPROCAL
Definition: IpQualityFunctionMuOracle.hpp:64
Ipopt::QualityFunctionMuOracle::curr_d_minus_s_nrm2_
Number curr_d_minus_s_nrm2_
Definition: IpQualityFunctionMuOracle.hpp:266
Ipopt::QualityFunctionMuOracle::quality_function_norm_
NormEnum quality_function_norm_
Norm to be used for the quality function.
Definition: IpQualityFunctionMuOracle.hpp:194
Ipopt::QualityFunctionMuOracle::tmp_step_x_U_
SmartPtr< Vector > tmp_step_x_U_
Definition: IpQualityFunctionMuOracle.hpp:217
Ipopt::QualityFunctionMuOracle::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
IpMuOracle.hpp
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::QualityFunctionMuOracle::quality_function_section_qf_tol_
Number quality_function_section_qf_tol_
Relative tolerance for golden bi-section algorithm in function value space.
Definition: IpQualityFunctionMuOracle.hpp:207
Ipopt::QualityFunctionMuOracle::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::QualityFunctionMuOracle::NM_NORM_2
Definition: IpQualityFunctionMuOracle.hpp:56
Ipopt::QualityFunctionMuOracle::BalancingTermEnum
BalancingTermEnum
enum for the quality function balancing term type
Definition: IpQualityFunctionMuOracle.hpp:67
Ipopt::QualityFunctionMuOracle::tmp_slack_x_U_
SmartPtr< Vector > tmp_slack_x_U_
Definition: IpQualityFunctionMuOracle.hpp:226
Ipopt::QualityFunctionMuOracle::count_qf_evals_
Index count_qf_evals_
Definition: IpQualityFunctionMuOracle.hpp:236
Ipopt::QualityFunctionMuOracle::curr_d_minus_s_amax_
Number curr_d_minus_s_amax_
Definition: IpQualityFunctionMuOracle.hpp:271
Ipopt::QualityFunctionMuOracle::tmp_slack_s_L_
SmartPtr< Vector > tmp_slack_s_L_
Definition: IpQualityFunctionMuOracle.hpp:227
Ipopt::QualityFunctionMuOracle::curr_c_nrm2_
Number curr_c_nrm2_
Definition: IpQualityFunctionMuOracle.hpp:265
Ipopt::QualityFunctionMuOracle::NM_NORM_2_SQUARED
Definition: IpQualityFunctionMuOracle.hpp:54
Ipopt::QualityFunctionMuOracle::tmp_z_L_
SmartPtr< Vector > tmp_z_L_
Definition: IpQualityFunctionMuOracle.hpp:229
Ipopt::QualityFunctionMuOracle::n_pri_
Index n_pri_
Definition: IpQualityFunctionMuOracle.hpp:245
Ipopt::QualityFunctionMuOracle::curr_v_U_
SmartPtr< const Vector > curr_v_U_
Definition: IpQualityFunctionMuOracle.hpp:256
Ipopt::QualityFunctionMuOracle::NormEnum
NormEnum
enum for norm type
Definition: IpQualityFunctionMuOracle.hpp:51
Ipopt::QualityFunctionMuOracle::tmp_slack_s_U_
SmartPtr< Vector > tmp_slack_s_U_
Definition: IpQualityFunctionMuOracle.hpp:228
Ipopt::QualityFunctionMuOracle::quality_function_balancing_term_
BalancingTermEnum quality_function_balancing_term_
Flag indicating whether we use a balancing term in the quality function.
Definition: IpQualityFunctionMuOracle.hpp:201
Ipopt::QualityFunctionMuOracle::curr_grad_lag_s_asum_
Number curr_grad_lag_s_asum_
Definition: IpQualityFunctionMuOracle.hpp:259
Ipopt::QualityFunctionMuOracle::initialized_
bool initialized_
Definition: IpQualityFunctionMuOracle.hpp:243
Ipopt::QualityFunctionMuOracle::UnscaleSigma
Number UnscaleSigma(Number scaled_sigma)
Ipopt::QualityFunctionMuOracle::~QualityFunctionMuOracle
virtual ~QualityFunctionMuOracle()
Default destructor.
Ipopt::QualityFunctionMuOracle::CalculateMu
virtual bool CalculateMu(Number mu_min, Number mu_max, Number &new_mu)
Method for computing the value of the barrier parameter that could be used in the current iteration (...
Ipopt::QualityFunctionMuOracle::tmp_step_x_L_
SmartPtr< Vector > tmp_step_x_L_
Definition: IpQualityFunctionMuOracle.hpp:216
Ipopt::QualityFunctionMuOracle::NM_NORM_1
Definition: IpQualityFunctionMuOracle.hpp:53
Ipopt::QualityFunctionMuOracle::operator=
void operator=(const QualityFunctionMuOracle &)
Overloaded Equals Operator.
Ipopt::QualityFunctionMuOracle::CalculateQualityFunction
Number CalculateQualityFunction(Number sigma, const Vector &step_aff_x_L, const Vector &step_aff_x_U, const Vector &step_aff_s_L, const Vector &step_aff_s_U, const Vector &step_aff_y_c, const Vector &step_aff_y_d, const Vector &step_aff_z_L, const Vector &step_aff_z_U, const Vector &step_aff_v_L, const Vector &step_aff_v_U, const Vector &step_cen_x_L, const Vector &step_cen_x_U, const Vector &step_cen_s_L, const Vector &step_cen_s_U, const Vector &step_cen_y_c, const Vector &step_cen_y_d, const Vector &step_cen_z_L, const Vector &step_cen_z_U, const Vector &step_cen_v_L, const Vector &step_cen_v_U)
Auxilliary function for computing the average complementarity at a point, given step sizes and step...
Ipopt::QualityFunctionMuOracle::pd_solver_
SmartPtr< PDSystemSolver > pd_solver_
Pointer to the object that should be used to solve the primal-dual system.
Definition: IpQualityFunctionMuOracle.hpp:96
Ipopt::QualityFunctionMuOracle::CentralityEnum
CentralityEnum
enum for centrality type
Definition: IpQualityFunctionMuOracle.hpp:59
Ipopt::QualityFunctionMuOracle::NM_NORM_MAX
Definition: IpQualityFunctionMuOracle.hpp:55
Ipopt::QualityFunctionMuOracle::curr_v_L_
SmartPtr< const Vector > curr_v_L_
Definition: IpQualityFunctionMuOracle.hpp:255
Ipopt::QualityFunctionMuOracle::curr_grad_lag_x_nrm2_
Number curr_grad_lag_x_nrm2_
Definition: IpQualityFunctionMuOracle.hpp:263
Ipopt::QualityFunctionMuOracle::BT_CUBIC
Definition: IpQualityFunctionMuOracle.hpp:70