00001 // EvolveTrafficDoc.h : interface of the CEvolveTrafficDoc class 00002 // 00004 00005 #if !defined(AFX_EVOLVETRAFFICDOC_H__E9AF4E58_CB5C_4E2F_94AC_B1498A1C476A__INCLUDED_) 00006 #define AFX_EVOLVETRAFFICDOC_H__E9AF4E58_CB5C_4E2F_94AC_B1498A1C476A__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include "afxtempl.h" 00013 #include "afxcoll.h" 00014 #include "Sim.h" 00015 #include "IDMParameterSet.h" 00016 #include "ConfigData.h" 00017 00020 class CEvolveTrafficDoc : public CDocument 00021 { 00022 protected: // create from serialization only 00023 CEvolveTrafficDoc(); 00024 DECLARE_DYNCREATE(CEvolveTrafficDoc) 00025 00026 // Attributes 00027 public: 00028 00029 // Operations 00030 public: 00031 00032 // Overrides 00033 // ClassWizard generated virtual function overrides 00034 //{{AFX_VIRTUAL(CEvolveTrafficDoc) 00035 public: 00036 virtual BOOL OnNewDocument(); 00037 virtual void Serialize(CArchive& ar); 00038 //}}AFX_VIRTUAL 00039 00040 // Implementation 00041 public: 00042 void clear(); 00043 bool initSim(); 00044 Sim m_Sim; 00045 void UpdateDerivedMembers(bool setMod); 00046 00047 // The gets 00048 CObArray* getStatDetectors() {return &m_vStatDetectors;}; 00049 CObArray* getRoadFeatures() {return &m_vRoadFeatures;}; 00050 WORD getFileType() const {return m_FileType;}; 00051 CString getFileIn() const {return m_FileIn;}; 00052 CString getFileOut() const {return m_FileOut;}; 00053 CString getMetricsDir() const {return m_MetricsDir;}; 00054 int getNoLanesDirPos() const {return m_NoLanesDirPos;}; 00055 int getNoLanesDirNeg() const {return m_NoLanesDirNeg;}; 00056 double getSimTimeStep() const {return m_SimTimeStep;}; 00057 int getNoDirections() const {return m_NoDirections;}; 00058 int getNoLanes() const {return m_NoLanes;}; 00059 int getRoadLength() const {return m_RoadLength;}; 00060 BOOL getDriveOnRight() const {return m_DriveOnRight;}; 00061 int getTrafFileNoLanesDirPos() const {return m_TrafFileNoLanesDirPos;}; 00062 int getTrafFileNoLanesDirNeg() const {return m_TrafFileNoLanesDirNeg;}; 00063 int getLocOutputDetectorDirPos()const {return m_LocOutputDetectorDirPos;}; 00064 int getLocOutputDetectorDirNeg()const {return m_LocOutputDetectorDirNeg;}; 00065 BOOL getAllowLaneChanging() const {return m_AllowLaneChanging;}; 00066 00067 CIDMParameterSet getIDMParams_Car() const {return m_IDMParams_Car;}; 00068 CIDMParameterSet getIDMParams_SmallTruck() const {return m_IDMParams_SmallTruck;}; 00069 CIDMParameterSet getIDMParams_LargeTruck() const {return m_IDMParams_LargeTruck;}; 00070 CIDMParameterSet getIDMParams_Crane() const {return m_IDMParams_Crane;}; 00071 CIDMParameterSet getIDMParams_Lowloader() const {return m_IDMParams_Lowloader;}; 00072 00073 // The sets 00074 void setDriveOnRight(bool OnRight); 00075 void setStatDetectors(CObArray* pStatDetectors); 00076 void setRoadFeatures(CObArray* pRoadFeatures); 00077 void setFileType(WORD fileType); 00078 void setFileIn(CString file); 00079 void setFileOut(CString file); 00080 void setMetricsDir(CString dir); 00081 void setNoLanesDirPos(int nlpos); 00082 void setNoLanesDirNeg(int nlneg); 00083 void setSimTimeStep(double ts); 00084 void setNoDirections(int nd); 00085 void setNoLanes(int nl); 00086 void setRoadLength(int L); 00087 void setTrafFileNoLanesDirPos(int nl); 00088 void setTrafFileNoLanesDirNeg(int nl); 00089 void setLocOutputDetectorDirPos(int loc); 00090 void setLocOutputDetectorDirNeg(int loc); 00091 void setAllowLaneChanging(BOOL status); 00092 00093 void setIDMParams_Car (CIDMParameterSet theSet); 00094 void setIDMParams_SmallTruck (CIDMParameterSet theSet); 00095 void setIDMParams_LargeTruck (CIDMParameterSet theSet); 00096 void setIDMParams_Crane (CIDMParameterSet theSet); 00097 void setIDMParams_Lowloader (CIDMParameterSet theSet); 00098 00099 virtual ~CEvolveTrafficDoc(); 00100 #ifdef _DEBUG 00101 virtual void AssertValid() const; 00102 virtual void Dump(CDumpContext& dc) const; 00103 #endif 00104 00105 protected: 00106 00107 // Generated message map functions 00108 protected: 00109 //{{AFX_MSG(CEvolveTrafficDoc) 00110 // NOTE - the ClassWizard will add and remove member functions here. 00111 // DO NOT EDIT what you see in these blocks of generated code ! 00112 //}}AFX_MSG 00113 DECLARE_MESSAGE_MAP() 00114 private: 00115 CString m_MetricsDir; 00116 CObArray m_vStatDetectors; 00117 CObArray m_vRoadFeatures; 00118 BOOL m_DriveOnRight; 00119 BOOL m_AllowLaneChanging; 00120 int m_LocOutputDetectorDirPos; 00121 int m_LocOutputDetectorDirNeg; 00122 int m_TrafFileNoLanesDirPos; 00123 int m_TrafFileNoLanesDirNeg; 00124 int m_NoVehicleClasses; 00125 CString m_FileIn; 00126 CString m_FileOut; 00127 WORD m_FileType; 00128 int m_NoLanesDirPos; 00129 int m_NoLanesDirNeg; 00130 double m_SimTimeStep; 00131 int m_NoDirections; 00132 int m_NoLanes; 00133 int m_RoadLength; 00134 CIDMParameterSet m_IDMParams_Car; 00135 CIDMParameterSet m_IDMParams_SmallTruck; 00136 CIDMParameterSet m_IDMParams_LargeTruck; 00137 CIDMParameterSet m_IDMParams_Crane; 00138 CIDMParameterSet m_IDMParams_Lowloader; 00139 00140 }; 00141 00143 00144 //{{AFX_INSERT_LOCATION}} 00145 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00146 00147 #endif // !defined(AFX_EVOLVETRAFFICDOC_H__E9AF4E58_CB5C_4E2F_94AC_B1498A1C476A__INCLUDED_)