/home/coin/SVN-release/CoinAll-1.1.0/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 1019 2007-06-24 03:52:34Z 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 
00064     virtual Number CalculateAlphaMin();
00065 
00071     virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal);
00072 
00084     virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
00085                                           Number& alpha_primal,
00086                                           SmartPtr<IteratesVector>& actual_delta);
00087 
00094     virtual bool TryCorrector(Number alpha_primal_test,
00095                               Number& alpha_primal,
00096                               SmartPtr<IteratesVector>& actual_delta);
00097 
00102     virtual char UpdateForNextIteration(Number alpha_primal_test);
00103 
00106     virtual void StartWatchDog();
00107 
00110     virtual void StopWatchDog();
00111 
00118     bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta,
00119                                       bool called_from_restoration=false) const;
00120 
00122     bool IsAcceptableToCurrentFilter(Number trial_barr, Number trial_theta) const;
00124 
00127     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
00129 
00130   private:
00140     FilterLSAcceptor(const FilterLSAcceptor&);
00141 
00143     void operator=(const FilterLSAcceptor&);
00145 
00149     Number theta_max_;
00150     Number theta_max_fact_;
00151 
00153     Number theta_min_;
00154     Number theta_min_fact_;
00156 
00161     bool IsFtype(Number alpha_primal_test);
00162 
00167     bool ArmijoHolds(Number alpha_primal_test);
00168 
00171     void AugmentFilter();
00172 
00174     //ToDo This should probably not be a static member function if we want to
00175     //     allow for different relaxation parameters values
00176     static bool Compare_le(Number lhs, Number rhs, Number BasVal);
00177 
00181     Number eta_phi_;
00183     Number delta_;
00185     Number s_phi_;
00187     Number s_theta_;
00189     Number gamma_phi_;
00191     Number gamma_theta_;
00193     Number alpha_min_frac_;
00195     Index max_soc_;
00199     Number kappa_soc_;
00204     Number obj_max_inc_;
00205 
00207     enum CorrectorTypeEnum
00208     {
00209       NO_CORRECTOR=0,
00210       AFFINE_CORRECTOR,
00211       PRIMAL_DUAL_CORRECTOR
00212     };
00214     CorrectorTypeEnum corrector_type_;
00217     Number corrector_compl_avrg_red_fact_;
00220     bool skip_corr_if_neg_curv_;
00223     bool skip_corr_in_monotone_mode_;
00225     Index max_filter_resets_;
00230     Index filter_reset_trigger_;
00232 
00237     Number reference_theta_;
00240     Number reference_barr_;
00243     Number reference_gradBarrTDelta_;
00245     Number watchdog_theta_;
00247     Number watchdog_barr_;
00249     Number watchdog_gradBarrTDelta_;
00251 
00253     Filter filter_;
00254 
00258     Number last_rejection_due_to_filter_;
00261     Index count_successive_filter_rejections_;
00263     Index n_filter_resets_;
00265 
00268     SmartPtr<PDSystemSolver> pd_solver_;
00270   };
00271 
00272 } // namespace Ipopt
00273 
00274 #endif

Generated on Sun Nov 14 14:06:34 2010 for Coin-All by  doxygen 1.4.7