Fix multiple EIDM stop issues
Fixes EIDM issues with minGap stopping in followSpeed (see #11199) and stopSpeed (#11182 and #11183).
Updated all relevant tests.
One "EIDM"-test is failing and seems to be a different problem: #11184.
I found out why the last test is failing: The calculation is based on followSpeed, so the EIDM / IDM does not come to a perfect stop behind the leading vehicle. When the ego-vehicle overshoots this position, it just ignores the leading vehicle in front.
Here is what I found when looking at the test scenario ahead of the first collision:
Up to step 199.2, vehicle '0' decelerates (though a bit sloppy so it undercuts the minGap.
In step 199.3, the method stopSpeed is called in line https://github.com/eclipse/sumo/blob/23be5b3f255ef7812f8273bc092a966f27ea351f/src/microsim/MSVehicle.cpp#L2935
With input arguments of speed= 0.29 and gap=-15.42 the returned value is 0.41 and thus the vehicle starts to accelerate. I would expect the vehicle to continue decelerating whenever a negative gap is given.
Can you check this?
I must have assumed to always get "positive" gaps ("negative" gaps would mean a collision for me).
The test should run successful now.
Still, is there another way to solve this issue with a blocking leader on a junction?! (Actually belongs to #11184) When I use Krauss or IDM instead, I also get an emergency braking vehicle.
re negative gap: these aren't physical gaps but rather 'physicalGap - minGap', hence any mingap violation due to imprecise driving will result in a negative value.
I'll look into the emergency braking. Basically the use of option --ignore-junction-blocker creates exceptional situations where foe vehicles are somewhat ignored. I agree that there is still a bug in sumo causing a discontinuity in behavior. At least now all models can handle this without colliding (-: