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