Commit Graph

90 Commits

Author SHA1 Message Date
Dustin Carlino
14bea3a4be Split out a raw_map crate from map_model. RawMap is the thing we turn
OSM and other raw input into and store, before later converting to a
Map.

Why?

- build-time performance: while iterating on geometry problems, map_editor in release mode took 33s to build before, 11s now that the crate is split
- better layering: operations on a RawMap are becoming increasingly distinct from later transformations on the bigger map model
- this helps tease apart the dependencies of the intersection polygon algorithm for #846
- this will make it simpler to cutover to osm2lanes for https://github.com/a-b-street/osm2lanes/issues/71

There's further reorganization in raw_map and map_model that'll follow,
but the main work is done here.
2022-02-19 17:39:28 +00:00
Dustin Carlino
c8d88bd689 Make things build with the lyon_geom change 2021-12-23 17:00:08 +00:00
Marcel Dejean
72ae333218 switch from nbez to lyon_geom for bezier curves 2021-12-23 17:00:08 +00:00
Dustin Carlino
007cf0b28d Split the importer into individual commands with structopt. #745 2021-10-25 13:02:00 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
easbar
0a7670d874 Update fast_paths to current master, faster preparation 2021-09-13 10:53:14 -07:00
Dustin Carlino
1d71e39480 Amp up the short service road trimmer -- Aurora's got lots of dangly things to trim.
While we're at it, opt into new fast_paths branch that should have about
a 2x import speedup.

Regenerating the world...
2021-08-21 21:23:35 -07:00
Dustin Carlino
70c6d47c13 Track locally which proposals have been uploaded, to avoid uploading copies of stuff uselessly. Not quite working, but big step forwards. 2021-08-18 10:23:20 -07:00
Dustin Carlino
4547395067 Move the cycleway snapping step to happen just before RawMap->Map, so we can play with it in the map_editor. #330 2021-07-27 11:20:57 -07:00
Dustin Carlino
db435cd56d Use the quick fix to https://github.com/easbar/fast_paths/issues/34 to
dramatically improve time to import and edit maps.

The fix helps all maps that use extremely high edge weights to prevent
people from cutting through private roads. There may be a more robust
fast_paths fix later, but I want to reap the benefits for tomorrow's
release.

The dramatic numbers:

- importing huge_seattle: 893s down to 108s
- editing huge_seattle: 102s down to 19s

Query speeds didn't appear to substantially change.
2021-07-17 22:33:01 -07:00
Dustin Carlino
0edc0cb279 Fix the Dijkstra pathfinding, by using DiGraph, which is serializable 2021-07-10 17:14:10 -07:00
Dustin Carlino
c5369a10f4 Invert the structure of CH-vs-dijkstra pathfinding. Use a generic
"engine" that just operates on raw usize IDs. Embed that enum in each of
the particular pathfinders. This way, we don't have to keep duplicating
logic to delegate requests, handle one-step edge cases, etc. And it also
sets us up to more easily try out other CH implementations like osm_ch,
without having to move around tons of code.

Still use fast_path's InputGraph as the "universal" format, for now.

This is a huge change... got map_model compiling at least. Some stubbed
out stuff.
2021-07-10 17:14:10 -07:00
Dustin Carlino
382d890ac6 Switch to updated fast_paths 2021-07-04 14:34:20 -07:00
Dustin Carlino
57feeada59 Allow vehicles to exit driveways onto the opposite side of the road. #555
- Adding an internal alt_start to PathRequest
- Using it for contraction hierarchy queries only (the Dijkstra
  implementation now diverges!)
- Figuring out which start position was used

TODO:

- Fix the unparking position
- Make sure the simulation inserts static blockages
- Carefully check the same start/end road case
- Evaluate impact on gridlock / cancelled trips
2021-07-04 14:34:20 -07:00
Rémi Lauzier
dd050ea425 Update some dependency 2021-06-16 15:51:03 -07:00
Trevor Nederlof
4080d0d130
Add craft and office to import and add/reorg AmenityType (#638)
* Add craft and office to import and add/reorg AmenityType

* Remove bike rental/parking and rename BikeShop to Bike

* add in leisure and tourism tags, add more categories to AmenityType and remove lesser used tags

* add dependency on strum and strum_macros and removed some manual code for text display of Enum and Enum into string

* include lock file, fix color of buildings for amenity layer, fix formatting and use orders
2021-05-06 08:43:52 -07:00
Dustin Carlino
4826808b9b Use fast_paths from crates.io, now that a new release is out 2021-04-25 18:03:16 -07:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -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
312a721e63 Fold the separate seattle_traffic_signals git repo back into this one.
Originally it was split out to organize a separate volunteer mapping
effort, but that never took off, and it's unlikely to happen. When we
have to occasionally update the prebaked signal data for some
intersections, it's unnecessary friction to update the other repo.
2020-12-31 11:01:48 -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
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
2ddd9a62ff Cleanups for #346:
- Add Distance::min()/max()
- Bring in log crate everywhere
- Consolidate traffic signal validation
2020-09-26 10:11:08 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
3afdb3f7e2 The JSON format for the map edits changes occasionally. Be backwards
compatible with old edits, automatically transforming them to match the
new format. Part of #216 and necessary to work on #234.
2020-08-22 09:14:01 -07:00
Dustin Carlino
bfc5236152 fix crash with duplicate full route names on one bus stop [rebuild] 2020-08-02 08:36:40 -07:00
Dustin Carlino
1b993544ab print logs from fast_paths 2020-08-01 08:27:09 -07:00
Dustin Carlino
d9d4e5448e consolidate some gridlock problems/solutions in markdown, for #114 2020-07-17 13:38:09 -07:00
Dustin Carlino
a86fb5c73d upgrade to rust 1.45 after fixing an issue in fastpaths [rebuild] 2020-07-17 12:54:14 -07:00
Dustin Carlino
b058d5d926 cargo fmt and regenerate map data 2020-07-13 10:11:48 -07:00
Mateusz Konieczny
885fdefb5d
playing with processing modifications (#183)
* WIP set up plumbing for calculating building info in the Raw layer and using it later for #154

* WIP playing with processing modifications

* experiment with some possibilities for tag processing

* fix an embarassing typo

* enable busses in work-home traffic

* refactor, add multiuse

* seed more parking in Kraków

* parse integers properly - thanks for a help!

* rebalance generated trips

* add hack providing some background traffic

more realistic traffic

even mess realistic people

* attempt to further reduce parking deficit

* add TODO

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-07-13 09:56:05 -07:00
Dustin Carlino
82345767c9 store a bitset of access restrictions per road. derive zones from this only for editing and pathfinding. this unblocks editing zones 2020-07-06 13:09:49 -07:00
Dustin Carlino
56cb59c3ac rip out gtfs code, cutover to osm. will revisit this later; gtfs and osm probably disagree on routes and stops, and gtfs has schedule. but for now, just osm. 2020-07-03 17:33:32 -07:00
Dustin Carlino
ddf6de5f59 stop dependending directly on serde_derive 2020-05-19 15:06:32 -07:00
Dustin Carlino
f986dd8683 switch back to upstream fast_graphs, using the new 32-bit wasm-friendly
serialization. no measured performance impact. file sizes shrink!
2020-04-05 09:41:51 -07:00
Dustin Carlino
0bcbac1fee upgrade a few misc packages 2020-03-17 10:35:37 -07:00
Dustin Carlino
377fed6ce0 cutover to the separate traffic signals repo 2020-03-10 17:08:19 -07:00
Dustin Carlino
d44303de5c starting a new crate with a JSON schema for traffic signals. exporting
to it.
2020-03-04 11:59:41 -08:00
Dustin Carlino
34b1f342a2 fix map deserialization in wasm. 64-bit usizes in fast_paths was the problem. 2020-02-25 14:49:56 -08:00
Dustin Carlino
1d13ae39c3 explain a few more things in the tutorial, improve arrows a bit
[rebuild]
2020-01-31 12:18:44 -08:00
Dustin Carlino
79de16a840 get the sim crate to build to wasm. a small step towards #21 2020-01-30 17:28:52 -08:00
Dustin Carlino
e307e1f56d only need to prebake once per map+scenario 2019-12-13 13:57:27 -08:00
Dustin Carlino
16c9819a0d Check in the first manifest for data/system/, after fixing a
nondeterminism issue in fast_paths
2019-12-13 13:44:03 -08:00
Dustin Carlino
7ead5f9281 make traffic signal diagram always be a fixed width; zoom the intersection based on that 2019-10-21 15:17:21 -07:00
Dustin Carlino
bf7a65770b find the largest SCC of the driving graph, use this to classify parking blackholes 2019-08-21 11:48:33 -07:00
Dustin Carlino
4e83f492d8 upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps 2019-08-15 12:14:35 -07:00