A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.

Overview

A/B Street

Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a game exploring how small changes to a city affect the movement of drivers, cyclists, transit users, and pedestrians. It works anywhere in the world, thanks to OpenStreetMap.

Show, don't tell

Alpha release trailer

Find a problem:

exploring_traffic

Make some changes:

editing_map

Measure the effects:

evaluating_impacts

Documentation

Roadmap and contributing

See the roadmap for current work, including ways to help. If you want to bring this to your city or if you're skilled in design, traffic simulation, data visualization, or civic/government outreach, please contact Dustin Carlino at [email protected]. Follow r/abstreet for weekly updates or @CarlinoDustin for occasional videos of recent progress.

Project mission

If you fix some traffic problem while playing A/B Street, my ultimate goal is for your changes to become a real proposal for adjusting Seattle's infrastructure. A/B Street is of course a game, using a simplified approach to traffic modeling, so city governments still have to evaluate proposals using their existing methods. A/B Street is intended as a conversation starter and tool to communicate ideas with interactive visualizations.

Why not leave city planning to professionals? People are local experts on the small slice of the city they interact with daily -- the one left turn lane that always backs up or a certain set of poorly timed walk signals. Laura Adler writes:

"Only with simple, accessible simulation programs can citizens become active generators of their own urban visions, not just passive recipients of options laid out by government officials."

Existing urban planning software is either proprietary or hard to use. A/B Street strives to be highly accessible, by being a fun, engaging game. See here for more guiding principles.

Credits

Core team:

Others:

Data:

Issues
  • Add Leeds

    Add Leeds

    Context: https://github.com/dabreegster/abstreet/issues/87

    opened by Robinlovelace 33
  • better default

    better default "random" traffic patterns

    see https://github.com/dabreegster/abstreet/issues/154#issuecomment-658026415 for current plans

    see https://github.com/dabreegster/abstreet/issues/205#issuecomment-660707593 for warp hint


    sim/src/make/generator.rs contains code for generating trips

    See https://github.com/dabreegster/abstreet/pull/183/files for related code

    See https://github.com/dabreegster/abstreet/commit/ead4a99682d11ec4af4824a1ab4c3854bae7b0d4 for related code


    I have no idea how "random" traffic generation works, but currently it results in poor results for large maps.

    Initial traffic at midnight seemed reasonable (maybe bicycle traffic was too high and bus traffic was too low), but later instead of ramping up it started dropping!

    I expected game melting down/crashing on attempting to simulate tens (hundreds?) thousands of active trips at once rather than drop to zero active trips.

    EDIT: yes, it is a prime example of not reading warnings. Random is described to behave in this way - see https://github.com/dabreegster/abstreet/commit/da1731ccb2d549ed95516de76881ab53f67e8dd3#diff-628ee6879bfcdd889804ae5371c9a26cR223

    good first issue 
    opened by matkoniecz 28
  • Quick prototype of Streetcomplete colors and an explicit curb

    Quick prototype of Streetcomplete colors and an explicit curb

    This is a followup to @westnordost's suggestion in #704 to draw a more explicit curb between the road and sidewalk. I incorporated a few more ideas here too, pulling lots of colors from Streetcomplete (https://user-images.githubusercontent.com/7988080/103153247-827c1f00-478f-11eb-9d1f-4d12017533aa.png) and also its map style (https://raw.githubusercontent.com/ENT8R/streetcomplete-mapstyle/gh-pages/images/light.png). I'm really liking how things are looking and am considering a big color overhaul based around this. Any initial feedback? @Robinlovelace, @michaelkirk, @trangrei

    Some of the changes:

    • Using Streetcomplete colors for the map background, water, parks, unzoomed roads
    • Drawing a bold line between the road and curb. (There are some bugs near intersections that I'll fix if we decide to push forward with this style.)
    • Use Streetcomplete color for zoomed-in lanes
    • Stop coloring intersections and parking lanes a different color. It usually doesn't match reality; just show paved surface, and add markings on top of that.

    If we go forward with this, there's lots of code simplification I'll do, and rethinking the styling for bike/bus lanes, access-restricted roads, night mode, etc. Also need to make sure layers and agents look good on this scheme.

    We could also just incorporate a few of the ideas -- the color changes and adding the curb could be independent steps.

    Before: Screenshot from 2021-07-23 13-04-15 After: Screenshot from 2021-07-23 13-04-24

    Before: Screenshot from 2021-07-23 13-03-38 After: Screenshot from 2021-07-23 13-03-19

    Before: Screenshot from 2021-07-23 13-05-46 After: Screenshot from 2021-07-23 13-05-39

    opened by dabreegster 25
  • Importing a city doesn't work on Windows

    Importing a city doesn't work on Windows

    image i got to step 6, got this message as i tried to import my selected city

    opened by Daniel1785 19
  • Create new lane types to express different types of buffers for prote…

    Create new lane types to express different types of buffers for prote…

    …cted bike lanes. They're only created manually right now, to explore rendering.

    The goal is to start modeling different types of bike lanes -- some are right in the door-zone of street parking, others have flimsy little flex posts protecting from cars, but some have proper barriers in place. Eventually we'll use this in the routing and simulation layer. But the goal for this PR is actually just to explore the rendering style.

    I've started with 4 types of barriers, but happy to add more!

    For each of these, any better ideas for visualizing in our top-down view?

    Stripes

    Top-down rendering: Screenshot from 2021-07-16 14-50-25 Reference: buffered-bike-lane_street_0

    Flex posts ("wands" in the UK)

    Rendering: Screenshot from 2021-07-16 14-51-45 Reality: bikes_lanes_slider

    Planters

    Rendering: Screenshot from 2021-07-16 14-52-52 Reality: 2016_0211_2ndAvePioneerSquareFlyer-concept

    Jersey barrier

    Rendering: Screenshot from 2021-07-16 14-54-00 Reality: bikelane-protected-jersey-barrier-flushing-ave--fortheloveofbikes-thumb

    Next steps

    There's more work needed to create/modify these properly in the road editor UI. I also want to start tagging these in OSM, and then importing into A/B Street. https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Radwege#Tagging-Beispiele seems to have some traction.

    opened by dabreegster 19
  • Roll out actdev UI changes to all modes

    Roll out actdev UI changes to all modes

    @Robinlovelace in https://github.com/cyipt/actdev/issues/112#issuecomment-789573411 reports: 109784487-07a60900-7c03-11eb-90f7-9c2ad37930f3 This example has a particularly long name.

    design-needed 
    opened by dabreegster 18
  • Import all service roads

    Import all service roads

    Separate cyclepaths like https://www.openstreetmap.org/way/54563641 excluded; let's try enabling them.

    https://www.openstreetmap.org/way/4188078 has cycleway:left, but it winds up on the right -- I think the left-hand driving side needs some fixes here.

    opened by dabreegster 17
  • Adding support for other cities

    Adding support for other cities

    What's involved with this? It's not just converting the OSM data right? Are locations hardcoded in somewhere? My city has terrible street traffic. I'd love to modify this to support other cities easily.

    opened by taybin 17
  • Font problem or a missing language setting?

    Font problem or a missing language setting?

    I built the simulation game from source. After starting the simulation, i see a mix of readable text and non-readable pixels, where i assume, another text should be visible. Is there a missing font or do i have to define a prefered language for the game? abstreet_fontproblem

    opened by okilimu 17
  • WebAssembly

    WebAssembly

    WebGL?

    opened by Immortalin 14
  • Curvy turn arrows

    Curvy turn arrows

    1. Use Bezier curves for all turns, so a lane change is now an offset bend instead of a straight line.
    2. Change turn::angle to be the relative angle of the turn (i.e. +90 degrees is a normal left turn)
    3. Draw turn marking arrows prettily using Bezier curves
    opened by mdejean 3
  • Help to import and set up map for Lisbon, Portugal

    Help to import and set up map for Lisbon, Portugal

    Hi! This is a really really great tool.

    I need some help to import and set up the map for Lisbon (Portugal). I tried, but something must be wrong.

    image

    Ok, prob related with this issue: https://github.com/a-b-street/abstreet/issues/32

    Is the workaround is to avoid the Tagus river?

    opened by temospena 3
  • Make proletariat robot model configurable

    Make proletariat robot model configurable

    image this image for building = apartments and have 645 drivers, 1 cyclist and 22 other. I believe that for different regions there should be a different distribution, for example for Ukraine, 50 cars, 1 bicyclist, 300 workers, 200 pensioners. that is, there are much fewer cars in traffic, but more public transport in the morning and evening, and 200 for retirees at any time.

    you can also take into account the number of storeys of buildings and the number of apartments, because sometimes there is this data in the OCM, and not just the area.

    that is, to make the setting more general and not take very accurate data, say, from mobile operators or someone else.

    opened by bezdna 8
  • Please make abstreet package-friendly

    Please make abstreet package-friendly

    Data can be pre-downloaded and installed into a read-only location by the package, and can also be downloaded in the runtime into the user's home directory.

    Currently the application doesn't seem to understand that the location is read-only and breaks with "something wrong" message: https://github.com/a-b-street/abstreet/issues/803

    When no data is present - the application just fails with 'No such file or directory': https://github.com/a-b-street/abstreet/issues/802

    It should always offer the user to download data into the home directory instead of into the installed location. And this should be the only option when the installed location is read-only.

    opened by yurivict 1
  • Map download fails with

    Map download fails with "something went wrong" message

    On FreeBSD I am trying to download a new city using abstreet installed from a package.

    It always fails, see the video screenshot:

    https://user-images.githubusercontent.com/271906/140864476-82c896a3-806c-4202-939f-4273e02905a9.mp4

    I'm not sure if it attempts to download into a read-only directory. It can only download into a home directory.

    Message on the terminal:

    [2021-11-09T04:46:20Z INFO  map_gui::tools::updater] Decompressing data/system/at/salzburg/city.bin
    thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', /disk-samsung/freebsd-ports/games/abstreet/work/abstreet-0.2.64/map_gui/src/tools/updater.rs:140:22
    [2021-11-09T04:46:20Z ERROR map_gui::load] channel failed: Canceled
    
    opened by yurivict 1
  • When the data is missing the program just complains about a missing file and exits

    When the data is missing the program just complains about a missing file and exits

    It shows the message "Couldn't load montlake (in seattle (us)) No such file or directory" with the Ok button and exits.

    It should suggest the user what to do. Otherwise the behavior looks like it is broken.

    opened by yurivict 1
  • When some file is missing the error message doesn't mention the file name

    When some file is missing the error message doesn't mention the file name

    Resources were missing and this was the message:

    $ abstreet-game 
    [2021-11-08T17:19:04Z WARN  map_gui::options] Couldn't restore settings, so using defaults. No such file or directory (os error 2)
    setup widgetry...
    [2021-11-08T17:19:04Z INFO  winit::platform_impl::platform::x11::window] Guessed window scale factor: 1
    load textures...
    [2021-11-08T17:19:04Z INFO  widgetry::backend_glow] img_size: 896x896px (802816 px), sprite_size: 64x64px, sprites: 14x14 (196 sprites)
    load textures took 0.0628s
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', /disk-samsung/freebsd-ports/games/abstreet/work/abstreet-0.2.64/widgetry/src/runner.rs:316:43
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    setup widgetry... plus 0.1795s
    setup widgetry took 0.2423s
    [2021-11-08T17:19:04Z INFO  abstutil::time] - setup widgetry took 0.2423s
    [2021-11-08T17:19:04Z INFO  abstutil::time]   - load textures took 0.0628s
    [2021-11-08T17:19:04Z INFO  abstutil::time]   - ... plus 0.1795s
    [2021-11-08T17:19:04Z ERROR abstutil::time] 
    [2021-11-08T17:19:04Z ERROR abstutil::time] 
    [2021-11-08T17:19:04Z ERROR abstutil::time] 
    [2021-11-08T17:19:04Z ERROR abstutil::time] 
    [2021-11-08T17:19:04Z ERROR abstutil::time] 
    [2021-11-08T17:19:04Z ERROR abstutil::time] !!! The program panicked, look above for the stack trace !!!
    

    In fact. icon.png was missing.

    opened by yurivict 1
  • Edits to one road weren't compacted before saving

    Edits to one road weren't compacted before saving

    See https://www.reddit.com/r/seattlebike/comments/q8z12m/draw_your_vision_of_seattles_bike_network/hhwzdrt/

    Need to reproduce locally

    opened by dabreegster 0
  • Question on crosswalks, infered vs. mapped ones

    Question on crosswalks, infered vs. mapped ones

    I just started today with a local install. It all went smooth, importing my city. Main interest is pedestrian routing. Here crosswalks (highway=crossing on nodes) are meticulously mapped. The heuristics though infer a lot of them, where there are in fact none. While those in places where there is no crossroads simply are missing.

    Is there a switch, to have (only/all) mapped crosswalks appear? Just switching off heuristics, would that result in no crosswalks? Will that be very complicated, to combine intersections etc. with mapped crosswalks only?

    opened by hungerburg 22
  • Importing OSM data for London

    Importing OSM data for London

    Hi, your progress with the LTN Tool is exciting and it's already potentially useful. London UK is a focus of a lot of effort in planning LTNs.

    As you may know, London is administered as 33 boroughs that act as separate cities for most road planning. My own borough is Camden https://www.openstreetmap.org/#map=13/51.5428/-0.1809. It would be great to get the OSM data for Camden imported to AB Street. I'd be happy to designate the area or to download the relevant section of the OSM database.

    Once knowledge of the LTN Tool spreads I imagine there will be demands from quite a few other London boroughs too. Does it make sense to import the OSM data for all of Greater London (http://download.geofabrik.de/europe/great-britain/england/greater-london.html)?

    opened by georgio8 16
Releases(v0.3.1)
Owner
A/B Street
A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.
A/B Street
Blazing fast and lightweight PostGIS vector tiles server

Martin Martin is a PostGIS vector tiles server suitable for large databases. Martin is written in Rust using Actix web framework. Requirements Install

Urbica 661 Nov 24, 2021
Geospatial primitives and algorithms for Rust

geo Geospatial Primitives, Algorithms, and Utilities The geo crate provides geospatial primitive types such as Point, LineString, and Polygon, and pro

GeoRust 736 Nov 20, 2021
Zero-Copy reading and writing of geospatial data.

GeoZero Zero-Copy reading and writing of geospatial data. GeoZero defines an API for reading geospatial data formats without an intermediate represent

GeoRust 57 Nov 18, 2021
TIFF decoding and encoding library in pure Rust

image-tiff TIFF decoding and encoding library in pure Rust Supported Features Baseline spec (other than formats and tags listed below as not supported

image-rs 45 Nov 8, 2021
OpenStreetMap flatdata format and compiler

osmflat Flat OpenStreetMap (OSM) data format providing an efficient random data access through memory mapped files. The data format is described and i

null 26 Oct 20, 2021
Calculates a stars position and velocity in the cartesian coordinate system.

SPV Calculates a stars position and velocity in the cartesian coordinate system. Todo Expand the number of available operation Batch processing by tak

Albin Sjögren 4 Nov 26, 2021
💫 Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages

?? Kanata Small microservice to handle state changes of Kubernetes pods and post to Instatus ?? Why? I don't really want to implement and repeat code

Noel ʕ •ᴥ•ʔ 4 Nov 10, 2021
Small game where you play a big spider chasing small spiders, written in Rust and Macroquad.

Ludum Dare #49 Compo entry - Procedural Spider Small game where you play a big spider chasing small spiders. Each spider you catch makes you bigger! C

Jakub Arnold 13 Nov 19, 2021
Examples on how to write Windows kernel drivers in Rust

windows-kernel-rs Note: this is still work in progress! This is a Windows kernel framework in Rust that consists of windows-kernel-sys, a crate that p

S.J.R. van Schaik 5 Nov 4, 2021
An experimental programming language for exploring first class iterators.

An experimental programming language for exploring first class iterators.

Miccah 4 Nov 10, 2021
Rust drivers for the SIM7000 series of modems

sim7000 This crate provides drivers for the SIM7000 series of chips. The current code implements enough commands to bring up a TCP connection and run

The Techno Creatives 3 Nov 11, 2021
An interactive shell environment for exploring the p2panda protocol

An interactive shell environment for exploring the p2panda protocol. Uses a mock node and clients to simulate network logic.

null 3 Nov 11, 2021
A work-in-progress, open-source, multi-player city simulation game.

Citybound is a city building game with a focus on realism, collaborative planning and simulation of microscopic details. It is independently developed

Citybound 6.6k Nov 26, 2021
Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic

Nethoscope Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic. Check video on how it

Vesa Vilhonen 80 Nov 14, 2021
🕵️Scrape multiple media providers on a cron job and dispatch webhooks when changes are detected.

Jiu is a multi-threaded media scraper capable of juggling thousands of endpoints from different providers with unique restrictions/requirements.

Xetera 27 Dec 1, 2021
Finding the shortest and fastest path in the graph to optimize traffic.

Finding the shortest and fastest path in the graph to optimize traffic. Because we don't want to spend unnecessary time searching for the optimal route back to home.

Tomáš Petržela 2 Oct 26, 2021
`haproxy_autconfd` is a daemon that automatically assembles a HAProxy config and restarts HAProxy if the config changes

haproxy_autconfd Welcome to haproxy_autconfd ?? haproxy_autconfd is a daemon that automatically assembles a HAProxy config and restarts HAProxy if the

null 0 Nov 9, 2021
Akasio is a simple HTTP server that redirects traffic based on a JSON redirect table. This is its Rust implementation.

This page is inaccurate and is pending updates. Akasio (Rust) Description Akasio is a simple HTTP server that redirects traffic based on a JSON redire

K4YT3X 5 Jun 8, 2021
A Tauri Plugin to watch the filesystem for changes

Tauri Plugin FSWatch This plugin provides a "classical" Tauri Plugin Interface to watch changes on files and directories through notify. Architecture

Tauri 6 Oct 28, 2021
Tunnel TCP traffic through SOCKS5 or HTTP using a TUN interface.

tun2proxy Tunnel TCP traffic through SOCKS5 or HTTP on Linux. Authentication not yet supported. Error handling incomplete and too restrictive. Build C

B. Blechschmidt 7 Nov 18, 2021
Rust-based traffic editor for RMF

Traffic Editor III Welcome to Traffic Editor III. install stuff Unfortunately we need a newer Rust than what comes with Ubuntu 20.04. First make sure

null 1 Nov 24, 2021
Hybrid Traffic Mesh Proxy

Hybrid Traffic Mesh Proxy L7 proxy on kubernetes dependencies: routeagent: refresh proxy routes fetched with k8s sdk register routes curl -v --unix-s

Goku 1 Nov 4, 2021
Detect timestamp of all scene changes in video

detect-scene-change detect timestamp of all scene changes in video Usage

soruly 4 Nov 23, 2021
desktop automation, screen capture, input listen/simulation, asar compress, color picker for nodejs and electron based on rust

desktop automation, screen capture, input listen/simulation, asar compress, color picker for nodejs and electron based on rust. 基于 Rust / WASM 提供截图、取色、键鼠事件监听模拟、压缩解压、图像处理、获取已安装应用等跨平台功能的现代异步 Nodejs 模块,占用空间小, 安装便捷, 使用简单, 高性能, 资源占用极小, 可取代 iohook 和 robotjs

null 9 Nov 15, 2021
Parallel finance a decentralized lending protocol built on top of the Polkadot ecosystem. Our unique approach will allow users to earn "double interests" from staking and lending their tokens simultaneously.

Parallel Finance A new Cumulus-based Substrate node, ready for hacking ?? Getting Started Follow these steps to get started with the Cumulus Template

parallel-finance 47 Nov 20, 2021
Terminal UI that allows Alacritty users to quickly and easily shuffle through provided themes 🦄

Alac-pretty alac-pretty.mp4 If you're like me in that you constantly need to change the colors of your dev environment because visual stagnation reall

Benji Nguyen 8 Oct 23, 2021
Network simulation in Rust

netsim - A Rust library for network simulation and testing (currently linux-only). netsim is a crate for simulating networks for the sake of testing n

Andrew Cann 86 Sep 15, 2021