Commit Graph

231 Commits

Author SHA1 Message Date
Dustin Carlino
e32a576237 Reimport the sites that were there before, but under the new naming.
cyipt/actdev#65

(No procgen buildings for any of them yet)
2021-02-11 15:00:40 -08:00
Dustin Carlino
fd73166292 Prep to import actdev again, and fix build break in game/src/lib 2021-02-11 14:35:32 -08:00
Dustin Carlino
dd9ddb6e45 Forgot the importer configs... 2021-02-11 14:30:41 -08:00
Dustin Carlino
21573e09f1 Delete all of the actdev maps. I'm going to do this over again and just
use the site name as the city, instead of picking the "closest" major
city. This is introducing too much friction in automation.
cyipt/actdev#65

There will be a few awkward results -- cambridge gets renamed, and lcid
gets disassociated from leeds. Worth it for now.
2021-02-11 14:27:28 -08:00
Dustin Carlino
a5bfa55c8e Create a tool to find the geofabrik osm.pbf file covering a particular region. Inspired by https://github.com/ropensci/osmextract. This will make importing more maps much easier, especially for cyipt/actdev#65. 2021-02-10 12:35:59 -08:00
Dustin Carlino
7c0bac236a Bring in study areas for all actdev sites. Automatically show them when launching in actdev mode. cyipt/actdev#65 2021-02-10 08:35:08 -08:00
Dustin Carlino
1b1a4e99c7 Adjust procedurally generated building setback. Generate for most of the suburban actdev maps. https://github.com/cyipt/actdev/issues/65 2021-02-09 16:04:40 -08:00
Dustin Carlino
1241cea22e Update Chapelford boundary, and add LCID. https://github.com/cyipt/actdev/issues/65 2021-02-09 15:41:42 -08:00
Dustin Carlino
bbdd23dada Partly automate importing new actdev maps. Bring in 6 new sites 2021-02-09 13:53:50 -08:00
Michael Kirk
4b665c871d
update geo related deps. (#508)
geo-types to 0.7
geo to 0.17 which removes redundant old geo used by polylabel
geojson to 0.22
2021-02-08 16:34:56 -08:00
Dustin Carlino
4235d9f994 When importing maps, optionally add in extra buildings from a GeoJSON
source to augment the ones in OSM. For
https://github.com/cyipt/actdev/issues/53 -- sometimes the buildings
just haven't been mapped in OSM yet, other times the buildings are part
of a future development site. In either case, we can procedurally
generate some houses, so this is a way to include them in the map.

Start doing this for Chapelford. But first, adjust the generated house
sizes -- they were WAY too tiny.

Also prep for [rebuild] [release]
2021-02-07 13:56:26 -08:00
Dustin Carlino
744c49dfb4 Fix importer after last commit 2021-02-06 15:17:59 -08:00
Dustin Carlino
fc213d1d38 Optionally skip importing external trips that don't match an endpoint, for the Grid2Demand integration. 2021-02-06 14:59:45 -08:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dmitriy Serdyuk
5bd4e79190
[WIP] Add Montreal (#481) 2021-02-02 18:24:31 -08:00
Dustin Carlino
802a647a81 Import Providence for a student project. 2021-01-27 15:34:54 -08:00
Dustin Carlino
9d751afc24 Increase the amount of offstreet parking in Rainier Valley. #446
At long last, we have the 3rd Seattle map that finishes without
gridlock! Hoping to use it for this case study on signal timing
maximums...
2021-01-26 18:15:34 -08:00
Dustin Carlino
8e22f2aa9e Make the Rainier Valley map smaller, cutting out MLK. #446
The roads that cross the light rail tracks wind up gridlocking horribly.
For this case study, we actually just care about Rainier Ave.

The scenario still gridlocks, but due to tiny traffic circles breaking.
Going to try automatically converting those to a single node.
2021-01-26 15:28:36 -08:00
Dustin Carlino
f69335edf0 Let individual maps override the street parking length. #457
Now regenerate all map data, because the schema changed. Also had to
revert part of the last commit to unbreak transit route snapping in
Berlin.
2021-01-25 12:36:49 -08:00
Dustin Carlino
56101addcf Remove the zcool font and Xi'an import. #377
The Xi'an map isn't being regularly used, and it has some issues
(boundary is too large, OSM is missing buildings in most of the area).

The zcool font enables Chinese characters to render, but costs 6MB in
the binary files, slowing down wasm loading time. Eventually, we can
support async loading fonts and passing them to widgetry when loading a
map requiring them. For now, cutting down wasm size is a bigger
priority.

game wasm from 18MB to 12MB. Not bad!
2021-01-24 20:30:20 -08:00
Dustin Carlino
ea103803d1 New map focusing on Rainier Valley for #446, studying the effects of amping up maximum signal cycle lengths. [rebuild] [release] 2021-01-24 15:49:15 -08:00
Dustin Carlino
c9c6f240ae Remove timer.{note, warn, error} in favor of the log crate. #262
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.

Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08:00
Dustin Carlino
02dc473d1e Reorganize importer code, so that regenerating all cities can be done
under a single Timer, which helps understand where time is spent. #326
and #262
2021-01-19 12:52:56 -08:00
Filip Czaplicki
c6e211cc77 Map: Warsaw 2021-01-18 17:58:05 -08:00
Dustin Carlino
a6c61e4fae Use Great Kneighton study area for Cambridge, not Trumpington. And bring
in Chapelford too. #449
2021-01-17 17:35:11 -08:00
Dustin Carlino
4c6d7af76d Bring in linear pedestrian highways as cycleways+shoulders. #458
Also give living_streets in Krakow shoulders, so foot routing works
better there.

Now regenerate everything. Actually messes up routing for Trumpington;
71 cancelled trips up to 101. And have to intervene to keep lakeslice
not gridlocking, as usual.
2021-01-16 17:03:13 -08:00
Dustin Carlino
0a353f67f8 When importing external scenario data for cyipt/actdev#32, snap border endpoints based on the allowed modes of each border. Without this, some driving trips snap to the cycleway next to a road.
212 cancelled trips (that immediately failed) down to 140.
2021-01-15 21:45:42 -08:00
Dustin Carlino
6ba1cfe8a1 Import Detroit for #452 2021-01-14 18:06:52 -08:00
Dustin Carlino
909ebe35a2 Refactor the cyipt/actdev#32 scenario importer. Expressing in terms of OD is cleaner. 2021-01-14 17:48:17 -08:00
Dustin Carlino
a7f3e998b7 Start to generate two simple scenario from actdev desire lines. https://github.com/cyipt/actdev/issues/32 2021-01-14 10:31:21 -08:00
Dustin Carlino
d49c6c5d7d Refactor the logic of distributing N people to K buildings. This was
duplicated between the Berlin importer and the new census-based popdat
crate, and I suspect some form of it might get used for the actdev
integration. #424
2021-01-13 11:18:51 -08:00
Dustin Carlino
a1988f269c Based on importer config, try using separate cyclepaths directly. #330
Small adjustments to unzoomed rendering and stop sign placement.

Regenerate all maps because of the format change, but only Cambridge
changes. Since we're doing this anyway, also pull in leisure=garden.
2021-01-12 11:13:45 -08:00
Dustin Carlino
b4cee2d6f9 Start importing parts of Cambridge for https://github.com/cyipt/actdev/issues/26.
I did
https://dabreegster.github.io/abstreet/howto/new_city.html#including-the-city-to-ab-street-more-permanently,
using
https://github.com/cyipt/actdev/blob/main/data-small/study_area_trumpington-test.geojson
2021-01-11 14:23:52 -08:00
Dustin Carlino
afceb5e268 Adjust Leeds import: #444
- stretch central polygon a bit to avoid crash when clipping
  https://www.openstreetmap.org/way/511767781
- rename polygons ("center" to "huge", and removing the "leeds_" prefix
  from the others)
- generate a region overview from the huge map
- only import/match collision data on the huge map
2021-01-08 09:29:45 -08:00
Robin Lovelace
6af15c202c Break-up Leeds, closing #444 2021-01-08 09:21:05 -08:00
Dustin Carlino
e99def9124 Switch all error handling to anyhow. Nothing consumes our code as a
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
d529ae2e5c Upgrade usvg and rand 2021-01-04 09:19:54 -08:00
Dustin Carlino
965d999199 Upgrade misc other dependencies 2021-01-03 20:01:27 -08:00
Dustin Carlino
2945913fb3 Upgrade rand 2021-01-03 19:48:03 -08:00
Dustin Carlino
5c04923dff Split abstio crate out from abstutil. #253
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Dustin Carlino
df59b477a5 Start importing Bellevue. Treat it as a separate city from Seattle, and
don't even check if Soundcast data covers it yet.

Now regenerate all map data.
2020-12-30 13:21:59 -08:00
Dustin Carlino
bc5c4d3b2e Fix importer bug from 14f692fc39 that meant Seattle maps aren't touched when running with --raw and --map 2020-12-29 08:44:54 -08:00
Dustin Carlino
14f692fc39 Turn more code in the importer into config. Ideally we just have code
for all the custom extra import data. #326

Verified there are no changes when importing the affected cities (except
for renaming the original OSM input file for Leeds to match the
geofabrik source)

Woops, and fix updater uploading with the compressed_size_bytes change.
2020-12-22 13:38:29 -08:00
Dustin Carlino
ee0d73847e Add more small Seattle maps for the experiment -- and who knows, maybe also useful for traffic sim
And unbreak the importer, cargo check doesn't build with features! Argh.
2020-12-18 11:00:15 -08:00
Dustin Carlino
5aecff3b9e Regularly import Salzburg. #366 2020-12-15 06:02:06 -08:00
Michael Kirk
8b9b3ce2b1
census areas import (#425)
#424
2020-12-14 17:48:47 -08:00
Dustin Carlino
aa5010f2d0 Import part of Manhattan. Need to adjust the boundary to fix water
polygons, but this is a start.
2020-12-09 16:15:08 -08:00
Dustin Carlino
c8a37a27a0 Create 3 new small maps of Seattle for the experiment. Notably, 2 of
them simulate fully with --infinite_parking, and SLU makes it to about
4pm, so these might have some other interesting use...
2020-12-07 20:58:04 -08:00
Dustin Carlino
57963126fa Fold number of housing units into Building; ditch the extra file approach. 2020-12-01 12:43:19 -08:00
Dustin Carlino
aa4d848a0e Figure out the number of single family and multi-family units per OSM building, from parcel data. Just store it in an extra system file for now. 2020-11-30 10:58:47 -08:00
Dustin Carlino
ff829db8f1 Expanding the boundary of huge_seattle, and creating a new north_seattle map 2020-11-25 08:56:55 -08:00
Dustin Carlino
ab88010ed0
Refactor PathRequest creators that go between two buildings. #176 (#404) 2020-11-24 13:21:44 -08:00
Dustin Carlino
fb07e35200 Just download a KML file of Seattle zoning codes, for #393 2020-11-21 08:55:58 -08:00
Dustin Carlino
308eb90956 Bring in Seattle parcel data to experiment with filling the negative
space on maps with "private area around houses".

And a few tweaks to the KML viewer to make it more useful:

- optionally save the clipped file
- click an object to view all attributes in a scrollable popup
2020-11-20 10:30:13 -08:00
Dustin Carlino
915e12ff7e Remove PersonID from Scenario; the simulation will assign IDs sequentially. They're redundant. #258
Slightly reduces scenario file size, and simpler code to construct
scenarios.
2020-11-18 14:13:25 -08:00
Dustin Carlino
6a2c391b8b Add a tool to convert maps from JSON back to binary, to enable experiments with modifying parking per buildings. Except... apparently we can't read back in JSON maps?! 2020-11-18 11:34:38 -08:00
Dustin Carlino
4ab98b1477 Compact the schedule in Scenario by just storing each TripEndpoint. #258
The schedule validation changes slightly. No-op trips between the same
origin/destination are now an error and get filtered out.

huge_seattle scenario goes from 129MB to 110MB with the redundant
endpoints removed.
2020-11-18 11:13:09 -08:00
Dustin Carlino
7741ea79b5 Refactor starting trips -- caller passes in TripInfo. Stop inferring
TripEndpoints from TripLegs. #258

NOW regenerate scenarios. I'm confident this sweeping refactor didn't
break behavior, because prebaked data didn't budge. huge_seattle
scenario went from 147MB to 129MB. Not bad!
2020-11-17 16:59:37 -08:00
Dustin Carlino
5ea3c2ba6f Remove support for remote trips, and stop plumbing off-map locations. A
remote trip goes between two locations off-map, specified just by a GPS
coordinate. The trips aren't simulated at all. They were originally
added to support Orestis's pandemic model, to handle transmission
off-map in shared buildings. This work has died off, there are no other
anticipated use cases for remote trips, and they complicate bigger
refactorings. #258

This also has the nice side effect of substantially reducing scenario
size -- huge_seattle from 177MB to 147MB. That unused metadata was
expensive!
2020-11-17 10:14:23 -08:00
Dustin Carlino
b6be9c81d5 Generate city picker maps from a bunch of small maps, instead of one huge map. Use for Paris. One giant map covering everything there is going to be too large. 2020-11-13 18:22:46 -08:00
Dustin Carlino
d43bf2c869 Import Paris, for helping the OSM community visualize all the awesome pop-up bike lanes there 2020-11-13 17:23:36 -08:00
Dustin Carlino
6fe49ce0fa Some preps for importing Paris: avoid crashing on some previously unseen
OSM things, and making geojson_to_osmosis handle multiple polygons in
one input file.
2020-11-13 16:31:22 -08:00
Dustin Carlino
4b557fa6de Bring in fresh OSM for Seattle. Because it's so annoying to manually
repair proposals when roads change upstream, make the test dump a
repaired file before failing. Manually inspect/amend that.
2020-11-11 15:16:06 -08:00
Dustin Carlino
aa966d7533 Upgrade a bunch of dependencies 2020-11-11 12:02:53 -08:00
Dustin Carlino
07ac288e72 Refactor: rename Pt2D::from_gps to just gps.to_pt(bounds) 2020-11-10 12:00:43 -08:00
Dustin Carlino
104c987edd Import Seattle collision data and convert to the common format. #87 2020-11-06 13:16:50 -08:00
Dustin Carlino
b0bdbf6c1f Change some cities to just use JSON config for importing, instead of boilerplate-filled code. #326 2020-11-06 10:56:36 -08:00
Dustin Carlino
e0a8d82b61 Reorganize polygon files to importer/config, instead of data/input.
Nothing in data/input should be under version control; all of it is
managed by the updater. #326
2020-11-06 10:10:03 -08:00
Dustin Carlino
ad7a25f7f2 Prototype a simple data format for collision data. Import data for Leeds and London. #87 2020-11-05 16:16:40 -08:00
Dustin Carlino
ac6eff31ef Rename some maps to remove the now-redundant city. #326 2020-11-05 15:24:02 -08:00
Dustin Carlino
cda586dfc9 Cleanup by moving some methods to belong to MapName. #326 2020-11-05 14:18:13 -08:00
Dustin Carlino
4f2cda8d53 Reorganize data/system/ files by city! The only interesting change is
abstutil::path_all_maps becoming abstutil::list_all_maps. #326
2020-11-05 14:05:48 -08:00
Dustin Carlino
67530bec07 Future-proof file organization by changing map_name from a string to a
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326

This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
2020-11-04 17:26:32 -08:00
Dustin Carlino
e99dd5bba7 Use inferred sidewalks for Leeds, after detecting another geometry bug
when building sidewalk corners. Raw sidewalks from OSM aren't suitable
for traffic simulation yet.
2020-11-04 08:46:06 -08:00
Dustin Carlino
21cd7a197d Run the experimental cycleway snapper phase for Leeds, after adding a
check to skip ways like https://www.openstreetmap.org/way/429285996,
which're unexpectedly loops.
2020-11-03 15:57:21 -08:00
Robin
edf5d0d8a9
Add Leeds (#375) 2020-11-03 10:53:14 -08:00
Dustin Carlino
4cd18047bd Fix the random_scenario tool by adding --scenario_name and saving a
binary scenario file
2020-11-02 12:01:37 -08:00
Dustin Carlino
b46c3d26eb Don't infer sidewalks for the plethora of demo maps 2020-10-31 17:06:48 -07:00
Dustin Carlino
ca2ff08d71 Don't render intersections between footways with a special color. Also
cut Kraków over to using the new experimental footpath support. #161
2020-10-30 14:11:00 -07:00
Dustin Carlino
bf0dce2c18 Optionally import sidewalks and separate footpaths exactly as they're in OSM, instead of attempting any inference. This is a way to move forward on #161 without having to cutover to it all at once. 2020-10-30 13:27:45 -07:00
Dustin Carlino
3ed7e73aa8 Use a u64 RNG seed, not a u8 2020-10-29 09:25:07 -07:00
Dustin Carlino
fda4c4da7b Refactor a few utilities, and use convex hull of the city boundaries to simplify them considerably. #326 2020-10-26 14:15:25 -07:00
Dustin Carlino
34b41a909e Optionally keep building OSM tags. Display in info panels and the new viewer, when present.
Don't keep the tags by default. File size increase from the empty map is
negligible.
2020-10-24 14:19:22 -07:00
Dustin Carlino
f258c50595 Organize import blocks using https://github.com/dabreegster/organize_rust_imports 2020-10-05 20:29:22 -07:00
Dustin Carlino
27d94945c6 Manually move mod block after the use block, to match what CLion does. 2020-10-05 20:29:22 -07:00
Dustin Carlino
ac5aa927db Test turn generation via goldenfiles instead. Revert the "import from a
raw string" stuff from the previous commit.

Add tests of a few interesting intersections. The results right now
aren't ideal, but this sets things up for fast iteraton.
2020-10-01 15:34:43 -07:00
Dustin Carlino
ec114e51e1 Prototype an idea for unit testing the turn generation code. Hardcode a
simple .osm, turn it into a full Map, and inspect the results.
2020-09-30 16:30:28 -07:00
Dustin Carlino
2c63a485cc Undo some uses of impl trait. Originally added for performance in a big
refactor, they complicate the function signatures significantly and have
no observable perf impact, since all of the methods just happen in map
importing.
2020-09-29 15:53:08 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
8faab3592a Refactor RawMap saving 2020-09-22 15:49:02 -07:00
Michael Kirk
66220e0a57 persist raw map artifact during oneshot import 2020-09-22 15:31:40 -07:00
Dustin Carlino
4a07164394 Add the concept of trip purpose. Seed it from Soundcast data, or assign
it for the prolet robot model. Expose it in the trip info panel.

Total scenario size from 385MB to 412MB, but that's not so bad, and this
seems worth it.
2020-09-19 13:02:36 -07:00
Michael Kirk
08f330cfad track worker capacity of commercial buildings 2020-09-16 16:43:11 -07:00
Dustin Carlino
edbc674970 Fix stop sign placement for left-handed maps. #311 2020-09-11 11:03:59 -07:00
Dustin Carlino
5be4c2ca84 Add an API to add a new trip in the middle of the simulation. Fixes #313
[rebuild]
2020-09-06 13:53:31 -07:00
Dustin Carlino
4367c03a7d Add a tool to generate a random proletariat robot scenario given an RNG seed, for the forecasting group. #313 2020-09-04 11:10:38 -07:00
Dustin Carlino
65e07d9cc7 Read/write scenarios in JSON, so people can manipulate them in any language. #313 2020-09-04 10:57:52 -07:00
Dustin Carlino
4576e9c1d0 Start importing a tiny slice of London, to start working on left-hand driving again 2020-09-03 16:09:17 -07:00
Dustin Carlino
b13f5b0f4a Move iotool things into the importer package, but keep separate binaries 2020-09-03 11:49:53 -07:00
Dustin Carlino
6a9d55b7f5 Since the first line of the osmosis file doesn't matter, more clearly rename it 2020-09-02 22:12:43 -07:00