- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/SVN-release/Ipopt-3.7.1/Ipopt/src/Algorithm/IpLimMemQuasiNewtonUpdater.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2006 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Common Public License.
    00004 //
    00005 // $Id: IpLimMemQuasiNewtonUpdater.hpp 1324 2008-09-16 14:19:26Z andreasw $
    00006 //
    00007 // Authors:  Andreas Waechter            IBM    2005-12-26
    00008
    00009 #ifndef __IPLIMMEMQUASINEWTONUPDATER_HPP__
    00010 #define __IPLIMMEMQUASINEWTONUPDATER_HPP__
    00011
    00012 #include "IpHessianUpdater.hpp"
    00013 #include "IpLowRankUpdateSymMatrix.hpp"
    00014 #include "IpMultiVectorMatrix.hpp"
    00015 #include "IpDenseVector.hpp"
    00016 #include "IpDenseGenMatrix.hpp"
    00017 #include "IpDenseSymMatrix.hpp"
    00018
    00019 namespace Ipopt
    00020 {
    00021
    00025   class LimMemQuasiNewtonUpdater : public HessianUpdater
    00026   {
    00027   public:
    00031     LimMemQuasiNewtonUpdater(bool update_for_resto);
    00032
    00034     virtual ~LimMemQuasiNewtonUpdater()
    00035     {}
    00037
    00039     virtual bool InitializeImpl(const OptionsList& options,
    00040                                 const std::string& prefix);
    00041
    00044     virtual void UpdateHessian();
    00045
    00048     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00050
    00051   private:
    00061     LimMemQuasiNewtonUpdater(const LimMemQuasiNewtonUpdater&);
    00062
    00064     void operator=(const LimMemQuasiNewtonUpdater&);
    00066
    00068     SmartPtr<const LowRankUpdateSymMatrixSpace> h_space_;
    00069
    00073     Index limited_memory_max_history_;
    00075     enum LMUpdateType
    00076     {
    00077       BFGS=0,
    00078       SR1
    00079     };
    00081     LMUpdateType limited_memory_update_type_;
    00083     enum LMInitialization
    00084     {
    00085       SCALAR1=0,
    00086       SCALAR2,
    00087       CONSTANT
    00088     };
    00090     LMInitialization limited_memory_initialization_;
    00093     Number limited_memory_init_val_;
    00096     Index limited_memory_max_skipping_;
    00098     Number sigma_safe_min_;
    00100     Number sigma_safe_max_;
    00102
    00108     const bool update_for_resto_;
    00111     Number last_eta_;
    00115     SmartPtr<const Vector> curr_DR_x_;
    00117     TaggedObject::Tag curr_DR_x_tag_;
    00122     SmartPtr<const Vector> curr_red_DR_x_;
    00125     Number curr_eta_;
    00128     bool eta_changed_;
    00129
    00132     Index lm_skipped_iter_;
    00133
    00137     Index curr_lm_memory_;
    00139     SmartPtr<MultiVectorMatrix> S_;
    00143     SmartPtr<MultiVectorMatrix> Y_;
    00146     SmartPtr<MultiVectorMatrix> Ypart_;
    00149     SmartPtr<DenseVector> D_;
    00151     SmartPtr<DenseGenMatrix> L_;
    00153     SmartPtr<Vector> B0_;
    00157     Number sigma_;
    00159     SmartPtr<MultiVectorMatrix> V_;
    00161     SmartPtr<MultiVectorMatrix> U_;
    00164     SmartPtr<DenseSymMatrix> SdotS_;
    00167     bool SdotS_uptodate_;
    00169     SmartPtr<MultiVectorMatrix> DRS_;
    00172     SmartPtr<DenseSymMatrix> STDRS_;
    00174     SmartPtr<const Vector> last_x_;
    00176     SmartPtr<const Vector> last_grad_f_;
    00178     SmartPtr<const Matrix> last_jac_c_;
    00180     SmartPtr<const Matrix> last_jac_d_;
    00182     Index curr_lm_memory_old_;
    00184     SmartPtr<MultiVectorMatrix> S_old_;
    00188     SmartPtr<MultiVectorMatrix> Y_old_;
    00191     SmartPtr<MultiVectorMatrix> Ypart_old_;
    00194     SmartPtr<DenseVector> D_old_;
    00196     SmartPtr<DenseGenMatrix> L_old_;
    00198     SmartPtr<Vector> B0_old_;
    00202     Number sigma_old_;
    00204     SmartPtr<MultiVectorMatrix> V_old_;
    00206     SmartPtr<MultiVectorMatrix> U_old_;
    00209     SmartPtr<DenseSymMatrix> SdotS_old_;
    00212     bool SdotS_uptodate_old_;
    00214     SmartPtr<MultiVectorMatrix> DRS_old_;
    00217     SmartPtr<DenseSymMatrix> STDRS_old_;
    00219
    00226     bool CheckSkippingBFGS(Vector& s_new, Vector& y_new);
    00231     bool UpdateInternalData(const Vector& s_new, const Vector& y_new,
    00232                             SmartPtr<Vector> ypart_new);
    00238     void AugmentMultiVector(SmartPtr<MultiVectorMatrix>& V,
    00239                             const Vector& v_new);
    00245     void AugmentDenseVector(SmartPtr<DenseVector>& V,
    00246                             Number v_new);
    00254     void AugmentLMatrix(SmartPtr<DenseGenMatrix>& V,
    00255                         const MultiVectorMatrix& S,
    00256                         const MultiVectorMatrix& Y);
    00263     void AugmentSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00264                             const MultiVectorMatrix& S);
    00272     void AugmentSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00273                             const MultiVectorMatrix& S,
    00274                             const MultiVectorMatrix& DRS);
    00275
    00280     void ShiftMultiVector(SmartPtr<MultiVectorMatrix>& V, const Vector& v_new);
    00286     void ShiftDenseVector(SmartPtr<DenseVector>& V, Number v_new);
    00293     void ShiftLMatrix(SmartPtr<DenseGenMatrix>& V,
    00294                       const MultiVectorMatrix& S,
    00295                       const MultiVectorMatrix& Y);
    00301     void ShiftSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00302                           const MultiVectorMatrix& S);
    00308     void ShiftSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00309                           const MultiVectorMatrix& S,
    00310                           const MultiVectorMatrix& DRS);
    00313     void RecalcY(Number eta, const Vector& DR_x,
    00314                  MultiVectorMatrix& S,
    00315                  MultiVectorMatrix& Ypart,
    00316                  SmartPtr<MultiVectorMatrix>& Y);
    00318     void RecalcD(MultiVectorMatrix& S,
    00319                  MultiVectorMatrix& Y,
    00320                  SmartPtr<DenseVector>& D);
    00322     void RecalcL(MultiVectorMatrix& S,
    00323                  MultiVectorMatrix& Y,
    00324                  SmartPtr<DenseGenMatrix>& L);
    00334     bool SplitEigenvalues(DenseGenMatrix& Q, const DenseVector& E,
    00335                           SmartPtr<DenseGenMatrix>& Qminus,
    00336                           SmartPtr<DenseGenMatrix>& Qplus);
    00340     void StoreInternalDataBackup();
    00343     void RestoreInternalDataBackup();
    00346     void ReleaseInternalDataBackup();
    00349     void SetW();
    00351
    00352   };
    00353
    00354 } // namespace Ipopt
    00355
    00356 #endif