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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // The repository for definitions about SOTL and Swarm-based logics
18 /****************************************************************************/
19 
20 #ifndef MSSOTLDefinitions_h
21 #define MSSOTLDefinitions_h
22 
24 //SENSOR_START in meters, counting from the traffic light and moving backward with respect to traffic direction
25 #define SENSOR_START 0.0f
26 //INPUT_SENSOR_LENGTH in meters, counting from SENSOR_START and moving backward with respect to traffic direction
27 #define INPUT_SENSOR_LENGTH 100.0f
28 #define OUTPUT_SENSOR_LENGTH 80.0f
29 
30 //TODO Check the distances for the count sensors
31 #define INPUT_COUNT_SENSOR_LENGTH 15.0f
32 #define OUTPUT_COUNT_SENSOR_LENGTH 15.0f
33 #define COUNT_SENSOR_START 10000.0f
34 //E2 Detector parameter: the time in seconds a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed
36 #define HALTING_TIME_THRS 10
37 //E2 Detector parameter: the speed in meters/second a vehicle's speed must be below to be assigned as jammed
38 #define HALTING_SPEED_THRS 1
39 //E2 Detector parameter: the distance in meters between two vehicles in order to not count them to one jam
40 #define DIST_THRS 20.0
41 
42 //#define SENSORS_TYPE "e2"
43 #define SENSORS_TYPE_E1 1
44 #define SENSORS_TYPE_E2 2
45 #define SENSORS_TYPE SENSORS_TYPE_E2
46 
47 #include <stdlib.h>
48 
49 #include <map>
50 #include <utility>
52 //Every lane has its own sensors, one at the beginning and one at the end
53 //Sensors can be retrieved by lanes pointer
54 typedef std::pair<MSLane*, MSE2Collector*> MSLane_MSE2Collector;
55 typedef std::map<MSLane*, MSE2Collector*> MSLane_MSE2CollectorMap;
56 
57 //Sensors can be retrieved by lane Id
58 typedef std::pair<std::string, MSE2Collector*> MSLaneID_MSE2Collector;
59 typedef std::map<std::string, MSE2Collector*> MSLaneID_MSE2CollectorMap;
60 
61 //Every lane has its speed limit, it can be retrieved by lane Id
62 typedef std::pair<std::string, double> MSLaneID_MaxSpeed;
63 typedef std::map<std::string, double> MSLaneID_MaxSpeedMap;
64 
65 //****************************************************
66 //Type definitions to implement the pheromone paradigm
67 typedef std::pair<std::string, double> MSLaneId_Pheromone;
72 typedef std::map<std::string, double> MSLaneId_PheromoneMap;
73 
74 //****************************************************
75 
76 typedef std::set<std::string> MSLaneID_set;
77 
78 typedef std::map<MSLane*, bool> LaneCheckMap;
79 typedef std::vector<std::string> LaneIdVector;
80 
81 #endif
82 /****************************************************************************/
std::map< std::string, double > MSLaneId_PheromoneMap
std::pair< MSLane *, MSE2Collector * > MSLane_MSE2Collector
std::set< std::string > MSLaneID_set
std::map< MSLane *, bool > LaneCheckMap
std::map< std::string, double > MSLaneID_MaxSpeedMap
std::pair< std::string, double > MSLaneId_Pheromone
std::pair< std::string, double > MSLaneID_MaxSpeed
std::map< std::string, MSE2Collector * > MSLaneID_MSE2CollectorMap
std::pair< std::string, MSE2Collector * > MSLaneID_MSE2Collector
std::map< MSLane *, MSE2Collector * > MSLane_MSE2CollectorMap
std::vector< std::string > LaneIdVector