Ipopt  3.11.9
IpInexactPDSolver.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpInexactPDSolver.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Andreas Waechter IBM 2008-09-09
8 
9 #ifndef __IPINEXACTPDSOLVER_HPP__
10 #define __IPINEXACTPDSOLVER_HPP__
11 
12 #include "IpAlgStrategy.hpp"
13 #include "IpAugSystemSolver.hpp"
15 #include "IpInexactCq.hpp"
16 
17 namespace Ipopt
18 {
19 
25  {
26  public:
33  PDPerturbationHandler& perturbHandler);
34 
36  virtual ~InexactPDSolver();
38 
39  /* overloaded from AlgorithmStrategyObject */
40  bool InitializeImpl(const OptionsList& options,
41  const std::string& prefix);
42 
45  virtual bool Solve(const IteratesVector& rhs,
46  IteratesVector& sol);
47 
52 
53  private:
67 
70  {
71  InexactData& inexact_data =
72  static_cast<InexactData&>(IpData().AdditionalData());
73  DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
74  return inexact_data;
75  }
76 
79  {
80  InexactCq& inexact_cq =
81  static_cast<InexactCq&>(IpCq().AdditionalCq());
82  DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
83  return inexact_cq;
84  }
85 
93 
97  void ComputeResiduals(const SymMatrix& W,
98  const Matrix& J_c,
99  const Matrix& J_d,
100  const Matrix& Pd_L,
101  const Matrix& Pd_U,
102  const Vector& v_L,
103  const Vector& v_U,
104  const Vector& slack_s_L,
105  const Vector& slack_s_U,
106  const Vector& sigma_s,
107  const IteratesVector& rhs,
108  const IteratesVector& res,
109  IteratesVector& resid);
110 
115 
132 
136 
138  };
139 
140 
141 } // namespace Ipopt
142 
143 #endif
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:38
This is the base class for all algorithm strategy objects.
IpoptCalculatedQuantities & IpCq() const
Base class for Solver for the augmented system.
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpInexactCq.hpp:23
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
This is the implemetation of the Primal-Dual System, allowing the usage of an inexact linear solver.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
InexactPDSolver()
Default Constructor.
InexactData & InexData()
Method to easily access Inexact data.
SmartPtr< AugSystemSolver > augSysSolver_
Pointer to the Solver for the augmented system.
SmartPtr< PDPerturbationHandler > perturbHandler_
Pointer to the Perturbation Handler.
bool is_pardiso_
flag indicating if we are dealing with the Pardiso solver (temporary)
Number tcc_psi_
Psi factor in the tangential component condition.
InexactPDSolver & operator=(const InexactPDSolver &)
Overloaded Equals Operator.
virtual ~InexactPDSolver()
Default destructor.
Index inexact_regularization_ls_count_trigger_
Threshold on line search evaluation count to trigger Hessia modification.
void ComputeResiduals(const SymMatrix &W, const Matrix &J_c, const Matrix &J_d, const Matrix &Pd_L, const Matrix &Pd_U, const Vector &v_L, const Vector &v_U, const Vector &slack_s_L, const Vector &slack_s_U, const Vector &sigma_s, const IteratesVector &rhs, const IteratesVector &res, IteratesVector &resid)
Internal function for computing the residual (resid) given the right hand side (rhs) and the solution...
bool modify_hessian_with_slacks_
flag indicating if the Hessian for the (s,s) part should be modified with the slacks instead of the i...
InexactCq & InexCq()
Method to easily access Inexact calculated quantities.
InexactPDSolver(AugSystemSolver &augSysSolver, PDPerturbationHandler &perturbHandler)
Constructor that takes in the Augmented System solver that is to be used inside.
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 tcc_theta_
theta factor in the tangential component condition
bool HessianRequiresChange()
Method for checking if the Hessian matrix has to be modified.
virtual bool Solve(const IteratesVector &rhs, IteratesVector &sol)
Solve the primal dual system, given one right hand side.
Number tcc_theta_mu_exponent_
mu exponent when multiplied to theta in the tangential component condition
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
Specialized CompoundVector class specifically for the algorithm iterates.
Matrix Base Class.
Definition: IpMatrix.hpp:28
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:183
This is the base class for all derived symmetric matrix types.
Definition: IpSymMatrix.hpp:24
Vector Base Class.
Definition: IpVector.hpp:48
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
double Number
Type of all numbers.
Definition: IpTypes.hpp:17