Ipopt Documentation  
IpCGPenaltyLSAcceptor.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2008 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors: Andreas Waechter IBM 2005-10-13
6 
7 #ifndef __IPCGPENALTYLSACCEPTOR_HPP__
8 #define __IPCGPENALTYLSACCEPTOR_HPP__
9 
10 #include "IpPiecewisePenalty.hpp"
12 #include "IpPDSystemSolver.hpp"
13 #include "IpIpoptAlg.hpp"
14 #include "IpCGPenaltyCq.hpp"
15 
16 namespace Ipopt
17 {
18 
22 {
23 public:
33  const SmartPtr<PDSystemSolver>& pd_solver
34  );
35 
39 
40  virtual bool InitializeImpl(
41  const OptionsList& options,
42  const std::string& prefix);
43 
51  virtual void Reset();
52 
58  virtual void InitThisLineSearch(
59  bool in_watchdog
60  );
61 
67  virtual void PrepareRestoPhaseStart();
68 
76 
84  Number alpha_primal
85  );
86 
102  Number alpha_primal_test,
103  Number& alpha_primal,
104  SmartPtr<IteratesVector>& actual_delta
105  );
106 
114  virtual bool TryCorrector(
115  Number alpha_primal_test,
116  Number& alpha_primal,
117  SmartPtr<IteratesVector>& actual_delta
118  );
119 
128  Number alpha_primal_test
129  );
130 
132  virtual void StartWatchDog();
133 
135  virtual void StopWatchDog();
136 
140  virtual bool RestoredIterate();
141 
145  virtual bool NeverRestorationPhase();
146 
152  virtual bool DoFallback();
153 
156  static void RegisterOptions(
158  );
160 
161 private:
174  const CGPenaltyLSAcceptor&
175  );
176 
178  void operator=(
179  const CGPenaltyLSAcceptor&
180  );
182 
185  {
186  CGPenaltyData& cg_pen_data = static_cast<CGPenaltyData&>(IpData().AdditionalData());
187  DBG_ASSERT(dynamic_cast<CGPenaltyData*>(&IpData().AdditionalData()));
188  return cg_pen_data;
189  }
190 
193  {
194  CGPenaltyCq& cg_pen_cq = static_cast<CGPenaltyCq&>(IpCq().AdditionalCq());
195  DBG_ASSERT(dynamic_cast<CGPenaltyCq*>(&IpCq().AdditionalCq()));
196  return cg_pen_cq;
197  }
198 
201  Number alpha_primal_test
202  );
203 
206  Number alpha_primal_test
207  );
208 
213  static bool Compare_le(
214  Number lhs,
215  Number rhs,
216  Number BasVal
217  );
218 
224 
249 
253  // Number used to indicate that mu has been decreased
255 
258 
263 
266 
268 
271 
278 
283 
293 
313 
319 
321 
326 };
327 
328 } // namespace Ipopt
329 
330 #endif
Ipopt::CGPenaltyLSAcceptor::reference_curr_direct_f_nrm_
Number reference_curr_direct_f_nrm_
Definition: IpCGPenaltyLSAcceptor.hpp:302
Ipopt::CGPenaltyLSAcceptor::TrySecondOrderCorrection
virtual bool TrySecondOrderCorrection(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try a second order correction for the constraints.
Ipopt::CGPenaltyLSAcceptor::Compare_le
static bool Compare_le(Number lhs, Number rhs, Number BasVal)
Check comparison "lhs <= rhs", using machine precision based on BasVal.
Ipopt::CGPenaltyLSAcceptor::pen_theta_max_
Number pen_theta_max_
Upper bound on infeasibility.
Definition: IpCGPenaltyLSAcceptor.hpp:250
Ipopt::CGPenaltyLSAcceptor::DoFallback
virtual bool DoFallback()
Method for doing a fallback approach in case no search direction could be computed.
Ipopt::CGPenaltyLSAcceptor::Reset
virtual void Reset()
Reset the acceptor.
IpCGPenaltyCq.hpp
Ipopt::CGPenaltyLSAcceptor::penalty_update_compl_tol_
Number penalty_update_compl_tol_
Tolerance for complementarity part in penalty parameter update rule.
Definition: IpCGPenaltyLSAcceptor.hpp:237
Ipopt::CGPenaltyLSAcceptor::piecewisepenalty_gamma_obj_
Number piecewisepenalty_gamma_obj_
Parameters for piecewise penalty acceptor.
Definition: IpCGPenaltyLSAcceptor.hpp:246
Ipopt::CGPenaltyLSAcceptor::gamma_tilde_
Number gamma_tilde_
Definition: IpCGPenaltyLSAcceptor.hpp:242
Ipopt::CGPenaltyLSAcceptor::UpdatePenaltyParameter
char UpdatePenaltyParameter()
Ipopt::CGPenaltyLSAcceptor::CGPenaltyLSAcceptor
CGPenaltyLSAcceptor(const SmartPtr< PDSystemSolver > &pd_solver)
Constructor.
Ipopt::AlgorithmStrategyObject::IpCq
IpoptCalculatedQuantities & IpCq() const
Definition: IpAlgStrategy.hpp:150
Ipopt::CGPenaltyLSAcceptor::counter_first_type_penalty_updates_
Index counter_first_type_penalty_updates_
Counter for increases of penalty parameter.
Definition: IpCGPenaltyLSAcceptor.hpp:279
Ipopt::CGPenaltyLSAcceptor::PiecewisePenalty_
PiecewisePenalty PiecewisePenalty_
piecewise penalty list
Definition: IpCGPenaltyLSAcceptor.hpp:316
Ipopt::CGPenaltyLSAcceptor::never_use_piecewise_penalty_ls_
bool never_use_piecewise_penalty_ls_
Flag for whether or not use piecewise penalty line search.
Definition: IpCGPenaltyLSAcceptor.hpp:314
Ipopt::CGPenaltyLSAcceptor::chi_hat_
Number chi_hat_
Definition: IpCGPenaltyLSAcceptor.hpp:238
Ipopt::CGPenaltyLSAcceptor::CurrentIsBest
bool CurrentIsBest()
Ipopt::CGPenaltyLSAcceptor::gamma_hat_
Number gamma_hat_
Definition: IpCGPenaltyLSAcceptor.hpp:241
Ipopt::CGPenaltyLSAcceptor::MultipliersDiverged
bool MultipliersDiverged()
Ipopt::CGPenaltyLSAcceptor::reference_penalty_function_
Number reference_penalty_function_
Penalty function at the point with respect to which progress is to be made.
Definition: IpCGPenaltyLSAcceptor.hpp:298
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::CGPenaltyLSAcceptor::~CGPenaltyLSAcceptor
virtual ~CGPenaltyLSAcceptor()
Destructor.
Ipopt::CGPenaltyLSAcceptor::CGPenCq
CGPenaltyCq & CGPenCq()
Method to easily access CGPenalty calculated quantities.
Definition: IpCGPenaltyLSAcceptor.hpp:192
Ipopt::CGPenaltyLSAcceptor::eta_penalty_
Number eta_penalty_
Relaxation factor in the Armijo condition for the penalty function.
Definition: IpCGPenaltyLSAcceptor.hpp:228
Ipopt::CGPenaltyLSAcceptor::operator=
void operator=(const CGPenaltyLSAcceptor &)
Default Assignment Operator.
Ipopt::CGPenaltyLSAcceptor::chi_tilde_
Number chi_tilde_
Definition: IpCGPenaltyLSAcceptor.hpp:239
Ipopt::AlgorithmStrategyObject::IpData
IpoptData & IpData() const
Definition: IpAlgStrategy.hpp:144
Ipopt::CGPenaltyData
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
Definition: IpCGPenaltyData.hpp:22
Ipopt::CGPenaltyLSAcceptor::StopWatchDog
virtual void StopWatchDog()
Method for setting internal data if the watchdog procedure is stopped.
Ipopt::CGPenaltyLSAcceptor::max_soc_
Index max_soc_
Maximal number of second order correction steps.
Definition: IpCGPenaltyLSAcceptor.hpp:272
IpBacktrackingLSAcceptor.hpp
Ipopt::CGPenaltyLSAcceptor::jump_for_tiny_step_
Index jump_for_tiny_step_
Definition: IpCGPenaltyLSAcceptor.hpp:320
Ipopt::CGPenaltyLSAcceptor::eta_min_
Number eta_min_
Minimal tolerance for step part in penalty parameter update rule.
Definition: IpCGPenaltyLSAcceptor.hpp:234
Ipopt::CGPenaltyLSAcceptor::pd_solver_
SmartPtr< PDSystemSolver > pd_solver_
Definition: IpCGPenaltyLSAcceptor.hpp:324
Ipopt::CGPenaltyLSAcceptor::kappa_soc_
Number kappa_soc_
Required reduction in constraint violation before trying multiple second order correction steps .
Definition: IpCGPenaltyLSAcceptor.hpp:276
IpPiecewisePenalty.hpp
Ipopt::CGPenaltyLSAcceptor::watchdog_delta_cgpen_
SmartPtr< const IteratesVector > watchdog_delta_cgpen_
Backup for the Chen-Goldfarb search direction (needed in the update rule for the penalty parameter.
Definition: IpCGPenaltyLSAcceptor.hpp:311
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::CGPenaltyLSAcceptor::watchdog_direct_deriv_penalty_function_
Number watchdog_direct_deriv_penalty_function_
Directional derivative of penalty function at the point with respect to which progress is to be made ...
Definition: IpCGPenaltyLSAcceptor.hpp:308
Ipopt::CGPenaltyLSAcceptor::mult_diverg_feasibility_tol_
Number mult_diverg_feasibility_tol_
Check if the multpliers are diverging.
Definition: IpCGPenaltyLSAcceptor.hpp:291
Ipopt::CGPenaltyLSAcceptor::mult_diverg_y_tol_
Number mult_diverg_y_tol_
Definition: IpCGPenaltyLSAcceptor.hpp:292
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::CGPenaltyLSAcceptor::ls_counter_
Index ls_counter_
counter for cut backs in the line search
Definition: IpCGPenaltyLSAcceptor.hpp:285
Ipopt::CGPenaltyLSAcceptor::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
Ipopt::IpoptData::AdditionalData
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
Definition: IpIpoptData.hpp:606
Ipopt::CGPenaltyLSAcceptor::IsAcceptableToPiecewisePenalty
bool IsAcceptableToPiecewisePenalty(Number alpha_primal_test)
Check if the trial point is acceptable to the piecewise penalty list.
Ipopt::CGPenaltyLSAcceptor::UpdateForNextIteration
virtual char UpdateForNextIteration(Number alpha_primal_test)
Method for ending the current line search.
Ipopt::CGPenaltyLSAcceptor::CheckAcceptabilityOfTrialPoint
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)
Method for checking if current trial point is acceptable.
Ipopt::CGPenaltyLSAcceptor::accepted_by_Armijo_
bool accepted_by_Armijo_
Flag indicating whether the trial point is accepted by the Armijo condition or the PLPF condition.
Definition: IpCGPenaltyLSAcceptor.hpp:262
Ipopt::CGPenaltyLSAcceptor::reference_theta_
Number reference_theta_
Initial constraint violation.
Definition: IpCGPenaltyLSAcceptor.hpp:269
Ipopt::CGPenaltyLSAcceptor::CalculateAlphaMin
virtual Number CalculateAlphaMin()
Method returning the lower bound on the trial step sizes.
Ipopt::CGPenaltyLSAcceptor::TryCorrector
virtual bool TryCorrector(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try higher order corrector (for fast local convergence).
Ipopt::CGPenaltyLSAcceptor::curr_eta_
Number curr_eta_
eta parameter
Definition: IpCGPenaltyLSAcceptor.hpp:282
Ipopt::CGPenaltyLSAcceptor
Line search acceptor, based on the Chen-Goldfarb penalty function approach.
Definition: IpCGPenaltyLSAcceptor.hpp:22
Ipopt::CGPenaltyLSAcceptor::best_iterate_
SmartPtr< const IteratesVector > best_iterate_
Store the iterate with best KKT error found so far.
Definition: IpCGPenaltyLSAcceptor.hpp:289
IpPDSystemSolver.hpp
Ipopt::CGPenaltyLSAcceptor::StoreBestPoint
void StoreBestPoint()
Ipopt::CGPenaltyLSAcceptor::ArmijoHolds
bool ArmijoHolds(Number alpha_primal_test)
Check if the trial point is acceptable by the Armijo condition.
Ipopt::CGPenaltyLSAcceptor::RestoreBestPoint
bool RestoreBestPoint()
Ipopt::CGPenaltyLSAcceptor::reference_direct_deriv_penalty_function_
Number reference_direct_deriv_penalty_function_
Directional derivative of penalty function at the point with respect to which progress is to be made.
Definition: IpCGPenaltyLSAcceptor.hpp:301
Ipopt::CGPenaltyLSAcceptor::penalty_max_
Number penalty_max_
Definition: IpCGPenaltyLSAcceptor.hpp:243
Ipopt::CGPenaltyLSAcceptor::CGPenData
CGPenaltyData & CGPenData()
Method to easily access CGPenalty data.
Definition: IpCGPenaltyLSAcceptor.hpp:184
Ipopt::PiecewisePenalty
Class for the Piecewise Penalty.
Definition: IpPiecewisePenalty.hpp:37
Ipopt::CGPenaltyLSAcceptor::chi_cup_
Number chi_cup_
Definition: IpCGPenaltyLSAcceptor.hpp:240
Ipopt::IpoptCalculatedQuantities::AdditionalCq
IpoptAdditionalCq & AdditionalCq()
Definition: IpIpoptCalculatedQuantities.hpp:574
Ipopt::CGPenaltyLSAcceptor::InitThisLineSearch
virtual void InitThisLineSearch(bool in_watchdog)
Initialization for the next line search.
Ipopt::CGPenaltyLSAcceptor::piecewisepenalty_gamma_infeasi_
Number piecewisepenalty_gamma_infeasi_
Definition: IpCGPenaltyLSAcceptor.hpp:247
Ipopt::CGPenaltyLSAcceptor::best_KKT_error_
Number best_KKT_error_
Record the lease KKT error found so far.
Definition: IpCGPenaltyLSAcceptor.hpp:287
Ipopt::CGPenaltyLSAcceptor::counter_second_type_penalty_updates_
Index counter_second_type_penalty_updates_
Definition: IpCGPenaltyLSAcceptor.hpp:280
Ipopt::CGPenaltyLSAcceptor::watchdog_penalty_function_
Number watchdog_penalty_function_
Penalty function at the point with respect to which progress is to be made (at watchdog point)
Definition: IpCGPenaltyLSAcceptor.hpp:305
Ipopt::CGPenaltyLSAcceptor::StartWatchDog
virtual void StartWatchDog()
Method for setting internal data if the watchdog procedure is started.
Ipopt::CGPenaltyLSAcceptor::CGPenaltyLSAcceptor
CGPenaltyLSAcceptor(const CGPenaltyLSAcceptor &)
Copy Constructor.
Ipopt::CGPenaltyLSAcceptor::penalty_update_infeasibility_tol_
Number penalty_update_infeasibility_tol_
Tolerance for infeasibility part in penalty parameter update rule.
Definition: IpCGPenaltyLSAcceptor.hpp:231
Ipopt::BacktrackingLSAcceptor
Base class for backtracking line search acceptors.
Definition: IpBacktrackingLSAcceptor.hpp:19
Ipopt::CGPenaltyLSAcceptor::theta_min_
Number theta_min_
Parameters deciding when the piecewise penalty acceptor shall be closed.
Definition: IpCGPenaltyLSAcceptor.hpp:257
Ipopt::CGPenaltyLSAcceptor::PrepareRestoPhaseStart
virtual void PrepareRestoPhaseStart()
Method that is called before the restoration phase is called.
Ipopt::CGPenaltyLSAcceptor::epsilon_c_
Number epsilon_c_
Definition: IpCGPenaltyLSAcceptor.hpp:244
Ipopt::CGPenaltyLSAcceptor::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
Ipopt::CGPenaltyLSAcceptor::RestoredIterate
virtual bool RestoredIterate()
Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:28
Ipopt::CGPenaltyLSAcceptor::NeverRestorationPhase
virtual bool NeverRestorationPhase()
Method for telling the BacktrackingLineSearch object that the restoration is not needed.
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
IpIpoptAlg.hpp
Ipopt::CGPenaltyLSAcceptor::pen_theta_max_fact_
Number pen_theta_max_fact_
Definition: IpCGPenaltyLSAcceptor.hpp:251
Ipopt::CGPenaltyLSAcceptor::reset_piecewise_penalty_
bool reset_piecewise_penalty_
Flag indicating whether PiecewisePenalty has to be initialized.
Definition: IpCGPenaltyLSAcceptor.hpp:318
Ipopt::CGPenaltyLSAcceptor::pen_curr_mu_
Number pen_curr_mu_
Definition: IpCGPenaltyLSAcceptor.hpp:254
Ipopt::CGPenaltyLSAcceptor::min_alpha_primal_
Number min_alpha_primal_
Minimal step size that triggers non-monotone method.
Definition: IpCGPenaltyLSAcceptor.hpp:265
Ipopt::CGPenaltyCq
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpCGPenaltyCq.hpp:21