- Main Page
- Classes
- Files

- File List
- File Members

# src/Algorithm/IpLimMemQuasiNewtonUpdater.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2010 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpLimMemQuasiNewtonUpdater.hpp 1861 2010-12-21 21:34:47Z 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       SCALAR3,
    00088       SCALAR4,
    00089       CONSTANT
    00090     };
    00092     LMInitialization limited_memory_initialization_;
    00095     Number limited_memory_init_val_;
    00098     Index limited_memory_max_skipping_;
    00100     Number sigma_safe_min_;
    00102     Number sigma_safe_max_;
    00105     bool limited_memory_special_for_resto_;
    00107
    00113     const bool update_for_resto_;
    00116     Number last_eta_;
    00120     SmartPtr<const Vector> curr_DR_x_;
    00122     TaggedObject::Tag curr_DR_x_tag_;
    00127     SmartPtr<const Vector> curr_red_DR_x_;
    00130     Number curr_eta_;
    00131
    00134     Index lm_skipped_iter_;
    00135
    00139     Index curr_lm_memory_;
    00141     SmartPtr<MultiVectorMatrix> S_;
    00145     SmartPtr<MultiVectorMatrix> Y_;
    00148     SmartPtr<MultiVectorMatrix> Ypart_;
    00151     SmartPtr<DenseVector> D_;
    00153     SmartPtr<DenseGenMatrix> L_;
    00155     SmartPtr<Vector> B0_;
    00159     Number sigma_;
    00161     SmartPtr<MultiVectorMatrix> V_;
    00163     SmartPtr<MultiVectorMatrix> U_;
    00166     SmartPtr<DenseSymMatrix> SdotS_;
    00169     bool SdotS_uptodate_;
    00171     SmartPtr<MultiVectorMatrix> DRS_;
    00174     SmartPtr<DenseSymMatrix> STDRS_;
    00176     SmartPtr<const Vector> last_x_;
    00178     SmartPtr<const Vector> last_grad_f_;
    00180     SmartPtr<const Matrix> last_jac_c_;
    00182     SmartPtr<const Matrix> last_jac_d_;
    00184     Index curr_lm_memory_old_;
    00186     SmartPtr<MultiVectorMatrix> S_old_;
    00190     SmartPtr<MultiVectorMatrix> Y_old_;
    00193     SmartPtr<MultiVectorMatrix> Ypart_old_;
    00196     SmartPtr<DenseVector> D_old_;
    00198     SmartPtr<DenseGenMatrix> L_old_;
    00200     SmartPtr<Vector> B0_old_;
    00204     Number sigma_old_;
    00206     SmartPtr<MultiVectorMatrix> V_old_;
    00208     SmartPtr<MultiVectorMatrix> U_old_;
    00211     SmartPtr<DenseSymMatrix> SdotS_old_;
    00214     bool SdotS_uptodate_old_;
    00216     SmartPtr<MultiVectorMatrix> DRS_old_;
    00219     SmartPtr<DenseSymMatrix> STDRS_old_;
    00221
    00228     bool CheckSkippingBFGS(Vector& s_new, Vector& y_new);
    00233     bool UpdateInternalData(const Vector& s_new, const Vector& y_new,
    00234                             SmartPtr<Vector> ypart_new);
    00240     void AugmentMultiVector(SmartPtr<MultiVectorMatrix>& V,
    00241                             const Vector& v_new);
    00247     void AugmentDenseVector(SmartPtr<DenseVector>& V,
    00248                             Number v_new);
    00256     void AugmentLMatrix(SmartPtr<DenseGenMatrix>& V,
    00257                         const MultiVectorMatrix& S,
    00258                         const MultiVectorMatrix& Y);
    00265     void AugmentSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00266                             const MultiVectorMatrix& S);
    00274     void AugmentSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00275                             const MultiVectorMatrix& S,
    00276                             const MultiVectorMatrix& DRS);
    00277
    00282     void ShiftMultiVector(SmartPtr<MultiVectorMatrix>& V, const Vector& v_new);
    00288     void ShiftDenseVector(SmartPtr<DenseVector>& V, Number v_new);
    00295     void ShiftLMatrix(SmartPtr<DenseGenMatrix>& V,
    00296                       const MultiVectorMatrix& S,
    00297                       const MultiVectorMatrix& Y);
    00303     void ShiftSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00304                           const MultiVectorMatrix& S);
    00310     void ShiftSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00311                           const MultiVectorMatrix& S,
    00312                           const MultiVectorMatrix& DRS);
    00315     void RecalcY(Number eta, const Vector& DR_x,
    00316                  MultiVectorMatrix& S,
    00317                  MultiVectorMatrix& Ypart,
    00318                  SmartPtr<MultiVectorMatrix>& Y);
    00320     void RecalcD(MultiVectorMatrix& S,
    00321                  MultiVectorMatrix& Y,
    00322                  SmartPtr<DenseVector>& D);
    00324     void RecalcL(MultiVectorMatrix& S,
    00325                  MultiVectorMatrix& Y,
    00326                  SmartPtr<DenseGenMatrix>& L);
    00336     bool SplitEigenvalues(DenseGenMatrix& Q, const DenseVector& E,
    00337                           SmartPtr<DenseGenMatrix>& Qminus,
    00338                           SmartPtr<DenseGenMatrix>& Qplus);
    00342     void StoreInternalDataBackup();
    00345     void RestoreInternalDataBackup();
    00348     void ReleaseInternalDataBackup();
    00351     void SetW();
    00353
    00354   };
    00355
    00356 } // namespace Ipopt
    00357
    00358 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines