Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Parking Area error

Hi,

 

I’m using TraCI to route vehicles around a network. Suppose a vehicle is on edge “A” at a certain position. I wish to reroute the vehicle to park at a parking area which is on edge “A” but this parking area lies earlier on in the edge (so that vehicle has to loop round to reach this point). So, after rerouting the vehicle back to edge “A”, the route is [A, B, C, … A]. If I then set the parking area with the TraCI command: “traci.vehicle.setParkingAreaStop(vehicle_id, parking_area_id)”, I get the following error:

 

“traci.exceptions.TraCIException: parkingArea 'parking_id' for vehicle 'vehicle_id' on lane 'lane_id' is not downstream the current route.”

 

I know that if you use the “traci.vehicle.setStop” command, you can specify “startPos” parameter after the parking area but this keyword argument is not available for the function : “traci.vehicle.setParkingAreaStop”. I tried to override the setStop function to specify that it was a parking stop as follows:

 

“traci.vehicle.setStop(vehID, stopID, startPos=startPos, duration=duration, until=until, flags=flags | tc.STOP_PARKING_AREA)”

 

But this also didn’t seem to work. Does anyone have any suggestions for fixing this?

 

Many thanks,

Xavier


Back to the top