Ipopt Documentation  
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IpCGPerturbationHandler.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Carl Laird, Andreas Waechter IBM 2005-08-04
6 
7 #ifndef __IPCGPERTURBATIONHANDLER_HPP__
8 #define __IPCGPERTURBATIONHANDLER_HPP__
9 
11 #include "IpCGPenaltyCq.hpp"
12 
13 namespace Ipopt
14 {
15 
26 {
27 public:
29 
32 
35  { }
37 
38  /* overloaded from AlgorithmStrategyObject */
39  virtual bool InitializeImpl(
40  const OptionsList& options,
41  const std::string& prefix
42  );
43 
53  bool ConsiderNewSystem(
54  Number& delta_x,
55  Number& delta_s,
56  Number& delta_c,
57  Number& delta_d
58  );
59 
66  Number& delta_x,
67  Number& delta_s,
68  Number& delta_c,
69  Number& delta_d
70  );
71 
79  Number& delta_x,
80  Number& delta_s,
81  Number& delta_c,
82  Number& delta_d
83  );
84 
89  Number& delta_x,
90  Number& delta_s,
91  Number& delta_c,
92  Number& delta_d
93  );
94 
95  static void RegisterOptions(
97  );
98 
99 private:
109 
112  const CGPerturbationHandler&
113  );
114 
116  void operator=(
117  const CGPerturbationHandler&
118  );
120 
123  {
124  CGPenaltyData& cg_pen_data = static_cast<CGPenaltyData&>(IpData().AdditionalData());
125  DBG_ASSERT(dynamic_cast<CGPenaltyData*>(&IpData().AdditionalData()));
126  return cg_pen_data;
127  }
128 
131  {
132  CGPenaltyCq& cg_pen_cq = static_cast<CGPenaltyCq&>(IpCq().AdditionalCq());
133  DBG_ASSERT(dynamic_cast<CGPenaltyCq*>(&IpCq().AdditionalCq()));
134  return cg_pen_cq;
135  }
136 
138 
148 
151 
161 
165 
167 
170  {
174  };
175 
180 
185 
193 
196  {
202  };
203 
207 
209 
237 
242 
244 
251  Number& delta_x,
252  Number& delta_s,
253  Number& delta_c,
254  Number& delta_d
255  );
256 
262  void finalize_test();
263 
265  Number delta_cd();
267 
268 };
269 
270 } // namespace Ipopt
271 
272 #endif
Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual...
Number delta_cd_exp_
Exponent on mu in formula for of perturbation for c and d blocks.
CGPerturbationHandler()
Default Constructor.
Number delta_xs_inc_fact_
Increase factor for delta_xs for later perturbations.
TrialStatus
Status of current trial configuration.
bool PerturbForSingularity(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
This method returns perturbation factors for the case when the most recent factorization resulted in ...
Number delta_d_last_
The last nonzero value for delta_d.
Index degen_iters_max_
Required number of iterations for degeneracy conclusions.
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Number delta_d_curr_
The current value for delta_d.
bool reset_last_
Flag indicating whether the new values are based on the perturbations in the last iteration or in the...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Number delta_xs_first_inc_fact_
Increase factor for delta_xs for first required perturbation.
Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual...
Number delta_s_last_
The last nonzero value for delta_s.
void finalize_test()
This method is call whenever a matrix had been factorization and is not singular. ...
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...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
Number mult_diverg_feasibility_tol_
Feasibility for perturbation in pure Newton method.
Number delta_x_last_
The last nonzero value for delta_x.
This class stores a list of user set options.
Number penalty_max_
The max reference value for scaling the penalty parameter.
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm...
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...
Number delta_xs_min_
Smallest possible perturbation for x and s.
CGPenaltyCq & CGPenCq()
Method to easily access CGPenalty calculated quantities.
Number delta_x_curr_
The current value for delta_x.
Class for all Chen-Goldfarb penalty method specific calculated quantities.
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
bool perturb_always_cd_
Flag indicating that the delta_c, delta_d perturbation should always be used.
DegenType jac_degenerate_
Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient...
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
void operator=(const CGPerturbationHandler &)
Default Assignment Operator.
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:27
CGPenaltyData & CGPenData()
Method to easily access CGPenalty data.
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...
Number delta_cd_val_
Size of perturbation for c and d blocks.
Number delta_s_curr_
The current value for delta_s.
DegenType hess_degenerate_
Flag indicating whether the reduced Hessian matrix is thought to be structurally singular.
Number delta_xs_dec_fact_
Decrease factor for delta_xs for later perturbations.
bool PerturbForWrongInertia(Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
This method returns perturbation factors for the case when the most recent factorization resulted in ...
IpoptCalculatedQuantities & IpCq() const
TrialStatus test_status_
Current status.
Number delta_xs_max_
Maximal perturbation for x and s.
bool get_deltas_for_wrong_inertia_called_
Flag indicating if for the given matrix the perturbation for wrong inertia method has already been ca...
Number delta_xs_init_
Very first trial value for delta_xs perturbation.
virtual ~CGPerturbationHandler()
Destructor.
Number delta_cd()
Compute perturbation value for constraints.
Index degen_iters_
Flag counting matrices in which degeneracy was observed in the first successive iterations.
DegenType
Type for degeneracy flags.
Number delta_c_curr_
The current value for delta_c.
Number delta_c_last_
The last nonzero value for delta_c.
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.