Eclipse SUMO - Simulation of Urban MObility
MSSOTLDefinitions.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-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 /****************************************************************************/
15 // The repository for definitions about SOTL and Swarm-based logics
16 /****************************************************************************/
17 
18 #ifndef MSSOTLDefinitions_h
19 #define MSSOTLDefinitions_h
20 
22 //SENSOR_START in meters, counting from the traffic light and moving backward with respect to traffic direction
23 #define SENSOR_START 0.0f
24 //INPUT_SENSOR_LENGTH in meters, counting from SENSOR_START and moving backward with respect to traffic direction
25 #define INPUT_SENSOR_LENGTH 100.0f
26 #define OUTPUT_SENSOR_LENGTH 80.0f
27 
28 //TODO Check the distances for the count sensors
29 #define INPUT_COUNT_SENSOR_LENGTH 15.0f
30 #define OUTPUT_COUNT_SENSOR_LENGTH 15.0f
31 #define COUNT_SENSOR_START 10000.0f
32 //E2 Detector parameter: the time in seconds a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed
34 #define HALTING_TIME_THRS 10
35 //E2 Detector parameter: the speed in meters/second a vehicle's speed must be below to be assigned as jammed
36 #define HALTING_SPEED_THRS 1
37 //E2 Detector parameter: the distance in meters between two vehicles in order to not count them to one jam
38 #define DIST_THRS 20.0
39 
40 //#define SENSORS_TYPE "e2"
41 #define SENSORS_TYPE_E1 1
42 #define SENSORS_TYPE_E2 2
43 #define SENSORS_TYPE SENSORS_TYPE_E2
44 
45 #include <stdlib.h>
46 
47 #include <map>
48 #include <utility>
50 //Every lane has its own sensors, one at the beginning and one at the end
51 //Sensors can be retrieved by lanes pointer
52 typedef std::pair<MSLane*, MSE2Collector*> MSLane_MSE2Collector;
53 typedef std::map<MSLane*, MSE2Collector*> MSLane_MSE2CollectorMap;
54 
55 //Sensors can be retrieved by lane Id
56 typedef std::pair<std::string, MSE2Collector*> MSLaneID_MSE2Collector;
57 typedef std::map<std::string, MSE2Collector*> MSLaneID_MSE2CollectorMap;
58 
59 //Every lane has its speed limit, it can be retrieved by lane Id
60 typedef std::pair<std::string, double> MSLaneID_MaxSpeed;
61 typedef std::map<std::string, double> MSLaneID_MaxSpeedMap;
62 
63 //****************************************************
64 //Type definitions to implement the pheromone paradigm
65 typedef std::pair<std::string, double> MSLaneId_Pheromone;
70 typedef std::map<std::string, double> MSLaneId_PheromoneMap;
71 
72 //****************************************************
73 
74 typedef std::set<std::string> MSLaneID_set;
75 
76 typedef std::map<MSLane*, bool> LaneCheckMap;
77 typedef std::vector<std::string> LaneIdVector;
78 
79 #endif
80 /****************************************************************************/
LaneIdVector
std::vector< std::string > LaneIdVector
Definition: MSSOTLDefinitions.h:77
LaneCheckMap
std::map< MSLane *, bool > LaneCheckMap
Definition: MSSOTLDefinitions.h:76
MSLaneID_MaxSpeedMap
std::map< std::string, double > MSLaneID_MaxSpeedMap
Definition: MSSOTLDefinitions.h:61
MSLaneID_set
std::set< std::string > MSLaneID_set
Definition: MSSOTLDefinitions.h:74
MSE2Collector.h
MSLaneId_Pheromone
std::pair< std::string, double > MSLaneId_Pheromone
Definition: MSSOTLDefinitions.h:65
MSLaneID_MSE2Collector
std::pair< std::string, MSE2Collector * > MSLaneID_MSE2Collector
Definition: MSSOTLDefinitions.h:56
MSLane_MSE2CollectorMap
std::map< MSLane *, MSE2Collector * > MSLane_MSE2CollectorMap
Definition: MSSOTLDefinitions.h:53
MSLaneID_MaxSpeed
std::pair< std::string, double > MSLaneID_MaxSpeed
Definition: MSSOTLDefinitions.h:60
MSLaneId_PheromoneMap
std::map< std::string, double > MSLaneId_PheromoneMap
Definition: MSSOTLDefinitions.h:70
MSLaneID_MSE2CollectorMap
std::map< std::string, MSE2Collector * > MSLaneID_MSE2CollectorMap
Definition: MSSOTLDefinitions.h:57
MSLane_MSE2Collector
std::pair< MSLane *, MSE2Collector * > MSLane_MSE2Collector
Definition: MSSOTLDefinitions.h:52