Eclipse SUMO - Simulation of Urban MObility
MSChargingStationExport.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // Realises dumping ChargingStation charging events
19 /****************************************************************************/
20 #include <config.h>
21 
22 #include <microsim/MSEdgeControl.h>
23 #include <microsim/MSEdge.h>
24 #include <microsim/MSLane.h>
25 #include <microsim/MSGlobals.h>
27 #include <microsim/MSNet.h>
30 
31 
32 // ===========================================================================
33 // method definitions
34 // ===========================================================================
35 void
37  // loop through charging stations
38  for (const auto& stop : MSNet::getInstance()->getStoppingPlaces(SUMO_TAG_CHARGING_STATION)) {
39  static_cast<MSChargingStation*>(stop.second)->writeAggregatedChargingStationOutput(of);
40  }
41 }
long long int SUMOTime
Definition: GUI.h:35
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
static void write(OutputDevice &of, SUMOTime timestep)
Writes the recently completed charging events.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:184
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61