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

Intermediate/advanced projects #266

Closed
dabreegster opened this issue Aug 8, 2020 · 3 comments
Closed

Intermediate/advanced projects #266

dabreegster opened this issue Aug 8, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@dabreegster
Copy link
Collaborator

dabreegster commented Aug 8, 2020

Backlog of larger efforts that feel imminently important. Not appropriate for small starter bugs, but maybe more inspiring for longer-term work.

  • Robustify the map importer, get MANY cities working
    • Easy source: https://download.bbbike.org/osm/bbbike/
    • Most places hit geometry problems, especially overlapping segments. Manually fixing is ideal, but tedious. Maybe in the meantime, totally cut out broken areas and warn very loudly?
    • Start to brainstorm infrastructure for regularly maintaining many cities, allowing players to opt-into downloading more maps
  • Driving on the left side of the road
    • Preliminary support exists, but is buggy
    • This also affects lane-changing heuristics, turn creation, traffic signal heuristics (assuming right-turn-on-red)
  • Better representation of public transit platforms/stations
    • Right now, the pedestrian position is just snapped to the nearest sidewalk or shoulder. No way to describe the few minutes it takes to navigate a larger underground station.
  • Auto-tuning traffic signals
    • One of the biggest gridlock sources
    • Either statically use the scenario, calculate all the paths that happen each hour, then compute the best traffic signal policy to handle that demand
    • Or do it live, maybe adjusting the policy in real-time
    • Add support for signal "plans" -- the configuration changes for morning rush hour, late at night, etc. Relatively easy to code up in the map model, but possibly hard to represent in the UI.
  • Prep for web/WASM support
    • The current hack statically bundles binary map/scenario data into the wasm file. Probably better to send XmlHttpRpc requests and actually download it. Might require some interesting rearchitecting for async
@khuston
Copy link
Contributor

khuston commented Aug 24, 2020

Hello, I'm interested in looking at "auto-tuning traffic signals".

I would like to support simulation of actuated traffic signals. I think a lot of behavior could be captured by including features found here like (1) skipping phases that aren't called, (2) making artificial calls to "recall" preferred phases every cycle, (3) specifying parameters like minimum green interval, maximum green interval, passage time gap before terminating a phase.

If implementing actuated traffic signals with the parameters listed above sounds good, I can move ahead with it.

Without having gotten my hands dirty yet, I just have a couple other thoughts:

  1. In real life, I assume that actuated left turns are only possible when left-only turn lanes are present. (Then again, I suppose the technology exists to identify when cars are waiting for a left turn.) For now I'll just ignore this and look at what turns are requested?

  2. I am not planning to touch phase generation or phase sequencing in this first piece of work. The only change to phase sequence will be the opportunity to skip a phase while running if it has not been called.

  3. Multi-signal coordination with actuated signals will require a bit more thought - I need to look into how they maintain a synchronized cycle.

Later, as a separate task, I could look into optimizing phase durations for pre-timed signals and optimizing maximum green intervals and preferred phase for actuated signals.

@dabreegster
Copy link
Collaborator Author

Hi! Implementing those parameters would be a huge step forward. Feel free to file a separate issue to track things, track questions, etc. #91 is also relevant. As far as pointers to relevant code, bb3da1f and some of the explanations in the other bug are a start. You have to represent the new settings in the ControlTrafficSignal struct (with some boilerplate to save it in PermanentMapEdits), then update the UI in TrafficSignalEditor to modify this, and finally interpret the values in sim's update_intersection. Feel free to reach out as you dive in; I can also send a Slack invite if you prefer real-time chat.

In real life, I assume that actuated left turns are only possible when left-only turn lanes are present. (Then again, I suppose the technology exists to identify when cars are waiting for a left turn.) For now I'll just ignore this and look at what turns are requested?

Looking at the turns requested is appropriate for now. The phases that're heuristically generated should probably opt for a separate left-turn phase when a dedicated turn lane is there, but this isn't implemented yet.

  1. Multi-signal coordination...

That can definitely be a later step. I recently got the signal editor to allow modifying multiple intersections at once, but we haven't yet figured out how to express an offset between two intersections. From what I understand, the offset is usually timed to match how long it'll take agents to travel between the two intersections. You have to pick a direction for the offset; it's not symmetric from i1 -> i2 and i2 -> i1. And this timing is usually based on free-flow conditions. I think figuring out all of this better would be relevant to multi-signal coordination too.

@dabreegster
Copy link
Collaborator Author

I'm cleaning up this old issue, since everything has either been done (!!!) or has its own more specific issue (like public transit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants