From ca7dffe8c83668d826138aea0822c5b54cdda7d2 Mon Sep 17 00:00:00 2001 From: Anastasia Psarou <97515093+AnastasiaPsarou@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:18:33 +0100 Subject: [PATCH] simulator indentation --- RouteRL/environment/simulator.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/RouteRL/environment/simulator.py b/RouteRL/environment/simulator.py index 84c2c5248..d3972419b 100644 --- a/RouteRL/environment/simulator.py +++ b/RouteRL/environment/simulator.py @@ -106,7 +106,7 @@ def add_vehice(self, act_dict: dict) -> None: Parameters: - act_dict (dict): A dictionary containing key vehicle attributes. - + """ route_id = self.route_id_cache.setdefault((act_dict[kc.AGENT_ORIGIN], act_dict[kc.AGENT_DESTINATION], act_dict[kc.ACTION]), \ @@ -119,11 +119,10 @@ def step(self) -> tuple: Advances the SUMO simulation by one timestep and retrieves information about vehicle arrivals and detector data. Returns: - - tuple: A tuple containing: - - self.timestep (int): The current simulation timestep. - - arrivals (list): List of vehicle IDs that arrived at their destinations during the current timestep. - - self.det_dict (list): The current detector data (currently an empty list). - + tuple: A tuple containing: + self.timestep (int): The current simulation timestep. + arrivals (list): List of vehicle IDs that arrived at their destinations during the current timestep. + self.det_dict (list): The current detector data (currently an empty list). """ arrivals = self.sumo_connection.simulation.getArrivedIDList()