SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Writes route distributions at a certain edge 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef MSRouteProbe_h 00023 #define MSRouteProbe_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <microsim/output/MSDetectorFileOutput.h> 00037 #include <microsim/MSMoveReminder.h> 00038 #include <utils/common/RandomDistributor.h> 00039 00040 00041 // =========================================================================== 00042 // class declarations 00043 // =========================================================================== 00044 class MSEdge; 00045 class MSRoute; 00046 class MSVehicle; 00047 class OutputDevice; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00068 class MSRouteProbe : public MSDetectorFileOutput, public MSMoveReminder { 00069 public: 00076 MSRouteProbe(const std::string& id, 00077 const MSEdge* edge, 00078 SUMOTime begin) ; 00079 00080 00082 virtual ~MSRouteProbe() ; 00083 00084 00087 00099 bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason) ; 00101 00102 00105 00119 void writeXMLOutput(OutputDevice& dev, 00120 SUMOTime startTime, SUMOTime stopTime); 00121 00122 00130 void writeXMLDetectorProlog(OutputDevice& dev) const; 00132 00133 private: 00135 RandomDistributor<const MSRoute*> *myCurrentRouteDistribution; 00136 00137 00138 private: 00140 MSRouteProbe(const MSRouteProbe&); 00141 00143 MSRouteProbe& operator=(const MSRouteProbe&); 00144 00145 00146 }; 00147 00148 #endif 00149 00150 /****************************************************************************/ 00151