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 Number neg_curv_test_tol_;
00116 bool neg_curv_test_reg_;
00117
00119
00126 bool SolveOnce(bool resolve_unmodified,
00127 bool pretend_singular,
00128 const SymMatrix& W,
00129 const Matrix& J_c,
00130 const Matrix& J_d,
00131 const Matrix& Px_L,
00132 const Matrix& Px_U,
00133 const Matrix& Pd_L,
00134 const Matrix& Pd_U,
00135 const Vector& z_L,
00136 const Vector& z_U,
00137 const Vector& v_L,
00138 const Vector& v_U,
00139 const Vector& slack_x_L,
00140 const Vector& slack_x_U,
00141 const Vector& slack_s_L,
00142 const Vector& slack_s_U,
00143 const Vector& sigma_x,
00144 const Vector& sigma_s,
00145 Number alpha,
00146 Number beta,
00147 const IteratesVector& rhs,
00148 IteratesVector& res);
00149
00153 void ComputeResiduals(const SymMatrix& W,
00154 const Matrix& J_c,
00155 const Matrix& J_d,
00156 const Matrix& Px_L,
00157 const Matrix& Px_U,
00158 const Matrix& Pd_L,
00159 const Matrix& Pd_U,
00160 const Vector& z_L,
00161 const Vector& z_U,
00162 const Vector& v_L,
00163 const Vector& v_U,
00164 const Vector& slack_x_L,
00165 const Vector& slack_x_U,
00166 const Vector& slack_s_L,
00167 const Vector& slack_s_U,
00168 const Vector& sigma_x,
00169 const Vector& sigma_s,
00170 Number alpha,
00171 Number beta,
00172 const IteratesVector& rhs,
00173 const IteratesVector& res,
00174 IteratesVector& resid);
00175
00179 Number ComputeResidualRatio(const IteratesVector& rhs,
00180 const IteratesVector& res,
00181 const IteratesVector& resid);
00182
00186 void SinvBlrmZPTdBr(Number alpha, const Vector& S,
00187 const Vector& R, const Vector& Z,
00188 const Matrix& P, const Vector&g, Vector& X);
00190 };
00191
00192 }
00193
00194 #endif