- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/SVN-release/Ipopt-3.2.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 759 2006-07-07 03:07:08Z 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       BFGS=0,
    00077       SR1
    00078     };
    00080     LMUpdateType limited_memory_update_type_;
    00082     enum LMInitialization {
    00083       SCALAR1=0,
    00084       SCALAR2,
    00085       CONSTANT
    00086     };
    00088     LMInitialization limited_memory_initialization_;
    00091     Number limited_memory_init_val_;
    00094     Index limited_memory_max_skipping_;
    00096     Number sigma_safe_min_;
    00098     Number sigma_safe_max_;
    00100
    00106     const bool update_for_resto_;
    00109     Number last_eta_;
    00113     SmartPtr<const Vector> curr_DR_x_;
    00115     TaggedObject::Tag curr_DR_x_tag_;
    00120     SmartPtr<const Vector> curr_red_DR_x_;
    00123     Number curr_eta_;
    00126     bool eta_changed_;
    00127
    00130     Index lm_skipped_iter_;
    00131
    00135     Index curr_lm_memory_;
    00137     SmartPtr<MultiVectorMatrix> S_;
    00141     SmartPtr<MultiVectorMatrix> Y_;
    00144     SmartPtr<MultiVectorMatrix> Ypart_;
    00147     SmartPtr<DenseVector> D_;
    00149     SmartPtr<DenseGenMatrix> L_;
    00151     SmartPtr<Vector> B0_;
    00155     Number sigma_;
    00157     SmartPtr<MultiVectorMatrix> V_;
    00159     SmartPtr<MultiVectorMatrix> U_;
    00162     SmartPtr<DenseSymMatrix> SdotS_;
    00165     bool SdotS_uptodate_;
    00167     SmartPtr<MultiVectorMatrix> DRS_;
    00170     SmartPtr<DenseSymMatrix> STDRS_;
    00172     SmartPtr<const Vector> last_x_;
    00174     SmartPtr<const Vector> last_grad_f_;
    00176     SmartPtr<const Matrix> last_jac_c_;
    00178     SmartPtr<const Matrix> last_jac_d_;
    00180     Index curr_lm_memory_old_;
    00182     SmartPtr<MultiVectorMatrix> S_old_;
    00186     SmartPtr<MultiVectorMatrix> Y_old_;
    00189     SmartPtr<MultiVectorMatrix> Ypart_old_;
    00192     SmartPtr<DenseVector> D_old_;
    00194     SmartPtr<DenseGenMatrix> L_old_;
    00196     SmartPtr<Vector> B0_old_;
    00200     Number sigma_old_;
    00202     SmartPtr<MultiVectorMatrix> V_old_;
    00204     SmartPtr<MultiVectorMatrix> U_old_;
    00207     SmartPtr<DenseSymMatrix> SdotS_old_;
    00210     bool SdotS_uptodate_old_;
    00212     SmartPtr<MultiVectorMatrix> DRS_old_;
    00215     SmartPtr<DenseSymMatrix> STDRS_old_;
    00217
    00224     bool CheckSkippingBFGS(Vector& s_new, Vector& y_new);
    00229     bool UpdateInternalData(const Vector& s_new, const Vector& y_new,
    00230                             SmartPtr<Vector> ypart_new);
    00236     void AugmentMultiVector(SmartPtr<MultiVectorMatrix>& V,
    00237                             const Vector& v_new);
    00243     void AugmentDenseVector(SmartPtr<DenseVector>& V,
    00244                             Number v_new);
    00252     void AugmentLMatrix(SmartPtr<DenseGenMatrix>& V,
    00253                         const MultiVectorMatrix& S,
    00254                         const MultiVectorMatrix& Y);
    00261     void AugmentSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00262                             const MultiVectorMatrix& S);
    00270     void AugmentSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00271                             const MultiVectorMatrix& S,
    00272                             const MultiVectorMatrix& DRS);
    00273
    00278     void ShiftMultiVector(SmartPtr<MultiVectorMatrix>& V, const Vector& v_new);
    00284     void ShiftDenseVector(SmartPtr<DenseVector>& V, Number v_new);
    00291     void ShiftLMatrix(SmartPtr<DenseGenMatrix>& V,
    00292                       const MultiVectorMatrix& S,
    00293                       const MultiVectorMatrix& Y);
    00299     void ShiftSdotSMatrix(SmartPtr<DenseSymMatrix>& V,
    00300                           const MultiVectorMatrix& S);
    00306     void ShiftSTDRSMatrix(SmartPtr<DenseSymMatrix>& V,
    00307                           const MultiVectorMatrix& S,
    00308                           const MultiVectorMatrix& DRS);
    00311     void RecalcY(Number eta, const Vector& DR_x,
    00312                  MultiVectorMatrix& S,
    00313                  MultiVectorMatrix& Ypart,
    00314                  SmartPtr<MultiVectorMatrix>& Y);
    00316     void RecalcD(MultiVectorMatrix& S,
    00317                  MultiVectorMatrix& Y,
    00318                  SmartPtr<DenseVector>& D);
    00320     void RecalcL(MultiVectorMatrix& S,
    00321                  MultiVectorMatrix& Y,
    00322                  SmartPtr<DenseGenMatrix>& L);
    00332     bool SplitEigenvalues(DenseGenMatrix& Q, const DenseVector& E,
    00333                           SmartPtr<DenseGenMatrix>& Qminus,
    00334                           SmartPtr<DenseGenMatrix>& Qplus);
    00338     void StoreInternalDataBackup();
    00341     void RestoreInternalDataBackup();
    00344     void ReleaseInternalDataBackup();
    00347     void SetW();
    00349
    00350   };
    00351
    00352 } // namespace Ipopt
    00353
    00354 #endif