sumo
sumo copied to clipboard
While looking at the "mapTrace" function, I have a question.
I have a question while checking the role of the variable "gapPenalty" in the "mapTrace" function. in "tools/sumolib/route.py"
When I look at line 137 in route.py, "gapPenalty" works only once for the first time, and after that, it does not seem to work because it is greater than 0. Is "gapPenalty" valid only once for the first time?
**SUMO-version: 1.14.1
It looks like the code is meant to be used with a constant gapPenalty value and the default of -1 causes this constant to be initialized. It does look somewhat strange since advance may vary over the course of all data points so the initialization is somewhat unpredictable.
you are right the gapPenalty should be adapted every time