Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While looking at the "mapTrace" function, I have a question. #11292

Closed
JamesPsh opened this issue Aug 8, 2022 · 2 comments
Closed

While looking at the "mapTrace" function, I have a question. #11292

JamesPsh opened this issue Aug 8, 2022 · 2 comments
Assignees

Comments

@JamesPsh
Copy link

JamesPsh commented Aug 8, 2022

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

@m-kro m-kro added the question label Aug 8, 2022
@namdre
Copy link
Contributor

namdre commented Aug 9, 2022

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.

@behrisch
Copy link
Contributor

you are right the gapPenalty should be adapted every time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants