Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpSolveStatistics.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2009 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: IpSolveStatistics.hpp 1861 2010-12-21 21:34:47Z andreasw $
6 //
7 // Authors: Carl Laird, Andreas Waechter IBM 2005-08-15
8
9 #ifndef __IPSOLVESTATISTICS_HPP__
10 #define __IPSOLVESTATISTICS_HPP__
11
12 #include "IpReferenced.hpp"
13 #include "IpSmartPtr.hpp"
14
15 namespace Ipopt
16 {
17 // forward declaration (to avoid inclusion of too many header files)
18 class IpoptNLP;
19 class IpoptData;
20 class IpoptCalculatedQuantities;
21
27 class SolveStatistics : public ReferencedObject
28 {
29 public:
36 SolveStatistics(const SmartPtr<IpoptNLP>& ip_nlp,
37 const SmartPtr<IpoptData>& ip_data,
38 const SmartPtr<IpoptCalculatedQuantities>& ip_cq);
39
41 virtual ~SolveStatistics()
42 {}
44
49 virtual Index IterationCount() const;
51 virtual Number TotalCpuTime() const;
54 Number TotalCPUTime() const
55 {
56 return TotalCpuTime();
57 }
59 virtual Number TotalSysTime() const;
61 virtual Number TotalWallclockTime() const;
63 virtual void NumberOfEvaluations(Index& num_obj_evals,
64 Index& num_constr_evals,
65 Index& num_obj_grad_evals,
66 Index& num_constr_jac_evals,
67 Index& num_hess_evals) const;
69 virtual void Infeasibilities(Number& dual_inf,
70 Number& constr_viol,
71 Number& complementarity,
72 Number& kkt_error) const;
74 virtual void ScaledInfeasibilities(Number& scaled_dual_inf,
75 Number& scaled_constr_viol,
76 Number& scaled_complementarity,
77 Number& scaled_kkt_error) const;
79 virtual Number FinalObjective() const;
81 virtual Number FinalScaledObjective() const;
83
84 private:
94 SolveStatistics();
95
97 SolveStatistics(const SolveStatistics&);
98
100 void operator=(const SolveStatistics&);
102
106 Index num_iters_;
107 /* Total CPU time */
108 Number total_cpu_time_;
109 /* Total system time */
110 Number total_sys_time_;
111 /* Total wall clock time */
112 Number total_wallclock_time_;
114 Index num_obj_evals_;
117 Index num_constr_evals_;
119 Index num_obj_grad_evals_;
121 Index num_constr_jac_evals_;
123 Index num_hess_evals_;
124
126 Number scaled_obj_val_;
128 Number obj_val_;
130 Number scaled_dual_inf_;
132 Number dual_inf_;
134 Number scaled_constr_viol_;
136 Number constr_viol_;
138 Number scaled_compl_;
140 Number compl_;
142 Number scaled_kkt_error_;
144 Number kkt_error_;
146 };
147
148 } // namespace Ipopt
149
150 #endif
Ipopt::SolveStatistics::TotalCpuTime
virtual Number TotalCpuTime() const
Total CPU time, including function evaluations.
Ipopt::SolveStatistics::dual_inf_
Number dual_inf_
Final unscaled dual infeasibility (max-norm)
Definition: IpSolveStatistics.hpp:132
Ipopt::SolveStatistics::constr_viol_
Number constr_viol_
Final unscaled constraint violation (max-norm)
Definition: IpSolveStatistics.hpp:136
Ipopt::SolveStatistics::compl_
Number compl_
Final unscaled complementarity error (max-norm)
Definition: IpSolveStatistics.hpp:140
Ipopt::SolveStatistics::operator=
void operator=(const SolveStatistics &)
Overloaded Equals Operator.
Ipopt::SolveStatistics::num_obj_evals_
Index num_obj_evals_
Number of objective function evaluations.
Definition: IpSolveStatistics.hpp:114
Ipopt::SolveStatistics::scaled_constr_viol_
Number scaled_constr_viol_
Final scaled constraint violation (max-norm)
Definition: IpSolveStatistics.hpp:134
Ipopt::SolveStatistics::Infeasibilities
virtual void Infeasibilities(Number &dual_inf, Number &constr_viol, Number &complementarity, Number &kkt_error) const
Unscaled solution infeasibilities.
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
Ipopt::SolveStatistics::total_wallclock_time_
Number total_wallclock_time_
Definition: IpSolveStatistics.hpp:112
Ipopt::SolveStatistics::TotalWallclockTime
virtual Number TotalWallclockTime() const
Total wall clock time, including function evaluations.
Ipopt::SolveStatistics::total_cpu_time_
Number total_cpu_time_
Definition: IpSolveStatistics.hpp:108
Ipopt::SolveStatistics::~SolveStatistics
virtual ~SolveStatistics()
Default destructor.
Definition: IpSolveStatistics.hpp:41
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::ReferencedObject
ReferencedObject class.
Definition: IpReferenced.hpp:174
Ipopt::SolveStatistics::TotalCPUTime
Number TotalCPUTime() const
Total CPU time, including function evaluations.
Definition: IpSolveStatistics.hpp:54
Ipopt::SolveStatistics::NumberOfEvaluations
virtual void NumberOfEvaluations(Index &num_obj_evals, Index &num_constr_evals, Index &num_obj_grad_evals, Index &num_constr_jac_evals, Index &num_hess_evals) const
Number of NLP function evaluations.
Ipopt::SolveStatistics::FinalScaledObjective
virtual Number FinalScaledObjective() const
Final scaled value of objective function.
Ipopt::SolveStatistics::scaled_obj_val_
Number scaled_obj_val_
Final scaled value of objective function.
Definition: IpSolveStatistics.hpp:126
Ipopt::SolveStatistics::num_obj_grad_evals_
Index num_obj_grad_evals_
Number of objective gradient evaluations.
Definition: IpSolveStatistics.hpp:119
Ipopt::SolveStatistics::obj_val_
Number obj_val_
Final unscaled value of objective function.
Definition: IpSolveStatistics.hpp:128
Ipopt::SolveStatistics::num_hess_evals_
Index num_hess_evals_
Number of Lagrangian Hessian evaluations.
Definition: IpSolveStatistics.hpp:123
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
Ipopt::SolveStatistics::num_constr_evals_
Index num_constr_evals_
Number of constraints evaluations (max of equality and inequality)
Definition: IpSolveStatistics.hpp:117
IpReferenced.hpp
Ipopt::SolveStatistics::ScaledInfeasibilities
virtual void ScaledInfeasibilities(Number &scaled_dual_inf, Number &scaled_constr_viol, Number &scaled_complementarity, Number &scaled_kkt_error) const
Scaled solution infeasibilities.
Ipopt::SolveStatistics::num_constr_jac_evals_
Index num_constr_jac_evals_
Number of constraint Jacobian evaluations.
Definition: IpSolveStatistics.hpp:121
Ipopt::SolveStatistics::kkt_error_
Number kkt_error_
Final overall unscaled KKT error (max-norm)
Definition: IpSolveStatistics.hpp:144
Ipopt::SolveStatistics::FinalObjective
virtual Number FinalObjective() const
Final value of objective function.
Ipopt::SolveStatistics::scaled_dual_inf_
Number scaled_dual_inf_
Final scaled dual infeasibility (max-norm)
Definition: IpSolveStatistics.hpp:130
Ipopt::SolveStatistics::scaled_kkt_error_
Number scaled_kkt_error_
Final overall scaled KKT error (max-norm)
Definition: IpSolveStatistics.hpp:142
Ipopt::SolveStatistics
This class collects statistics about an optimziation run, such as iteration count, final infeasibilities etc.
Definition: IpSolveStatistics.hpp:27
Ipopt::SolveStatistics::scaled_compl_
Number scaled_compl_
Final scaled complementarity error (max-norm)
Definition: IpSolveStatistics.hpp:138
Ipopt::SolveStatistics::SolveStatistics
SolveStatistics()
Default Constructor.
Ipopt::SolveStatistics::num_iters_
Index num_iters_
Number of iterations.
Definition: IpSolveStatistics.hpp:106
Ipopt::SolveStatistics::total_sys_time_
Number total_sys_time_
Definition: IpSolveStatistics.hpp:110
Ipopt::SolveStatistics::IterationCount
virtual Index IterationCount() const
Iteration counts.
IpSmartPtr.hpp
Ipopt::SolveStatistics::TotalSysTime
virtual Number TotalSysTime() const
Total System time, including function evaluations.