00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __IPPDFULLSPACESOLVER_HPP__
00010 #define __IPPDFULLSPACESOLVER_HPP__
00011
00012 #include "IpPDSystemSolver.hpp"
00013 #include "IpAugSystemSolver.hpp"
00014 #include "IpPDPerturbationHandler.hpp"
00015
00016 namespace Ipopt
00017 {
00018
00032 class PDFullSpaceSolver: public PDSystemSolver
00033 {
00034 public:
00040 PDFullSpaceSolver(AugSystemSolver& augSysSolver,
00041 PDPerturbationHandler& perturbHandler);
00042
00044 virtual ~PDFullSpaceSolver();
00046
00047
00048 bool InitializeImpl(const OptionsList& options,
00049 const std::string& prefix);
00050
00053 virtual bool Solve(Number alpha,
00054 Number beta,
00055 const IteratesVector& rhs,
00056 IteratesVector& res,
00057 bool allow_inexact=false,
00058 bool improve_solution=false);
00059
00062 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00064
00065 private:
00075 PDFullSpaceSolver();
00077 PDFullSpaceSolver& operator=(const PDFullSpaceSolver&);
00079
00083 SmartPtr<AugSystemSolver> augSysSolver_;
00085 SmartPtr<PDPerturbationHandler> perturbHandler_;
00087
00091 CachedResults<void*> dummy_cache_;
00094 bool augsys_improved_;
00096
00100 Index min_refinement_steps_;
00102 Index max_refinement_steps_;
00105 Number residual_ratio_max_;
00109 Number residual_ratio_singular_;
00112 Number residual_improvement_factor_;
00114
00121 bool SolveOnce(bool resolve_unmodified,
00122 bool pretend_singular,
00123 const SymMatrix& W,
00124 const Matrix& J_c,
00125 const Matrix& J_d,
00126 const Matrix& Px_L,
00127 const Matrix& Px_U,
00128 const Matrix& Pd_L,
00129 const Matrix& Pd_U,
00130 const Vector& z_L,
00131 const Vector& z_U,
00132 const Vector& v_L,
00133 const Vector& v_U,
00134 const Vector& slack_x_L,
00135 const Vector& slack_x_U,
00136 const Vector& slack_s_L,
00137 const Vector& slack_s_U,
00138 const Vector& sigma_x,
00139 const Vector& sigma_s,
00140 Number alpha,
00141 Number beta,
00142 const IteratesVector& rhs,
00143 IteratesVector& res);
00144
00148 void ComputeResiduals(const SymMatrix& W,
00149 const Matrix& J_c,
00150 const Matrix& J_d,
00151 const Matrix& Px_L,
00152 const Matrix& Px_U,
00153 const Matrix& Pd_L,
00154 const Matrix& Pd_U,
00155 const Vector& z_L,
00156 const Vector& z_U,
00157 const Vector& v_L,
00158 const Vector& v_U,
00159 const Vector& slack_x_L,
00160 const Vector& slack_x_U,
00161 const Vector& slack_s_L,
00162 const Vector& slack_s_U,
00163 const Vector& sigma_x,
00164 const Vector& sigma_s,
00165 Number alpha,
00166 Number beta,
00167 const IteratesVector& rhs,
00168 const IteratesVector& res,
00169 IteratesVector& resid);
00170
00174 Number ComputeResidualRatio(const IteratesVector& rhs,
00175 const IteratesVector& res,
00176 const IteratesVector& resid);
00177
00181 void SinvBlrmZPTdBr(Number alpha, const Vector& S,
00182 const Vector& R, const Vector& Z,
00183 const Matrix& P, const Vector&g, Vector& X);
00185 };
00186
00187 }
00188
00189 #endif