# Ipopt::CGPenaltyLSAcceptor Class Reference

Line search acceptor, based on the Chen-Goldfarb penalty function approach. More...

`#include <IpCGPenaltyLSAcceptor.hpp>`

Inheritance diagram for Ipopt::CGPenaltyLSAcceptor:
[legend]

List of all members.

## Public Member Functions
virtual bool | InitializeImpl (const OptionsList &options, const std::string &prefix)
| InitializeImpl - overloaded from AlgorithmStrategyObject.
virtual void | Reset ()
| Reset the acceptor.
virtual void | InitThisLineSearch (bool in_watchdog)
| Initialization for the next line search.
virtual void | PrepareRestoPhaseStart ()
| Method that is called before the restoration phase is called.
virtual Number | CalculateAlphaMin ()
| Method returning the lower bound on the trial step sizes.
virtual bool | CheckAcceptabilityOfTrialPoint (Number alpha_primal)
| Method for checking if current trial point is acceptable.
virtual bool | TrySecondOrderCorrection (Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
| Try a second order correction for the constraints.
virtual bool | TryCorrector (Number alpha_primal_test, Number &alpha_primal, SmartPtr< IteratesVector > &actual_delta)
| Try higher order corrector (for fast local convergence).
virtual char | UpdateForNextIteration (Number alpha_primal_test)
| Method for ending the current line search.
virtual void | StartWatchDog ()
| Method for setting internal data if the watchdog procedure is started.
virtual void | StopWatchDog ()
| Method for setting internal data if the watchdog procedure is stopped.
virtual bool | RestoredIterate ()
| Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
virtual bool | NeverRestorationPhase ()
| Method for telling the BacktrackingLineSearch object that the restoration is not needed.
virtual bool | DoFallback ()
| Method for doing a fallback approach in case no search direction could be computed.
Constructors/Destructors
| CGPenaltyLSAcceptor (const SmartPtr< PDSystemSolver > &pd_solver)
| Constructor.
virtual | ~CGPenaltyLSAcceptor ()
| Default destructor.
## Private Member Functions
CGPenaltyData & | CGPenData ()
| Method to easily access CGPenalty data.
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.
bool | ArmijoHolds (Number alpha_primal_test)
| Check if the trial point is acceptable by the Armijo condition.
bool | CurrentIsBest ()
void | StoreBestPoint ()
bool | RestoreBestPoint ()
bool | MultipliersDiverged ()
char | UpdatePenaltyParameter ()
Default Compiler Generated Methods
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
| CGPenaltyLSAcceptor (const CGPenaltyLSAcceptor &)
| Copy Constructor.
void | operator= (const CGPenaltyLSAcceptor &)
| Overloaded Equals Operator.
## Static Private Member Functions
static bool | Compare_le (Number lhs, Number rhs, Number BasVal)
| Check comparison "lhs <= rhs", using machine precision based on BasVal.
## Private Attributes
Number | pen_curr_mu_
Number | theta_min_
| Parameters deciding when the piecewise penalty acceptor shall be closed.
bool | accepted_by_Armijo_
| Flag indicating whether the trial point is accepted by the Armijo condition or the PLPF condition.
Number | min_alpha_primal_
| Min step size that triggers nonmonotone method.
Index | max_soc_
| Maximal number of second order correction steps.
Number | kappa_soc_
| Required reduction in constraint violation before trying multiple second order correction steps .
Index | counter_first_type_penalty_updates_
| Counter for increases of penalty parameter.
Index | counter_second_type_penalty_updates_
Number | curr_eta_
| eta parameter
Index | ls_counter_
| counter for cut backs in the line search
Number | best_KKT_error_
| Record the lease KKT error found so far.
SmartPtr< const IteratesVector > | best_iterate_
| Store the iterate with best KKT error found so far.
Number | mult_diverg_feasibility_tol_
| Check if the multpliers are diverging.
Number | mult_diverg_y_tol_
bool | never_use_piecewise_penalty_ls_
| Flag for whether or not use piecewise penalty line search.
PiecewisePenalty | PiecewisePenalty_
bool | reset_piecewise_penalty_
| Flag indicating whether PiecewisePenalty has to be initiailized.
Index | jump_for_tiny_step_
Parameters for the penalty function algorithm.
Number | eta_penalty_
| Relaxation factor in the Armijo condition for the penalty function.
Number | penalty_update_infeasibility_tol_
| Tolerance for infeasibility part in penalty parameter update rule.
Number | eta_min_
| Minimal tolerance for step part in penalty parameter update rule.
Number | penalty_update_compl_tol_
| Tolerance for complementarity part in penalty parameter update rule.
Number | chi_hat_
Number | chi_tilde_
Number | chi_cup_
Number | gamma_hat_
Number | gamma_tilde_
Number | penalty_max_
Number | epsilon_c_
Number | piecewisepenalty_gamma_obj_
| Parameters for piecewise penalty acceptor.
Number | piecewisepenalty_gamma_infeasi_
Number | pen_theta_max_
| Upper bound on infeasibility.
Number | pen_theta_max_fact_
Information related to watchdog procedure
Number | reference_penalty_function_
| Penalty function at the point with respect to which progress is to be made.
Number | reference_direct_deriv_penalty_function_
| Directional derivative of penalty function at the point with respect to which progress is to be made.
Number | reference_curr_direct_f_nrm_
Number | watchdog_penalty_function_
| Penalty function at the point with respect to which progress is to be made (at watchdog point).
Number | watchdog_direct_deriv_penalty_function_
| Directional derivative of penalty function at the point with respect to which progress is to be made (at watchdog point).
SmartPtr< const IteratesVector > | watchdog_delta_cgpen_
| Backup for the Chen-Goldfarb search direction (needed in the update rule for the penalty parameter.
Strategy objective that are used
SmartPtr< PDSystemSolver > | pd_solver_
Number | reference_theta_
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions)
| Methods for OptionsList.

## Detailed Description

Line search acceptor, based on the Chen-Goldfarb penalty function approach.

Definition at line 23 of file IpCGPenaltyLSAcceptor.hpp.

## Constructor & Destructor Documentation

Ipopt::CGPenaltyLSAcceptor::CGPenaltyLSAcceptor | ( | const SmartPtr< PDSystemSolver > & | pd_solver | ) |

Constructor.

The PDSystemSolver object only needs to be provided (i.e. not NULL) if second order correction or corrector steps are to be used.

virtual Ipopt::CGPenaltyLSAcceptor::~CGPenaltyLSAcceptor | ( |  | ) | `[virtual]`

Default destructor.

Ipopt::CGPenaltyLSAcceptor::CGPenaltyLSAcceptor | ( | const CGPenaltyLSAcceptor & |  | ) | `[private]`

Copy Constructor.

## Member Function Documentation

virtual bool Ipopt::CGPenaltyLSAcceptor::InitializeImpl | ( | const OptionsList & | options,
|  | const std::string & | prefix |
| ) |  |  | `[virtual]`

InitializeImpl - overloaded from AlgorithmStrategyObject.

Implements Ipopt::BacktrackingLSAcceptor.

virtual void Ipopt::CGPenaltyLSAcceptor::Reset | ( |  | ) | `[virtual]`

Reset the acceptor.

This function should be called if all previous information should be discarded when the line search is performed the next time. For example, this method should be called if the barrier parameter is changed.

Implements Ipopt::BacktrackingLSAcceptor.

virtual void Ipopt::CGPenaltyLSAcceptor::InitThisLineSearch | ( | bool | in_watchdog | ) | `[virtual]`

Initialization for the next line search.

The flag in_watchdog indicates if we are currently in an active watchdog procedure.

Implements Ipopt::BacktrackingLSAcceptor.

virtual void Ipopt::CGPenaltyLSAcceptor::PrepareRestoPhaseStart | ( |  | ) | `[virtual]`

Method that is called before the restoration phase is called.

Here, we can set up things that are required in the termination test for the restoration phase.

Implements Ipopt::BacktrackingLSAcceptor.

virtual Number Ipopt::CGPenaltyLSAcceptor::CalculateAlphaMin | ( |  | ) | `[virtual]`

Method returning the lower bound on the trial step sizes.

If the backtracking procedure encounters a trial step size below this value after the first trial set, it swtiches to the (soft) restoration phase.

Implements Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::CheckAcceptabilityOfTrialPoint | ( | Number | alpha_primal | ) | `[virtual]`

Method for checking if current trial point is acceptable.

It is assumed that the delta information in ip_data is the search direction used in criteria. The primal trial point has to be set before the call.

Implements Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::TrySecondOrderCorrection | ( | Number | alpha_primal_test,
|  | Number & | alpha_primal,
|  | SmartPtr< IteratesVector > & | actual_delta |
| ) |  |  | `[virtual]`

Try a second order correction for the constraints.

If the first trial step (with incoming alpha_primal) has been reject, this tries up to max_soc_ second order corrections for the constraints. Here, alpha_primal_test is the step size that has to be used in the merit function acceptance tests. On output actual_delta_ has been set to the step including the second order correction if it has been accepted, otherwise it is unchanged. If the SOC step has been accepted, alpha_primal has the fraction-to-the-boundary value for the SOC step on output. The return value is true, if a SOC step has been accepted.

Implements Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::TryCorrector | ( | Number | alpha_primal_test,
|  | Number & | alpha_primal,
|  | SmartPtr< IteratesVector > & | actual_delta |
| ) |  |  | `[virtual]`

Try higher order corrector (for fast local convergence).

In contrast to a second order correction step, which tries to make an unacceptable point acceptable by improving constraint violation, this corrector step is tried even if the regular primal-dual step is acceptable.

Implements Ipopt::BacktrackingLSAcceptor.

virtual char Ipopt::CGPenaltyLSAcceptor::UpdateForNextIteration | ( | Number | alpha_primal_test | ) | `[virtual]`

Method for ending the current line search.

When it is called, the internal data should be updates, e.g., the penalty parameter might be updated. alpha_primal_test is the value of alpha that has been used for in the acceptence test ealier.

Implements Ipopt::BacktrackingLSAcceptor.

virtual void Ipopt::CGPenaltyLSAcceptor::StartWatchDog | ( |  | ) | `[virtual]`

Method for setting internal data if the watchdog procedure is started.

Implements Ipopt::BacktrackingLSAcceptor.

virtual void Ipopt::CGPenaltyLSAcceptor::StopWatchDog | ( |  | ) | `[virtual]`

Method for setting internal data if the watchdog procedure is stopped.

Implements Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::RestoredIterate | ( |  | ) | `[virtual]`

Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.

Reimplemented from Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::NeverRestorationPhase | ( |  | ) | `[virtual]`

Method for telling the BacktrackingLineSearch object that the restoration is not needed.

Reimplemented from Ipopt::BacktrackingLSAcceptor.

virtual bool Ipopt::CGPenaltyLSAcceptor::DoFallback | ( |  | ) | `[virtual]`

Method for doing a fallback approach in case no search direction could be computed.

If no such fall back option is available, return false.

Reimplemented from Ipopt::BacktrackingLSAcceptor.

static void Ipopt::CGPenaltyLSAcceptor::RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | `[static]`

Methods for OptionsList.

Reimplemented from Ipopt::BacktrackingLSAcceptor.

void Ipopt::CGPenaltyLSAcceptor::operator= | ( | const CGPenaltyLSAcceptor & |  | ) | `[private]`

Overloaded Equals Operator.

Reimplemented from Ipopt::BacktrackingLSAcceptor.

CGPenaltyData& Ipopt::CGPenaltyLSAcceptor::CGPenData | ( |  | ) | `[inline, private]`

Method to easily access CGPenalty data.

Definition at line 146 of file IpCGPenaltyLSAcceptor.hpp.

CGPenaltyCq& Ipopt::CGPenaltyLSAcceptor::CGPenCq | ( |  | ) | `[inline, private]`

Method to easily access CGPenalty calculated quantities.

Definition at line 155 of file IpCGPenaltyLSAcceptor.hpp.

bool Ipopt::CGPenaltyLSAcceptor::IsAcceptableToPiecewisePenalty | ( | Number | alpha_primal_test | ) | `[private]`

Check if the trial point is acceptable to the piecewise penalty list.

bool Ipopt::CGPenaltyLSAcceptor::ArmijoHolds | ( | Number | alpha_primal_test | ) | `[private]`

Check if the trial point is acceptable by the Armijo condition.

static bool Ipopt::CGPenaltyLSAcceptor::Compare_le | ( | Number | lhs,
|  | Number | rhs,
|  | Number | BasVal |
| ) |  |  | `[static, private]`

Check comparison "lhs <= rhs", using machine precision based on BasVal.

bool Ipopt::CGPenaltyLSAcceptor::CurrentIsBest | ( |  | ) | `[private]`

void Ipopt::CGPenaltyLSAcceptor::StoreBestPoint | ( |  | ) | `[private]`

bool Ipopt::CGPenaltyLSAcceptor::RestoreBestPoint | ( |  | ) | `[private]`

bool Ipopt::CGPenaltyLSAcceptor::MultipliersDiverged | ( |  | ) | `[private]`

char Ipopt::CGPenaltyLSAcceptor::UpdatePenaltyParameter | ( |  | ) | `[private]`

## Member Data Documentation

Number Ipopt::CGPenaltyLSAcceptor::eta_penalty_`[private]`

Relaxation factor in the Armijo condition for the penalty function.

Definition at line 183 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::penalty_update_infeasibility_tol_`[private]`

Tolerance for infeasibility part in penalty parameter update rule.

Definition at line 186 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::eta_min_`[private]`

Minimal tolerance for step part in penalty parameter update rule.

Definition at line 189 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::penalty_update_compl_tol_`[private]`

Tolerance for complementarity part in penalty parameter update rule.

Definition at line 192 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::chi_hat_`[private]`

Definition at line 193 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::chi_tilde_`[private]`

Definition at line 194 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::chi_cup_`[private]`

Definition at line 195 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::gamma_hat_`[private]`

Definition at line 196 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::gamma_tilde_`[private]`

Definition at line 197 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::penalty_max_`[private]`

Definition at line 198 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::epsilon_c_`[private]`

Definition at line 199 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::piecewisepenalty_gamma_obj_`[private]`

Parameters for piecewise penalty acceptor.

Definition at line 201 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::piecewisepenalty_gamma_infeasi_`[private]`

Definition at line 202 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::pen_theta_max_`[private]`

Upper bound on infeasibility.

Definition at line 205 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::pen_theta_max_fact_`[private]`

Definition at line 206 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::pen_curr_mu_`[private]`

Definition at line 209 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::theta_min_`[private]`

Parameters deciding when the piecewise penalty acceptor shall be closed.

Definition at line 212 of file IpCGPenaltyLSAcceptor.hpp.

bool Ipopt::CGPenaltyLSAcceptor::accepted_by_Armijo_`[private]`

Flag indicating whether the trial point is accepted by the Armijo condition or the PLPF condition.

Definition at line 217 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::min_alpha_primal_`[private]`

Min step size that triggers nonmonotone method.

Definition at line 220 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::reference_theta_`[private]`

Definition at line 224 of file IpCGPenaltyLSAcceptor.hpp.

Index Ipopt::CGPenaltyLSAcceptor::max_soc_`[private]`

Maximal number of second order correction steps.

Definition at line 227 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::kappa_soc_`[private]`

Required reduction in constraint violation before trying multiple second order correction steps .

Definition at line 231 of file IpCGPenaltyLSAcceptor.hpp.

Index Ipopt::CGPenaltyLSAcceptor::counter_first_type_penalty_updates_`[private]`

Counter for increases of penalty parameter.

Definition at line 234 of file IpCGPenaltyLSAcceptor.hpp.

Index Ipopt::CGPenaltyLSAcceptor::counter_second_type_penalty_updates_`[private]`

Definition at line 235 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::curr_eta_`[private]`

eta parameter

Definition at line 237 of file IpCGPenaltyLSAcceptor.hpp.

Index Ipopt::CGPenaltyLSAcceptor::ls_counter_`[private]`

counter for cut backs in the line search

Definition at line 240 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::best_KKT_error_`[private]`

Record the lease KKT error found so far.

Definition at line 242 of file IpCGPenaltyLSAcceptor.hpp.

SmartPtr<const IteratesVector> Ipopt::CGPenaltyLSAcceptor::best_iterate_`[private]`

Store the iterate with best KKT error found so far.

Definition at line 244 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::mult_diverg_feasibility_tol_`[private]`

Check if the multpliers are diverging.

Definition at line 246 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::mult_diverg_y_tol_`[private]`

Definition at line 247 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::reference_penalty_function_`[private]`

Penalty function at the point with respect to which progress is to be made.

Definition at line 253 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::reference_direct_deriv_penalty_function_`[private]`

Directional derivative of penalty function at the point with respect to which progress is to be made.

Definition at line 256 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::reference_curr_direct_f_nrm_`[private]`

Definition at line 257 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::watchdog_penalty_function_`[private]`

Penalty function at the point with respect to which progress is to be made (at watchdog point).

Definition at line 260 of file IpCGPenaltyLSAcceptor.hpp.

Number Ipopt::CGPenaltyLSAcceptor::watchdog_direct_deriv_penalty_function_`[private]`

Directional derivative of penalty function at the point with respect to which progress is to be made (at watchdog point).

Definition at line 263 of file IpCGPenaltyLSAcceptor.hpp.

SmartPtr<const IteratesVector> Ipopt::CGPenaltyLSAcceptor::watchdog_delta_cgpen_`[private]`

Backup for the Chen-Goldfarb search direction (needed in the update rule for the penalty parameter.

Definition at line 266 of file IpCGPenaltyLSAcceptor.hpp.

bool Ipopt::CGPenaltyLSAcceptor::never_use_piecewise_penalty_ls_`[private]`

Flag for whether or not use piecewise penalty line search.

Definition at line 269 of file IpCGPenaltyLSAcceptor.hpp.

PiecewisePenalty Ipopt::CGPenaltyLSAcceptor::PiecewisePenalty_`[private]`

Definition at line 271 of file IpCGPenaltyLSAcceptor.hpp.

bool Ipopt::CGPenaltyLSAcceptor::reset_piecewise_penalty_`[private]`

Flag indicating whether PiecewisePenalty has to be initiailized.

Definition at line 273 of file IpCGPenaltyLSAcceptor.hpp.

Index Ipopt::CGPenaltyLSAcceptor::jump_for_tiny_step_`[private]`

Definition at line 275 of file IpCGPenaltyLSAcceptor.hpp.

SmartPtr<PDSystemSolver> Ipopt::CGPenaltyLSAcceptor::pd_solver_`[private]`

Definition at line 279 of file IpCGPenaltyLSAcceptor.hpp.

The documentation for this class was generated from the following file:

- src/contrib/CGPenalty/IpCGPenaltyLSAcceptor.hpp

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines