Input Files
Metropolis requires 3 input JSON files:
-
Road-network: list of edges with their characteristics,
list of vehicle types with their characteristics
-
Agent file: list of the agents with their characteristics
(including modes available)
- Simulation parameters
Units
-
Time: number of seconds since midnight (10AM is 36 000)
- Travel time: number of seconds
- Length: meters
- Speed: meters per second (50 km/h is 50 ÷ 3.6 m/s)
-
Value of time: utility unit (e.g., €, $ or an abstract
unit) per second
- Flow: vehicle length (in meters) per second
Example Road Network JSON File
{
"graph": {
"edges": [
[
0,
1,
{
"base_speed": 10.0,
"length": 10.0,
"constant_travel_time": 1.0,
"bottleneck_flow": 1.0,
"lanes": 2,
"speed_density": {
"type": "FreeFlow"
},
"overtaking": true
}
],
[
1,
2,
{
"base_speed": 20.0,
"length": 10.0,
"speed_density": {
"type": "ThreeRegimes",
"value": {
"beta": 1.1,
"jam_density": 0.2,
"jam_speed": 2.0,
"min_density": 0.8
}
}
}
]
]
},
"vehicles": [
{
"headway": 10.0,
"pce": 1.0
},
{
"headway": 30.0,
"pce": 5.0,
"speed_function": {
"type": "Piecewise",
"value": [
[
0.0,
0.0
],
[
25.0,
25.0
],
[
100.0,
25.0
]
]
},
"restricted_edges": [
1
]
}
]
}
Example Agent JSON File
[
{
"id": 1,
"mode_choice": {
"type": "Logit",
"value": {
"u": 0.5,
"mu": 1.0
}
},
"modes": [
{
"type": "Trip",
"value": {
"legs": [
{
"class": {
"type": "Road",
"value": {
"origin": 0,
"destination": 1,
"vehicle": 0
}
},
"stopping_time": 600.0,
"travel_utility": {
"type": "Polynomial",
"value": {
"a": 1.0,
"b": -0.003
}
},
"schedule_utility": {
"type": "None"
}
},
{
"class": {
"type": "Virtual",
"value": 300.0
},
"travel_utility": {
"type": "Polynomial",
"value": {
"b": -0.003
}
}
}
],
"departure_time_model": {
"type": "ContinuousChoice",
"value": {
"period": [
0.0,
200.0
],
"choice_model": {
"type": "Logit",
"value": {
"u": 0.5,
"mu": 1.0
}
}
}
},
"origin_schedule_utility": {
"type": "None"
},
"destination_schedule_utility": {
"type": "AlphaBetaGamma",
"value": {
"t_star_low": 30.0,
"t_star_high": 30.0,
"beta": 1.0,
"gamma": 4.0
}
},
"pre_compute_route": true
}
},
{
"type": "Trip",
"value": {
"legs": [
{
"class": {
"type": "Virtual",
"value": 900.0
}
}
],
"departure_time_model": {
"type": "Constant",
"value": 50.0
}
}
}
]
}
]
Example Parameters JSON File
{
"period": [
0.0,
200.0
],
"network": {
"road_network": {
"recording_interval": 50.0,
"approximation_bound": 1.0,
"spillback": true,
"max_pending_duration": 20.0,
"algorithm_type": "Best"
}
},
"learning_model": {
"type": "Exponential",
"value": {
"alpha": 0.99
}
},
"init_iteration_counter": 1,
"stopping_criteria": [
{
"type": "MaxIteration",
"value": 2
},
{
"type": "DepartureTime",
"value": [
0.01,
100.0
]
}
],
"update_ratio": 1.0,
"random_seed": 19960813,
"nb_threads": 24
}