/home/coin/SVN-release/Ipopt-3.5.1/Ipopt/src/Algorithm/IpFilterLSAcceptor.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: IpFilterLSAcceptor.hpp 1256 2008-06-26 17:33:33Z andreasw $
00006 //
00007 // Authors:  Andreas Waechter                 IBM    2005-10-13
00008 //               derived file from IpFilterLineSearch.hpp
00009 
00010 #ifndef __IPFILTERLSACCEPTOR_HPP__
00011 #define __IPFILTERLSACCEPTOR_HPP__
00012 
00013 #include "IpFilter.hpp"
00014 #include "IpBacktrackingLSAcceptor.hpp"
00015 #include "IpPDSystemSolver.hpp"
00016 
00017 namespace Ipopt
00018 {
00019 
00023   class FilterLSAcceptor : public BacktrackingLSAcceptor
00024   {
00025   public:
00031     FilterLSAcceptor(const SmartPtr<PDSystemSolver>& pd_solver);
00032 
00034     virtual ~FilterLSAcceptor();
00036 
00038     virtual bool InitializeImpl(const OptionsList& options,
00039                                 const std::string& prefix);
00040 
00047     virtual void Reset();
00048 
00052     virtual void InitThisLineSearch(bool in_watchdog);
00053 
00058     virtual void PrepareRestoPhaseStart();
00059 
00061     virtual Number CalculateAlphaMin();
00062 
00068     virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal);
00069 
00081     virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
00082                                           Number& alpha_primal,
00083                                           SmartPtr<IteratesVector>& actual_delta);
00084 
00091     virtual bool TryCorrector(Number alpha_primal_test,
00092                               Number& alpha_primal,
00093                               SmartPtr<IteratesVector>& actual_delta);
00094 
00099     virtual char UpdateForNextIteration(Number alpha_primal_test);
00100 
00103     virtual void StartWatchDog();
00104 
00107     virtual void StopWatchDog();
00108 
00115     bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta,
00116                                       bool called_from_restoration=false) const;
00117 
00119     bool IsAcceptableToCurrentFilter(Number trial_barr, Number trial_theta) const;
00121 
00124     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00126 
00127   private:
00137     FilterLSAcceptor(const FilterLSAcceptor&);
00138 
00140     void operator=(const FilterLSAcceptor&);
00142 
00146     Number theta_max_;
00147     Number theta_max_fact_;
00148 
00150     Number theta_min_;
00151     Number theta_min_fact_;
00153 
00158     bool IsFtype(Number alpha_primal_test);
00159 
00164     bool ArmijoHolds(Number alpha_primal_test);
00165 
00168     void AugmentFilter();
00169 
00171     //ToDo This should probably not be a static member function if we want to
00172     //     allow for different relaxation parameters values
00173     static bool Compare_le(Number lhs, Number rhs, Number BasVal);
00174 
00178     Number eta_phi_;
00180     Number delta_;
00182     Number s_phi_;
00184     Number s_theta_;
00186     Number gamma_phi_;
00188     Number gamma_theta_;
00190     Number alpha_min_frac_;
00192     Index max_soc_;
00196     Number kappa_soc_;
00201     Number obj_max_inc_;
00202 
00204     enum CorrectorTypeEnum
00205     {
00206       NO_CORRECTOR=0,
00207       AFFINE_CORRECTOR,
00208       PRIMAL_DUAL_CORRECTOR
00209     };
00211     CorrectorTypeEnum corrector_type_;
00214     Number corrector_compl_avrg_red_fact_;
00217     bool skip_corr_if_neg_curv_;
00220     bool skip_corr_in_monotone_mode_;
00222     Index max_filter_resets_;
00227     Index filter_reset_trigger_;
00229 
00234     Number reference_theta_;
00237     Number reference_barr_;
00240     Number reference_gradBarrTDelta_;
00242     Number watchdog_theta_;
00244     Number watchdog_barr_;
00246     Number watchdog_gradBarrTDelta_;
00248 
00250     Filter filter_;
00251 
00255     Number last_rejection_due_to_filter_;
00258     Index count_successive_filter_rejections_;
00260     Index n_filter_resets_;
00262 
00265     SmartPtr<PDSystemSolver> pd_solver_;
00267   };
00268 
00269 } // namespace Ipopt
00270 
00271 #endif

Generated on Wed Aug 27 03:00:34 2008 by  doxygen 1.4.7