00001 
00019 #ifndef _VGS_AIMSUN_H_
00020 #define _VGS_AIMSUN_H_
00021 
00022 
00023 #include "vgs_exports.h"
00024 
00025 
00026 #include "vgs_commons.h"
00027 
00032 typedef struct {
00033         float time;             
00034         int   capacity; 
00035         int   length;   
00036         int * flows;    
00037         int * sids;             
00039 } vgs_entr_record;
00040 
00046 typedef struct {
00047         int   length;   
00048         int * sids;             
00049 } vgs_sect_stats;
00050 
00054 #define TIME_GLOBAL_STATS       -1.0f
00055 
00056 typedef struct {
00057         float time;                             
00059         int   flow;                             
00060         float travelTimeAvg;    
00061         float travelTimeSdv;    
00062         float delayTimeAvg;             
00063         float delayTimeSdv;             
00064         float speedAvg;                 
00065         float speedSdv;                 
00066         float density;                  
00067         float stopTimeAvg;              
00068         float stopTimeSdv;              
00069         float numStops;                 
00070 } vgs_system_stats;
00071 
00072 typedef struct
00073 {
00074         int   flow;                             
00075         float travelTimeAvg;    
00076         float travelTimeSdv;    
00077         float delayTimeAvg;             
00078         float delayTimeSdv;             
00079         float speedAvg;                 
00080         float speedSdv;                 
00081         float density;                  
00082         float stopTimeAvg;              
00083         float stopTimeSdv;              
00084         float numStops;                 
00085         float queueAvg;                 
00086         float queueMax;                 
00087 } vgs_se_stat_entry;
00088 
00089 typedef struct
00090 {
00091         float time;                                     
00094         vgs_se_stat_entry * stats;      
00095         int length;                                     
00096 } vgs_sections_stats;
00097 
00098 VGS_API int vgs_is_generating_vehicles ( void );
00099 
00100 VGS_API void vgs_get_entrances ( 
00101         float              current_time,
00102         vgs_entr_record *  entrances,
00103         vgs_headway_mode * headway_mode
00104         );
00105 
00106 VGS_API void vgs_get_stat_sects (
00107         vgs_sect_stats ** stats
00108         );
00109 
00110 VGS_API void vgs_store_system_stats (
00111         vgs_system_stats * system
00112         );
00113 
00114 VGS_API void vgs_store_section_stats (
00115         vgs_sections_stats * sections
00116         );
00117 
00125 VGS_API void vgs_set_stats_complete (
00126         );
00127 
00128 #endif