DOI: 10.4121/dbbfecf5-a6a3-4077-968e-11c3681f4a93
title: Data and code underlying the publication: Probabilistic Game-Theoretic Traffic Routing

description: This data contains simulation results for the routing of 8 fleets of vehicles using a game-theoretic Nash equilibrium (NE) strategy, both offline and with a receding-horizon approach. Each fleet is capable of autonomous decisions and is referred to as an agent.<br>The vehicles aim at minimizing their time to destination in a non-cooperative fashion. For each fleet of vehicle, the control input is the probability of routing a vehicle of the fleet through each road.<br><strong>Receding-horizon test</strong>The receding-horizon test is performed over N cases, where for each test the initial condition and final destination of each fleet of vehicles is randomly generated. For each test, we produce a control action for T={1,3,4,5,8} control horizon.<br><strong>Data format for receding-horizon test:</strong>The result of each test is stored in a file, resulting in N files for the receding-horizon test. The code is in Python and the data is in format .pkl which serializes the following data:<br>x: dictionary that maps from the tuple (n, t) to a pytorch vector of shape (I, n_x, T_sim ) which contains the sequence in time of a decision variable of each agent, where:n is the test index. In this specific case, there is only one test per file indexed as 0t is the control horizon being testedI is the number of agentsn_x is the dimension of the decision variable of each agentT_sim is the length in timesteps of the simulationx_baseline: pytorch tensor of dimension (N, n_x, T_sim*n_x), where N is the number of tests performed, which contains the decision variables of each agent using the baseline solution. The baseline solution is a shortest path without traffic informationvisited_nodes: dictionary that maps from the tuple (n, t) to a pytorch tensor with shape (I, V, T_sim+1), which contains the sequence of nodes in the road network visited by each vehicle.V is the number of vehicles in each fleetroad_graph: network of roads in format networkxedge_time_to_index: dictionary that maps the tuple (edge, time_index) to the index of the decision variable relative to the edge taken at time time_indexnode_time_to_index: dictionary that maps the tuple (node, time_index) to the index of the decision variable relative to the node distribution at time_indexT_horizon: vector of tested control horizonsT_simulation: contains T_siminitial_junctions: dictionary that maps the test index to the vector containing the initial node of each vehicle fleetdestinations: dictionary that maps the test index to the vector containing the destination node of each vehicle fleetcongestion_baseline: dictionary that maps each test index to a dictionary, which in turns maps the tuple (edge, time_index) to the congestion at the edge at time time_index, using the baseline solutioncost_baseline: dictionary that maps each test index to a vector containing the cost incurred by each agent along the baseline solutionN_random test: number of tests performed<br><strong>Offline test</strong>The offline test is performed over 100 tests, all stored in a single file. The code is in Python and the data is in format .pkl which serializes the following data:x: pytorch vector of shape (N,I,n_x), where N is the number of tests (100), I is the number of agents (8), n_x is the number of decision variables. It contains the decision variables of each agentdual: pytorch vector of shape (N, n_d), where n_d is the number of shared constraints. It contains the dual variables associated to each shared constraint.residual: pytorch vector of shape (N, N_iter), where N_iter is the number of iterations of the solution algorithm. It contains the residual at each algorithm iteration, which measures the distance from the Nash equilibrium set.cost: pytorch vector of shape (N,I), where N is the number of tests (100), I is the number of agents (8). Contains the cost incurred by each agent.road_graph: network of roads in format networkxedge_time_to_index: dictionary that maps the tuple (edge, time_index) to the index of the decision variable relative to the edge taken at time time_indexnode_time_to_index: dictionary that maps the tuple (node, time_index) to the index of the decision variable relative to the node distribution at time_indexT_horizon: vector of tested control horizonsT_simulation: contains T_siminitial_junctions: dictionary that maps the test index to the vector containing the initial node of each vehicle fleetdestinations: dictionary that maps the test index to the vector containing the destination node of each vehicle fleetcongestion_baseline: dictionary that maps each test index to a dictionary, which in turns maps the tuple (edge, time_index) to the congestion at the edge at time time_index, using the baseline solutioncost_baseline: dictionary that maps each test index to a vector containing the cost incurred by each agent along the baseline solution<br>