root/applications/doprava/aimsun_bdm/aimsun_ds.h @ 1088

Revision 1027, 1.4 kB (checked in by prikryl, 14 years ago)

New private variable sections_stats.

Line 
1/*!
2  \file
3  \brief DataSource for experiments with Aimsun
4  \author Jan Prikryl.
5
6*/
7
8/* WIN32 stuff */
9#include <windows.h>
10#include <stdio.h>
11#include <tchar.h>
12
13#include <base/loggers.h>
14
15extern "C" {
16  #include "eh_hrd.h"
17  #include "vgs_hrd.h"
18}
19
20using namespace bdm;
21
22//! Simulator of traffic - AIMSUN
23class AimsunDS : public DS
24{
25
26protected:
27        //! Pointer to realised signal plans stored in local data space of eh_api.
28        eh_els3hrd * p_rsp;
29
30        //! Target buffer when querying VGS for last section statistics data.
31        vgs_sections_stats sections_stats;
32
33public:
34    //! Constructor with fixed sampling period
35    AimsunDS ();
36
37    //! Get measurements and signal plans from ELS3 controllers
38    void getdata ( vec &dt ) const;
39
40    //! Write new signal plans to ELS3
41    void write ( vec &ut );
42
43    //! Wait for new data and copy them out to local buffers
44    void step();
45       
46        //! number of steps
47        int max_length() {return 960;}
48
49        virtual void from_setting ( const Setting &cfg );
50        virtual void validate ( void );
51       
52    // TODO dodelat void to_setting( Setting &root ) const;
53private:
54        //! File name containing vehicle entrances into the network
55        string entranceFileName;
56       
57        //! Stip time of the simulation
58        string stopTime;
59       
60        void AimsunDS::initVGS (
61                const vgs_headway_mode headway,
62                const string &entrancePath,
63                const string &sectionStatsPath,
64                const string &globalStatsPath
65        );
66
67};
68UIREGISTER(AimsunDS);
Note: See TracBrowser for help on using the browser.