Ipopt Documentation  
 
Loading...
Searching...
No Matches
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
12#include "IpPDSystemSolver.hpp"
13#include "IpIpoptAlg.hpp"
14#include "IpCGPenaltyCq.hpp"
15
16namespace Ipopt
17{
18
22{
23public:
26
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
85 );
86
105 );
106
114 virtual bool TryCorrector(
118 );
119
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
161private:
172
175 );
176
180 );
182
185 {
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
202 );
203
207 );
208
210 // ToDo This should probably not be a static member function if we want to allow for different relaxation parameters values
211 static bool Compare_le(
212 Number lhs,
213 Number rhs,
215 );
216
222
225
247
251 // Number used to indicate that mu has been decreased
253
256
261
264
266
269
276
281
291
294
311
317
319
324};
325
326} // namespace Ipopt
327
328#endif
#define DBG_ASSERT(test)
Definition IpDebug.hpp:27
IpoptCalculatedQuantities & IpCq() const
Base class for backtracking line search acceptors.
Class for all Chen-Goldfarb penalty method specific calculated quantities.
Class to organize all the additional data required by the Chen-Goldfarb penalty function algorithm.
Line search acceptor, based on the Chen-Goldfarb penalty function approach.
Number kappa_soc_
Required reduction in constraint violation before trying multiple second order correction steps .
virtual void PrepareRestoPhaseStart()
Method that is called before the restoration phase is called.
CGPenaltyData & CGPenData()
Method to easily access CGPenalty data.
Number penalty_update_infeasibility_tol_
Tolerance for infeasibility part in penalty parameter update rule.
static bool Compare_le(Number lhs, Number rhs, Number BasVal)
Check comparison "lhs <= rhs", using machine precision based on BasVal.
Number pen_theta_max_
Upper bound on infeasibility.
Number reference_penalty_function_
Penalty function at the point with respect to which progress is to be made.
virtual void InitThisLineSearch(bool in_watchdog)
Initialization for the next line search.
bool never_use_piecewise_penalty_ls_
Flag for whether or not use piecewise penalty line search.
CGPenaltyLSAcceptor(const CGPenaltyLSAcceptor &)
Copy Constructor.
Number mult_diverg_feasibility_tol_
Check if the multpliers are diverging.
Number watchdog_penalty_function_
Penalty function at the point with respect to which progress is to be made (at watchdog point)
bool ArmijoHolds(Number alpha_primal_test)
Check if the trial point is acceptable by the Armijo condition.
Number theta_min_
Parameters deciding when the piecewise penalty acceptor shall be closed.
virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)
Method for checking if current trial point is acceptable.
virtual ~CGPenaltyLSAcceptor()
Destructor.
virtual void StartWatchDog()
Method for setting internal data if the watchdog procedure is started.
SmartPtr< const IteratesVector > watchdog_delta_cgpen_
Backup for the Chen-Goldfarb search direction (needed in the update rule for the penalty parameter.
virtual Number CalculateAlphaMin()
Method returning the lower bound on the trial step sizes.
Number watchdog_direct_deriv_penalty_function_
Directional derivative of penalty function at the point with respect to which progress is to be made ...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for OptionsList.
CGPenaltyLSAcceptor(const SmartPtr< PDSystemSolver > &pd_solver)
Constructor.
Number eta_min_
Minimal tolerance for step part in penalty parameter update rule.
virtual void StopWatchDog()
Method for setting internal data if the watchdog procedure is stopped.
CGPenaltyCq & CGPenCq()
Method to easily access CGPenalty calculated quantities.
bool IsAcceptableToPiecewisePenalty(Number alpha_primal_test)
Check if the trial point is acceptable to the piecewise penalty list.
Number reference_direct_deriv_penalty_function_
Directional derivative of penalty function at the point with respect to which progress is to be made.
void operator=(const CGPenaltyLSAcceptor &)
Default Assignment Operator.
Number eta_penalty_
Relaxation factor in the Armijo condition for the penalty function.
Index ls_counter_
counter for cut backs in the line search
Index counter_first_type_penalty_updates_
Counter for increases of penalty parameter.
SmartPtr< const IteratesVector > best_iterate_
Store the iterate with best KKT error found so far.
bool accepted_by_Armijo_
Flag indicating whether the trial point is accepted by the Armijo condition or the PLPF condition.
virtual bool DoFallback()
Method for doing a fallback approach in case no search direction could be computed.
virtual void Reset()
Reset the acceptor.
virtual bool NeverRestorationPhase()
Method for telling the BacktrackingLineSearch object that the restoration is not needed.
Index max_soc_
Maximal number of second order correction steps.
virtual bool TrySecondOrderCorrection(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try a second order correction for the constraints.
Number min_alpha_primal_
Minimal step size that triggers non-monotone method.
Number reference_theta_
Initial constraint violation.
SmartPtr< PDSystemSolver > pd_solver_
virtual bool RestoredIterate()
Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
PiecewisePenalty PiecewisePenalty_
piecewise penalty list
Number piecewisepenalty_gamma_obj_
Parameters for piecewise penalty acceptor.
Number penalty_update_compl_tol_
Tolerance for complementarity part in penalty parameter update rule.
virtual char UpdateForNextIteration(Number alpha_primal_test)
Method for ending the current line search.
Number best_KKT_error_
Record the lease KKT error found so far.
virtual bool TryCorrector(Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
Try higher order corrector (for fast local convergence).
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.
bool reset_piecewise_penalty_
Flag indicating whether PiecewisePenalty has to be initialized.
Templated class which stores one entry for the CachedResult class.
IpoptAdditionalData & AdditionalData()
Get access to additional data object.
This class stores a list of user set options.
Class for the Piecewise Penalty.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ipindex Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17