Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::PenaltyLSAcceptor Class Reference

Penalty function line search. More...

#include <IpPenaltyLSAcceptor.hpp>

+ Inheritance diagram for Ipopt::PenaltyLSAcceptor:

Public Member Functions

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.
 
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.
 
Constructors/Destructors
 PenaltyLSAcceptor (const SmartPtr< PDSystemSolver > &pd_solver)
 Constructor.
 
virtual ~PenaltyLSAcceptor ()
 Destructor.
 
Trial Point Accepting Methods.

Used internally to check certain acceptability criteria and used externally (by the restoration phase convergence check object, for instance).

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.
 
- Public Member Functions inherited from Ipopt::BacktrackingLSAcceptor
virtual bool RestoredIterate ()
 Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
 
virtual bool NeverRestorationPhase ()
 Method called by BacktrackingLineSearch object to determine whether the restoration phase should never be called.
 
virtual bool DoFallback ()
 Method for doing a fallback approach in case no search direction could be computed.
 
virtual Number ComputeAlphaForY (Number, Number, SmartPtr< IteratesVector > &)
 Method for computing the step for the constraint multipliers in the line search acceptor method.
 
virtual bool HasComputeAlphaForY () const
 Method returning true of ComputeAlphaForY is implemented for this acceptor.
 
 BacktrackingLSAcceptor ()
 Constructor.
 
virtual ~BacktrackingLSAcceptor ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::AlgorithmStrategyObject
bool Initialize (const Journalist &jnlst, IpoptNLP &ip_nlp, IpoptData &ip_data, IpoptCalculatedQuantities &ip_cq, const OptionsList &options, const std::string &prefix)
 This method is called every time the algorithm starts again - it is used to reset any internal state.
 
bool ReducedInitialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 Reduced version of the Initialize method, which does not require special Ipopt information.
 
 AlgorithmStrategyObject ()
 Default Constructor.
 
virtual ~AlgorithmStrategyObject ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Static Public Member Functions

static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 Methods for OptionsList.
 
- Static Public Member Functions inherited from Ipopt::BacktrackingLSAcceptor
static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 Methods for OptionsList.
 

Private Member Functions

Number CalcPred (Number alpha)
 Compute predicted reduction for given step size.
 
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.

 PenaltyLSAcceptor (const PenaltyLSAcceptor &)
 Copy Constructor.
 
void operator= (const PenaltyLSAcceptor &)
 Overloaded Assignment Operator.
 

Private Attributes

Number resto_pred_
 When called from the restoration phase, this is the required predicted reduction.
 
Parameters for the penalty function line search

algorithm.

Names as in the filter paper

Number nu_init_
 Initial value of penalty parameter.
 
Number nu_inc_
 Incrememt for penalty parameter.
 
Number eta_
 \( \eta_{\varphi} \)
 
Number rho_
 \( \rho \)
 
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 \( \kappa_{soc}\).
 
Index soc_method_
 Second method correction method.
 
Information related to watchdog procedure
Number reference_theta_
 Constraint violation at the point with respect to which progress is to be made.
 
Number reference_barr_
 Barrier objective function at the point with respect to which progress is to be made.
 
Number reference_gradBarrTDelta_
 Barrier gradient transpose search direction at the point with respect to which progress is to be made.
 
Number reference_dWd_
 Two-sided product of search direction with complete Hessian.
 
SmartPtr< const Vectorreference_JacC_delta_
 Product of Jacobian of equality constraint with x direction.
 
SmartPtr< const Vectorreference_JacD_delta_
 Product of Jacobian of (d-s) constraint with search direction.
 
Number reference_pred_
 Reference predicted reduction.
 
Number watchdog_theta_
 Constraint violation at reference point.
 
Number watchdog_barr_
 Barrier objective function at reference point.
 
Number watchdog_pred_
 Predicted reduction to be compared with in watch dog.
 
Penalty parameter
Number nu_
 Current value of the penalty parameter.
 
Number last_nu_
 Value of penalty parameter at beginning of the iteration.
 
Strategy objective that are used
SmartPtr< PDSystemSolverpd_solver_
 

Additional Inherited Members

- Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject
const JournalistJnlst () const
 
IpoptNLPIpNLP () const
 
IpoptDataIpData () const
 
IpoptCalculatedQuantitiesIpCq () const
 
bool HaveIpData () const
 

Detailed Description

Penalty function line search.

This class implements the penalty function line search procedure as proposed by Waltz, Morales, Nocedal, Orban.

Definition at line 22 of file IpPenaltyLSAcceptor.hpp.

Constructor & Destructor Documentation

◆ PenaltyLSAcceptor() [1/2]

Ipopt::PenaltyLSAcceptor::PenaltyLSAcceptor ( 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.

◆ ~PenaltyLSAcceptor()

virtual Ipopt::PenaltyLSAcceptor::~PenaltyLSAcceptor ( )
virtual

Destructor.

◆ PenaltyLSAcceptor() [2/2]

Ipopt::PenaltyLSAcceptor::PenaltyLSAcceptor ( const PenaltyLSAcceptor )
private

Copy Constructor.

Member Function Documentation

◆ InitializeImpl()

virtual bool Ipopt::PenaltyLSAcceptor::InitializeImpl ( const OptionsList options,
const std::string &  prefix 
)
virtual

Implementation of the initialization method that has to be overloaded by for each derived class.

Implements Ipopt::BacktrackingLSAcceptor.

◆ Reset()

virtual void Ipopt::PenaltyLSAcceptor::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.

◆ InitThisLineSearch()

virtual void Ipopt::PenaltyLSAcceptor::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.

◆ PrepareRestoPhaseStart()

virtual void Ipopt::PenaltyLSAcceptor::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.

◆ CalculateAlphaMin()

virtual Number Ipopt::PenaltyLSAcceptor::CalculateAlphaMin ( )
virtual

Method returning the lower bound on the trial step sizes.

Implements Ipopt::BacktrackingLSAcceptor.

◆ CheckAcceptabilityOfTrialPoint()

virtual bool Ipopt::PenaltyLSAcceptor::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.

◆ TrySecondOrderCorrection()

virtual bool Ipopt::PenaltyLSAcceptor::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 rejected, 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 penalty 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.

◆ TryCorrector()

virtual bool Ipopt::PenaltyLSAcceptor::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.

◆ UpdateForNextIteration()

virtual char Ipopt::PenaltyLSAcceptor::UpdateForNextIteration ( Number  alpha_primal_test)
virtual

Method for ending the current line search.

When it is called, the internal data should be updates.

Parameters
alpha_primal_testvalue of alpha that has been used for in the acceptence test ealier

Implements Ipopt::BacktrackingLSAcceptor.

◆ StartWatchDog()

virtual void Ipopt::PenaltyLSAcceptor::StartWatchDog ( )
virtual

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

Implements Ipopt::BacktrackingLSAcceptor.

◆ StopWatchDog()

virtual void Ipopt::PenaltyLSAcceptor::StopWatchDog ( )
virtual

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

Implements Ipopt::BacktrackingLSAcceptor.

◆ IsAcceptableToCurrentIterate()

bool Ipopt::PenaltyLSAcceptor::IsAcceptableToCurrentIterate ( Number  trial_barr,
Number  trial_theta,
bool  called_from_restoration = false 
) const

Checks if a trial point is acceptable to the current iterate.

◆ RegisterOptions()

static void Ipopt::PenaltyLSAcceptor::RegisterOptions ( SmartPtr< RegisteredOptions roptions)
static

Methods for OptionsList.

◆ operator=()

void Ipopt::PenaltyLSAcceptor::operator= ( const PenaltyLSAcceptor )
private

Overloaded Assignment Operator.

◆ CalcPred()

Number Ipopt::PenaltyLSAcceptor::CalcPred ( Number  alpha)
private

Compute predicted reduction for given step size.

Member Data Documentation

◆ nu_init_

Number Ipopt::PenaltyLSAcceptor::nu_init_
private

Initial value of penalty parameter.

Definition at line 184 of file IpPenaltyLSAcceptor.hpp.

◆ nu_inc_

Number Ipopt::PenaltyLSAcceptor::nu_inc_
private

Incrememt for penalty parameter.

Definition at line 186 of file IpPenaltyLSAcceptor.hpp.

◆ eta_

Number Ipopt::PenaltyLSAcceptor::eta_
private

\( \eta_{\varphi} \)

Definition at line 188 of file IpPenaltyLSAcceptor.hpp.

◆ rho_

Number Ipopt::PenaltyLSAcceptor::rho_
private

\( \rho \)

Definition at line 190 of file IpPenaltyLSAcceptor.hpp.

◆ max_soc_

Index Ipopt::PenaltyLSAcceptor::max_soc_
private

Maximal number of second order correction steps.

Definition at line 192 of file IpPenaltyLSAcceptor.hpp.

◆ kappa_soc_

Number Ipopt::PenaltyLSAcceptor::kappa_soc_
private

Required reduction in constraint violation before trying multiple second order correction steps \( \kappa_{soc}\).

Definition at line 196 of file IpPenaltyLSAcceptor.hpp.

◆ soc_method_

Index Ipopt::PenaltyLSAcceptor::soc_method_
private

Second method correction method.

Definition at line 198 of file IpPenaltyLSAcceptor.hpp.

◆ reference_theta_

Number Ipopt::PenaltyLSAcceptor::reference_theta_
private

Constraint violation at the point with respect to which progress is to be made.

Definition at line 205 of file IpPenaltyLSAcceptor.hpp.

◆ reference_barr_

Number Ipopt::PenaltyLSAcceptor::reference_barr_
private

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

Definition at line 208 of file IpPenaltyLSAcceptor.hpp.

◆ reference_gradBarrTDelta_

Number Ipopt::PenaltyLSAcceptor::reference_gradBarrTDelta_
private

Barrier gradient transpose search direction at the point with respect to which progress is to be made.

Definition at line 211 of file IpPenaltyLSAcceptor.hpp.

◆ reference_dWd_

Number Ipopt::PenaltyLSAcceptor::reference_dWd_
private

Two-sided product of search direction with complete Hessian.

Definition at line 213 of file IpPenaltyLSAcceptor.hpp.

◆ reference_JacC_delta_

SmartPtr<const Vector> Ipopt::PenaltyLSAcceptor::reference_JacC_delta_
private

Product of Jacobian of equality constraint with x direction.

Definition at line 215 of file IpPenaltyLSAcceptor.hpp.

◆ reference_JacD_delta_

SmartPtr<const Vector> Ipopt::PenaltyLSAcceptor::reference_JacD_delta_
private

Product of Jacobian of (d-s) constraint with search direction.

Definition at line 217 of file IpPenaltyLSAcceptor.hpp.

◆ reference_pred_

Number Ipopt::PenaltyLSAcceptor::reference_pred_
private

Reference predicted reduction.

If positive, then it is used in watch dog.

Definition at line 220 of file IpPenaltyLSAcceptor.hpp.

◆ watchdog_theta_

Number Ipopt::PenaltyLSAcceptor::watchdog_theta_
private

Constraint violation at reference point.

Definition at line 222 of file IpPenaltyLSAcceptor.hpp.

◆ watchdog_barr_

Number Ipopt::PenaltyLSAcceptor::watchdog_barr_
private

Barrier objective function at reference point.

Definition at line 224 of file IpPenaltyLSAcceptor.hpp.

◆ watchdog_pred_

Number Ipopt::PenaltyLSAcceptor::watchdog_pred_
private

Predicted reduction to be compared with in watch dog.

Definition at line 226 of file IpPenaltyLSAcceptor.hpp.

◆ nu_

Number Ipopt::PenaltyLSAcceptor::nu_
private

Current value of the penalty parameter.

Definition at line 232 of file IpPenaltyLSAcceptor.hpp.

◆ last_nu_

Number Ipopt::PenaltyLSAcceptor::last_nu_
private

Value of penalty parameter at beginning of the iteration.

Definition at line 234 of file IpPenaltyLSAcceptor.hpp.

◆ resto_pred_

Number Ipopt::PenaltyLSAcceptor::resto_pred_
private

When called from the restoration phase, this is the required predicted reduction.

Definition at line 239 of file IpPenaltyLSAcceptor.hpp.

◆ pd_solver_

SmartPtr<PDSystemSolver> Ipopt::PenaltyLSAcceptor::pd_solver_
private

Definition at line 243 of file IpPenaltyLSAcceptor.hpp.


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