eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

speed factor adaption ignores desired max speed #15535

Open behrisch opened 1 week ago

behrisch commented 1 week ago

The code in MSEdge::validateDepartSpeed only uses the edge speed limit to calculate the new speed factor when it should use the minimum of edge speed limit and desired max speed

behrisch commented 1 week ago

proposed fix: v.setChosenSpeedFactor(type.computeChosenSpeedDeviation(nullptr, (pars.departSpeed + SPEED_EPS) / MIN2(getSpeedLimit(), type.getDesiredMaxSpeed())));

namdre commented 6 days ago

If a car departs with 10m/s on a road with speed limit 10m/s the speedFactor now gets set to 1.001 This shouldn't happen. (see failing test traci/vehicletype/save_and_load_vtype_params)