1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2012-2019 German Aerospace Center (DLR) and others. 4 // This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v2.0 6 // which accompanies this distribution, and is available at 7 // http://www.eclipse.org/legal/epl-v20.html 8 // SPDX-License-Identifier: EPL-2.0 9 /****************************************************************************/ 10 /// @file MSQueueExport.h 11 /// @author Mario Krumnow 12 /// @date 2012-04-26 13 /// @version $Id$ 14 /// 15 // Export the queueing length in front of a junction (very experimental!) 16 /****************************************************************************/ 17 #ifndef MSQueueExport_h 18 #define MSQueueExport_h 19 20 21 // =========================================================================== 22 // included modules 23 // =========================================================================== 24 #include <config.h> 25 26 #include <utils/common/SUMOTime.h> 27 28 29 // =========================================================================== 30 // class declarations 31 // =========================================================================== 32 class OutputDevice; 33 class MSEdgeControl; 34 class MSEdge; 35 class MSLane; 36 37 38 // =========================================================================== 39 // class definitions 40 // =========================================================================== 41 /** 42 * @class MSQueueExport 43 * @brief Export the queueing length in front of a junction (very experimental!) 44 * 45 * The class offers a static method, which writes the actual queueing length of 46 * the network into the given OutputDevice. 47 * 48 * @todo consider error-handling on write (using IOError) 49 */ 50 class MSQueueExport { 51 public: 52 /** @brief Export the queueing length in front of a junction (very experimental!) 53 * 54 * Opens the current time step, goes through the lanes check for a traffic jam in front of a junction 55 * 56 * @param[in] of The output device to use 57 * @param[in] timestep The current time step 58 * @exception IOError If an error on writing occurs (!!! not yet implemented) 59 */ 60 static void write(OutputDevice& of, SUMOTime timestep); 61 62 63 private: 64 /// @brief Invalidated copy constructor. 65 MSQueueExport(const MSQueueExport&); 66 67 /// @brief Invalidated assignment operator. 68 MSQueueExport& operator=(const MSQueueExport&); 69 70 /// @brief Iterates through all the edges and extract the lanes 71 static void writeEdge(OutputDevice& of); 72 73 /// @brief Iterates through the lanes and check for available vehicle queues 74 static void writeLane(OutputDevice& of, const MSLane& lane); 75 76 }; 77 78 79 80 #endif 81 82 /****************************************************************************/ 83 84