Driving style is known to have a big impact on fuel consumption, and ecodriving is usually understood as an approach to determine the optimal speed pro?le leading to the highest fuel ef?ciency for a given route and conditions. Ecodriving has been mainly studied for highway traf?c and without taking into account the in?uence of other road users, dynamic programming (DP) being the standard method for computation. However, under real conditions the presence of other road users forces to deviations from the ideal speed pro?le. Against this background, there have been suggestions to split the problem into two optimization layers. In this paper, we follow the same idea and examine different approaches for the lower layer to cope with the actual safety conditions but recovering as much as possible of the ideal ef?ciency, using the idealsolutionasareferenceforthelowerlayer.Itisshownthat a signi?cant part of the fuel savings from the optimal solution can be recovered under rather general conditions.