SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSSOTLDefinitions.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // The repository for definitions about SOTL and Swarm-based logics
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright 2001-2009 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 #ifndef MSSOTLDefinitions_h
22 #define MSSOTLDefinitions_h
23 
25 //SENSOR_START in meters, counting from the traffic light and moving backward with respect to traffic direction
26 #define SENSOR_START 0.0f
27 //INPUT_SENSOR_LENGTH in meters, counting from SENSOR_START and moving backward with respect to traffic direction
28 #define INPUT_SENSOR_LENGTH 100.0f
29 #define OUTPUT_SENSOR_LENGTH 80.0f
30 
31 //TODO Check the distances for the count sensors
32 #define INPUT_COUNT_SENSOR_LENGTH 15.0f
33 #define OUTPUT_COUNT_SENSOR_LENGTH 15.0f
34 #define COUNT_SENSOR_START 10000.0f
35 //E2 Detector parameter: the time in seconds a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed
37 #define HALTING_TIME_THRS 10
38 //E2 Detector parameter: the speed in meters/second a vehicle's speed must be below to be assigned as jammed
39 #define HALTING_SPEED_THRS 1
40 //E2 Detector parameter: the distance in meters between two vehicles in order to not count them to one jam
41 #define DIST_THRS 20.0
42 
43 //#define SENSORS_TYPE "e2"
44 #define SENSORS_TYPE_E1 1
45 #define SENSORS_TYPE_E2 2
46 #define SENSORS_TYPE SENSORS_TYPE_E2
47 
48 #include <stdlib.h>
49 
50 #include <map>
51 #include <utility>
53 //Every lane has its own sensors, one at the beginning and one at the end
54 //Sensors can be retrieved by lanes pointer
55 typedef std::pair<MSLane*, MSE2Collector*> MSLane_MSE2Collector;
56 typedef std::map<MSLane*, MSE2Collector*> MSLane_MSE2CollectorMap;
57 
58 //Sensors can be retrieved by lane Id
59 typedef std::pair<std::string, MSE2Collector*> MSLaneID_MSE2Collector;
60 typedef std::map<std::string, MSE2Collector*> MSLaneID_MSE2CollectorMap;
61 
62 //Every lane has its speed limit, it can be retrieved by lane Id
63 typedef std::pair<std::string, SUMOReal> MSLaneID_MaxSpeed;
64 typedef std::map<std::string, SUMOReal> MSLaneID_MaxSpeedMap;
65 
66 //****************************************************
67 //Type definitions to implement the pheromone paradigm
68 typedef std::pair<std::string, SUMOReal> MSLaneId_Pheromone;
73 typedef std::map<std::string, SUMOReal> MSLaneId_PheromoneMap;
74 
75 //****************************************************
76 
77 typedef std::set<std::string> MSLaneID_set;
78 
79 typedef std::map<MSLane*, bool> LaneCheckMap;
80 typedef std::vector<std::string> LaneIdVector;
81 
82 #endif
83 /****************************************************************************/
std::pair< MSLane *, MSE2Collector * > MSLane_MSE2Collector
std::set< std::string > MSLaneID_set
std::map< MSLane *, bool > LaneCheckMap
std::map< std::string, SUMOReal > MSLaneId_PheromoneMap
std::map< std::string, MSE2Collector * > MSLaneID_MSE2CollectorMap
std::pair< std::string, MSE2Collector * > MSLaneID_MSE2Collector
std::map< MSLane *, MSE2Collector * > MSLane_MSE2CollectorMap
std::map< std::string, SUMOReal > MSLaneID_MaxSpeedMap
std::vector< std::string > LaneIdVector
std::pair< std::string, SUMOReal > MSLaneId_Pheromone
std::pair< std::string, SUMOReal > MSLaneID_MaxSpeed