Skip to content

Trips, public transport, ambulances, roundabouts, analysis tools and OSM import - #1

Merged
VictorNagibator merged 3 commits into
mainfrom
feature/big-update
Dec 1, 2026
Merged

VictorNagibator merged 3 commits into
mainfrom
feature/big-update

Conversation

@VictorNagibator

Copy link
Copy Markdown
Owner

Summary

A large feature update of the simulator.

Traffic model

  • Commuter trips: land use follows the shape of the city (offices in the centre, shops around them, homes on the outskirts); vehicles drive to destinations along the fastest route, which accounts for congestion, with morning and evening rush hours. Templates now start in this mode; "random drivers" is still available in the settings.
  • Single-lane roundabouts with entry control based on when circulating traffic reaches the entry point.
  • Adaptive signals (gap-out, rest in green, skip empty phases, extend only for the longest queue) and green waves for fixed-time signals.
  • Bus stops, bus lines and bus lanes.
  • Ambulances dispatched to accidents; traffic pulls over or changes lane, and they cross on red.
  • Pedestrians crossing at zebras.

Tools

  • Bottleneck finder with one-click fixes.
  • Comparison of two city variants with identical traffic, run in a Web Worker.
  • Three challenges with a budget, prices and stars.
  • OpenStreetMap import (Nominatim search, Overpass data with retries across mirrors).
  • City links (compressed into the URL fragment), video recording and screenshots.

Bugs found and fixed along the way

  • Deadlock at signals: pedestrians who had waited a long time blocked cars but could not cross on the cars' green. This slowed every signalised junction.
  • Adaptive signals stretched greens too far in heavy traffic and lost to fixed-time plans.
  • Vehicles entering a roundabout from adjacent arms could collide at the merge.

Notes

  • The visible simulation still runs on the main thread; the worker only runs headless benchmarks.
  • Old saves load as before.
  • The first commit (engine) does not type-check the UI on its own; the second commit restores the build.

Test plan

  • npm test: 96 tests pass (67 existing ones plus new tests for every feature)
  • npm run build
  • Checked in headless Chromium at desktop, 1000 px and mobile widths: roundabouts, transit, bottlenecks, comparison, challenges, opening a city link, an ambulance call and an OSM import of the Arbat area

🤖 Generated with Claude Code

VictorNagibator and others added 3 commits December 1, 2026 17:58
… signals

- Shortest-time routing over road directions with per-destination trees
- Commuter trips driven by land use and a daily demand profile
- Bus stops, bus lines and bus lanes
- Ambulances dispatched to accidents; traffic pulls over for them
- Single-lane roundabouts with arrival-time based entry control
- Adaptive signals and green waves for fixed-time signals
- Pedestrians crossing at zebras
- Bottleneck monitor and advisor, headless benchmarks in a worker
- Challenges with prices and stars, OpenStreetMap import, city links

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Transit tool, bottlenecks, comparison, challenges and OSM import panels;
roundabouts, bus lanes, stops, lines, pedestrians, sirens and land use on
the map; city links, video recording and screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@VictorNagibator
VictorNagibator merged commit 978c2df into main Dec 1, 2026
1 check passed
@VictorNagibator
VictorNagibator deleted the feature/big-update branch December 1, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant