Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpPDPerturbationHandler.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2007 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpPDPerturbationHandler.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2005-08-04
8
9 #ifndef __IPPDPERTURBATIONHANDLER_HPP__
10 #define __IPPDPERTURBATIONHANDLER_HPP__
11
12 #include "IpAlgStrategy.hpp"
13
14 namespace Ipopt
15 {
16
24 class PDPerturbationHandler: public AlgorithmStrategyObject
25 {
26 public:
30 PDPerturbationHandler();
32 virtual ~PDPerturbationHandler()
33 {}
35
36 /* overloaded from AlgorithmStrategyObject */
37 virtual bool InitializeImpl(const OptionsList& options,
38 const std::string& prefix);
39
46 virtual bool ConsiderNewSystem(Number& delta_x, Number& delta_s,
47 Number& delta_c, Number& delta_d);
48
53 virtual bool PerturbForSingularity(Number& delta_x, Number& delta_s,
54 Number& delta_c, Number& delta_d);
55
60 virtual bool PerturbForWrongInertia(Number& delta_x, Number& delta_s,
61 Number& delta_c, Number& delta_d);
62
65 virtual void CurrentPerturbation(Number& delta_x, Number& delta_s,
66 Number& delta_c, Number& delta_d);
67
70 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
72
73 protected:
83 PDPerturbationHandler(const PDPerturbationHandler&);
84
86 void operator=(const PDPerturbationHandler&);
88
92 Number delta_x_last_;
94 Number delta_s_last_;
96 Number delta_c_last_;
98 Number delta_d_last_;
100
105 Number delta_x_curr_;
107 Number delta_s_curr_;
109 Number delta_c_curr_;
111 Number delta_d_curr_;
113
116 bool get_deltas_for_wrong_inertia_called_;
117
121 enum DegenType
122 {
123 NOT_YET_DETERMINED,
124 NOT_DEGENERATE,
125 DEGENERATE
126 };
127
130 DegenType hess_degenerate_;
131
134 DegenType jac_degenerate_;
135
139 Index degen_iters_;
140
142 enum TrialStatus
143 {
144 NO_TEST,
145 TEST_DELTA_C_EQ_0_DELTA_X_EQ_0,
146 TEST_DELTA_C_GT_0_DELTA_X_EQ_0,
147 TEST_DELTA_C_EQ_0_DELTA_X_GT_0,
148 TEST_DELTA_C_GT_0_DELTA_X_GT_0
149 };
150
152 TrialStatus test_status_;
154
158 Number delta_xs_max_;
160 Number delta_xs_min_;
162 Number delta_xs_first_inc_fact_;
164 Number delta_xs_inc_fact_;
166 Number delta_xs_dec_fact_;
168 Number delta_xs_init_;
170 Number delta_cd_val_;
172 Number delta_cd_exp_;
176 bool reset_last_;
178 Index degen_iters_max_;
181 bool perturb_always_cd_;
183
189 bool get_deltas_for_wrong_inertia(Number& delta_x, Number& delta_s,
190 Number& delta_c, Number& delta_d);
191
195 void finalize_test();
197 Number delta_cd();
199
200 };
201
202 } // namespace Ipopt
203
204 #endif
Ipopt::PDPerturbationHandler::CurrentPerturbation
virtual void CurrentPerturbation(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
Just return the perturbation values that have been determined most recently.
IpAlgStrategy.hpp
Ipopt::PDPerturbationHandler::delta_x_last_
Number delta_x_last_
The last nonzero value for delta_x.
Definition: IpPDPerturbationHandler.hpp:92
Ipopt::PDPerturbationHandler::TEST_DELTA_C_GT_0_DELTA_X_EQ_0
Definition: IpPDPerturbationHandler.hpp:146
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::PDPerturbationHandler::delta_xs_inc_fact_
Number delta_xs_inc_fact_
Increase factor for delta_xs for later perturbations.
Definition: IpPDPerturbationHandler.hpp:164
Ipopt::PDPerturbationHandler::TEST_DELTA_C_GT_0_DELTA_X_GT_0
Definition: IpPDPerturbationHandler.hpp:148
Ipopt::PDPerturbationHandler::DegenType
DegenType
Type for degeneracy flags.
Definition: IpPDPerturbationHandler.hpp:121
Ipopt::PDPerturbationHandler::delta_d_curr_
Number delta_d_curr_
The current value for delta_d.
Definition: IpPDPerturbationHandler.hpp:111
Ipopt::PDPerturbationHandler::delta_xs_first_inc_fact_
Number delta_xs_first_inc_fact_
Increase factor for delta_xs for first required perturbation.
Definition: IpPDPerturbationHandler.hpp:162
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::PDPerturbationHandler::NO_TEST
Definition: IpPDPerturbationHandler.hpp:144
Ipopt::PDPerturbationHandler::delta_d_last_
Number delta_d_last_
The last nonzero value for delta_d.
Definition: IpPDPerturbationHandler.hpp:98
Ipopt::PDPerturbationHandler
Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual...
Definition: IpPDPerturbationHandler.hpp:24
Ipopt::PDPerturbationHandler::get_deltas_for_wrong_inertia_called_
bool get_deltas_for_wrong_inertia_called_
Flag indicating if for the given matrix the perturb for wrong inertia method has already been called...
Definition: IpPDPerturbationHandler.hpp:116
Ipopt::PDPerturbationHandler::jac_degenerate_
DegenType jac_degenerate_
Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient...
Definition: IpPDPerturbationHandler.hpp:134
Ipopt::PDPerturbationHandler::delta_xs_min_
Number delta_xs_min_
Smallest possible perturbation for x and s.
Definition: IpPDPerturbationHandler.hpp:160
Ipopt::PDPerturbationHandler::DEGENERATE
Definition: IpPDPerturbationHandler.hpp:125
Ipopt::PDPerturbationHandler::ConsiderNewSystem
virtual bool ConsiderNewSystem(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
This method must be called for each new matrix, and before any other method for generating perturbati...
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::PDPerturbationHandler::get_deltas_for_wrong_inertia
bool get_deltas_for_wrong_inertia(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
Internal version of PerturbForWrongInertia with the difference, that finalize_test is not called...
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::PDPerturbationHandler::delta_xs_init_
Number delta_xs_init_
Very first trial value for delta_xs perturbation.
Definition: IpPDPerturbationHandler.hpp:168
Ipopt::PDPerturbationHandler::delta_x_curr_
Number delta_x_curr_
The current value for delta_x.
Definition: IpPDPerturbationHandler.hpp:105
Ipopt::PDPerturbationHandler::delta_cd_val_
Number delta_cd_val_
Size of perturbation for c and d blocks.
Definition: IpPDPerturbationHandler.hpp:170
Ipopt::PDPerturbationHandler::NOT_YET_DETERMINED
Definition: IpPDPerturbationHandler.hpp:123
Ipopt::PDPerturbationHandler::delta_xs_dec_fact_
Number delta_xs_dec_fact_
Decrease factor for delta_xs for later perturbations.
Definition: IpPDPerturbationHandler.hpp:166
Ipopt::PDPerturbationHandler::PerturbForSingularity
virtual bool PerturbForSingularity(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
This method returns pertubation factors for the case when the most recent factorization resulted in a...
Ipopt::PDPerturbationHandler::TEST_DELTA_C_EQ_0_DELTA_X_GT_0
Definition: IpPDPerturbationHandler.hpp:147
Ipopt::PDPerturbationHandler::delta_s_last_
Number delta_s_last_
The last nonzero value for delta_s.
Definition: IpPDPerturbationHandler.hpp:94
Ipopt::PDPerturbationHandler::delta_cd
Number delta_cd()
Compute perturbation value for constraints.
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::PDPerturbationHandler::finalize_test
void finalize_test()
This method is call whenever a matrix had been factorization and is not singular. ...
Ipopt::PDPerturbationHandler::TEST_DELTA_C_EQ_0_DELTA_X_EQ_0
Definition: IpPDPerturbationHandler.hpp:145
Ipopt::PDPerturbationHandler::PDPerturbationHandler
PDPerturbationHandler()
Default Constructor.
Ipopt::PDPerturbationHandler::delta_s_curr_
Number delta_s_curr_
The current value for delta_s.
Definition: IpPDPerturbationHandler.hpp:107
Ipopt::PDPerturbationHandler::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class...
Ipopt::PDPerturbationHandler::delta_c_curr_
Number delta_c_curr_
The current value for delta_c.
Definition: IpPDPerturbationHandler.hpp:109
Ipopt::PDPerturbationHandler::degen_iters_max_
Index degen_iters_max_
Required number of iterations for degeneracy conclusions.
Definition: IpPDPerturbationHandler.hpp:178
Ipopt::PDPerturbationHandler::test_status_
TrialStatus test_status_
Current status.
Definition: IpPDPerturbationHandler.hpp:152
Ipopt::PDPerturbationHandler::~PDPerturbationHandler
virtual ~PDPerturbationHandler()
Default destructor.
Definition: IpPDPerturbationHandler.hpp:32
Ipopt::PDPerturbationHandler::PerturbForWrongInertia
virtual bool PerturbForWrongInertia(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
This method returns pertubation factors for the case when the most recent factorization resulted in a...
Ipopt::PDPerturbationHandler::hess_degenerate_
DegenType hess_degenerate_
Flag indicating whether the reduced Hessian matrix is thought to be structurally singular.
Definition: IpPDPerturbationHandler.hpp:130
Ipopt::PDPerturbationHandler::delta_cd_exp_
Number delta_cd_exp_
Exponent on mu in formula for of perturbation for c and d blocks.
Definition: IpPDPerturbationHandler.hpp:172
Ipopt::PDPerturbationHandler::operator=
void operator=(const PDPerturbationHandler &)
Overloaded Equals Operator.
Ipopt::PDPerturbationHandler::reset_last_
bool reset_last_
Flag indicating whether the new values are based on the perturbations in the last iteration or in the...
Definition: IpPDPerturbationHandler.hpp:176
Ipopt::PDPerturbationHandler::delta_xs_max_
Number delta_xs_max_
Maximal perturbation for x and s.
Definition: IpPDPerturbationHandler.hpp:158
Ipopt::PDPerturbationHandler::degen_iters_
Index degen_iters_
Flag counting matrices in which degeneracy was observed in the first successive iterations.
Definition: IpPDPerturbationHandler.hpp:139
Ipopt::PDPerturbationHandler::TrialStatus
TrialStatus
Status of current trial configuration.
Definition: IpPDPerturbationHandler.hpp:142
Ipopt::PDPerturbationHandler::NOT_DEGENERATE
Definition: IpPDPerturbationHandler.hpp:124
Ipopt::PDPerturbationHandler::perturb_always_cd_
bool perturb_always_cd_
Flag indicating that the delta_c, delta_d perturbation should always be used.
Definition: IpPDPerturbationHandler.hpp:181
Ipopt::PDPerturbationHandler::delta_c_last_
Number delta_c_last_
The last nonzero value for delta_c.
Definition: IpPDPerturbationHandler.hpp:96
Ipopt::PDPerturbationHandler::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.