Ipopt Documentation  
 
Loading...
Searching...
No Matches
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"
18#include "IpIterationOutput.hpp"
19#include "IpAlgTypes.hpp"
20#include "IpHessianUpdater.hpp"
22
23namespace Ipopt
24{
25
40{
41public:
42
45
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
77 bool isResto = false
78 );
79
82 static void RegisterOptions(
84 );
86
90 {
91 return search_dir_calculator_;
92 }
94
96 const Journalist& jnlst
97 );
98
99private:
110
112
115 const IpoptAlgorithm&
116 );
117
120 const IpoptAlgorithm&
121 );
123
138
141
147
155
163
169
174
177
183
186
190
193
196
199
222
226 const Vector& x,
227 const Vector& x_L,
228 const Vector& x_U,
229 const Matrix& Px_L,
230 const Matrix& Px_U,
231 Index& n_tot,
232 Index& n_only_lower,
233 Index& n_both,
234 Index& n_only_upper
235 );
236
247 const Vector& trial_z,
248 const Vector& trial_slack,
249 const Vector& trial_compl,
250 SmartPtr<const Vector>& new_trial_z
251 );
253};
254
255} // namespace Ipopt
256
257#endif
This is the base class for all algorithm strategy objects.
The main ipopt algorithm class.
Definition: IpIpoptAlg.hpp:40
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:136
SmartPtr< ConvergenceCheck > conv_check_
Definition: IpIpoptAlg.hpp:129
IpoptAlgorithm()
Default Constructor.
bool UpdateBarrierParameter()
Method to update the barrier parameter.
SmartPtr< SearchDirectionCalculator > search_dir_calculator_
Definition: IpIpoptAlg.hpp:126
bool mehrotra_algorithm_
Flag indicating if we want to do Mehrotras's algorithm.
Definition: IpIpoptAlg.hpp:218
SmartPtr< MuUpdate > mu_update_
Definition: IpIpoptAlg.hpp:128
virtual ~IpoptAlgorithm()
Destructor.
static void print_copyright_message(const Journalist &jnlst)
SmartPtr< SearchDirectionCalculator > SearchDirCalc()
Definition: IpIpoptAlg.hpp:89
void operator=(const IpoptAlgorithm &)
Default Assignment Operator.
bool recalc_y_
Flag indicating whether the y multipliers should be recalculated with the eq_mutliplier_calculator ob...
Definition: IpIpoptAlg.hpp:210
SmartPtr< LineSearch > line_search_
Definition: IpIpoptAlg.hpp:127
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.
void UpdateHessian()
Method for updating the current Hessian.
void PrintProblemStatistics()
Print the problem size statistics.
IpoptAlgorithm(const IpoptAlgorithm &)
Copy Constructor.
Number kappa_sigma_
safeguard factor for bound multipliers.
Definition: IpIpoptAlg.hpp:205
SolverReturn Optimize(bool isResto=false)
Main solve method.
SmartPtr< IterateInitializer > iterate_initializer_
Definition: IpIpoptAlg.hpp:130
bool ComputeSearchDirection()
Method to setup the call to the PDSystemSolver.
void ComputeFeasibilityMultipliers()
Compute the Lagrangian multipliers for a feasibility problem.
virtual bool InitializeImpl(const OptionsList &options, const std::string &prefix)
overloaded from AlgorithmStrategyObject
SmartPtr< HessianUpdater > hessian_updater_
Definition: IpIpoptAlg.hpp:132
SmartPtr< IterationOutput > iter_output_
Definition: IpIpoptAlg.hpp:131
void InitializeIterates()
Sets up initial values for the iterates.
void OutputIteration()
Do all the output for one iteration.
std::string linear_solver_name_
String specifying linear solver.
Definition: IpIpoptAlg.hpp:220
void AcceptTrialPoint()
Method for accepting the trial point as the new iteration, possibly after adjusting the variable boun...
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
Methods for IpoptType.
Number recalc_y_feas_tol_
Feasibility threshold for recalc_y.
Definition: IpIpoptAlg.hpp:212
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, const std::string &linear_solver_name="")
Constructor.
void ComputeAcceptableTrialPoint()
Method computing the new iterate (usually vialine search).
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)
bool skip_print_problem_stats_
Flag indicating if the statistic should not be printed.
Definition: IpIpoptAlg.hpp:194
Class responsible for all message output.
Matrix Base Class.
Definition: IpMatrix.hpp:28
This class stores a list of user set options.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:165
Vector Base Class.
Definition: IpVector.hpp:48
#define IPOPTLIB_EXPORT
Definition: config.h:94
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SolverReturn
enum for the return from the optimize algorithm
Definition: IpAlgTypes.hpp:20
ipindex Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17