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 
28 DECLARE_STD_EXCEPTION(STEP_COMPUTATION_FAILED);
30 
45 {
46 public:
47 
57  const SmartPtr<SearchDirectionCalculator>& search_dir_calculator,
58  const SmartPtr<LineSearch>& line_search,
59  const SmartPtr<MuUpdate>& mu_update,
60  const SmartPtr<ConvergenceCheck>& conv_check,
61  const SmartPtr<IterateInitializer>& iterate_initializer,
62  const SmartPtr<IterationOutput>& iter_output,
63  const SmartPtr<HessianUpdater>& hessian_updater,
64  const SmartPtr<EqMultiplierCalculator>& eq_multiplier_calculator = NULL
65  );
66 
68  virtual ~IpoptAlgorithm();
70 
72  virtual bool InitializeImpl(
73  const OptionsList& options,
74  const std::string& prefix
75  );
76 
79  bool isResto = false
80  );
81 
84  static void RegisterOptions(
86  );
88 
92  {
93  return search_dir_calculator_;
94  }
96 
98  const Journalist& jnlst
99  );
100 
101 private:
114 
117  const IpoptAlgorithm&
118  );
119 
121  void operator=(
122  const IpoptAlgorithm&
123  );
125 
140 
149 
157 
165 
171 
176 
179 
185 
188 
192 
198 
212  bool recalc_y_;
222  std::string linear_solver_;
224 
228  const Vector& x,
229  const Vector& x_L,
230  const Vector& x_U,
231  const Matrix& Px_L,
232  const Matrix& Px_U,
233  Index& n_tot,
234  Index& n_only_lower,
235  Index& n_both,
236  Index& n_only_upper
237  );
238 
249  const Vector& trial_z,
250  const Vector& trial_slack,
251  const Vector& trial_compl,
252  SmartPtr<const Vector>& new_trial_z
253  );
255 };
256 
257 } // namespace Ipopt
258 
259 #endif
Ipopt::IpoptAlgorithm::IpoptAlgorithm
IpoptAlgorithm()
Default Constructor.
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::operator=
void operator=(const IpoptAlgorithm &)
Default Assignment Operator.
Ipopt::IpoptAlgorithm::SearchDirCalc
SmartPtr< SearchDirectionCalculator > SearchDirCalc()
Definition: IpIpoptAlg.hpp:91
Ipopt::IpoptAlgorithm::PrintProblemStatistics
void PrintProblemStatistics()
Print the problem size statistics.
IpMuUpdate.hpp
Ipopt::IpoptAlgorithm::InitializeImpl
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
IpSearchDirCalculator.hpp
IpAlgTypes.hpp
Ipopt::IpoptAlgorithm::ComputeSearchDirection
bool ComputeSearchDirection()
Method to setup the call to the PDSystemSolver.
IpOptionsList.hpp
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::Matrix
Matrix Base Class.
Definition: IpMatrix.hpp:28
Ipopt::IpoptAlgorithm::ComputeAcceptableTrialPoint
void ComputeAcceptableTrialPoint()
Method computing the new iterate (usually vialine search).
IpEqMultCalculator.hpp
Ipopt::IpoptAlgorithm::iterate_initializer_
SmartPtr< IterateInitializer > iterate_initializer_
Definition: IpIpoptAlg.hpp:132
Ipopt::IpoptAlgorithm::mu_update_
SmartPtr< MuUpdate > mu_update_
Definition: IpIpoptAlg.hpp:130
Ipopt::IpoptAlgorithm::Optimize
SolverReturn Optimize(bool isResto=false)
Main solve method.
Ipopt::IpoptAlgorithm::recalc_y_feas_tol_
Number recalc_y_feas_tol_
Feasibility threshold for recalc_y.
Definition: IpIpoptAlg.hpp:214
IPOPTLIB_EXPORT
#define IPOPTLIB_EXPORT
Definition: config_default.h:16
IpIterateInitializer.hpp
Ipopt::IpoptAlgorithm::InitializeIterates
void InitializeIterates()
Sets up initial values for the iterates.
Ipopt::IpoptAlgorithm::UpdateHessian
void UpdateHessian()
Method for updating the current Hessian.
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::IpoptAlgorithm::mehrotra_algorithm_
bool mehrotra_algorithm_
Flag indicating if we want to do Mehrotras's algorithm.
Definition: IpIpoptAlg.hpp:220
Ipopt::IpoptAlgorithm::RegisterOptions
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Ipopt::IpoptAlgorithm::eq_multiplier_calculator_
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
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::IpoptAlgorithm::iter_output_
SmartPtr< IterationOutput > iter_output_
Definition: IpIpoptAlg.hpp:133
Ipopt::IpoptAlgorithm::conv_check_
SmartPtr< ConvergenceCheck > conv_check_
Definition: IpIpoptAlg.hpp:131
Ipopt::IpoptAlgorithm::line_search_
SmartPtr< LineSearch > line_search_
Definition: IpIpoptAlg.hpp:129
Ipopt::IpoptAlgorithm::OutputIteration
void OutputIteration()
Do all the output for one iteration.
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::kappa_sigma_
Number kappa_sigma_
safeguard factor for bound multipliers.
Definition: IpIpoptAlg.hpp:207
Ipopt::IpoptAlgorithm::hessian_updater_
SmartPtr< HessianUpdater > hessian_updater_
Definition: IpIpoptAlg.hpp:134
Ipopt::IpoptAlgorithm::IpoptAlgorithm
IpoptAlgorithm(const IpoptAlgorithm &)
Copy Constructor.
Ipopt::IpoptAlgorithm::~IpoptAlgorithm
virtual ~IpoptAlgorithm()
Destructor.
Ipopt::IpoptAlgorithm::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.
Ipopt::Journalist
Class responsible for all message output.
Definition: IpJournalist.hpp:117
Ipopt::AlgorithmStrategyObject
This is the base class for all algorithm strategy objects.
Definition: IpAlgStrategy.hpp:35
IpIterationOutput.hpp
Ipopt::IpoptAlgorithm::skip_print_problem_stats_
bool skip_print_problem_stats_
Flag indicating if the statistic should not be printed.
Definition: IpIpoptAlg.hpp:196
Ipopt::IpoptAlgorithm
The main ipopt algorithm class.
Definition: IpIpoptAlg.hpp:45
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:212
IpAlgStrategy.hpp
IpLineSearch.hpp
Ipopt::IpoptAlgorithm::ComputeFeasibilityMultipliers
void ComputeFeasibilityMultipliers()
Compute the Lagrangian multipliers for a feasibility problem.
IpConvCheck.hpp
Ipopt::IpoptAlgorithm::print_copyright_message
static void print_copyright_message(const Journalist &jnlst)
Ipopt::DECLARE_STD_EXCEPTION
DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)
Ipopt::SolverReturn
SolverReturn
enum for the return from the optimize algorithm
Definition: IpAlgTypes.hpp:20
Ipopt::IpoptAlgorithm::AcceptTrialPoint
void AcceptTrialPoint()
Method for accepting the trial point as the new iteration, possibly after adjusting the variable boun...
Ipopt::IpoptAlgorithm::UpdateBarrierParameter
bool UpdateBarrierParameter()
Method to update the barrier parameter.
Ipopt::IpoptAlgorithm::linear_solver_
std::string linear_solver_
String specifying linear solver.
Definition: IpIpoptAlg.hpp:222
Ipopt::OptionsList
This class stores a list of user set options.
Definition: IpOptionsList.hpp:33
IpIpoptNLP.hpp
IpHessianUpdater.hpp
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:48
Ipopt::IpoptAlgorithm::search_dir_calculator_
SmartPtr< SearchDirectionCalculator > search_dir_calculator_
Definition: IpIpoptAlg.hpp:128