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

routeSampler.py: bias/pattern in generated depart times #13523

Closed
namdre opened this issue Jun 29, 2023 · 2 comments
Closed

routeSampler.py: bias/pattern in generated depart times #13523

namdre opened this issue Jun 29, 2023 · 2 comments
Assignees

Comments

@namdre
Copy link
Contributor

namdre commented Jun 29, 2023

when generating traffic for a particular data interval:

  • when generating individual vehicles or flows with number, the first vehicle always departs at the start of the interval
  • a list of fixed, departure times (within an raster of times) is assigned to every route, if a route occurs only once per interval, even poisson flow setting doesn't shift it. -> this algorithm is pretty weird

The problem is especially noticeable when there are many intervalls with only a few vehicles.

@namdre namdre self-assigned this Jun 29, 2023
@namdre
Copy link
Contributor Author

namdre commented Jun 29, 2023

There will always be some bias when using flow=number. This is because any algorithm that picks endpoints in an interval and then evenly spaces departures between these points is going to bias the middle of the interval. A related example is picking random points on a circle by picking points on the circumference and then picking at random from the connecting line. This will also bias the center over the border.

However, the bias is fixable for

  • individual vehicles (obviously)
  • flow=poisson
  • flow=random
  • flow=number: bias is also fixable by not picking random start/end and just adding a random offset to interval begin

@namdre namdre closed this as completed in 05a865e Jun 29, 2023
namdre added a commit that referenced this issue Jun 29, 2023
@mschrader15
Copy link
Contributor

Thanks @namdre!

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

2 participants