Commit Graph

184 Commits

Author SHA1 Message Date
Dustin Carlino
2288b0d42a Add a smaller study area in Tehran.
- Procedurally generate houses there, so the automatic travel demand
  model doesn't produce totally silly patterns.
- Disable parking
- Allow vehicles to enter the intersection even when it looks like they
  might get stuck; this lets the default scenario complete without
  gridlock.
- Prebake the scenario, so a researcher can make edits and use all of
  the A/B testing data viz.

The home-to-work scenario produces laughably bogus patterns... everyone
working at Bank Sepah.
2021-09-30 14:51:56 -07:00
Dustin Carlino
b7d010058c Store Movements per Intersection, instead of constantly calculating them! #746
Regenerating everything...
2021-09-06 14:53:37 -07:00
Dustin Carlino
df242871b5 Fix actdev crash -- some people in the imported scenario data don't have
any trips snap successfully to buildings, so we wind up with 0-trip
people that break some UI logic.

Reimported all actdev scenarios. Hopefully there weren't any cases like
this in the Seattle data, but I'll do a full regeneration later tonight
anyway...
2021-08-25 09:24:00 -07:00
Dustin Carlino
fbd173408e Import new Seattle OSM data with a bunch of fixes around Aurora, and actually disable parking in the Aurora maps
Remove Queen Anne from prebaking -- it trips some crash with waking up
following vehicles that I'm not going to dig into right now.
2021-08-22 19:50:47 -07:00
Dustin Carlino
988ece069d Fix broken LCing test; intersection IDs changed at some point? 2021-08-19 12:01:48 -07:00
Dustin Carlino
c98b4f293e Regenerate all maps after last few changes. Split out the actdev scripts to more easily regenerate actdev scenarios. This is necessary if map intersection IDs change, for instance.
Rainier Valley starts crashing in the simulation! Not sure why the
regression happened, disabling for now, will look into it later.
2021-07-29 14:19:46 -07:00
Dustin Carlino
ffcf0a8d66 Fix a bug in transit snapping introduced by 163244ace9. Regenerating all maps, also bringing in a Tempe OSM fix...
The deadend trimming is too enthusiastic, getting rid of some unsnapped
cycleways and things connecting to the map border. Will iterate on it
this week; net benefit for now.
2021-07-27 16:56:11 -07:00
Dustin Carlino
8eeee4cb8e Import fresh Seattle OSM, with a crazy intersection near the Burke consolidated and lots of cycletracks downtown deduplicated. 2021-07-25 12:34:20 -07:00
Dustin Carlino
d10d8ceb33 Clean up code and regenerate everything with new the consolidation algorithm... #654
Phinney gridlocks again; 68daa6884a was
too ambitious. Otherwise all fine!
2021-07-19 15:07:10 -07:00
Dustin Carlino
68daa6884a Phinney and Wallingfjord don't gridlock right now, so opt them back into prebaked results 2021-07-18 22:58:22 -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
628f75f9fb Update actdev scenarios with fixed departure times 2021-07-14 15:04:56 -07:00
Dustin Carlino
3d5955c2b6 Hardcode infinite parking option for a few maps. #688
This is an interim option until we decide whether this setting belongs
on the map, the scenario, or something else.
2021-07-13 09:03:07 -07:00
Dustin Carlino
8be065c1b8 Finally regenerate all data. Trip times got slower, because now pedestrians can't zoom up one side of a steep hill.
Temporarily leaving all_costs_from as the only thing broken by the
refactor. Will fix it before the release tomorrow.
2021-07-10 17:14:10 -07:00
Dustin Carlino
1539091453 Import Loop 101, adding an option to skip local roads to cut down map
size.
2021-07-08 10:25:36 -07:00
Dustin Carlino
c5113b868c Let one vehicle attempt to lane-change around another vehicle on every
lane that they're stuck behind them. Only record a risk exposure event
the first time, but let passing happen anywhere. #382

Also add scenario name to PrebakeSummary, to disambiguate the Poundbury
results.
2021-07-07 21:20:06 -07:00
Dustin Carlino
ed59a8a386 Reimport all actdev scenarios, and restore Poundbury prebaked data. This was temporarily broken by a JSON format change (a-b-street/abstr#29) 2021-07-06 15:29:51 -07:00
Dustin Carlino
964cc23df8 Improve 3-way signal timing by explicitly specifying crosswalks. This
fixes a very dramatic problem in the Green Lake map.

Regenerating everything...

Also added total trip time to the prebaked summary, to get a quick sense
if a change net helps or hurts and have a record in version control.
2021-07-06 14:37:50 -07:00
Dustin Carlino
f37e71236f Some fixups to the regenerated data from the past two commits:
- handle when the equiv_pos of a driveway gets too close to the edge of
  another lane
- make the updater workflow handle files from S3 that're a bit older
- remove pathfinding_avoiding_roads
- strip out old vehicle capping from map edit JSON, then fix up
  proposals
- delete old capping API example
- temporarily give up on phinney; it starts gridlocking
- add broadmoor proposal link in-game
2021-07-05 17:51:40 -07:00
Dustin Carlino
f4c8a508da Keep a JSON file with a summary of prebaked simulations, to more easily detect regressions with broken trips. 2021-07-02 10:07:37 -07:00
Dustin Carlino
69152f00ad Fix critical dynamic blockage math bug. Stops some crashes in some cases, including the tests -- which run again. Manually verified the turn goldenfile diff in the UI and regenerated prebaked data. #392 2021-06-21 20:37:11 -07:00
Dustin Carlino
8f199177f5 Upgrade to Rust 1.53
- arrays are now iterable directly
- switch to using BTree{Set,Map}::retain!
- a round of clippy
- regenerate scenarios and prebaked data; not sure why, but there's a
  diff
2021-06-17 23:04:35 -07:00
Rémi Lauzier
1a4b997818 Fix some clippy warnings 2021-06-16 16:21:35 -07:00
Dustin Carlino
18ff0eefc0 Store Turns per Intersection, instead of a massive BTreeMap. #368
Minimal file size savings, but substantial runtime improvement!
2021-06-11 09:40:44 -07:00
Dustin Carlino
9fc79b1089 Use explicit start/endpoints for trips in scenarios. This is necessary
for people that leave one border, then re-enter a different one. #664

Alternative considered: insert a dummy remote trip between the two
borders. We used to do something like this at non-trivial code
complexity expense and having to explain the trip in the UI.

Regenerated all scenarios and prebaked data.

- Modest file size increase, as expected. Montlake scenario goes from
  1.3MB to 1.5, downtown from 37MB to 43MB, all Seattle scenarios from
  280MB to 327MB
- Eyeballed a few of the previously broken trips; they work now!
- Montlake goes from 3127 cancelled trips to just 302!
- No new gridlock, except in Rainier Valley -- disabling that for now
- I discovered missing validation in Poundbury for no-op trips between
  the same building. I'll filter those out and restore prebaked results
  there in a followup.
2021-05-26 14:30:01 -07:00
Dustin Carlino
2dd611fd73 Refine the connectivity check for bus and bike lanes
Down to 12 connectivity problems in Montlake! Now that the dust has
settled, manually check the 3 unit tests and confirm the goldenfile
diffs.
2021-05-25 20:24:11 -07:00
Vinzent Steinberg
446a21696d
Fix most clippy warnings (#646)
* More conventional spelling of acronym identifiers

* `new` -> `new_state`

* Remove redundant field name

* Remove needless `collect`

* `to_controls` -> `make_controls`

* Simplify long if statement

* Fix module inception

* Simplify chained if let

* Return directly instead of creating a binding

* Disable clippy warning about `borrow` method

Implementing the `Borrow` trait instead would result in excessive type
annotations.

* Fix most remaining clippy warnings

* Allow clippy::type_complexity

* Fix bad merge from web editor

* Run cargo fmt

* Suppress large_enum_variant warnings

* Rename FYI state to ShowMessage

* Fix upper_case_acronyms warnings

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 17:31:32 -07:00
Vinzent Steinberg
fd3b0e2a14
Fix compilation failures and most clippy warnings (#642)
* abstutil: Fix compilation failure

* map_gui: Fix compilation

* traffic_signal_data: Fix compilation failure

* map_model: Fix compilation failure

* abstutil: Fix doctests

* abstio: Fix most clippy warnings

* abstutil: Fix most clippy warnings

* collisions: Fix clippy warning

* convert_osm: Fix clippy warnings

* sim: Fix most clippy warnings

* geom: Fix clippy warnings

* kml: Fix clippy warnings

* map_model: Fix most clippy warnings

* fifteen_min: Fix clippy warnings

* game: Fix many clippy warnings

* Disable some noisy clippy warnings

* headless: Fix clippy warnings

* importer: Fix clippy warnings

* map_editor: Fix clippy warnings

* map_gui: Fix clippy warnings

* osm_viewer: Fix clippy warnings

* parking_mapper: Fix most clippy warnings

* popdat: Fix clippy warnings

* santa: Fix clippy warnings

* sumo: Fix clippy warnings

* traffic_seitan: Fix clippy warning

* updater: Fix clippy warnings

* widgetry: Fix clippy warnings

* tests: Fix some clippy warnings

* Fix compilation on stable Rust

* Simplify unwrapping

* Make use of `Entry` more readable

* Fix formatting

* Fix code that was broken in the refactoring

* Apply cargo +stable fmt

* Fix code that was broken in the refactoring, second try

* Remove `Default` impls that are equivalent to `new`

* Remove obsolete clippy wrapper

* Avoid turbofish

* Prefer `unwrap_or_else` over allowing `clippy::or_fun_call`

* Remove redundant `into_iter`

* Fix typo

* Prefer `&& false` over commenting code out

* Fix some clippy warnings

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 08:32:56 -07:00
Dustin Carlino
4d3234ea14 Plumb a flag through the importer to try to consolidate all intersections in a map 2021-05-08 11:34:16 -07:00
Dustin Carlino
8f70f9f9e9 In the city picker, list all cities from data/MANIFEST, whether or not they exist locally. Prompt to download when needed. 2021-04-20 16:10:17 -07:00
Dustin Carlino
4ef04f5bd1 Change road incline calculations to be stored in RawMap. Previously, the
"rise / run" calculation used the trimmed road center-lines, which don't
match up with the elevation at each original intersection point.

Also handle infinity in the output and reduce the resolution of the
query from every 1m to every 5m.

Regenerate all maps due to the map format change. Try bringing in
elevation data for all of Seattle using the LIDAR source, since
the data quality assessed in eldang/elevation_lookups#12 seems to be
similar, and LIDAR is way faster than contours.
2021-03-23 22:47:52 -07:00
Dustin Carlino
ffc4f4222d Remove the old SRTM code, which has always been broken. Remove the elevation from importer config; the new approach will detect the right data source to use automatically using the bbox. #82 2021-03-18 10:14:43 -07:00
Dustin Carlino
95b1d884cf Rename Map::new to be more clear that it should only be used in non-UI
tools. There's one place in the UI that doesn't work on the web!
2021-03-12 06:38:17 -08:00
Dustin Carlino
dd42acdc28 Refactor a CityName::seattle() 2021-03-03 18:08:06 -08:00
Dustin Carlino
603717a560 Remove the separate_cycleways experiment flag. Always import cyclepaths
mapped as separate OSM ways in all maps!!! #330
2021-02-26 14:58:57 -08:00
Dustin Carlino
39f5d50fcd The grand country split. #326
City names are now disambiguated by a two-letter country code. This
commit handles almost everything needed to make this transition. Main
next steps are fixing up map edits automatically and making the city
picker UI understand the extra level of hierarchy.

A little bit of fallout: lakeslice gridlocks again; this regression is
actually from the recent traffic signal changes, but I'm just now
regenerating everything. Will fix soon.
2021-02-13 15:45:59 -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
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -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
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
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
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
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
0b8c86e2c8 Adjust the threshold for what counts as a straight vs right turn from 10
degrees to 30 degrees. It works around the issue in #428, but it doesn't
solve the root cause there, so the unit test is also adjusted to provide
a way to solve the harder problem.

Regenerated all maps accordingly. Many traffic signals tended to
improve, with a straight turn marked protected, instead of permitted as
a "right turn."
2020-12-18 12:06:16 -08:00
Dustin Carlino
c256c5ebee Get a small unit testable repro of #428 2020-12-17 11:11:17 -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
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
8d80668a56 The big cutover: a Scenario's trips are now just start/endpoints and mode, not the old SpawnTrip structure with a bunch of different cases and details picked out. #258
Not regenerating scenarios yet...
2020-11-17 16:28:52 -08:00