Ipopt
trunk
|
00001 // Copyright (C) 2004, 2010 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 2004-08-13 00008 00009 #ifndef __IPOPTERRORCONVCHECK_HPP__ 00010 #define __IPOPTERRORCONVCHECK_HPP__ 00011 00012 #include "IpConvCheck.hpp" 00013 00014 namespace Ipopt 00015 { 00016 00020 class OptimalityErrorConvergenceCheck : public ConvergenceCheck 00021 { 00022 public: 00026 OptimalityErrorConvergenceCheck(); 00027 00029 virtual ~OptimalityErrorConvergenceCheck(); 00031 00033 virtual bool InitializeImpl(const OptionsList& options, 00034 const std::string& prefix); 00035 00037 virtual ConvergenceStatus 00038 CheckConvergence(bool call_intermediate_callback = true); 00039 00042 virtual bool CurrentIsAcceptable(); 00043 00046 static void RegisterOptions(SmartPtr<RegisteredOptions> roptions); 00048 00049 protected: 00053 Index max_iterations_; 00055 Number dual_inf_tol_; 00057 Number constr_viol_tol_; 00059 Number compl_inf_tol_; 00063 Index acceptable_iter_; 00066 Number acceptable_tol_; 00068 Number acceptable_dual_inf_tol_; 00070 Number acceptable_constr_viol_tol_; 00072 Number acceptable_compl_inf_tol_; 00075 Number acceptable_obj_change_tol_; 00077 Number diverging_iterates_tol_; 00079 Number mu_target_; 00081 Number max_cpu_time_; 00083 00084 private: 00092 OptimalityErrorConvergenceCheck(const OptimalityErrorConvergenceCheck&); 00093 00095 void operator=(const OptimalityErrorConvergenceCheck&); 00097 00100 Index acceptable_counter_; 00101 00104 Number last_obj_val_; 00105 00108 Number curr_obj_val_; 00109 00111 Index last_obj_val_iter_; 00112 }; 00113 00114 } // namespace Ipopt 00115 00116 #endif