00001 // LaneChangeDetector.h: interface for the LaneChangeDetector class. 00002 // 00004 00005 #if !defined(AFX_LaneChangeDetector_H__639DB76E_AAB0_4635_9E5E_2770E45286C3__INCLUDED_) 00006 #define AFX_LaneChangeDetector_H__639DB76E_AAB0_4635_9E5E_2770E45286C3__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include "stdafx.h" 00013 #include "Detector.h" 00014 #include "LaneChangeEvent.h" 00015 00018 class LaneChangeDetector : public Detector 00019 { 00020 public: 00021 LaneChangeDetector(std::string dir, double dt, double dx, int roadLen, 00022 bool DirPos, WORD VehType); 00023 virtual ~LaneChangeDetector(); 00024 00025 virtual void EndOutput(); 00026 00027 void addEvent(LaneChangeEvent* lce); 00028 00029 private: 00030 virtual void InitOutputFiles(); 00031 virtual void doIntervalOutput(); 00032 virtual void ReInit(); 00033 00034 void InitVerboseFile(); 00035 void InitCompositionFile(); 00036 void InitSpaceTimeFile(); 00037 void InitRateFile(); 00038 00039 void doVerboseOutput(); 00040 void doCompositionOutput(); 00041 void doSpaceTimeOutput(); 00042 void doRateOutput(); 00043 00044 void AddCurrentEvent(LaneChangeEvent* lce); 00045 00046 std::vector<LaneChangeEvent*> m_vChangeEvents; 00047 00048 std::ofstream m_OutFile_Verbose; 00049 std::ofstream m_OutFile_Composition; 00050 std::ofstream m_OutFile_SpaceTime; 00051 std::ofstream m_OutFile_Rate; 00052 00053 int m_NoLaneChangeEvents; 00054 int m_DistanceInterval; 00055 int m_NoDistIntervals; 00056 std::vector<int> m_vDistanceIntervals; 00057 std::vector<int> m_vDistInt_LCECount; 00058 00059 std::string m_MetricsDir2; 00060 00061 }; 00062 00063 #endif // !defined(AFX_LaneChangeDetector_H__639DB76E_AAB0_4635_9E5E_2770E45286C3__INCLUDED_)