Skip to main content

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

Hi Michael,

My apologies, I was actually mistaken -  the situation I described seems work. It seems as though the rerouting is the thing causing the problem.
I was rerouting to the current edge but it was simply keeping the route as ["A"] rather trying to find a loop.

To actually add the current edge to the route, I will use traci.simulation.getRoute for each of the out edges and see which route gives the lowest travel time.

Sorry for the confusion and thank you for your help.

Best,
Xavier
-----Original Message-----
From: Michael Behrisch [mailto:oss@xxxxxxxxxxx] 
Sent: 17 January 2018 16:53
To: sumo-user@xxxxxxxxxxx; Xavier Paul Lister Lavenir <xlavenir@xxxxxxx>
Subject: Re: [sumo-user] Parking Area error

Hi Xavier,
I would consider this a bug, at least from my understanding of the code this should not happen. Here are some questions / things to try:
1. Does the vehicle have any stop before you reroute / add the parking area?
2. What happens if you add a simple stop instead of a parking area?
3. Could you try whether adding a stop (maybe with duration 0) at edge B before adding the parking area is a possible workaround.
4. Can you send the scenario?

Best regards,
Michael

Am 17.01.2018 um 19:37 schrieb Xavier Paul Lister Lavenir:
> 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
> 
> 
> 
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or 
> unsubscribe from this list, visit 
> https://dev.eclipse.org/mailman/listinfo/sumo-user
> 




Back to the top