Ipopt Documentation  
IpInexactLSAcceptor.hpp
Go to the documentation of this file.
1 // Copyright (C) 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 2008-09-11
6 // derived file from IpPenaltyLSAcceptor.hpp (rev 019)
7 
8 #ifndef __IPINEXACTLSACCEPTOR_HPP__
9 #define __IPINEXACTLSACCEPTOR_HPP__
10 
12 #include "IpInexactCq.hpp"
13 
14 namespace Ipopt
15 {
16 
21 {
22 public:
32 
34  virtual ~InexactLSAcceptor();
36 
37  virtual bool InitializeImpl(
38  const OptionsList& options,
39  const std::string& prefix
40  );
41 
49  virtual void Reset();
50 
57  virtual void InitThisLineSearch(
58  bool in_watchdog
59  );
60 
65  virtual void PrepareRestoPhaseStart();
66 
69 
77  Number alpha_primal
78  );
79 
86  Number alpha_primal_test,
87  Number& alpha_primal,
88  SmartPtr<IteratesVector>& actual_delta
89  );
90 
98  virtual bool TryCorrector(
99  Number alpha_primal_test,
100  Number& alpha_primal,
101  SmartPtr<IteratesVector>& actual_delta
102  );
103 
112  Number alpha_primal_test
113  );
114 
118  virtual void StartWatchDog();
119 
123  virtual void StopWatchDog();
124 
134  Number trial_barr,
135  Number trial_theta,
136  bool called_from_restoration = false
137  ) const;
139 
142  Number alpha_primal,
143  Number alpha_dual,
145  );
146 
150  virtual bool HasComputeAlphaForY() const
151  {
152  return true;
153  }
154 
157  static void RegisterOptions(
159  );
161 
162 protected:
165  {
166  InexactData& inexact_data = static_cast<InexactData&>(IpData().AdditionalData());
167  DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
168  return inexact_data;
169  }
170 
173  {
174  InexactCq& inexact_cq = static_cast<InexactCq&>(IpCq().AdditionalCq());
175  DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
176  return inexact_cq;
177  }
178 
179 private:
192  const InexactLSAcceptor&
193  );
194 
196  void operator=(
197  const InexactLSAcceptor&
198  );
200 
203  Number alpha
204  );
205 
210  void ResetSlacks();
211 
234 
253 
269 
274  bool in_tt2_;
275 
280 
287 };
288 
289 } // namespace Ipopt
290 
291 #endif
Ipopt::InexactLSAcceptor::last_nu_
Number last_nu_
Value of penalty parameter at beginning of the iteration.
Definition: IpInexactLSAcceptor.hpp:259
Ipopt::InexactLSAcceptor::UpdateForNextIteration
virtual char UpdateForNextIteration(Number alpha_primal_test)
Method for ending the current line search.
Ipopt::InexactLSAcceptor::resto_pred_
Number resto_pred_
When called from the restoration phase, this is the required predicted reduction.
Definition: IpInexactLSAcceptor.hpp:279
Ipopt::InexactLSAcceptor::reference_barr_
Number reference_barr_
Barrier objective function at the point with respect to which progress is to be made.
Definition: IpInexactLSAcceptor.hpp:242
Ipopt::InexactLSAcceptor::HasComputeAlphaForY
virtual bool HasComputeAlphaForY() const
Method returning true of ComputeAlphaForY is implemented for this acceptor.
Definition: IpInexactLSAcceptor.hpp:150
Ipopt::InexactLSAcceptor::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
Ipopt::InexactLSAcceptor::TryCorrector
virtual bool TryCorrector(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try higher order corrector (for fast local convergence).
Ipopt::InexactLSAcceptor::nu_low_
Number nu_low_
Current lower value of the penalty parameter.
Definition: IpInexactLSAcceptor.hpp:261
Ipopt::AlgorithmStrategyObject::IpCq
IpoptCalculatedQuantities & IpCq() const
Definition: IpAlgStrategy.hpp:150
Ipopt::InexactLSAcceptor::nu_low_fact_
Number nu_low_fact_
Factor in update rule for lower penalty parameter.
Definition: IpInexactLSAcceptor.hpp:219
Ipopt::InexactLSAcceptor::eta_
Number eta_
Definition: IpInexactLSAcceptor.hpp:223
Ipopt::InexactLSAcceptor::nu_
Number nu_
Current value of the penalty parameter.
Definition: IpInexactLSAcceptor.hpp:257
Ipopt::InexactLSAcceptor::nu_low_init_
Number nu_low_init_
Initial value of lower penalty parameter.
Definition: IpInexactLSAcceptor.hpp:217
IpInexactCq.hpp
Ipopt::InexactLSAcceptor::watchdog_theta_
Number watchdog_theta_
Constraint violation at reference point.
Definition: IpInexactLSAcceptor.hpp:247
Ipopt::InexactLSAcceptor::StartWatchDog
virtual void StartWatchDog()
Method for setting internal data if the watchdog procedure is started.
Ipopt::InexactLSAcceptor::inexact_decomposition_activate_tol_
Number inexact_decomposition_activate_tol_
Step size threshold for activating step decomposition.
Definition: IpInexactLSAcceptor.hpp:265
Ipopt::InexactLSAcceptor::reference_pred_
Number reference_pred_
Reference predicted reduction.
Definition: IpInexactLSAcceptor.hpp:245
Ipopt::InexactData
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
Definition: IpInexactData.hpp:19
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::InexactLSAcceptor::inexact_decomposition_inactivate_tol_
Number inexact_decomposition_inactivate_tol_
Step size threshold for inactivating step decomposition.
Definition: IpInexactLSAcceptor.hpp:267
Ipopt::InexactLSAcceptor::in_tt2_
bool in_tt2_
Flag indicating if this is a termination test 2 iteration in which we just update the multipliers and...
Definition: IpInexactLSAcceptor.hpp:274
Ipopt::AlgorithmStrategyObject::IpData
IpoptData & IpData() const
Definition: IpAlgStrategy.hpp:144
Ipopt::InexactLSAcceptor::InexactLSAcceptor
InexactLSAcceptor(const InexactLSAcceptor &)
Copy Constructor.
Ipopt::InexactLSAcceptor::CheckAcceptabilityOfTrialPoint
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)
Method for checking if current trial point is acceptable.
Ipopt::InexactLSAcceptor::InitThisLineSearch
virtual void InitThisLineSearch(bool in_watchdog)
Initialization for the next line search.
Ipopt::InexactLSAcceptor::TrySecondOrderCorrection
virtual bool TrySecondOrderCorrection(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try a second order correction for the constraints.
Ipopt::InexactLSAcceptor::nu_init_
Number nu_init_
Initial value of penalty parameter.
Definition: IpInexactLSAcceptor.hpp:215
IpBacktrackingLSAcceptor.hpp
Ipopt::InexactLSAcceptor::InexCq
InexactCq & InexCq()
Method to easily access Inexact calculated quantities.
Definition: IpInexactLSAcceptor.hpp:172
Ipopt::InexactLSAcceptor::nu_inc_
Number nu_inc_
Increment for penalty parameter.
Definition: IpInexactLSAcceptor.hpp:221
Ipopt::InexactLSAcceptor::CalcPred
Number CalcPred(Number alpha)
Compute predicted reduction for given step size.
Ipopt::InexactLSAcceptor
Penalty function line search for the inexact step algorithm version.
Definition: IpInexactLSAcceptor.hpp:21
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::InexactLSAcceptor::operator=
void operator=(const InexactLSAcceptor &)
Overloaded Assignment Operator.
Ipopt::IpoptData::AdditionalData
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
Definition: IpIpoptData.hpp:606
Ipopt::InexactLSAcceptor::InexData
InexactData & InexData()
Method to easily access Inexact data.
Definition: IpInexactLSAcceptor.hpp:164
Ipopt::InexactLSAcceptor::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::InexactLSAcceptor::PrepareRestoPhaseStart
virtual void PrepareRestoPhaseStart()
Method that is called before the restoration phase is called.
Ipopt::InexactLSAcceptor::reference_theta_
Number reference_theta_
Constraint violation at the point with respect to which progress is to be made.
Definition: IpInexactLSAcceptor.hpp:239
Ipopt::InexactLSAcceptor::rho_
Number rho_
Definition: IpInexactLSAcceptor.hpp:225
Ipopt::IpoptCalculatedQuantities::AdditionalCq
IpoptAdditionalCq & AdditionalCq()
Definition: IpIpoptCalculatedQuantities.hpp:574
Ipopt::InexactLSAcceptor::nu_update_inf_skip_tol_
Number nu_update_inf_skip_tol_
Lower feasibility bound to skip penalty parameter update.
Definition: IpInexactLSAcceptor.hpp:229
Ipopt::InexactLSAcceptor::ComputeAlphaForY
virtual Number ComputeAlphaForY(Number alpha_primal, Number alpha_dual, SmartPtr< IteratesVector > &delta)
Method for updating the equality constraint multipliers.
Ipopt::InexactLSAcceptor::last_nu_low_
Number last_nu_low_
Value of lower penalty parameter at beginning of the iteration.
Definition: IpInexactLSAcceptor.hpp:263
Ipopt::InexactLSAcceptor::InexactLSAcceptor
InexactLSAcceptor()
Constructor.
Ipopt::InexactLSAcceptor::IsAcceptableToCurrentIterate
bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta, bool called_from_restoration=false) const
Checks if a trial point is acceptable to the current iterate.
Ipopt::InexactLSAcceptor::accepted_by_low_only_
bool accepted_by_low_only_
Flag indicating if the step was accepted only because of the lower penalty parameter.
Definition: IpInexactLSAcceptor.hpp:286
Ipopt::InexactLSAcceptor::watchdog_pred_
Number watchdog_pred_
Predicted reduction to be compared with in watch dog.
Definition: IpInexactLSAcceptor.hpp:251
Ipopt::BacktrackingLSAcceptor
Base class for backtracking line search acceptors.
Definition: IpBacktrackingLSAcceptor.hpp:19
Ipopt::InexactLSAcceptor::watchdog_barr_
Number watchdog_barr_
Barrier objective function at reference point.
Definition: IpInexactLSAcceptor.hpp:249
Ipopt::InexactLSAcceptor::StopWatchDog
virtual void StopWatchDog()
Method for setting internal data if the watchdog procedure is stopped.
Ipopt::InexactLSAcceptor::Reset
virtual void Reset()
Reset the acceptor.
Ipopt::InexactLSAcceptor::CalculateAlphaMin
virtual Number CalculateAlphaMin()
Method returning the lower bound on the trial step sizes.
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:28
Ipopt::InexactLSAcceptor::tcc_theta_
Number tcc_theta_
theta factor in Tangential Component Condition
Definition: IpInexactLSAcceptor.hpp:227
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
Ipopt::InexactLSAcceptor::~InexactLSAcceptor
virtual ~InexactLSAcceptor()
Destructor.
Ipopt::InexactLSAcceptor::flexible_penalty_function_
bool flexible_penalty_function_
Flag indicating whether the Curtis/Nocedal flexible penalty function should be used.
Definition: IpInexactLSAcceptor.hpp:232
Ipopt::InexactLSAcceptor::ResetSlacks
void ResetSlacks()
Method for resetting the slacks to be satisfying the slack equality constraints without increasing th...
Ipopt::InexactCq
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpInexactCq.hpp:21