Ipopt
trunk
|
00001 // Copyright (C) 2005, 2009 International Business Machines and others. 00002 // All Rights Reserved. 00003 // This code is published under the Eclipse Public License. 00004 // 00005 // $Id$ 00006 // 00007 // Authors: Carl Laird, Andreas Waechter IBM 2005-08-15 00008 00009 #ifndef __IPSOLVESTATISTICS_HPP__ 00010 #define __IPSOLVESTATISTICS_HPP__ 00011 00012 #include "IpReferenced.hpp" 00013 #include "IpSmartPtr.hpp" 00014 00015 namespace Ipopt 00016 { 00017 // forward declaration (to avoid inclusion of too many header files) 00018 class IpoptNLP; 00019 class IpoptData; 00020 class IpoptCalculatedQuantities; 00021 00027 class SolveStatistics : public ReferencedObject 00028 { 00029 public: 00036 SolveStatistics(const SmartPtr<IpoptNLP>& ip_nlp, 00037 const SmartPtr<IpoptData>& ip_data, 00038 const SmartPtr<IpoptCalculatedQuantities>& ip_cq); 00039 00041 virtual ~SolveStatistics() 00042 {} 00044 00049 virtual Index IterationCount() const; 00051 virtual Number TotalCpuTime() const; 00054 Number TotalCPUTime() const 00055 { 00056 return TotalCpuTime(); 00057 } 00059 virtual Number TotalSysTime() const; 00061 virtual Number TotalWallclockTime() const; 00063 virtual void NumberOfEvaluations(Index& num_obj_evals, 00064 Index& num_constr_evals, 00065 Index& num_obj_grad_evals, 00066 Index& num_constr_jac_evals, 00067 Index& num_hess_evals) const; 00069 virtual void Infeasibilities(Number& dual_inf, 00070 Number& constr_viol, 00071 Number& complementarity, 00072 Number& kkt_error) const; 00074 virtual void ScaledInfeasibilities(Number& scaled_dual_inf, 00075 Number& scaled_constr_viol, 00076 Number& scaled_complementarity, 00077 Number& scaled_kkt_error) const; 00079 virtual Number FinalObjective() const; 00081 virtual Number FinalScaledObjective() const; 00083 00084 private: 00094 SolveStatistics(); 00095 00097 SolveStatistics(const SolveStatistics&); 00098 00100 void operator=(const SolveStatistics&); 00102 00106 Index num_iters_; 00107 /* Total CPU time */ 00108 Number total_cpu_time_; 00109 /* Total system time */ 00110 Number total_sys_time_; 00111 /* Total wall clock time */ 00112 Number total_wallclock_time_; 00114 Index num_obj_evals_; 00117 Index num_constr_evals_; 00119 Index num_obj_grad_evals_; 00121 Index num_constr_jac_evals_; 00123 Index num_hess_evals_; 00124 00126 Number scaled_obj_val_; 00128 Number obj_val_; 00130 Number scaled_dual_inf_; 00132 Number dual_inf_; 00134 Number scaled_constr_viol_; 00136 Number constr_viol_; 00138 Number scaled_compl_; 00140 Number compl_; 00142 Number scaled_kkt_error_; 00144 Number kkt_error_; 00146 }; 00147 00148 } // namespace Ipopt 00149 00150 #endif