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

allow location based change in vehicle behavior #6219

Closed
namdre opened this issue Nov 4, 2019 · 2 comments
Closed

allow location based change in vehicle behavior #6219

namdre opened this issue Nov 4, 2019 · 2 comments

Comments

@namdre
Copy link
Contributor

namdre commented Nov 4, 2019

Let vehicles of type A change their type to B when entering a specified edge in a specified time range

Implementation thoughts

  • infrastructure for handling time ranges and filtering by type is already available via Rerouters and Calibrators, both could be repurposed / inherited from
  • a minor change to calibrators could work:
    • when a calibrator flow defines type (other than DEFAULT_VEHTYPE), optionally speed and does not define vehsPerHour, then change the type of all vehicles that pass the calibrator
  • if lots of mappings have to be defined, a new calibrator definition is needed for each one (as each calibrator has to use the vTypes attribute to define type A
  • a special case coud be made if vTypes (A) references a type distribution and the flow type (B) is also a type distribution id and both distributions have the same length and probabilities. In this case a conditional mapping based on index in the distibution could be made.
@mdeamico
Copy link

Would this approach allow lane-specific vehicle behaviors? For example an edge with 3 lanes, 2 of which are general-purpose lanes and 1 is an HOV lane. The vehicles in the HOV lane may have different behavior than the general purpose lanes. However, vehicles may change in and out of lanes on the same edge, which would complicate the suggested implementation?

@namdre
Copy link
Contributor Author

namdre commented Nov 21, 2019

@mdeamico Yes. Calibrators can be defined as lane-specific or edge-specific. For lane-specific Calibrators, changing lanes would then trigger the type change as well.

namdre added a commit that referenced this issue Jan 18, 2020
namdre added a commit that referenced this issue Jan 18, 2020
@namdre namdre closed this as completed in aa3f671 Jan 18, 2020
namdre added a commit that referenced this issue Jan 21, 2020
namdre added a commit that referenced this issue Jan 21, 2020
namdre added a commit that referenced this issue Mar 30, 2020
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