Ipopt Documentation  
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 // Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6 
7 #ifndef __IPIPOPTALG_HPP__
8 #define __IPIPOPTALG_HPP__
9 
10 #include "IpIpoptNLP.hpp"
11 #include "IpAlgStrategy.hpp"
13 #include "IpLineSearch.hpp"
14 #include "IpMuUpdate.hpp"
15 #include "IpConvCheck.hpp"
16 #include "IpOptionsList.hpp"
17 #include "IpIterateInitializer.hpp"
18 #include "IpIterationOutput.hpp"
19 #include "IpAlgTypes.hpp"
20 #include "IpHessianUpdater.hpp"
21 #include "IpEqMultCalculator.hpp"
22 
23 namespace Ipopt
24 {
25 
40 {
41 public:
42 
44 
54  const SmartPtr<SearchDirectionCalculator>& search_dir_calculator,
55  const SmartPtr<LineSearch>& line_search,
56  const SmartPtr<MuUpdate>& mu_update,
57  const SmartPtr<ConvergenceCheck>& conv_check,
58  const SmartPtr<IterateInitializer>& iterate_initializer,
59  const SmartPtr<IterationOutput>& iter_output,
60  const SmartPtr<HessianUpdater>& hessian_updater,
61  const SmartPtr<EqMultiplierCalculator>& eq_multiplier_calculator = NULL,
62  const std::string& linear_solver_name = ""
63  );
64 
66  virtual ~IpoptAlgorithm();
68 
70  virtual bool InitializeImpl(
71  const OptionsList& options,
72  const std::string& prefix
73  );
74 
76  SolverReturn Optimize(
77  bool isResto = false
78  );
79 
81  static void RegisterOptions(
84  );
86 
90  {
91  return search_dir_calculator_;
92  }
94 
95  static void print_copyright_message(
96  const Journalist& jnlst
97  );
98 
99 private:
109 
111  IpoptAlgorithm();
112 
115  const IpoptAlgorithm&
116  );
117 
119  void operator=(
120  const IpoptAlgorithm&
121  );
123 
125  SmartPtr<SearchDirectionCalculator> search_dir_calculator_;
140 
142 
148  void UpdateHessian();
149 
156  bool UpdateBarrierParameter();
157 
164  bool ComputeSearchDirection();
165 
170  void ComputeAcceptableTrialPoint();
171 
175  void AcceptTrialPoint();
176 
178  void OutputIteration();
179 
184  void InitializeIterates();
185 
187  void PrintProblemStatistics();
188 
194  void ComputeFeasibilityMultipliers();
195 
200  void ComputeFeasibilityMultipliersPostprocess();
202 
204 
208 
210 
222  bool recalc_y_;
232  std::string linear_solver_name_;
236 
238  void calc_number_of_bounds(
240  const Vector& x,
241  const Vector& x_L,
242  const Vector& x_U,
243  const Matrix& Px_L,
244  const Matrix& Px_U,
245  Index& n_tot,
246  Index& n_only_lower,
247  Index& n_both,
248  Index& n_only_upper
249  );
250 
260  Number correct_bound_multiplier(
261  const Vector& trial_z,
262  const Vector& trial_slack,
263  const Vector& trial_compl,
264  SmartPtr<const Vector>& new_trial_z
265  );
267 };
268 
269 } // namespace Ipopt
270 
271 #endif
This is the base class for all algorithm strategy objects.
#define IPOPTLIB_EXPORT
Definition: config.h:94
SmartPtr< MuUpdate > mu_update_
Definition: IpIpoptAlg.hpp:128
SmartPtr< EqMultiplierCalculator > eq_multiplier_calculator_
The multiplier calculator (for y_c and y_d) has to be set only if option recalc_y is set to true...
Definition: IpIpoptAlg.hpp:138
Number constr_viol_tol_
Constraint violation tolerance on unscaled problem.
Definition: IpIpoptAlg.hpp:234
Vector Base Class.
Definition: IpVector.hpp:47
SmartPtr< IterationOutput > iter_output_
Definition: IpIpoptAlg.hpp:131
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
This file contains a base class for all exceptions and a set of macros to help with exceptions...
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:164
This class stores a list of user set options.
SolverReturn
enum for the return from the optimize algorithm
Definition: IpAlgTypes.hpp:19
Matrix Base Class.
Definition: IpMatrix.hpp:27
SmartPtr< IterateInitializer > iterate_initializer_
Definition: IpIpoptAlg.hpp:130
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17
Number recalc_y_feas_tol_
Feasibility threshold for recalc_y.
Definition: IpIpoptAlg.hpp:224
SmartPtr< ConvergenceCheck > conv_check_
Definition: IpIpoptAlg.hpp:129
bool mehrotra_algorithm_
Flag indicating if we want to do Mehrotras&#39;s algorithm.
Definition: IpIpoptAlg.hpp:230
Number kappa_sigma_
safeguard factor for bound multipliers.
Definition: IpIpoptAlg.hpp:217
Class responsible for all message output.
SmartPtr< HessianUpdater > hessian_updater_
Definition: IpIpoptAlg.hpp:132
The main ipopt algorithm class.
Definition: IpIpoptAlg.hpp:39
SmartPtr< LineSearch > line_search_
Definition: IpIpoptAlg.hpp:127
bool skip_print_problem_stats_
Flag indicating if the statistic should not be printed.
Definition: IpIpoptAlg.hpp:206
bool recalc_y_
Flag indicating whether the y multipliers should be recalculated with the eq_mutliplier_calculator ob...
Definition: IpIpoptAlg.hpp:222
std::string linear_solver_name_
String specifying linear solver.
Definition: IpIpoptAlg.hpp:232