Commit Graph

1510 Commits

Author SHA1 Message Date
Dustin Carlino
fc705318a9 Start a simple prediction of how vehicle traffic will be affected by an LTN scheme, based on a travel demand model. Super similar to Ungap's equivalent. 2022-01-23 09:37:45 +00:00
Dustin Carlino
a14d6b3810 Better errors when core Line stuff breaks.
... and plumbing it everywhere
2022-01-18 10:26:33 +00:00
Dustin Carlino
bd340a1970 Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path! 2022-01-17 17:30:51 +00:00
Marcel Dejean
65f086ecb3 PathStep::ContraflowTurn to allow walking turns both ways
* Also implement ContraflowMovement for pathfinder v2
* Change uses of Turn to Turn | ContraflowTurn
* Reverse contraflowturn geometry when tracing pathstep
* Don't start or end a path in a ContraflowTurn either
2021-12-20 23:11:36 +00:00
Dustin Carlino
b45bf869b7 Populating the map_model transit representation from the raw GTFS data. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
fc674df9ac Cleaning up the map_model transit representation a bit. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
6e11c386ac Mechanical refactor: bus {stop, route} -> transit. #372
(Mostly renaming map_model code everywhere, not yet sim layer and above)
2021-12-07 03:10:38 -08:00
Dustin Carlino
e6f60168e1 Totally remove CmdArgs! No more uses. #745 2021-11-11 13:02:12 -08:00
Dustin Carlino
32fc46831b Draw arrows to show entrances/exits to a LTN.
(and rename Line::reverse for consistency with PolyLine)
2021-10-29 12:25:30 -07:00
Dustin Carlino
2ee2b991f4 Convert other non-UI things from CmdArgs to structopt. #745
structopt is forcing some hacks, but oh well.

There are some docs to update in the other repo, will get to that
soon...
2021-10-26 12:02:40 -07:00
Dustin Carlino
0464ab4499 Convert the headless server from CmdArgs to structopt. #745 2021-10-26 11:10:08 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
be9ba5a80e Clean up the absurd number of Seattle maps. Ideally we'd have some way
to further organize them by purpose, but for the moment, two problems:

1) the city picker UI is getting way too crowded
2) on native, the initial download is up to 145MB

Removing:

- the 3 Aurora maps and Green Lake, added for the ARC workshop, but no
  longer the most active of collaborations
- Ballard is now subsumed by central Seattle -- the only advantage would
  be keeping its full scenario of walking and transit trips, but the
  simulation is horribly gridlocked there anyway
- the Rainier Valley map, originally meant for an SNG traffic light
  timing study
- the larger udistrict map
2021-10-11 14:37:59 -07:00
Dustin Carlino
309db511c2 Record timing while applying map edits. Even in release mode, this is a long inexplicable pause for large-scale bike network changes. A loading screen is better. 2021-10-05 11:35:37 -07:00
Dustin Carlino
eb9c4df3f2 Add a button to export throughput data to CSV 2021-10-04 08:09:00 -07:00
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
c4d38ca591 A humble start to showing an alternate, low-stress route. #743 2021-09-27 13:13:11 -07:00
Dustin Carlino
3945528cf5 Start a 4th mode for the bike network tool: predicting impact, aka, mode-shift. #448
Just load the scenario and scrape data from it, to start.
2021-09-20 10:07:58 -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
7f86fe5ce6 Fix the run_scenario tool, try to use it for profiling 2021-09-06 09:54:58 -07:00
Dustin Carlino
9300470c6b Lane offset comes for free now 2021-09-05 19:53:10 -07:00
Dustin Carlino
442523ae6c Simplify some lane lookups that just needed to find the parent 2021-09-05 19:53:10 -07:00
Dustin Carlino
112bc38e0c Get rid of the now redundant lanes_ltr 2021-09-05 19:53:10 -07:00
Dustin Carlino
4c46510342 Cleaning up a few APIs, now that lanes belong to roads... 2021-09-05 19:53:10 -07:00
Dustin Carlino
0f4a31e915 Moving lanes from a BTreeMap to be stored inlined in their parent Roads. #746
Somewhat invasive API change internal to map_model, but not much impact
elsewhere.

Not regenerating anything yet.
2021-09-05 19:53:10 -07:00
Dustin Carlino
cea0ad2541 Change LaneID to encode (RoadID, offset), still in one u32. #746
Not regenerating yet.
2021-09-05 19:53:10 -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
b397f97a12 Splitting Aurora study area into 3 maps, actually 2021-08-23 19:38:36 -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
71b54b3ed7 Create two study areas for the Aurora project. Can fine-tune or split
boundaries later, but this roughly captures the interesting bits.
2021-08-20 16:31:08 -07:00
Dustin Carlino
90a1d2ff83 Initially launch with edits loaded remotely 2021-08-16 16:00:01 -07:00
Dustin Carlino
1d7149c18b Don't crash in the activity model generators if a map has no borders. This currently happens with Overpass imports. #717 2021-07-25 10:30:06 -07:00
Dustin Carlino
1d7c8ce89c Opt Tempe into infinite parking always. #672 2021-07-21 15:13:13 -07:00
Dustin Carlino
f6a94e8a58 Allow DrawWithTooltip to return custom data instead of string labels.
CloneableAny revived from e35c69f6f3
2021-07-18 14:14:19 -07:00
Dustin Carlino
10fdaa8e92 estimate_duration already knows the mode, from the PathRequest 2021-07-14 12:38:19 -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
fe64501e6d Fix pedestrian speeds on inclines. Those walking contraflow on a
sidewalk were using the wrong incline!

Not regenerating data yet (need to regenerate all maps)
2021-07-10 17:14:10 -07:00
Dustin Carlino
da704b4546 Extend the parking thought bubbles to handle people climbing steep hills.
(And some clippy fixes)
2021-07-10 17:14:10 -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
06ec73b67f Fix a bug with both regular and infinite parking. If two cars enter a
lane and both want to park in the same building or parking lot, they're
assigned the same spot. When the second one tries to use it, they pick
another. Now the second will still consider spots that they're directly
next to. #688
2021-07-05 22:27:21 -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
a0dcc255c3 Rip out all congestion capping code. #325
This collaboration is abandoned, the code slows down refactoring, and
if we started this idea again today, it'd be better to do it from
scratch anyway.

Regenerating everything.
2021-07-05 11:15:31 -07:00
Dustin Carlino
6039063d28 Add a debug tool to dump JSON for different objects and open up with an external viewer. [rebuild] [release]
And fix some clippy problems
2021-07-04 15:32:49 -07:00
Dustin Carlino
d314163f13 Finally regenerate prebaked data, with left turns out of driveways fully
supported!

- Had to skip over center turn lanes -- we're approaching the point where
  we can model those realistically.
- Carefully deal with static blockages near the start of a lane to avoid
  spillover. Observed near b3810 in greenlake. It's time to make equiv_pos
  smarter...
2021-07-04 14:34:20 -07:00
Dustin Carlino
0211094689 Create static blockages for off-side driveway exits. Verified correct
for all combinations of on/off-side exits and cutting across lanes by
using the static blockage visualizer.
2021-07-04 14:34:20 -07:00
Dustin Carlino
646e85d278 Optionally draw static and dynamic blockages. This is immensely useful
for working on exiting from driveways and lane-changing. #382
2021-07-04 14:34:20 -07:00
Dustin Carlino
95ffa62218 Fix the unparking position. When we exit a driveway in EITHER direction,
we need to adjust the start position to account for the vehicle's
length.

Also add a very convenient debug tool to understand positions along
lanes.

This probably breaks static blockages; I'll check into that next.
2021-07-04 14:34:20 -07:00
Dustin Carlino
bf316fa99c Fix a crash in the trip info panel. If you happen to open a trip of a
car waiting to spawn, its total path distance is briefly 0.

Also silence the lane-changing info for the moment, until work resumes
there.
2021-07-03 08:28:16 -07:00
Dustin Carlino
4fd86c8a41 Entering edit mode is slow on large maps, because clearing the simulation recreates parking state for every building. Parallelize it to speed it up at least a bit. 2021-07-02 11:47:05 -07:00
Dustin Carlino
866ecd5f88 Fix a bug in efaf6085e4 that was using walking paths for vehicles. Now prebaked data doesn't budge.
And add some more timing to demonstrate why editing a single lane in a
huge map is so slow...
2021-07-02 11:25:02 -07:00