Ipopt Documentation  
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // Authors: Carl Laird, Andreas Waechter IBM 2005-08-15
6 
7 #ifndef __IPSOLVESTATISTICS_HPP__
8 #define __IPSOLVESTATISTICS_HPP__
9 
10 #include "IpReferenced.hpp"
11 #include "IpSmartPtr.hpp"
12 
13 namespace Ipopt
14 {
15 
16 // forward declaration (to avoid inclusion of too many header files)
17 class IpoptNLP;
18 class IpoptData;
19 class IpoptCalculatedQuantities;
20 
27 {
28 public:
39  const SmartPtr<IpoptNLP>& ip_nlp,
40  const SmartPtr<IpoptData>& ip_data,
42  );
43 
45  virtual ~SolveStatistics()
46  { }
48 
52  virtual Index IterationCount() const;
53 
55  virtual Number TotalCpuTime() const;
56 
62  {
63  return TotalCpuTime();
64  }
65 
67  virtual Number TotalSysTime() const;
68 
70  virtual Number TotalWallclockTime() const;
71 
73  virtual void NumberOfEvaluations(
74  Index& num_obj_evals,
75  Index& num_constr_evals,
76  Index& num_obj_grad_evals,
77  Index& num_constr_jac_evals,
78  Index& num_hess_evals
79  ) const;
80 
82  virtual void Infeasibilities(
83  Number& dual_inf,
84  Number& constr_viol,
85  Number& complementarity,
86  Number& kkt_error
87  ) const;
88 
90  virtual void ScaledInfeasibilities(
91  Number& scaled_dual_inf,
92  Number& scaled_constr_viol,
93  Number& scaled_complementarity,
94  Number& scaled_kkt_error
95  ) const;
96 
98  virtual Number FinalObjective() const;
99 
101  virtual Number FinalScaledObjective() const;
103 
104 private:
116  SolveStatistics();
117 
120  const SolveStatistics&
121  );
122 
124  void operator=(
125  const SolveStatistics&
126  );
128 
133  /* Total CPU time */
135  /* Total system time */
137  /* Total wall clock time */
149 
171 };
172 
173 } // namespace Ipopt
174 
175 #endif
Number dual_inf_
Final unscaled dual infeasibility (max-norm)
Number constr_viol_
Final unscaled constraint violation (max-norm)
Number compl_
Final unscaled complementarity error (max-norm)
Index num_obj_evals_
Number of objective function evaluations.
Number scaled_constr_viol_
Final scaled constraint violation (max-norm)
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
virtual ~SolveStatistics()
Default destructor.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:171
Storing the reference count of all the smart pointers that currently reference it.
Number TotalCPUTime() const
Total CPU time, including function evaluations.
Number scaled_obj_val_
Final scaled value of objective function.
Index num_obj_grad_evals_
Number of objective gradient evaluations.
Number obj_val_
Final unscaled value of objective function.
Index num_hess_evals_
Number of Lagrangian Hessian evaluations.
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Index num_constr_evals_
Number of constraints evaluations (max of equality and inequality)
Index num_constr_jac_evals_
Number of constraint Jacobian evaluations.
#define IPOPTLIB_EXPORT
Number kkt_error_
Final overall unscaled KKT error (max-norm)
Number scaled_dual_inf_
Final scaled dual infeasibility (max-norm)
Number scaled_kkt_error_
Final overall scaled KKT error (max-norm)
This class collects statistics about an optimization run, such as iteration count, final infeasibilities etc.
Number scaled_compl_
Final scaled complementarity error (max-norm)
Index num_iters_
Number of iterations.