Commit Graph

1532 Commits

Author SHA1 Message Date
Dustin Carlino
738f50f5b8 Prevent pedestrians from endlessly cutting off cars at a stop sign by
limiting how long a crowd can enter a crosswalk. #517

Removing Tehran from prebaking; it starts gridlocking. I didn't
investigate why; making SMP realistic unfortunately takes priority right
now.
2022-05-01 17:02:14 +01:00
Dustin Carlino
19447b5a26 Create a layer to show where problems are occurring more or less. #859 2022-04-29 14:08:52 +01:00
Dustin Carlino
4b446c754e Make leader agents call ahead before starting a turn. Don't make use of
this yet. #517

Dump the intersection state to JSON too for the UI debugger, to inspect
easily.
2022-04-28 12:50:23 +01:00
Dustin Carlino
91ccd29f6d On wide or narrow sidewalks, draw pedestrians at the edges -- stop
hardcoding a sidewalk thickness
2022-04-24 09:55:24 +01:00
Dustin Carlino
5890e600d3 Refactor pedestrian radius 2022-04-24 09:38:19 +01:00
Dustin Carlino
651a1f571a Slow down pedestrians when they're on a crowded sidewalk. #859 2022-04-23 21:18:26 +01:00
Dustin Carlino
9b4abae174 Fix a treachurous bug that was crashing the simulation, first uncovered
by chance in #870.

A vehicle exits a driveway and blocks a lane on its way out. When we try
to clear the static blockage, the queue calculation recurses to resolve
distances on the queue where that vehicle is entering. But since we
temporarily don't have the car in the list of cars (for the borrow
checker), it was crashing.

One of those "2 hours to figure out, 30 seconds to fix" bugs.
2022-04-23 20:03:28 +01:00
Dustin Carlino
7f50baa4c8 Don't crash when following a bus that's finished. #372 [rebuild] [release]
The UX of bus info panels is terrible, but just unbreak this.
2022-04-17 17:31:59 +01:00
Dustin Carlino
e1f27ec1f9 Add a smoke test that PT doesn't crash the simulation, and relax a check
to get this test to pass. #372

Now regenerate the maps with PT
2022-04-17 17:14:26 +01:00
Dustin Carlino
237f00d1cc Centralize logic in TransitRoute::all_path_requests. Stop repeating it
in the sim transit layer. Simplify the sim transit state accordingly.

Along the way, temporarily sacrifice tracking the paths taken by transit
passengers -- it wasn't correct before.

Not regenerating maps yet.
2022-04-17 11:13:05 +01:00
Dustin Carlino
d386948a13 Import GTFS for São Paulo 2022-04-14 15:19:29 +01:00
Dustin Carlino
27e94662e8 Add a regression test to make sure A/B testing has no spurious diffs. #868
I made sure the test fails before the fix from
b89e716d0c
2022-04-09 18:17:24 +01:00
Dustin Carlino
ca5166107b Disable parking for #861 to make it slightly easier to get meaningful results 2022-02-22 09:37:08 +00:00
Dustin Carlino
2e8d3970f5 Split out a CLI command to prebake one scenario for #861 2022-02-22 08:55:40 +00:00
Dustin Carlino
b93850406f Revive efforts on the generic desire line -> scenario pipeline. Include desire lines for zones that don't intersect the map boundary at all, with very simple border intersection snapping.
Note this changes all UK scenarios, but I'm not going to regenerate any
of them and put in S3 until I'm getting decent results at least in
Manchester.
2022-02-02 16:28:49 +00:00
Dustin Carlino
0058f99da2 Mechanical rename of TripEndpoint::Bldg to ::Building, mostly to kick off a [rebuild] [release] 2022-01-30 18:27:36 +00:00
Dustin Carlino
638e93c36a Stop re-exporting stuff from synthpop in sim 2022-01-28 13:13:43 +00:00
Dustin Carlino
f171ddcb73 Get everything to build again... 2022-01-28 13:13:43 +00:00
Dustin Carlino
9845d9cae1 Implement the two public TripEndpoint methods in synthpop, but without needing to drag in SidewalkSpot and DrivingGoal 2022-01-28 13:13:43 +00:00
Dustin Carlino
3f8689b9ea Rearrange methods defined on Scenario that're only for the sim crate 2022-01-28 13:13:43 +00:00
Dustin Carlino
231acf47a2 Step 2: try to get the sim crate to build again
Scenario and TripEndpoint have some methods defined on them that're
specific to sim. Do we rearrange these methods entirely or make some
kind of wrapper types?
2022-01-28 13:13:43 +00:00
Dustin Carlino
e45a5181db Split the "input" layer of the sim crate into a synthetic population
crate, in preparation for future focus on travel demand models that
incorporate more per-person info.

Note: I'm also a bit tempted to try to further split sim into a
"high-level" layer that orchestrates spawning and different legs of a
trip, from the "low-level" layer that moves pedestrians and vehicles.
That could _possibly_ pave the way for someday using a different traffic
simulation backend with more realistic movement mechanics.

Step 1: just get the synthpop crate to build
2022-01-28 13:13:43 +00:00
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