Eclipse SUMO - Simulation of Urban MObility
MultiEntryExit.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2017-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 // C++ TraCI client API implementation
19 /****************************************************************************/
20 #pragma once
21 #include <vector>
22 #include <libsumo/TraCIDefs.h>
23 
24 
25 // ===========================================================================
26 // class declarations
27 // ===========================================================================
28 #ifndef LIBTRACI
29 class MSE3Collector;
30 #endif
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 namespace LIBSUMO_NAMESPACE {
42 public:
43  static std::vector<std::string> getEntryLanes(const std::string& detID);
44  static std::vector<std::string> getExitLanes(const std::string& detID);
45  static std::vector<double> getEntryPositions(const std::string& detID);
46  static std::vector<double> getExitPositions(const std::string& detID);
47 
48  static int getLastStepVehicleNumber(const std::string& detID);
49  static double getLastStepMeanSpeed(const std::string& detID);
50  static std::vector<std::string> getLastStepVehicleIDs(const std::string& detID);
51  static int getLastStepHaltingNumber(const std::string& detID);
52 
53  static double getLastIntervalMeanTravelTime(const std::string& detID);
54  static double getLastIntervalMeanHaltsPerVehicle(const std::string& detID);
55  static double getLastIntervalMeanTimeLoss(const std::string& detID);
56  static int getLastIntervalVehicleSum(const std::string& detID);
57 
60 
61 #ifndef LIBTRACI
62 #ifndef SWIG
63  static std::shared_ptr<VariableWrapper> makeWrapper();
64 
65  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
66 
67  static MSE3Collector* getDetector(const std::string& detID);
68 
69 private:
72 #endif
73 #endif
74 
75 private:
77  MultiEntryExit() = delete;
78 
79 };
80 
81 
82 }
#define LIBSUMO_ID_PARAMETER_API
Definition: TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:62
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static double getLastIntervalMeanHaltsPerVehicle(const std::string &detID)
static std::vector< std::string > getEntryLanes(const std::string &detID)
MultiEntryExit()=delete
invalidated standard constructor
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
static int getLastStepVehicleNumber(const std::string &detID)
static int getLastStepHaltingNumber(const std::string &detID)
static std::vector< double > getEntryPositions(const std::string &detID)
static double getLastStepMeanSpeed(const std::string &detID)
static SubscriptionResults mySubscriptionResults
static double getLastIntervalMeanTravelTime(const std::string &detID)
static ContextSubscriptionResults myContextSubscriptionResults
static std::vector< std::string > getExitLanes(const std::string &detID)
static int getLastIntervalVehicleSum(const std::string &detID)
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
static MSE3Collector * getDetector(const std::string &detID)
static std::vector< double > getExitPositions(const std::string &detID)
static double getLastIntervalMeanTimeLoss(const std::string &detID)
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:59
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:338
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:337