Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 // $Id: IpInexactLSAcceptor.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Andreas Waechter IBM 2008-09-11
8 // derived file from IpPenaltyLSAcceptor.hpp (rev 019)
9
10 #ifndef __IPINEXACTLSACCEPTOR_HPP__
11 #define __IPINEXACTLSACCEPTOR_HPP__
12
13 #include "IpBacktrackingLSAcceptor.hpp"
14 #include "IpInexactCq.hpp"
15
16 namespace Ipopt
17 {
18
22 class InexactLSAcceptor : public BacktrackingLSAcceptor
23 {
24 public:
30 InexactLSAcceptor();
31
33 virtual ~InexactLSAcceptor();
35
37 virtual bool InitializeImpl(const OptionsList& options,
38 const std::string& prefix);
39
46 virtual void Reset();
47
51 virtual void InitThisLineSearch(bool in_watchdog);
52
55 virtual void PrepareRestoPhaseStart();
56
58 virtual Number CalculateAlphaMin();
59
65 virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal);
66
71 virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
72 Number& alpha_primal,
73 SmartPtr<IteratesVector>& actual_delta);
74
81 virtual bool TryCorrector(Number alpha_primal_test,
82 Number& alpha_primal,
83 SmartPtr<IteratesVector>& actual_delta);
84
89 virtual char UpdateForNextIteration(Number alpha_primal_test);
90
93 virtual void StartWatchDog();
94
97 virtual void StopWatchDog();
98
105 bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta,
106 bool called_from_restoration=false) const;
108
110 virtual Number ComputeAlphaForY(Number alpha_primal,
111 Number alpha_dual,
112 SmartPtr<IteratesVector>& delta);
113
116 virtual bool HasComputeAlphaForY() const
117 {
118 return true;
119 }
120
123 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
125
126 protected:
128 InexactData& InexData()
129 {
130 InexactData& inexact_data =
131 static_cast<InexactData&>(IpData().AdditionalData());
132 DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
133 return inexact_data;
134 }
135
137 InexactCq& InexCq()
138 {
139 InexactCq& inexact_cq =
140 static_cast<InexactCq&>(IpCq().AdditionalCq());
141 DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
142 return inexact_cq;
143 }
144
145 private:
155 InexactLSAcceptor(const InexactLSAcceptor&);
156
158 void operator=(const InexactLSAcceptor&);
160
162 Number CalcPred(Number alpha);
163
167 void ResetSlacks();
168
172 Number nu_init_;
174 Number nu_low_init_;
176 Number nu_low_fact_;
178 Number nu_inc_;
180 Number eta_;
182 Number rho_;
184 Number tcc_theta_;
186 Number nu_update_inf_skip_tol_;
189 bool flexible_penalty_function_;
191
196 Number reference_theta_;
199 Number reference_barr_;
202 Number reference_pred_;
204 Number watchdog_theta_;
206 Number watchdog_barr_;
208 Number watchdog_pred_;
210
214 Number nu_;
216 Number last_nu_;
218 Number nu_low_;
220 Number last_nu_low_;
222 Number inexact_decomposition_activate_tol_;
224 Number inexact_decomposition_inactivate_tol_;
226
230 bool in_tt2_;
231
234 Number resto_pred_;
235
238 bool accepted_by_low_only_;
239 };
240
241 } // namespace Ipopt
242
243 #endif
Ipopt::InexactLSAcceptor::ResetSlacks
void ResetSlacks()
Method for resetting the slacks to be satisfying the slack equality constraints without increasing t...
Ipopt::InexactLSAcceptor::operator=
void operator=(const InexactLSAcceptor &)
Overloaded Equals Operator.
Ipopt::InexactLSAcceptor::watchdog_theta_
Number watchdog_theta_
Constraint violation at reference point.
Definition: IpInexactLSAcceptor.hpp:204
Ipopt::InexactLSAcceptor
Penalty function line search for the inexact step algorithm version.
Definition: IpInexactLSAcceptor.hpp:22
Ipopt::InexactLSAcceptor::StartWatchDog
virtual void StartWatchDog()
Method for setting internal data if the watchdog procedure is started.
Ipopt::InexactLSAcceptor::CalculateAlphaMin
virtual Number CalculateAlphaMin()
Method returning the lower bound on the trial step sizes.
Ipopt::InexactLSAcceptor::ComputeAlphaForY
virtual Number ComputeAlphaForY(Number alpha_primal, Number alpha_dual, SmartPtr< IteratesVector > &delta)
Method for updating the equality constraint multipliers.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::BacktrackingLSAcceptor
Base class for backtracking line search acceptors.
Definition: IpBacktrackingLSAcceptor.hpp:21
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:230
Ipopt::InexactLSAcceptor::watchdog_pred_
Number watchdog_pred_
Predicted reduction to be compared with in watch dog.
Definition: IpInexactLSAcceptor.hpp:208
Ipopt::InexactLSAcceptor::last_nu_
Number last_nu_
Value of penalty parameter at beginning of the iteration.
Definition: IpInexactLSAcceptor.hpp:216
Ipopt::IpoptCalculatedQuantities::AdditionalCq
IpoptAdditionalCq & AdditionalCq()
Definition: IpIpoptCalculatedQuantities.hpp:452
Ipopt::InexactLSAcceptor::rho_
Number rho_
Definition: IpInexactLSAcceptor.hpp:182
Ipopt::InexactLSAcceptor::InitThisLineSearch
virtual void InitThisLineSearch(bool in_watchdog)
Initialization for the next line search.
Ipopt::InexactLSAcceptor::resto_pred_
Number resto_pred_
When called from the restoration phase, this is the required predicted reduction. ...
Definition: IpInexactLSAcceptor.hpp:234
Ipopt::InexactLSAcceptor::inexact_decomposition_activate_tol_
Number inexact_decomposition_activate_tol_
Step size threshold for activating step decomposition.
Definition: IpInexactLSAcceptor.hpp:222
Ipopt::InexactLSAcceptor::nu_low_fact_
Number nu_low_fact_
Factor in update rule for lower penalty parameter.
Definition: IpInexactLSAcceptor.hpp:176
Ipopt::InexactLSAcceptor::reference_pred_
Number reference_pred_
Reference predicted reduction.
Definition: IpInexactLSAcceptor.hpp:202
Ipopt::InexactLSAcceptor::last_nu_low_
Number last_nu_low_
Value of lower penalty parameter at beginning of the iteration.
Definition: IpInexactLSAcceptor.hpp:220
Ipopt::InexactLSAcceptor::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::InexactLSAcceptor::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
InitializeImpl - overloaded from AlgorithmStrategyObject.
IpBacktrackingLSAcceptor.hpp
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::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::InexactLSAcceptor::reference_theta_
Number reference_theta_
Constraint violation at the point with respect to which progress is to be made.
Definition: IpInexactLSAcceptor.hpp:196
Ipopt::InexactLSAcceptor::HasComputeAlphaForY
virtual bool HasComputeAlphaForY() const
Method returning true of ComputeAlphaForY is implemented for this acceptor.
Definition: IpInexactLSAcceptor.hpp:116
Ipopt::InexactLSAcceptor::nu_low_
Number nu_low_
Current lower value of the penalty parameter.
Definition: IpInexactLSAcceptor.hpp:218
Ipopt::InexactLSAcceptor::watchdog_barr_
Number watchdog_barr_
Barrier objective function at reference point.
Definition: IpInexactLSAcceptor.hpp:206
Ipopt::InexactLSAcceptor::InexData
InexactData & InexData()
Method to easily access Inexact data.
Definition: IpInexactLSAcceptor.hpp:128
Ipopt::IpoptData::AdditionalData
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
Definition: IpIpoptData.hpp:502
Ipopt::InexactLSAcceptor::UpdateForNextIteration
virtual char UpdateForNextIteration(Number alpha_primal_test)
Method for ending the current line search.
Ipopt::InexactLSAcceptor::InexCq
InexactCq & InexCq()
Method to easily access Inexact calculated quantities.
Definition: IpInexactLSAcceptor.hpp:137
Ipopt::InexactLSAcceptor::PrepareRestoPhaseStart
virtual void PrepareRestoPhaseStart()
Method that is called before the restoration phase is called.
Ipopt::InexactLSAcceptor::inexact_decomposition_inactivate_tol_
Number inexact_decomposition_inactivate_tol_
Step size threshold for inactivating step decomposition.
Definition: IpInexactLSAcceptor.hpp:224
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.
DBG_ASSERT
#define DBG_ASSERT(test)
Definition: IpDebug.hpp:38
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::~InexactLSAcceptor
virtual ~InexactLSAcceptor()
Default destructor.
Ipopt::InexactCq
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Definition: IpInexactCq.hpp:22
Ipopt::InexactData
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm...
Definition: IpInexactData.hpp:19
Ipopt::InexactLSAcceptor::nu_
Number nu_
Current value of the penalty parameter.
Definition: IpInexactLSAcceptor.hpp:214
Ipopt::InexactLSAcceptor::nu_init_
Number nu_init_
Initial value of penalty parameter.
Definition: IpInexactLSAcceptor.hpp:172
Ipopt::InexactLSAcceptor::nu_low_init_
Number nu_low_init_
Initial value of lower penalty parameter.
Definition: IpInexactLSAcceptor.hpp:174
Ipopt::AlgorithmStrategyObject::IpData
IpoptData & IpData() const
Definition: IpAlgStrategy.hpp:131
Ipopt::InexactLSAcceptor::tcc_theta_
Number tcc_theta_
theta factor in Tangential Component Condition
Definition: IpInexactLSAcceptor.hpp:184
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:199
Ipopt::InexactLSAcceptor::InexactLSAcceptor
InexactLSAcceptor()
Constructor.
Ipopt::InexactLSAcceptor::Reset
virtual void Reset()
Reset the acceptor.
Ipopt::InexactLSAcceptor::CheckAcceptabilityOfTrialPoint
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)
Method for checking if current trial point is acceptable.
Ipopt::InexactLSAcceptor::flexible_penalty_function_
bool flexible_penalty_function_
Flag indicating whether the Curtis/Nocedal flexible penalty function should be used.
Definition: IpInexactLSAcceptor.hpp:189
Ipopt::InexactLSAcceptor::CalcPred
Number CalcPred(Number alpha)
Compute predicted reduction for given step size.
IpInexactCq.hpp
Ipopt::AlgorithmStrategyObject::IpCq
IpoptCalculatedQuantities & IpCq() const
Definition: IpAlgStrategy.hpp:137
Ipopt::InexactLSAcceptor::nu_update_inf_skip_tol_
Number nu_update_inf_skip_tol_
Lower feasiblity bound to skip penalty parameter update.
Definition: IpInexactLSAcceptor.hpp:186
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:238
Ipopt::InexactLSAcceptor::eta_
Number eta_
Definition: IpInexactLSAcceptor.hpp:180
Ipopt::InexactLSAcceptor::StopWatchDog
virtual void StopWatchDog()
Method for setting internal data if the watchdog procedure is stopped.
Ipopt::InexactLSAcceptor::nu_inc_
Number nu_inc_
Incrememt for penalty parameter.
Definition: IpInexactLSAcceptor.hpp:178