Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Issues changing parking destination on same edge

Your description isn't quite clear on how the observed behavior differs from the expectation but I'm assuming vehicles don't stop as you expect them to.

Possibly, the vehicles are too fast to stop directly at the point in time where replaceStop is called. In this case, replaceStop will reroute them in a loop that goes past the stopping location and then stops on the second pass. Make sure to factor in the braking distance or override the deceleration dynamics (https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html#speed_mode_0xb3).

Please provide a small working example that makes SUMO crash so that this particular problem can be fixed.

regards,
Jakob

Am So., 1. Juni 2025 um 16:50 Uhr schrieb Abeledo, Julian <jabeledo@xxxxxxxxxxxxx>:
Hello Jakob,
For some reason my submission to the sumo-user listserv wasn't working correctly, so I thought that I would send the email to you (and that you could possibly forward it to the rest of the list).
Thanks,
Julian


---------- Forwarded message ---------
From: Abeledo, Julian <jabeledo@xxxxxxxxxxxxx>
Date: Sat, May 31, 2025, 10:45 PM
Subject: Issues changing parking destination on same edge
To: <sumo-user@xxxxxxxxxxx>


Hello all,

I am using SUMO as a base for a parking decision model. I have worked out most of the kinks in my model, but there is one error remaining that I haven't figured out how to work around. Occasionally, vehicles in my model will opportunistically choose to park at an available parking spot on the edge that they are currently on, rather than continue driving to their destination. All of the decisions are being taken on the first time step that a vehicle is on an edge, so generally I don't think the issue is that they are too far ahead of the parkingArea.

My code for this basically looks like:

if (parking spot available on current block & opportunistic parking decision):
                             traci.vehicle.changeLane(vehID,0,30) #change lanes to parking lane if necessary
                             traci.vehicle.replaceStop(vehID, 0, paCurrentEdge,duration = parking_duration,flags = 65) #set new parking target

I've tried a few other workarounds, such as using MoveTo to force the lane change (which also didn't seem to work) or MoveToXY to move the vehicle back to the beginning of the edge (which seemingly crashed my SUMO)

Does anybody have any ideas for how to accomplish what I'm looking for? Frankly some sort of close approximation would be acceptable as well (such as somehow teleporting directly into the parking spot on the same edge).

Thank you for your time,
Julian Abeledo



Back to the top