a-b-street / a-b-street/abstreet
Feature request: 'Save scenario' button
- Lenguaje dominante
- Rust
- Estrellas
- 8.2k
- Forks
- 380
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
A/B Street enables users to modify travel behaviour and infrastructure. Currently there are ways of saving scenarios of infrastructure change and scenarios of travel, but no way to save the 'package' of changes that you have made into a single file, including:
- [ ] The scenario file currently loaded
- [ ] The set of change made to the transport network
- [ ] Location of the camera, e.g. to show someone a particularly interesting feature of the transport system at a junction
- [ ] The timestamp
Each of these things have been implemented separately and work well. A great example of the effectiveness of being able to share insight into the impact of change is this demo of using A/B Street to simulate the addition of a new cycleway in Poundbury, UK.
Currently people can reproduce that situation by opening up A/B Street, getting the Poundbury map up, putting a scenario file e.g. [scenario_go_active.json](https://github.com/cyipt/actdev/blob/main/data-small/poundbury/scenario_go_active.json), in the relevant place and editing the map in the same way as shown on the video.
Even better, thanks to great work on the ActDev project, users can simply click on this link and then the just need to edit the road: https://actdev.cyipt.bike/abstreet/?--actdev=poundbury&--cam=16.9/50.71206/-2.45266&--actdev_scenario=go_active as shown below:

That opens the map at the correct location and at a specific time. Making the change auto saves it. But it's not immediately clear how to share the edits with others, let alone share the map state at that specific time and location. I imagine tackling this issue with have high benefit:cost ratio as all the components are there but not packaged. For that reason, as discussed, it may be more of a UI question in terms of where the 'Save Scenario' button goes.
Suggestion: have one main 'Save' button which when clicks opens a sub menu with the options, e.g.:
- [ ] Save current infrastructure
- [ ] Save infrastructure edits
- [ ] Save current scenario
- [ ] Save time
- [ ] Save camera view
That outputs a single file containing each of those things (and possibly in the future more such as annotations) that can be reloaded by others.
Imagine there are other settings that could be saved. Confident this will be useful in any case and very happy to provide further ideas/feedback and test.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
The issue describes bundling existing components (scenario file, network edits, camera location, timestamp) into a single save file. Look for UI code handling the save menu and serialization logic for the individual components. Start by finding where infrastructure edits and camera state are currently saved, then design a data structure that combines them. Check for existing serialization formats (like JSON) used in the codebase.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- desktop
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100