Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpIpoptAlg.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, 2010 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpIpoptAlg.hpp 2167 2013-03-08 11:15:38Z stefan $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
8
9 #ifndef __IPIPOPTALG_HPP__
10 #define __IPIPOPTALG_HPP__
11
12 #include "IpIpoptNLP.hpp"
13 #include "IpAlgStrategy.hpp"
14 #include "IpSearchDirCalculator.hpp"
15 #include "IpLineSearch.hpp"
16 #include "IpMuUpdate.hpp"
17 #include "IpConvCheck.hpp"
18 #include "IpOptionsList.hpp"
19 #include "IpIterateInitializer.hpp"
20 #include "IpIterationOutput.hpp"
21 #include "IpAlgTypes.hpp"
22 #include "IpHessianUpdater.hpp"
23 #include "IpEqMultCalculator.hpp"
24
25 namespace Ipopt
26 {
27
30 DECLARE_STD_EXCEPTION(STEP_COMPUTATION_FAILED);
32
45 class IpoptAlgorithm : public AlgorithmStrategyObject
46 {
47 public:
48
55 IpoptAlgorithm(const SmartPtr<SearchDirectionCalculator>& search_dir_calculator,
56 const SmartPtr<LineSearch>& line_search,
57 const SmartPtr<MuUpdate>& mu_update,
58 const SmartPtr<ConvergenceCheck>& conv_check,
59 const SmartPtr<IterateInitializer>& iterate_initializer,
60 const SmartPtr<IterationOutput>& iter_output,
61 const SmartPtr<HessianUpdater>& hessian_updater,
62 const SmartPtr<EqMultiplierCalculator>& eq_multiplier_calculator = NULL);
63
65 virtual ~IpoptAlgorithm();
67
68
70 virtual bool InitializeImpl(const OptionsList& options,
71 const std::string& prefix);
72
74 SolverReturn Optimize(bool isResto = false);
75
78 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
80
83 SmartPtr<SearchDirectionCalculator> SearchDirCalc()
84 {
85 return search_dir_calculator_;
86 }
88
89 static void print_copyright_message(const Journalist& jnlst);
90
91 private:
101 IpoptAlgorithm();
102
104 IpoptAlgorithm(const IpoptAlgorithm&);
105
107 void operator=(const IpoptAlgorithm&);
109
112 SmartPtr<SearchDirectionCalculator> search_dir_calculator_;
113 SmartPtr<LineSearch> line_search_;
114 SmartPtr<MuUpdate> mu_update_;
115 SmartPtr<ConvergenceCheck> conv_check_;
116 SmartPtr<IterateInitializer> iterate_initializer_;
117 SmartPtr<IterationOutput> iter_output_;
118 SmartPtr<HessianUpdater> hessian_updater_;
121 SmartPtr<EqMultiplierCalculator> eq_multiplier_calculator_;
123
130 void UpdateHessian();
131
136 bool UpdateBarrierParameter();
137
142 bool ComputeSearchDirection();
143
147 void ComputeAcceptableTrialPoint();
148
151 void AcceptTrialPoint();
152
154 void OutputIteration();
155
159 void InitializeIterates();
160
162 void PrintProblemStatistics();
163
165 void ComputeFeasibilityMultipliers();
167
171 bool skip_print_problem_stats_;
173
180 Number kappa_sigma_;
184 bool recalc_y_;
186 Number recalc_y_feas_tol_;
190 bool mehrotra_algorithm_;
192 std::string linear_solver_;
194
197 void calc_number_of_bounds(
198 const Vector& x,
199 const Vector& x_L,
200 const Vector& x_U,
201 const Matrix& Px_L,
202 const Matrix& Px_U,
203 Index& n_tot,
204 Index& n_only_lower,
205 Index& n_both,
206 Index& n_only_upper);
207
215 Number correct_bound_multiplier(const Vector& trial_z,
216 const Vector& trial_slack,
217 const Vector& trial_compl,
218 SmartPtr<const Vector>& new_trial_z);
220 };
221
222 } // namespace Ipopt
223
224 #endif
IpIterationOutput.hpp
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
IpAlgStrategy.hpp
Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint
void ComputeAcceptableTrialPoint()
Method computing the new iterate (usually vialine search).
IpIpoptNLP.hpp
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
Ipopt::IpoptAlgorithm::mu_update_
SmartPtr< MuUpdate > mu_update_
Definition: IpIpoptAlg.hpp:114
Ipopt::IpoptAlgorithm::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::IpoptAlgorithm::correct_bound_multiplier
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.
Ipopt::IpoptAlgorithm::eq_multiplier_calculator_
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...
Definition: IpIpoptAlg.hpp:121
Ipopt::IpoptAlgorithm::SearchDirCalc
SmartPtr< SearchDirectionCalculator > SearchDirCalc()
Definition: IpIpoptAlg.hpp:83
Ipopt::IpoptAlgorithm::PrintProblemStatistics
void PrintProblemStatistics()
Print the problem size statistics.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:47
Ipopt::IpoptAlgorithm::iter_output_
SmartPtr< IterationOutput > iter_output_
Definition: IpIpoptAlg.hpp:117
Ipopt::IpoptAlgorithm::InitializeIterates
void InitializeIterates()
Sets up initial values for the iterates, Corrects the initial values for x and s (force in bounds) ...
IpConvCheck.hpp
Ipopt::IpoptAlgorithm::operator=
void operator=(const IpoptAlgorithm &)
Overloaded Equals Operator.
Ipopt::IpoptAlgorithm::ComputeSearchDirection
bool ComputeSearchDirection()
Method to setup the call to the PDSystemSolver.
Ipopt::IpoptAlgorithm::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:32
Ipopt::SolverReturn
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Definition: IpAlgTypes.hpp:22
Ipopt::Matrix
Matrix Base Class.
Definition: IpMatrix.hpp:27
IpHessianUpdater.hpp
Ipopt::IpoptAlgorithm::Optimize
SolverReturn Optimize(bool isResto=false)
Main solve method.
IpLineSearch.hpp
Ipopt::IpoptAlgorithm::iterate_initializer_
SmartPtr< IterateInitializer > iterate_initializer_
Definition: IpIpoptAlg.hpp:116
IpEqMultCalculator.hpp
x_L
Number * x_L
Lower bounds on variables.
Definition: IpStdCInterface.h:137
Ipopt::IpoptAlgorithm::ComputeFeasibilityMultipliers
void ComputeFeasibilityMultipliers()
Compute the Lagrangian multipliers for a feasibility problem.
Ipopt::IpoptAlgorithm::recalc_y_feas_tol_
Number recalc_y_feas_tol_
Feasibility threshold for recalc_y.
Definition: IpIpoptAlg.hpp:186
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
x_U
Number Number * x_U
Upper bounds on variables.
Definition: IpStdCInterface.h:137
IpOptionsList.hpp
Ipopt::IpoptAlgorithm::UpdateHessian
void UpdateHessian()
Method for updating the current Hessian.
Ipopt::IpoptAlgorithm::conv_check_
SmartPtr< ConvergenceCheck > conv_check_
Definition: IpIpoptAlg.hpp:115
Ipopt::IpoptAlgorithm::mehrotra_algorithm_
bool mehrotra_algorithm_
Flag indicating if we want to do Mehrotras&#39;s algorithm.
Definition: IpIpoptAlg.hpp:190
IpMuUpdate.hpp
Ipopt::DECLARE_STD_EXCEPTION
DECLARE_STD_EXCEPTION(SUFFIX_EMPTY)
Ipopt::IpoptAlgorithm::AcceptTrialPoint
void AcceptTrialPoint()
Method for accepting the trial point as the new iteration, possibly after adjusting the variable boun...
Ipopt::IpoptAlgorithm::kappa_sigma_
Number kappa_sigma_
safeguard factor for bound multipliers.
Definition: IpIpoptAlg.hpp:180
Ipopt::IpoptAlgorithm::UpdateBarrierParameter
bool UpdateBarrierParameter()
Method to update the barrier parameter.
IpAlgTypes.hpp
Ipopt::IpoptAlgorithm::linear_solver_
std::string linear_solver_
String specifying linear solver.
Definition: IpIpoptAlg.hpp:192
Ipopt::IpoptAlgorithm::search_dir_calculator_
SmartPtr< SearchDirectionCalculator > search_dir_calculator_
Definition: IpIpoptAlg.hpp:112
Ipopt::Journalist
Class responsible for all message output.
Definition: IpJournalist.hpp:134
Ipopt::IpoptAlgorithm::IpoptAlgorithm
IpoptAlgorithm()
Default Constructor.
Ipopt::IpoptAlgorithm::hessian_updater_
SmartPtr< HessianUpdater > hessian_updater_
Definition: IpIpoptAlg.hpp:118
Ipopt::IpoptAlgorithm
The main ipopt algorithm class.
Definition: IpIpoptAlg.hpp:45
Ipopt::IpoptAlgorithm::line_search_
SmartPtr< LineSearch > line_search_
Definition: IpIpoptAlg.hpp:113
Ipopt::IpoptAlgorithm::OutputIteration
void OutputIteration()
Do all the output for one iteration.
Ipopt::IpoptAlgorithm::~IpoptAlgorithm
virtual ~IpoptAlgorithm()
Default destructor.
Ipopt::IpoptAlgorithm::calc_number_of_bounds
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)
Ipopt::IpoptAlgorithm::skip_print_problem_stats_
bool skip_print_problem_stats_
Flag indicating if the statistic should not be printed.
Definition: IpIpoptAlg.hpp:171
Ipopt::IpoptAlgorithm::recalc_y_
bool recalc_y_
Flag indicating whether the y multipliers should be recalculated with the eq_mutliplier_calculator ob...
Definition: IpIpoptAlg.hpp:184
IpIterateInitializer.hpp
Ipopt::IpoptAlgorithm::print_copyright_message
static void print_copyright_message(const Journalist &jnlst)
IpSearchDirCalculator.hpp