Ipopt Documentation  
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 #include "IpUtils.hpp"
13 
14 namespace Ipopt
15 {
16 
17 // forward declaration (to avoid inclusion of too many header files)
18 class IpoptNLP;
19 class IpoptData;
20 class IpoptCalculatedQuantities;
21 
28 {
29 public:
31 
40  const SmartPtr<IpoptNLP>& ip_nlp,
41  const SmartPtr<IpoptData>& ip_data,
43  );
44 
46  virtual ~SolveStatistics()
47  { }
49 
51 
53  virtual Index IterationCount() const;
54 
56  virtual Number TotalCpuTime() const;
57 
64  {
65  return TotalCpuTime();
66  }
67 
69  virtual Number TotalSysTime() const;
70 
72  virtual Number TotalWallclockTime() const;
73 
75  virtual void NumberOfEvaluations(
76  Index& num_obj_evals,
77  Index& num_constr_evals,
78  Index& num_obj_grad_evals,
79  Index& num_constr_jac_evals,
80  Index& num_hess_evals
81  ) const;
82 
88  virtual void Infeasibilities(
89  Number& dual_inf,
90  Number& constr_viol,
91  Number& complementarity,
92  Number& kkt_error
93  ) const;
94 
96  virtual void Infeasibilities(
97  Number& dual_inf,
98  Number& constr_viol,
99  Number& varbounds_viol,
100  Number& complementarity,
101  Number& kkt_error
102  ) const;
103 
109  virtual void ScaledInfeasibilities(
110  Number& scaled_dual_inf,
111  Number& scaled_constr_viol,
112  Number& scaled_complementarity,
113  Number& scaled_kkt_error
114  ) const;
115 
120  virtual void ScaledInfeasibilities(
121  Number& scaled_dual_inf,
122  Number& scaled_constr_viol,
123  Number& scaled_varbounds_viol,
124  Number& scaled_complementarity,
125  Number& scaled_kkt_error
126  ) const;
127 
129  virtual Number FinalObjective() const;
130 
132  virtual Number FinalScaledObjective() const;
134 
135 private:
145 
147  SolveStatistics();
148 
151  const SolveStatistics&
152  );
153 
155  void operator=(
156  const SolveStatistics&
157  );
159 
161 
164  /* Total CPU time */
166  /* Total system time */
168  /* Total wall clock time */
180 
206 };
207 
208 } // namespace Ipopt
209 
210 #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.
#define IPOPTLIB_EXPORT
Definition: config.h:94
Number scaled_constr_viol_
Final scaled constraint violation (max-norm)
IPOPT_DEPRECATED Number TotalCPUTime() const
Total CPU time, including function evaluations.
Number scaled_bound_viol_
Final scaled variable bound violation (max-norm)
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...
virtual ~SolveStatistics()
Default destructor.
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:164
Storing the reference count of all the smart pointers that currently reference it.
Number bound_viol_
Final unscaled variable bound violation (max-norm)
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.
ipnumber Number
Type of all numbers.
Definition: IpTypes.hpp:17
Index num_hess_evals_
Number of Lagrangian Hessian evaluations.
Index num_constr_evals_
Number of constraints evaluations (max of equality and inequality)
Index num_constr_jac_evals_
Number of constraint Jacobian evaluations.
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)
#define IPOPT_DEPRECATED
macro to declare symbols as deprecated
Definition: IpTypes.h:25
Index num_iters_
Number of iterations.