IpFilterLSAcceptor.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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
00175
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 NO_CORRECTOR=0,
00209 AFFINE_CORRECTOR,
00210 PRIMAL_DUAL_CORRECTOR
00211 };
00213 CorrectorTypeEnum corrector_type_;
00216 Number corrector_compl_avrg_red_fact_;
00219 bool skip_corr_if_neg_curv_;
00222 bool skip_corr_in_monotone_mode_;
00224 Index max_filter_resets_;
00229 Index filter_reset_trigger_;
00231
00236 Number reference_theta_;
00239 Number reference_barr_;
00242 Number reference_gradBarrTDelta_;
00244 Number watchdog_theta_;
00246 Number watchdog_barr_;
00248 Number watchdog_gradBarrTDelta_;
00250
00252 Filter filter_;
00253
00257 Number last_rejection_due_to_filter_;
00260 Index count_successive_filter_rejections_;
00262 Index n_filter_resets_;
00264
00267 SmartPtr<PDSystemSolver> pd_solver_;
00269 };
00270
00271 }
00272
00273 #endif