mixpp: bdm::DS Class Reference

bdm::DS Class Reference

Abstract class for discrete-time sources of data. More...

#include <bdmbase.h>

Inheritance diagram for bdm::DS:

bdm::root bdm::EpdfDS bdm::MemDS bdm::mxArrayDS bdm::PdfDS bdm::FileDS bdm::CsvFileDS bdm::ITppFileDS List of all members.

Public Types

 __VA_ARGS__
enum  log_level_enums { __VA_ARGS__ }

Public Member Functions

 DS ()
 default constructors
virtual int max_length ()
 Returns maximum number of provided data, by default it is set to maximum allowed length, shorter DS should overload this method! See, MemDS.max_length().
virtual void getdata (vec &dt_out) const
 Returns full vector of observed data=[output, input].
virtual void getdata (vec &dt_out, const ivec &indices)
 Returns data records at indices. Default is inefficent.
virtual void write (const vec &ut) NOT_IMPLEMENTED_VOID
 Accepts action variable and schedule it for application.
virtual void write (const vec &ut, const ivec &indices) NOT_IMPLEMENTED_VOID
 Accepts action variables at specific indices.
virtual void step ()=0
 Moves from $ t $ to $ t+1 $, i.e. perfroms the actions and reads response of the system.
virtual void log_register (logger &L, const string &prefix)
 Register DS for logging into logger L.
virtual void log_write () const
 Register DS for logging into logger L.
virtual const RV_drv () const
 access function
const RV_urv () const
 access function
void from_setting (const Setting &set)
void validate ()

Public Attributes

log_level_template< DSlog_level
vec dt
 publicly acessible vector of observations
vec ut
 publicly writeble vector of inputs

Protected Attributes

int dtsize
 size of data returned by getdata()
int utsize
 size of data
RV Drv
 Description of data returned by getdata().
RV Urv
 Description of data witten by by write().

Friends

class log_level_intermediate< DS >

Detailed Description

Abstract class for discrete-time sources of data.

The class abstracts operations of:

  • data aquisition,
  • data-preprocessing, such as scaling of data,
  • data resampling from the task of estimation and control. Moreover, for controlled systems, it is able to receive the desired control action and perform it in the next step. (Or as soon as possible).
The DataSource has three main data interaction structures:
  • input, $ u_t $, which are described via RVs in attribute urv
  • observations $ d_t $, which are described in drv In simulators, dt may contain "hidden" variables as well.


Member Function Documentation

void bdm::DS::from_setting ( const Setting &  set  )  [virtual]

Create object from the following structure

    drv  = RV({"names",...},[..sizes..]);            % decription of observed data using bdm::RV::from_setting
    urv  = RV({"names",...},[..sizes..]);            % decription of input data using bdm::RV::from_setting
    log_level = 'logdt,logut';               % when set, both the simulated data and the inputs are stored to the logger
                                             % By default both are on. It makes sense to switch them off e.g. for MemDS where the data are already stored.

Reimplemented from bdm::root.

Reimplemented in bdm::MemDS, bdm::FileDS, bdm::ITppFileDS, bdm::CsvFileDS, bdm::EpdfDS, bdm::PdfDS, and bdm::mxArrayDS.


The documentation for this class was generated from the following files:
Generated on 2 Dec 2013 for mixpp by  doxygen 1.4.7