Ipopt
trunk
|
00001 // Copyright (C) 2008 International Business Machines and others. 00002 // All Rights Reserved. 00003 // This code is published under the Eclipse Public License. 00004 // 00005 // $Id$ 00006 // 00007 // Authors: Andreas Waechter IBM 2008-09-09 00008 00009 #ifndef __IPINEXACTPDSOLVER_HPP__ 00010 #define __IPINEXACTPDSOLVER_HPP__ 00011 00012 #include "IpAlgStrategy.hpp" 00013 #include "IpAugSystemSolver.hpp" 00014 #include "IpPDPerturbationHandler.hpp" 00015 #include "IpInexactCq.hpp" 00016 00017 namespace Ipopt 00018 { 00019 00024 class InexactPDSolver: public AlgorithmStrategyObject 00025 { 00026 public: 00032 InexactPDSolver(AugSystemSolver& augSysSolver, 00033 PDPerturbationHandler& perturbHandler); 00034 00036 virtual ~InexactPDSolver(); 00038 00039 /* overloaded from AlgorithmStrategyObject */ 00040 bool InitializeImpl(const OptionsList& options, 00041 const std::string& prefix); 00042 00045 virtual bool Solve(const IteratesVector& rhs, 00046 IteratesVector& sol); 00047 00050 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions); 00052 00053 private: 00063 InexactPDSolver(); 00065 InexactPDSolver& operator=(const InexactPDSolver&); 00067 00069 InexactData& InexData() 00070 { 00071 InexactData& inexact_data = 00072 static_cast<InexactData&>(IpData().AdditionalData()); 00073 DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData())); 00074 return inexact_data; 00075 } 00076 00078 InexactCq& InexCq() 00079 { 00080 InexactCq& inexact_cq = 00081 static_cast<InexactCq&>(IpCq().AdditionalCq()); 00082 DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq())); 00083 return inexact_cq; 00084 } 00085 00089 SmartPtr<AugSystemSolver> augSysSolver_; 00091 SmartPtr<PDPerturbationHandler> perturbHandler_; 00093 00097 void ComputeResiduals(const SymMatrix& W, 00098 const Matrix& J_c, 00099 const Matrix& J_d, 00100 const Matrix& Pd_L, 00101 const Matrix& Pd_U, 00102 const Vector& v_L, 00103 const Vector& v_U, 00104 const Vector& slack_s_L, 00105 const Vector& slack_s_U, 00106 const Vector& sigma_s, 00107 const IteratesVector& rhs, 00108 const IteratesVector& res, 00109 IteratesVector& resid); 00110 00114 bool HessianRequiresChange(); 00115 00119 Number tcc_psi_; 00121 Number tcc_theta_; 00124 Number tcc_theta_mu_exponent_; 00127 bool modify_hessian_with_slacks_; 00130 Index inexact_regularization_ls_count_trigger_; 00132 00135 bool is_pardiso_; 00136 00137 Index last_info_ls_count_; 00138 }; 00139 00140 00141 } // namespace Ipopt 00142 00143 #endif