#include <IpFilterLSAcceptor.hpp>
This class implements the filter line search procedure.
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. | |
Constructors/Destructors | |
FilterLSAcceptor (const SmartPtr< PDSystemSolver > &pd_solver) | |
Constructor. | |
virtual | ~FilterLSAcceptor () |
Default 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. | |
bool | IsAcceptableToCurrentFilter (Number trial_barr, Number trial_theta) const |
Checks if a trial point is acceptable to the current filter. | |
Static Public Member Functions | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Methods for OptionsList. |
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.
References DBG_START_FUN.
~FilterLSAcceptor | ( | ) | [virtual] |
bool InitializeImpl | ( | const OptionsList & | options, | |
const std::string & | prefix | |||
) | [virtual] |
InitializeImpl - overloaded from AlgorithmStrategyObject.
Implements BacktrackingLSAcceptor.
References ASSERT_EXCEPTION, OptionsList::GetBoolValue(), OptionsList::GetEnumValue(), OptionsList::GetIntegerValue(), OptionsList::GetNumericValue(), Ipopt::IsValid(), and FilterLSAcceptor::Reset().
void 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 BacktrackingLSAcceptor.
References Filter::Clear(), and DBG_START_FUN.
Referenced by FilterLSAcceptor::CheckAcceptabilityOfTrialPoint(), and FilterLSAcceptor::InitializeImpl().
void 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 BacktrackingLSAcceptor.
References IpoptCalculatedQuantities::curr_barrier_obj(), IpoptCalculatedQuantities::curr_constraint_violation(), IpoptCalculatedQuantities::curr_gradBarrTDelta(), DBG_START_METH, AlgorithmStrategyObject::IpCq(), AlgorithmStrategyObject::Jnlst(), and Filter::Print().
void 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 BacktrackingLSAcceptor.
Number 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 BacktrackingLSAcceptor.
References IpoptCalculatedQuantities::curr_constraint_violation(), IpoptCalculatedQuantities::curr_gradBarrTDelta(), AlgorithmStrategyObject::IpCq(), and Ipopt::Min().
bool 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 BacktrackingLSAcceptor.
References IpoptData::Append_info_string(), DBG_ASSERT, DBG_START_METH, AlgorithmStrategyObject::IpCq(), AlgorithmStrategyObject::IpData(), FilterLSAcceptor::IsAcceptableToCurrentFilter(), FilterLSAcceptor::IsAcceptableToCurrentIterate(), Ipopt::IsFiniteNumber(), Ipopt::J_DETAILED, Ipopt::J_LINE_SEARCH, AlgorithmStrategyObject::Jnlst(), Ipopt::Max(), Journalist::Printf(), FilterLSAcceptor::Reset(), IpoptCalculatedQuantities::trial_barrier_obj(), and IpoptCalculatedQuantities::trial_constraint_violation().
Referenced by FilterLSAcceptor::TryCorrector(), and FilterLSAcceptor::TrySecondOrderCorrection().
bool 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 BacktrackingLSAcceptor.
References IpoptData::Append_info_string(), FilterLSAcceptor::CheckAcceptabilityOfTrialPoint(), IpoptCalculatedQuantities::curr_c(), IpoptCalculatedQuantities::curr_d_minus_s(), DBG_START_METH, AlgorithmStrategyObject::IpCq(), AlgorithmStrategyObject::IpData(), Ipopt::J_DETAILED, Ipopt::J_LINE_SEARCH, Ipopt::J_MAIN, Ipopt::J_WARNING, AlgorithmStrategyObject::Jnlst(), IpoptCalculatedQuantities::primal_frac_to_the_bound(), Journalist::Printf(), IpoptData::SetTrialPrimalVariablesFromStep(), and IpoptCalculatedQuantities::trial_constraint_violation().
bool 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 BacktrackingLSAcceptor.
References IpoptData::Append_info_string(), FilterLSAcceptor::CheckAcceptabilityOfTrialPoint(), IpoptData::curr(), IpoptCalculatedQuantities::curr_avrg_compl(), IpoptData::curr_mu(), DBG_ASSERT, DBG_PRINT_VECTOR, DBG_START_METH, IpoptData::delta_aff(), IpoptCalculatedQuantities::dual_frac_to_the_bound(), TimedTask::End(), AlgorithmStrategyObject::IpCq(), AlgorithmStrategyObject::IpData(), AlgorithmStrategyObject::IpNLP(), Ipopt::J_DETAILED, Ipopt::J_LINE_SEARCH, Ipopt::J_MAIN, Ipopt::J_MOREVECTOR, Ipopt::J_WARNING, AlgorithmStrategyObject::Jnlst(), IpoptNLP::Pd_L(), IpoptNLP::Pd_U(), IpoptCalculatedQuantities::primal_frac_to_the_bound(), Journalist::Printf(), IpoptNLP::Px_L(), IpoptNLP::Px_U(), IpoptData::set_delta_aff(), IpoptData::SetHaveAffineDeltas(), IpoptData::SetTrialBoundMultipliersFromStep(), IpoptData::SetTrialPrimalVariablesFromStep(), TimedTask::Start(), IpoptData::TimingStats(), IpoptCalculatedQuantities::trial_avrg_compl(), and TimingStatistics::TryCorrector().
char 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 acceptence test ealier.
Implements BacktrackingLSAcceptor.
void StartWatchDog | ( | ) | [virtual] |
Method for setting internal data if the watchdog procedure is started.
Implements BacktrackingLSAcceptor.
References IpoptCalculatedQuantities::curr_barrier_obj(), IpoptCalculatedQuantities::curr_constraint_violation(), IpoptCalculatedQuantities::curr_gradBarrTDelta(), DBG_START_FUN, and AlgorithmStrategyObject::IpCq().
void StopWatchDog | ( | ) | [virtual] |
Method for setting internal data if the watchdog procedure is stopped.
Implements BacktrackingLSAcceptor.
References DBG_START_FUN.
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.
References DBG_PRINT, DBG_START_METH, Ipopt::J_DETAILED, Ipopt::J_LINE_SEARCH, AlgorithmStrategyObject::Jnlst(), and Journalist::Printf().
Referenced by FilterLSAcceptor::CheckAcceptabilityOfTrialPoint(), and RestoFilterConvergenceCheck::CheckConvergence().
Checks if a trial point is acceptable to the current filter.
References Filter::Acceptable().
Referenced by FilterLSAcceptor::CheckAcceptabilityOfTrialPoint(), and RestoFilterConvergenceCheck::CheckConvergence().
void RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |
Methods for OptionsList.
Reimplemented from BacktrackingLSAcceptor.
Referenced by Ipopt::RegisterOptions_Algorithm().