00001 // Copyright 2009 Hans Pirnay 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // Date : 2009-07-10 00006 00007 #ifndef __AS_METADATAMEASUREMENT_HPP__ 00008 #define __AS_METADATAMEASUREMENT_HPP__ 00009 00010 #include "AsMeasurement.hpp" 00011 #include "AsSuffixHandler.hpp" 00012 #include "IpAlgStrategy.hpp" 00013 00014 00015 namespace Ipopt 00016 { 00017 00018 class MetadataMeasurement : public Measurement, public SuffixHandler, public AlgorithmStrategyObject 00019 { 00020 public: 00021 MetadataMeasurement(); 00022 00023 virtual ~MetadataMeasurement(); 00024 00025 /* AlgorithmStrategyObject */ 00026 virtual bool InitializeImpl(const OptionsList& options, 00027 const std::string& prefix); 00028 00029 /* measurement methods */ 00030 virtual std::vector<Index> GetInitialEqConstraints(); 00031 00032 virtual std::vector<Index> GetNmpcState(Index i); 00033 00034 virtual SmartPtr<DenseVector> GetMeasurement(Index measurement_number); 00035 00036 virtual void SetSolution(Index measurement_number, SmartPtr<IteratesVector> sol); 00037 00038 /* suffix handler methods */ 00039 00040 virtual std::vector<Index> GetIntegerSuffix(std::string suffix_string); 00041 00042 private: 00043 00044 /* Number of nmpc_indices */ 00045 Index n_idx_; 00046 00047 std::string select_step_; 00048 /* owner space of x */ 00049 SmartPtr<const DenseVectorSpace> x_owner_space_; 00050 /* owner space of y_c */ 00051 SmartPtr<const DenseVectorSpace> c_owner_space_; 00052 }; 00053 00054 } 00055 00056 #endif