Line search acceptor, based on the Chen-Goldfarb penalty function approach. More...
#include <IpCGPenaltyLSAcceptor.hpp>
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. | |
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 () |
Destructor. | |
Public Member Functions inherited from Ipopt::BacktrackingLSAcceptor | |
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 | |
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 &) |
Default Assignment 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_ |
Minimal step size that triggers non-monotone 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 \( \kappa_{soc}\). | |
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_ |
piecewise penalty list | |
bool | reset_piecewise_penalty_ |
Flag indicating whether PiecewisePenalty has to be initialized. | |
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_ |
Number | reference_theta_ |
Initial constraint violation. | |
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_ |
Additional Inherited Members | |
Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
Line search acceptor, based on the Chen-Goldfarb penalty function approach.
Definition at line 21 of file IpCGPenaltyLSAcceptor.hpp.
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 |
Destructor.
|
private |
Copy Constructor.
|
virtual |
Implementation of the initialization method that has to be overloaded by for each derived class.
Implements Ipopt::BacktrackingLSAcceptor.
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.
Initialization for the next line search.
The flag in_watchdog indicates if we are currently in an active watchdog procedure.
Implements Ipopt::BacktrackingLSAcceptor.
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.
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 |
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 |
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 |
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.
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 acceptance test earlier.
Implements Ipopt::BacktrackingLSAcceptor.
Method for setting internal data if the watchdog procedure is started.
Implements Ipopt::BacktrackingLSAcceptor.
Method for setting internal data if the watchdog procedure is stopped.
Implements Ipopt::BacktrackingLSAcceptor.
Method for telling the BacktrackingLineSearch object that a previous iterate has been restored.
Reimplemented from Ipopt::BacktrackingLSAcceptor.
Method for telling the BacktrackingLineSearch object that the restoration is not needed.
Reimplemented from Ipopt::BacktrackingLSAcceptor.
Method for doing a fallback approach in case no search direction could be computed.
Reimplemented from Ipopt::BacktrackingLSAcceptor.
|
static |
Methods for OptionsList.
|
private |
Default Assignment Operator.
|
inlineprivate |
Method to easily access CGPenalty data.
Definition at line 184 of file IpCGPenaltyLSAcceptor.hpp.
|
inlineprivate |
Method to easily access CGPenalty calculated quantities.
Definition at line 192 of file IpCGPenaltyLSAcceptor.hpp.
Check if the trial point is acceptable to the piecewise penalty list.
Check if the trial point is acceptable by the Armijo condition.
|
staticprivate |
Check comparison "lhs <= rhs", using machine precision based on BasVal.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Relaxation factor in the Armijo condition for the penalty function.
Definition at line 226 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Tolerance for infeasibility part in penalty parameter update rule.
Definition at line 229 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Minimal tolerance for step part in penalty parameter update rule.
Definition at line 232 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Tolerance for complementarity part in penalty parameter update rule.
Definition at line 235 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 236 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 237 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 238 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 239 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 240 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 241 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 242 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Parameters for piecewise penalty acceptor.
Definition at line 244 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 245 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Upper bound on infeasibility.
Definition at line 248 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 249 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 252 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Parameters deciding when the piecewise penalty acceptor shall be closed.
Definition at line 255 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Flag indicating whether the trial point is accepted by the Armijo condition or the PLPF condition.
Definition at line 260 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Minimal step size that triggers non-monotone method.
Definition at line 263 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Initial constraint violation.
Definition at line 267 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Maximal number of second order correction steps.
Definition at line 270 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Required reduction in constraint violation before trying multiple second order correction steps \( \kappa_{soc}\).
Definition at line 274 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Counter for increases of penalty parameter.
Definition at line 277 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 278 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
eta parameter
Definition at line 280 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
counter for cut backs in the line search
Definition at line 283 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Record the lease KKT error found so far.
Definition at line 285 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Store the iterate with best KKT error found so far.
Definition at line 287 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Check if the multpliers are diverging.
Definition at line 289 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 290 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Penalty function at the point with respect to which progress is to be made.
Definition at line 296 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Directional derivative of penalty function at the point with respect to which progress is to be made.
Definition at line 299 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 300 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Penalty function at the point with respect to which progress is to be made (at watchdog point)
Definition at line 303 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Directional derivative of penalty function at the point with respect to which progress is to be made (at watchdog point)
Definition at line 306 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Backup for the Chen-Goldfarb search direction (needed in the update rule for the penalty parameter.
Definition at line 309 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Flag for whether or not use piecewise penalty line search.
Definition at line 312 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
piecewise penalty list
Definition at line 314 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Flag indicating whether PiecewisePenalty has to be initialized.
Definition at line 316 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 318 of file IpCGPenaltyLSAcceptor.hpp.
|
private |
Definition at line 322 of file IpCGPenaltyLSAcceptor.hpp.