00001 // Copyright (C) 2005, 2007 International Business Machines and others. 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // $Id: IpCGPenaltyLSAcceptor.hpp 551 2005-10-27 00:31:28Z andreasw $ 00006 // 00007 // Authors: Andreas Waechter IBM 2005-10-13 00008 00009 #ifndef __IPCGPENALTYLSACCEPTOR_HPP__ 00010 #define __IPCGPENALTYLSACCEPTOR_HPP__ 00011 00012 #include "IpBacktrackingLSAcceptor.hpp" 00013 #include "IpPDSystemSolver.hpp" 00014 00015 namespace Ipopt 00016 { 00017 00020 class CGPenaltyLSAcceptor : public BacktrackingLSAcceptor 00021 { 00022 public: 00028 CGPenaltyLSAcceptor(const SmartPtr<PDSystemSolver>& pd_solver); 00029 00031 virtual ~CGPenaltyLSAcceptor(); 00033 00035 virtual bool InitializeImpl(const OptionsList& options, 00036 const std::string& prefix); 00037 00044 virtual void Reset(); 00045 00049 virtual void InitThisLineSearch(bool in_watchdog); 00050 00054 virtual void PrepareRestoPhaseStart(); 00055 00060 virtual Number CalculateAlphaMin(); 00061 00067 virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal); 00068 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 00111 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions); 00113 00114 private: 00124 CGPenaltyLSAcceptor(const CGPenaltyLSAcceptor&); 00125 00127 void operator=(const CGPenaltyLSAcceptor&); 00129 00131 //ToDo This should probably not be a static member function if we want to 00132 // allow for different relaxation parameters values 00133 static bool Compare_le(Number lhs, Number rhs, Number BasVal); 00134 00138 Number eta_penalty_; 00141 Number penalty_update_infeasibility_tol_; 00144 Number eta_min_; 00147 Number penalty_update_compl_tol_; 00148 Number chi_hat_; 00149 Number chi_tilde_; 00150 Number chi_cup_; 00151 Number gamma_hat_; 00152 Number gamma_tilde_; 00153 Number penalty_max_; 00154 Number epsilon_c_; 00156 Index max_soc_; 00160 Number kappa_soc_; 00162 00164 Index counter_penalty_updates_; 00165 00167 Number curr_eta_; 00168 00173 Number reference_penalty_function_; 00176 Number reference_direct_deriv_penalty_function_; 00179 Number watchdog_penalty_function_; 00182 Number watchdog_direct_deriv_penalty_function_; 00185 SmartPtr<const IteratesVector> watchdog_delta_cgpen_; 00187 00190 SmartPtr<PDSystemSolver> pd_solver_; 00192 }; 00193 00194 } // namespace Ipopt 00195 00196 #endif