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

Filter line search procedure. More...

#include <IpFilterLSAcceptor.hpp>

+ Inheritance diagram for Ipopt::FilterLSAcceptor:

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
 FilterLSAcceptor (const SmartPtr< PDSystemSolver > &pd_solver)
 Constructor.
 
virtual ~FilterLSAcceptor ()
 
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.
 
bool IsAcceptableToCurrentFilter (Number trial_barr, Number trial_theta) const
 Checks if a trial point is acceptable to the current filter.
 
- 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

bool IsFtype (Number alpha_primal_test)
 Method for checking if the current step size satisfies the f-type switching condition.
 
bool ArmijoHolds (Number alpha_primal_test)
 Method for checking the Armijo condition, given a trial step size.
 
void AugmentFilter ()
 Augment the filter used on the current values of the barrier objective function and the constraint violation.
 
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.

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

Private Attributes

Filter filter_
 Filter with entries.
 
Filter information
Number theta_max_
 Upper bound on infeasibility.
 
Number theta_max_fact_
 
Number theta_min_
 Infeasibility switching bound.
 
Number theta_min_fact_
 
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 watchdog_theta_
 Constraint violation at reference point.
 
Number watchdog_barr_
 Barrier objective function at reference point.
 
Number watchdog_gradBarrTDelta_
 Barrier gradient transpose search direction at reference point.
 
Filter reset stuff
bool last_rejection_due_to_filter_
 True, if last rejected was due to the filter.
 
Index count_successive_filter_rejections_
 Counter of successive iterations in which filter was reason for last rejection.
 
Index n_filter_resets_
 Counter for the filter resets done so far.
 
Strategy objective that are used
SmartPtr< PDSystemSolverpd_solver_
 

Parameters for the filter algorithm. Names as in the paper

enum  CorrectorTypeEnum { NO_CORRECTOR = 0 , AFFINE_CORRECTOR , PRIMAL_DUAL_CORRECTOR }
 enumeration for the corrector type More...
 
Number eta_phi_
 \( \eta_{\varphi} \)
 
Number delta_
 \( \delta \)
 
Number s_phi_
 \( s_{\varphi} \)
 
Number s_theta_
 \( s_{\Theta} \)
 
Number gamma_phi_
 \( \gamma_{\varphi} \)
 
Number gamma_theta_
 \( \gamma_{\Theta} \)
 
Number alpha_min_frac_
 \( \gamma_{\alpha} \)
 
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}\).
 
Number obj_max_inc_
 Maximal increase in objective function in orders of magnitude (std::log10).
 
Index soc_method_
 Second method correction method.
 
CorrectorTypeEnum corrector_type_
 Type of corrector steps that should be tried.
 
Number corrector_compl_avrg_red_fact_
 parameter in heuristic that determines whether corrector step should be tried.
 
bool skip_corr_if_neg_curv_
 Flag indicating whether the corrector should be skipped in an iteration in which negative curvature is detected.
 
bool skip_corr_in_monotone_mode_
 Flag indicating whether the corrector should be skipped during the monotone mu mode.
 
Index max_filter_resets_
 maximal allowed number of filter resets.
 
Index filter_reset_trigger_
 iteration counter trigger for filter reset.
 

Additional Inherited Members

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

Detailed Description

Filter line search procedure.

Definition at line 19 of file IpFilterLSAcceptor.hpp.

Member Enumeration Documentation

◆ CorrectorTypeEnum

enumeration for the corrector type

Enumerator
NO_CORRECTOR 
AFFINE_CORRECTOR 
PRIMAL_DUAL_CORRECTOR 

Definition at line 250 of file IpFilterLSAcceptor.hpp.

Constructor & Destructor Documentation

◆ FilterLSAcceptor() [1/2]

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

◆ ~FilterLSAcceptor()

virtual Ipopt::FilterLSAcceptor::~FilterLSAcceptor ( )
virtual

◆ FilterLSAcceptor() [2/2]

Ipopt::FilterLSAcceptor::FilterLSAcceptor ( const FilterLSAcceptor )
private

Copy Constructor.

Member Function Documentation

◆ InitializeImpl()

virtual bool Ipopt::FilterLSAcceptor::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::FilterLSAcceptor::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::FilterLSAcceptor::InitThisLineSearch ( bool  in_watchdog)
virtual

Initialization for the next line search.

Parameters
in_watchdogindicates if we are currently in an active watchdog procedure

Implements Ipopt::BacktrackingLSAcceptor.

◆ PrepareRestoPhaseStart()

virtual void Ipopt::FilterLSAcceptor::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, such as augmenting a filter.

Implements Ipopt::BacktrackingLSAcceptor.

◆ CalculateAlphaMin()

virtual Number Ipopt::FilterLSAcceptor::CalculateAlphaMin ( )
virtual

Method returning the lower bound on the trial step sizes.

Implements Ipopt::BacktrackingLSAcceptor.

◆ CheckAcceptabilityOfTrialPoint()

virtual bool Ipopt::FilterLSAcceptor::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::FilterLSAcceptor::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 filter 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::FilterLSAcceptor::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::FilterLSAcceptor::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 filter might be augmented. alpha_primal_test is the value of alpha that has been used for in the acceptance test earlier.

Implements Ipopt::BacktrackingLSAcceptor.

◆ StartWatchDog()

virtual void Ipopt::FilterLSAcceptor::StartWatchDog ( )
virtual

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

Implements Ipopt::BacktrackingLSAcceptor.

◆ StopWatchDog()

virtual void Ipopt::FilterLSAcceptor::StopWatchDog ( )
virtual

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

Implements Ipopt::BacktrackingLSAcceptor.

◆ IsAcceptableToCurrentIterate()

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

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

◆ IsAcceptableToCurrentFilter()

bool Ipopt::FilterLSAcceptor::IsAcceptableToCurrentFilter ( Number  trial_barr,
Number  trial_theta 
) const

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

◆ RegisterOptions()

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

Methods for OptionsList.

◆ operator=()

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

Overloaded Assignment Operator.

◆ IsFtype()

bool Ipopt::FilterLSAcceptor::IsFtype ( Number  alpha_primal_test)
private

Method for checking if the current step size satisfies the f-type switching condition.

Here, we use the search direction stored in ip_data.

◆ ArmijoHolds()

bool Ipopt::FilterLSAcceptor::ArmijoHolds ( Number  alpha_primal_test)
private

Method for checking the Armijo condition, given a trial step size.

The test uses the search direction stored in ip_data, and the values of the functions at the trial point in ip_data.

◆ AugmentFilter()

void Ipopt::FilterLSAcceptor::AugmentFilter ( )
private

Augment the filter used on the current values of the barrier objective function and the constraint violation.

Member Data Documentation

◆ theta_max_

Number Ipopt::FilterLSAcceptor::theta_max_
private

Upper bound on infeasibility.

Definition at line 184 of file IpFilterLSAcceptor.hpp.

◆ theta_max_fact_

Number Ipopt::FilterLSAcceptor::theta_max_fact_
private

Definition at line 185 of file IpFilterLSAcceptor.hpp.

◆ theta_min_

Number Ipopt::FilterLSAcceptor::theta_min_
private

Infeasibility switching bound.

Definition at line 188 of file IpFilterLSAcceptor.hpp.

◆ theta_min_fact_

Number Ipopt::FilterLSAcceptor::theta_min_fact_
private

Definition at line 189 of file IpFilterLSAcceptor.hpp.

◆ eta_phi_

Number Ipopt::FilterLSAcceptor::eta_phi_
private

\( \eta_{\varphi} \)

Definition at line 219 of file IpFilterLSAcceptor.hpp.

◆ delta_

Number Ipopt::FilterLSAcceptor::delta_
private

\( \delta \)

Definition at line 221 of file IpFilterLSAcceptor.hpp.

◆ s_phi_

Number Ipopt::FilterLSAcceptor::s_phi_
private

\( s_{\varphi} \)

Definition at line 223 of file IpFilterLSAcceptor.hpp.

◆ s_theta_

Number Ipopt::FilterLSAcceptor::s_theta_
private

\( s_{\Theta} \)

Definition at line 225 of file IpFilterLSAcceptor.hpp.

◆ gamma_phi_

Number Ipopt::FilterLSAcceptor::gamma_phi_
private

\( \gamma_{\varphi} \)

Definition at line 227 of file IpFilterLSAcceptor.hpp.

◆ gamma_theta_

Number Ipopt::FilterLSAcceptor::gamma_theta_
private

\( \gamma_{\Theta} \)

Definition at line 229 of file IpFilterLSAcceptor.hpp.

◆ alpha_min_frac_

Number Ipopt::FilterLSAcceptor::alpha_min_frac_
private

\( \gamma_{\alpha} \)

Definition at line 231 of file IpFilterLSAcceptor.hpp.

◆ max_soc_

Index Ipopt::FilterLSAcceptor::max_soc_
private

Maximal number of second order correction steps.

Definition at line 233 of file IpFilterLSAcceptor.hpp.

◆ kappa_soc_

Number Ipopt::FilterLSAcceptor::kappa_soc_
private

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

Definition at line 237 of file IpFilterLSAcceptor.hpp.

◆ obj_max_inc_

Number Ipopt::FilterLSAcceptor::obj_max_inc_
private

Maximal increase in objective function in orders of magnitude (std::log10).

If the log10(barrier objective function) is increased more than this compared to the current point, the trial point is rejected.

Definition at line 245 of file IpFilterLSAcceptor.hpp.

◆ soc_method_

Index Ipopt::FilterLSAcceptor::soc_method_
private

Second method correction method.

Definition at line 247 of file IpFilterLSAcceptor.hpp.

◆ corrector_type_

CorrectorTypeEnum Ipopt::FilterLSAcceptor::corrector_type_
private

Type of corrector steps that should be tried.

Definition at line 257 of file IpFilterLSAcceptor.hpp.

◆ corrector_compl_avrg_red_fact_

Number Ipopt::FilterLSAcceptor::corrector_compl_avrg_red_fact_
private

parameter in heuristic that determines whether corrector step should be tried.

Definition at line 259 of file IpFilterLSAcceptor.hpp.

◆ skip_corr_if_neg_curv_

bool Ipopt::FilterLSAcceptor::skip_corr_if_neg_curv_
private

Flag indicating whether the corrector should be skipped in an iteration in which negative curvature is detected.

Definition at line 263 of file IpFilterLSAcceptor.hpp.

◆ skip_corr_in_monotone_mode_

bool Ipopt::FilterLSAcceptor::skip_corr_in_monotone_mode_
private

Flag indicating whether the corrector should be skipped during the monotone mu mode.

Definition at line 267 of file IpFilterLSAcceptor.hpp.

◆ max_filter_resets_

Index Ipopt::FilterLSAcceptor::max_filter_resets_
private

maximal allowed number of filter resets.

Definition at line 269 of file IpFilterLSAcceptor.hpp.

◆ filter_reset_trigger_

Index Ipopt::FilterLSAcceptor::filter_reset_trigger_
private

iteration counter trigger for filter reset.

If the successive number of iterations in which the last rejected step was due to the filter, and max_filter_resets is non-zero, then the filter is reset.

Definition at line 276 of file IpFilterLSAcceptor.hpp.

◆ reference_theta_

Number Ipopt::FilterLSAcceptor::reference_theta_
private

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

Definition at line 284 of file IpFilterLSAcceptor.hpp.

◆ reference_barr_

Number Ipopt::FilterLSAcceptor::reference_barr_
private

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

Definition at line 288 of file IpFilterLSAcceptor.hpp.

◆ reference_gradBarrTDelta_

Number Ipopt::FilterLSAcceptor::reference_gradBarrTDelta_
private

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

Definition at line 292 of file IpFilterLSAcceptor.hpp.

◆ watchdog_theta_

Number Ipopt::FilterLSAcceptor::watchdog_theta_
private

Constraint violation at reference point.

Definition at line 294 of file IpFilterLSAcceptor.hpp.

◆ watchdog_barr_

Number Ipopt::FilterLSAcceptor::watchdog_barr_
private

Barrier objective function at reference point.

Definition at line 296 of file IpFilterLSAcceptor.hpp.

◆ watchdog_gradBarrTDelta_

Number Ipopt::FilterLSAcceptor::watchdog_gradBarrTDelta_
private

Barrier gradient transpose search direction at reference point.

Definition at line 298 of file IpFilterLSAcceptor.hpp.

◆ filter_

Filter Ipopt::FilterLSAcceptor::filter_
private

Filter with entries.

Definition at line 302 of file IpFilterLSAcceptor.hpp.

◆ last_rejection_due_to_filter_

bool Ipopt::FilterLSAcceptor::last_rejection_due_to_filter_
private

True, if last rejected was due to the filter.

Definition at line 307 of file IpFilterLSAcceptor.hpp.

◆ count_successive_filter_rejections_

Index Ipopt::FilterLSAcceptor::count_successive_filter_rejections_
private

Counter of successive iterations in which filter was reason for last rejection.

Definition at line 311 of file IpFilterLSAcceptor.hpp.

◆ n_filter_resets_

Index Ipopt::FilterLSAcceptor::n_filter_resets_
private

Counter for the filter resets done so far.

Definition at line 313 of file IpFilterLSAcceptor.hpp.

◆ pd_solver_

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

Definition at line 318 of file IpFilterLSAcceptor.hpp.


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