Ipopt
trunk
|
00001 // Copyright (C) 2005, 2006 International Business Machines and others. 00002 // All Rights Reserved. 00003 // This code is published under the Eclipse Public License. 00004 // 00005 // $Id$ 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 00173 Number eta_phi_; 00175 Number delta_; 00177 Number s_phi_; 00179 Number s_theta_; 00181 Number gamma_phi_; 00183 Number gamma_theta_; 00185 Number alpha_min_frac_; 00187 Index max_soc_; 00191 Number kappa_soc_; 00196 Number obj_max_inc_; 00197 00199 enum CorrectorTypeEnum 00200 { 00201 NO_CORRECTOR=0, 00202 AFFINE_CORRECTOR, 00203 PRIMAL_DUAL_CORRECTOR 00204 }; 00206 CorrectorTypeEnum corrector_type_; 00209 Number corrector_compl_avrg_red_fact_; 00212 bool skip_corr_if_neg_curv_; 00215 bool skip_corr_in_monotone_mode_; 00217 Index max_filter_resets_; 00222 Index filter_reset_trigger_; 00224 00229 Number reference_theta_; 00232 Number reference_barr_; 00235 Number reference_gradBarrTDelta_; 00237 Number watchdog_theta_; 00239 Number watchdog_barr_; 00241 Number watchdog_gradBarrTDelta_; 00243 00245 Filter filter_; 00246 00250 Number last_rejection_due_to_filter_; 00253 Index count_successive_filter_rejections_; 00255 Index n_filter_resets_; 00257 00260 SmartPtr<PDSystemSolver> pd_solver_; 00262 }; 00263 00264 } // namespace Ipopt 00265 00266 #endif