00001 // Copyright 2009 Hans Pirnay 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // Date : 2009-05-06 00006 00007 #ifndef __ASASNMPCONTROLLER_HPP__ 00008 #define __ASASNMPCONTROLLER_HPP__ 00009 00010 #include "IpAlgStrategy.hpp" 00011 #include "AsSensStepCalc.hpp" 00012 #include "AsMeasurement.hpp" 00013 #include "AsSchurDriver.hpp" 00014 #include "AsNmpcUtils.hpp" 00015 00016 namespace Ipopt 00017 { 00018 00019 class AsNmpController : public AlgorithmStrategyObject 00020 { 00024 public: 00025 00026 AsNmpController(std::vector< SmartPtr<SchurDriver> >& driver_vec, 00027 SmartPtr<SensitivityStepCalculator> sens_step_calc, 00028 SmartPtr<Measurement> measurement, 00029 Index n_nmpc_steps); 00030 00031 virtual ~AsNmpController(); 00032 00033 virtual bool InitializeImpl(const OptionsList& options, 00034 const std::string& prefix); 00035 00039 NmpControllerExitStatus Run(); 00040 00041 private: 00042 00043 std::vector< SmartPtr<SchurDriver> > driver_vec_; 00044 SmartPtr<SensitivityStepCalculator> sens_step_calc_; 00045 SmartPtr<Measurement> measurement_; 00046 Index n_nmpc_steps_; // I think it is useful to state this number explicitly in the constructor and here. 00047 00048 }; 00049 } 00050 00051 #endif