How to detect that the objects are just touching each other, and set the dv/dt =0?

i realised the new evolution event codes help to achieve the time to go on which answers the question i posted earlier on.
the code is
i have adopted your zero crossing method

if (v>0) return x+carSize/2-xbumperbottom; // bounced at x=xmax
else if(v<0)return x-carSize/2-xbumpertop; // bounced at x=xmin or x+carSize/2
return 1.0;
//return 1.0;




but now, if e=0.1 to 0.9
the car will move beyond the bummer at the bottom if the velocity is low.

what is the elegant way to overcome this new problem?

oh another problem e=0, it doesn't move at all due to v=0 at start.

if i use wolfgang's and paco evolution codes, it solves the problems above, but time stops running when they car is stationary against the bummer.
any way to make time continue?