Ipopt
trunk
|
00001 // Copyright (C) 2005, 2009 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 2009-11-05 00008 // (based on IpLowRankAugSystemSolver.hpp rev 1324) 00009 00010 #ifndef __IP_LOWRANKSSAUGSYSTEMSOLVER_HPP__ 00011 #define __IP_LOWRANKSSAUGSYSTEMSOLVER_HPP__ 00012 00013 #include "IpAugSystemSolver.hpp" 00014 #include "IpDiagMatrix.hpp" 00015 #include "IpCompoundMatrix.hpp" 00016 #include "IpCompoundVector.hpp" 00017 #include "IpExpandedMultiVectorMatrix.hpp" 00018 00019 namespace Ipopt 00020 { 00021 00027 class LowRankSSAugSystemSolver : public AugSystemSolver 00028 { 00029 public: 00034 LowRankSSAugSystemSolver(AugSystemSolver& aug_system_solver, 00035 Index max_rank); 00036 00038 virtual ~LowRankSSAugSystemSolver(); 00040 00042 bool InitializeImpl(const OptionsList& options, 00043 const std::string& prefix); 00044 00048 virtual ESymSolverStatus Solve( 00049 const SymMatrix* W, 00050 double W_factor, 00051 const Vector* D_x, 00052 double delta_x, 00053 const Vector* D_s, 00054 double delta_s, 00055 const Matrix* J_c, 00056 const Vector* D_c, 00057 double delta_c, 00058 const Matrix* J_d, 00059 const Vector* D_d, 00060 double delta_d, 00061 const Vector& rhs_x, 00062 const Vector& rhs_s, 00063 const Vector& rhs_c, 00064 const Vector& rhs_d, 00065 Vector& sol_x, 00066 Vector& sol_s, 00067 Vector& sol_c, 00068 Vector& sol_d, 00069 bool check_NegEVals, 00070 Index numberOfNegEVals); 00071 00078 virtual Index NumberOfNegEVals() const; 00079 00083 virtual bool ProvidesInertia() const; 00084 00091 virtual bool IncreaseQuality(); 00092 00093 private: 00103 LowRankSSAugSystemSolver(); 00105 LowRankSSAugSystemSolver(const LowRankSSAugSystemSolver&); 00106 00108 void operator=(const LowRankSSAugSystemSolver&); 00110 00115 SmartPtr<AugSystemSolver> aug_system_solver_; 00116 00118 Index max_rank_; 00119 00128 TaggedObject::Tag w_tag_; 00130 double w_factor_; 00134 TaggedObject::Tag d_x_tag_; 00136 double delta_x_; 00140 TaggedObject::Tag d_s_tag_; 00142 double delta_s_; 00146 TaggedObject::Tag j_c_tag_; 00150 TaggedObject::Tag d_c_tag_; 00152 double delta_c_; 00156 TaggedObject::Tag j_d_tag_; 00160 TaggedObject::Tag d_d_tag_; 00162 double delta_d_; 00164 00166 bool first_call_; 00167 00173 SmartPtr<DiagMatrix> Wdiag_; 00175 SmartPtr<ExpandedMultiVectorMatrix> expanded_vu_; 00177 SmartPtr<CompoundMatrix> J_c_ext_; 00179 SmartPtr<CompoundVector> D_c_ext_; 00181 SmartPtr<CompoundVectorSpace> y_c_ext_space_; 00184 Index negEvalsCorrection_; 00186 00194 Index num_neg_evals_; 00195 00200 ESymSolverStatus UpdateExtendedData( 00201 const SymMatrix* W, 00202 double W_factor, 00203 const Vector* D_x, 00204 double delta_x, 00205 const Vector* D_s, 00206 double delta_s, 00207 const Matrix& J_c, 00208 const Vector* D_c, 00209 double delta_c, 00210 const Matrix& J_d, 00211 const Vector* D_d, 00212 double delta_d, 00213 const Vector& proto_rhs_x, 00214 const Vector& proto_rhs_s, 00215 const Vector& proto_rhs_c, 00216 const Vector& proto_rhs_d); 00217 00221 bool AugmentedSystemRequiresChange( 00222 const SymMatrix* W, 00223 double W_factor, 00224 const Vector* D_x, 00225 double delta_x, 00226 const Vector* D_s, 00227 double delta_s, 00228 const Matrix& J_c, 00229 const Vector* D_c, 00230 double delta_c, 00231 const Matrix& J_d, 00232 const Vector* D_d, 00233 double delta_d); 00235 00236 }; 00237 00238 } // namespace Ipopt 00239 00240 #endif