Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSSOTLDefinitions.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2010-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// The repository for definitions about SOTL and Swarm-based logics
19/****************************************************************************/
20
21#pragma once
22#include <config.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
36//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
55typedef std::pair<MSLane*, MSE2Collector*> MSLane_MSE2Collector;
56typedef std::map<MSLane*, MSE2Collector*> MSLane_MSE2CollectorMap;
57
58//Sensors can be retrieved by lane Id
59typedef std::pair<std::string, MSE2Collector*> MSLaneID_MSE2Collector;
60typedef std::map<std::string, MSE2Collector*> MSLaneID_MSE2CollectorMap;
61
62//Every lane has its speed limit, it can be retrieved by lane Id
63typedef std::pair<std::string, double> MSLaneID_MaxSpeed;
64typedef std::map<std::string, double> MSLaneID_MaxSpeedMap;
65
66//****************************************************
67//Type definitions to implement the pheromone paradigm
68typedef std::pair<std::string, double> MSLaneId_Pheromone;
73typedef std::map<std::string, double> MSLaneId_PheromoneMap;
74
75//****************************************************
76
77typedef std::set<std::string> MSLaneID_set;
78
79typedef std::map<MSLane*, bool> LaneCheckMap;
80typedef std::vector<std::string> LaneIdVector;
std::map< std::string, double > MSLaneId_PheromoneMap
std::pair< std::string, double > MSLaneId_Pheromone
std::map< MSLane *, MSE2Collector * > MSLane_MSE2CollectorMap
std::pair< MSLane *, MSE2Collector * > MSLane_MSE2Collector
std::map< MSLane *, bool > LaneCheckMap
std::vector< std::string > LaneIdVector
std::map< std::string, MSE2Collector * > MSLaneID_MSE2CollectorMap
std::map< std::string, double > MSLaneID_MaxSpeedMap
std::set< std::string > MSLaneID_set
std::pair< std::string, MSE2Collector * > MSLaneID_MSE2Collector
std::pair< std::string, double > MSLaneID_MaxSpeed