Ipopt
3.12.12
|
The main ipopt algorithm class. More...
#include <IpIpoptAlg.hpp>
Public Member Functions | |
virtual bool | InitializeImpl (const OptionsList &options, const std::string &prefix) |
overloaded from AlgorithmStrategyObject More... | |
SolverReturn | Optimize (bool isResto=false) |
Main solve method. More... | |
Constructors/Destructors | |
IpoptAlgorithm (const SmartPtr< SearchDirectionCalculator > &search_dir_calculator, const SmartPtr< LineSearch > &line_search, const SmartPtr< MuUpdate > &mu_update, const SmartPtr< ConvergenceCheck > &conv_check, const SmartPtr< IterateInitializer > &iterate_initializer, const SmartPtr< IterationOutput > &iter_output, const SmartPtr< HessianUpdater > &hessian_updater, const SmartPtr< EqMultiplierCalculator > &eq_multiplier_calculator=NULL) | |
Constructor. More... | |
virtual | ~IpoptAlgorithm () |
Default destructor. More... | |
Access to internal strategy objects | |
SmartPtr < SearchDirectionCalculator > | SearchDirCalc () |
![]() | |
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. More... | |
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. More... | |
AlgorithmStrategyObject () | |
Default Constructor. More... | |
virtual | ~AlgorithmStrategyObject () |
Default Destructor. More... | |
![]() | |
ReferencedObject () | |
virtual | ~ReferencedObject () |
Index | ReferenceCount () const |
void | AddRef (const Referencer *referencer) const |
void | ReleaseRef (const Referencer *referencer) const |
Static Public Member Functions | |
static void | print_copyright_message (const Journalist &jnlst) |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Methods for IpoptType. More... | |
Private Member Functions | |
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. | |
IpoptAlgorithm () | |
Default Constructor. More... | |
IpoptAlgorithm (const IpoptAlgorithm &) | |
Copy Constructor. More... | |
void | operator= (const IpoptAlgorithm &) |
Overloaded Equals Operator. More... | |
Main steps of the algorthim | |
void | UpdateHessian () |
Method for updating the current Hessian. More... | |
bool | UpdateBarrierParameter () |
Method to update the barrier parameter. More... | |
bool | ComputeSearchDirection () |
Method to setup the call to the PDSystemSolver. More... | |
void | ComputeAcceptableTrialPoint () |
Method computing the new iterate (usually vialine search). More... | |
void | AcceptTrialPoint () |
Method for accepting the trial point as the new iteration, possibly after adjusting the variable bounds in the NLP. More... | |
void | OutputIteration () |
Do all the output for one iteration. More... | |
void | InitializeIterates () |
Sets up initial values for the iterates, Corrects the initial values for x and s (force in bounds) More... | |
void | PrintProblemStatistics () |
Print the problem size statistics. More... | |
void | ComputeFeasibilityMultipliers () |
Compute the Lagrangian multipliers for a feasibility problem. More... | |
auxiliary functions | |
void | calc_number_of_bounds (const Vector &x, const Vector &x_L, const Vector &x_U, const Matrix &Px_L, const Matrix &Px_U, Index &n_tot, Index &n_only_lower, Index &n_both, Index &n_only_upper) |
Number | correct_bound_multiplier (const Vector &trial_z, const Vector &trial_slack, const Vector &trial_compl, SmartPtr< const Vector > &new_trial_z) |
Method for ensuring that the trial multipliers are not too far from the primal estime. More... | |
Private Attributes | |
Strategy objects | |
SmartPtr < SearchDirectionCalculator > | search_dir_calculator_ |
SmartPtr< LineSearch > | line_search_ |
SmartPtr< MuUpdate > | mu_update_ |
SmartPtr< ConvergenceCheck > | conv_check_ |
SmartPtr< IterateInitializer > | iterate_initializer_ |
SmartPtr< IterationOutput > | iter_output_ |
SmartPtr< HessianUpdater > | hessian_updater_ |
SmartPtr< EqMultiplierCalculator > | eq_multiplier_calculator_ |
The multipler calculator (for y_c and y_d) has to be set only if option recalc_y is set to true. More... | |
internal flags | |
bool | skip_print_problem_stats_ |
Flag indicating if the statistic should not be printed. More... | |
Algorithmic parameters | |
Number | kappa_sigma_ |
safeguard factor for bound multipliers. More... | |
bool | recalc_y_ |
Flag indicating whether the y multipliers should be recalculated with the eq_mutliplier_calculator object for each new point. More... | |
Number | recalc_y_feas_tol_ |
Feasibility threshold for recalc_y. More... | |
bool | mehrotra_algorithm_ |
Flag indicating if we want to do Mehrotras's algorithm. More... | |
std::string | linear_solver_ |
String specifying linear solver. More... | |
Additional Inherited Members | |
![]() | |
const Journalist & | Jnlst () const |
IpoptNLP & | IpNLP () const |
IpoptData & | IpData () const |
IpoptCalculatedQuantities & | IpCq () const |
bool | HaveIpData () const |
The main ipopt algorithm class.
Main Ipopt algorithm class, contains the main optimize method, handles the execution of the optimization. The constructor initializes the data structures through the nlp, and the Optimize method then assumes that everything is initialized and ready to go. After an optimization is complete, the user can access the solution through the passed in ip_data structure. Multiple calls to the Optimize method are allowed as long as the structure of the problem remains the same (i.e. starting point or nlp parameter changes only).
Definition at line 45 of file IpIpoptAlg.hpp.
Ipopt::IpoptAlgorithm::IpoptAlgorithm | ( | const SmartPtr< SearchDirectionCalculator > & | search_dir_calculator, |
const SmartPtr< LineSearch > & | line_search, | ||
const SmartPtr< MuUpdate > & | mu_update, | ||
const SmartPtr< ConvergenceCheck > & | conv_check, | ||
const SmartPtr< IterateInitializer > & | iterate_initializer, | ||
const SmartPtr< IterationOutput > & | iter_output, | ||
const SmartPtr< HessianUpdater > & | hessian_updater, | ||
const SmartPtr< EqMultiplierCalculator > & | eq_multiplier_calculator = NULL |
||
) |
Constructor.
(The IpoptAlgorithm uses smart pointers for these passed-in pieces to make sure that a user of IpoptAlgoroithm cannot pass in an object created on the stack!)
|
virtual |
Default destructor.
|
private |
Default Constructor.
|
private |
Copy Constructor.
|
virtual |
overloaded from AlgorithmStrategyObject
Implements Ipopt::AlgorithmStrategyObject.
SolverReturn Ipopt::IpoptAlgorithm::Optimize | ( | bool | isResto = false | ) |
Main solve method.
|
static |
Methods for IpoptType.
|
inline |
Definition at line 83 of file IpIpoptAlg.hpp.
|
static |
|
private |
Overloaded Equals Operator.
|
private |
Method for updating the current Hessian.
This can either just evaluate the exact Hessian (based on the current iterate), or perform a quasi-Newton update.
|
private |
Method to update the barrier parameter.
Returns false, if the algorithm can't continue with the regular procedure and needs to revert to a fallback mechanism in the line search (such as restoration phase)
|
private |
Method to setup the call to the PDSystemSolver.
Returns false, if the algorithm can't continue with the regular procedure and needs to revert to a fallback mechanism in the line search (such as restoration phase)
|
private |
Method computing the new iterate (usually vialine search).
The acceptable point is the one in trial after return.
|
private |
Method for accepting the trial point as the new iteration, possibly after adjusting the variable bounds in the NLP.
|
private |
Do all the output for one iteration.
|
private |
Sets up initial values for the iterates, Corrects the initial values for x and s (force in bounds)
|
private |
Print the problem size statistics.
|
private |
Compute the Lagrangian multipliers for a feasibility problem.
|
private |
|
private |
Method for ensuring that the trial multipliers are not too far from the primal estime.
If a correction is made, new_trial_z is a pointer to the corrected multiplier, and the return value of this method give the magnitutde of the largest correction that we done. If no correction was made, new_trial_z is just a pointer to trial_z, and the return value is zero.
|
private |
Definition at line 112 of file IpIpoptAlg.hpp.
|
private |
Definition at line 113 of file IpIpoptAlg.hpp.
Definition at line 114 of file IpIpoptAlg.hpp.
|
private |
Definition at line 115 of file IpIpoptAlg.hpp.
|
private |
Definition at line 116 of file IpIpoptAlg.hpp.
|
private |
Definition at line 117 of file IpIpoptAlg.hpp.
|
private |
Definition at line 118 of file IpIpoptAlg.hpp.
|
private |
The multipler calculator (for y_c and y_d) has to be set only if option recalc_y is set to true.
Definition at line 121 of file IpIpoptAlg.hpp.
|
private |
Flag indicating if the statistic should not be printed.
Definition at line 171 of file IpIpoptAlg.hpp.
|
private |
safeguard factor for bound multipliers.
If value >= 1, then the dual variables will never deviate from the primal estimate by more than the factors kappa_sigma and 1./kappa_sigma.
Definition at line 180 of file IpIpoptAlg.hpp.
|
private |
Flag indicating whether the y multipliers should be recalculated with the eq_mutliplier_calculator object for each new point.
Definition at line 184 of file IpIpoptAlg.hpp.
|
private |
Feasibility threshold for recalc_y.
Definition at line 186 of file IpIpoptAlg.hpp.
|
private |
Flag indicating if we want to do Mehrotras's algorithm.
This means that a number of options are ignored, or have to be set (or are automatically set) to certain values.
Definition at line 190 of file IpIpoptAlg.hpp.
|
private |
String specifying linear solver.
Definition at line 192 of file IpIpoptAlg.hpp.