Ipopt Documentation  
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:
30 
32 
35  { }
37 
38  /* overloaded from AlgorithmStrategyObject */
39  virtual bool InitializeImpl(
40  const OptionsList& options,
41  const std::string& prefix
42  );
43 
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 
72  static void RegisterOptions(
74  );
75 
76 private:
87 
90  );
91 
93  void operator=(
95  );
97 
100  {
101  CGPenaltyData& cg_pen_data = static_cast<CGPenaltyData&>(IpData().AdditionalData());
102  DBG_ASSERT(dynamic_cast<CGPenaltyData*>(&IpData().AdditionalData()));
103  return cg_pen_data;
104  }
105 
108  {
109  CGPenaltyCq& cg_pen_cq = static_cast<CGPenaltyCq&>(IpCq().AdditionalCq());
110  DBG_ASSERT(dynamic_cast<CGPenaltyCq*>(&IpCq().AdditionalCq()));
111  return cg_pen_cq;
112  }
113 
118 
119 };
120 
121 } // namespace Ipopt
122 
123 #endif
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:27
IpoptCalculatedQuantities & IpCq() const
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual...
CGPerturbationHandler()
Default Constructor.
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.
Number mult_diverg_feasibility_tol_
Feasibility for perturbation in pure Newton method.
virtual ~CGPerturbationHandler()
Destructor.
void operator=(const CGPerturbationHandler &)
Default Assignment Operator.
CGPerturbationHandler(const CGPerturbationHandler &)
Copy Constructor.
CGPenaltyData & CGPenData()
Method to easily access CGPenalty data.
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...
CGPenaltyCq & CGPenCq()
Method to easily access CGPenalty calculated quantities.
Number penalty_max_
The max reference value for scaling the penalty parameter.
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 ...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
This class stores a list of user set options.
Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:165
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17