/home/coin/SVN-release/Ipopt-3.5.5/Ipopt/src/Algorithm/Inexact/IpInexactLSAcceptor.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2008 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: IpInexactLSAcceptor.hpp 1391 2009-01-06 21:47:19Z andreasw $
00006 //
00007 // Authors:  Andreas Waechter                 IBM    2008-09-11
00008 //               derived file from IpPenaltyLSAcceptor.hpp (rev 019)
00009 
00010 #ifndef __IPINEXACTLSACCEPTOR_HPP__
00011 #define __IPINEXACTLSACCEPTOR_HPP__
00012 
00013 #include "IpBacktrackingLSAcceptor.hpp"
00014 #include "IpInexactCq.hpp"
00015 
00016 namespace Ipopt
00017 {
00018 
00022   class InexactLSAcceptor : public BacktrackingLSAcceptor
00023   {
00024   public:
00030     InexactLSAcceptor();
00031 
00033     virtual ~InexactLSAcceptor();
00035 
00037     virtual bool InitializeImpl(const OptionsList& options,
00038                                 const std::string& prefix);
00039 
00046     virtual void Reset();
00047 
00051     virtual void InitThisLineSearch(bool in_watchdog);
00052 
00055     virtual void PrepareRestoPhaseStart();
00056 
00058     virtual Number CalculateAlphaMin();
00059 
00065     virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal);
00066 
00071     virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
00072                                           Number& alpha_primal,
00073                                           SmartPtr<IteratesVector>& actual_delta);
00074 
00081     virtual bool TryCorrector(Number alpha_primal_test,
00082                               Number& alpha_primal,
00083                               SmartPtr<IteratesVector>& actual_delta);
00084 
00089     virtual char UpdateForNextIteration(Number alpha_primal_test);
00090 
00093     virtual void StartWatchDog();
00094 
00097     virtual void StopWatchDog();
00098 
00105     bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta,
00106                                       bool called_from_restoration=false) const;
00108 
00110     virtual Number ComputeAlphaForY(Number alpha_primal,
00111                                     Number alpha_dual,
00112                                     SmartPtr<IteratesVector>& delta);
00113 
00116     virtual bool HasComputeAlphaForY() const
00117     {
00118       return true;
00119     }
00120 
00123     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00125 
00126   protected:
00128     InexactData& InexData()
00129     {
00130       InexactData& inexact_data =
00131         static_cast<InexactData&>(IpData().AdditionalData());
00132       DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
00133       return inexact_data;
00134     }
00135 
00137     InexactCq& InexCq()
00138     {
00139       InexactCq& inexact_cq =
00140         static_cast<InexactCq&>(IpCq().AdditionalCq());
00141       DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
00142       return inexact_cq;
00143     }
00144 
00145   private:
00155     InexactLSAcceptor(const InexactLSAcceptor&);
00156 
00158     void operator=(const InexactLSAcceptor&);
00160 
00162     Number CalcPred(Number alpha);
00163 
00167     void ResetSlacks();
00168 
00172     Number nu_init_;
00174     Number nu_low_init_;
00176     Number nu_inc_;
00178     Number eta_;
00180     Number rho_;
00182     Number tcc_theta_;
00184     Number nu_update_inf_skip_tol_;
00187     bool flexible_penalty_function_;
00189 
00194     Number reference_theta_;
00197     Number reference_barr_;
00200     Number reference_pred_;
00202     Number watchdog_theta_;
00204     Number watchdog_barr_;
00206     Number watchdog_pred_;
00208 
00212     Number nu_;
00214     Number last_nu_;
00216     Number nu_low_;
00218     Number last_nu_low_;
00220 
00224     bool in_tt2_;
00225 
00228     Number resto_pred_;
00229 
00232     bool accepted_by_low_only_;
00233   };
00234 
00235 } // namespace Ipopt
00236 
00237 #endif

Generated on Wed Jan 14 03:00:32 2009 by  doxygen 1.4.7