Returns the length of the specified vehicle. If the vehicle is not
found, returns -1001.
if isinstance(veh_id, list):
return [self.get_length(vehID) for vehID in veh_id]
return self.__vehicles.get(veh_id, {}).get("length", -1001)
def get_acc_controller(self, veh_id="all"):
After Change
return [self.__vehicles[vehID]["length"]
for vehID in veh_id]
elif veh_id == "all":
return [self.__vehicles[vehID]["length"]
for vehID in self.__ids]
else:
return self.__vehicles[veh_id]["length"]