Commit Graph

1232 Commits

Author SHA1 Message Date
Dustin Carlino
178404bd0e Remove unused RNG stuff from abstutil, and start to think about how to tease it apart a bit 2020-10-05 11:48:29 -07:00
Dustin Carlino
8e49aac42f Make traffic seitan close roads that agents are about to use, causing a
crash. And start to figure out the debugging story.
2020-10-05 08:49:16 -07:00
Dustin Carlino
b7818a52be Capture the reason for cancelled trips, for #312 2020-10-03 15:35:29 -07:00
Dustin Carlino
9ccbf40dba Merge the concept of cancelled and aborted trips, in preparation for storing the reason for cancellation, for #312 2020-10-03 10:41:53 -07:00
Dustin Carlino
ffdedcb0a7 When multiple source lanes can turn left* to multiple destination lanes,
only allow the leftmost source lane to turn to any destination lane. As
a future improvment, need to handle multiple explicitly tagged left turn
lanes, but this gets closer to reality, particularly helping some crazy
maneuvers along Mercer in downtown.

*or right

Also had to update lanes along Madison and fiddle a bit to keep
lakeslice running. Spotted some major traffic signal bottlenecks due to
stage generation falling back, will iterate on that separately.
2020-10-03 09:40:15 -07:00
Dustin Carlino
cfa203a4d3 Add an API call to dump all traffic signals' current state 2020-10-02 21:03:29 -07:00
Dustin Carlino
f73d9da080 Conjure Traffic Seitan, a tool to make byzantine live map edits, to cause chaos and flush out bugs... 2020-10-01 18:24:35 -07:00
Dustin Carlino
fd460a2f43 Fix blackholed buildings with --infinite_parking. Before, they were just
skipped outright. Now they redirect to a reasonably close building that
isn't blackholed. #329

(For context, https://dabreegster.github.io/abstreet/map/index.html#connectivity
explains "blackhole")

I'm increasingly convinced I made the wrong decision to split the
normal/infinite parking implementation. It's low-priority, but I'll try
consolidating them later.
2020-10-01 11:57:30 -07:00
Dustin Carlino
c36f8026f0 Remove the old per-lane delay layer in favor of the new per-agent one 2020-09-30 09:19:24 -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
de4f5c7768
Add a layer to color unzoomed agents based on their current delay, to help debug gridlock. Something like this used to exist as a first-class way to change unzoomed color schemes, but until we have more ideas about showing agent intent on the minimap, just implementing this as a separate layer. (#353) 2020-09-29 11:51:37 -07:00
Dustin Carlino
e1b079900a Don't touch SimFlags in headless at all 2020-09-24 17:10:07 -07:00
Dustin Carlino
c9fbf67989 Rearrange headless API to explicitly apply edits at the same time as
specifying the scenario to run. #325
2020-09-24 13:14:49 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
d77271f9d8 Export trip times to CSV [rebuild] 2020-09-23 13:06:22 -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
Dustin Carlino
3cc6a8ce12 And finally, a UI to tune offset between two signals! [rebuild] 2020-09-19 11:10:45 -07:00
Michael Kirk
08f330cfad track worker capacity of commercial buildings 2020-09-16 16:43:11 -07:00
Dustin Carlino
e28052c5be Reorganize sim module slightly, pull queries into one place 2020-09-16 10:15:30 -07:00
Dustin Carlino
1331b629aa Track how long cars have been parked in one spot 2020-09-16 09:42:02 -07:00
Dustin Carlino
0fc4c04171 Turn some spammy println's into silenceable alerts 2020-09-15 14:44:36 -07:00
Dustin Carlino
716f1f023f Don't seed parked cars in blackholed buildings 2020-09-15 13:27:56 -07:00
Dustin Carlino
c0e530645b Handle blackholes and reserving 2020-09-15 13:27:56 -07:00
Dustin Carlino
fcc05afda7 Add a flag to use the infinite parking sim. Start to test for real... 2020-09-15 13:27:56 -07:00
Dustin Carlino
a70fa0530a Start a new parking impl for infinite offstreet parking. Unused 2020-09-15 13:27:56 -07:00
Dustin Carlino
6439c026ea Set up the boilerplate for two parking impls 2020-09-15 13:27:56 -07:00
Dustin Carlino
82ea851a4e Make the Go API example track the same people through different cancellation runs, evaluating how much time the 'survivors' are gaining or losing 2020-09-14 18:56:52 -07:00
Dustin Carlino
d68273086b Autosave even the untitled edits!
Possibly when the player explicitly says "discard proposal", we should
actually delete the file.
2020-09-14 14:25:09 -07:00
Dustin Carlino
ce4e429648 Rename edits -> proposals, at least in the UI layer. 2020-09-14 12:52:06 -07:00
Dustin Carlino
faf1379062 Add a new experimental layer to show the distance between every parked car and its owner 2020-09-14 09:18:24 -07:00
Dustin Carlino
037e22e69e Cleanup last few things for left-hand maps. Fixes #311! 2020-09-11 14:17:31 -07:00
Dustin Carlino
d88ccf98b7 Make pedestrians walk on the left side of the sidewalk in the UK. #311 2020-09-11 13:55:26 -07:00
Dustin Carlino
d56d1fd0e3 Show trips affected by congestion capping in the trip table and info
panels
2020-09-11 11:21:39 -07:00
Dustin Carlino
65569c7f56 When a car trip violates a congestion cap, reroute around the problem
instead of aborting the trip.
2020-09-11 11:21:39 -07:00
Dustin Carlino
2895d50a1e
Add tooltips to the agent meters, and stop showing both buses and passengers. Fixes #239 (#323) 2020-09-11 11:08:26 -07:00
Dustin Carlino
f1b1263ee2 Fix congestion capping impl when RESERVE_WHEN_STARTING_TRIP is enabled. It wasn't reseting the counter every hour. 2020-09-10 14:29:06 -07:00
Michael Kirk
c11cecf1ac
log cleanups (#321) 2020-09-10 14:20:35 -07:00
Michael Kirk
f685af47a5
proletariat robot considers resident/worker capacity (#320)
proles: account for work capacity

previously all residents went to work on the map, but if the
neighborhood is mostly residential that meant they were "competing"
heavily for the scarce jobs available on the map.

with this commit, we do a better job of spreading worker/residential
demand to account for what is available, and fill in the gap with
off-map trip origins/desitinations.

e.g. if a neighborhood is mostly residential, we have folks commute off
of map. If a neighborhood is mostly commercial, we have folks commute
into the map.
2020-09-10 14:04:20 -07:00
Dustin Carlino
8cc61aafc8 Add a method to the API to modify a scenario. No callers/tests yet. 2020-09-09 19:52:15 -07:00
Dustin Carlino
1388694eec Flag off the live map edits, since it's going to take lots more work to stabilize this, but git branches are scary to maintain for more than a few days. #312 2020-09-09 15:03:14 -07:00
Dustin Carlino
220f33e2ec Abort cars bound to park on edited lanes. #312 2020-09-09 15:03:14 -07:00
Dustin Carlino
53f35f5de1 Nuke pedestrians walking to deleted cars. #312 2020-09-09 15:03:14 -07:00
Dustin Carlino
39290f899c Handle some of the live changes to parking by deleting parked cars on
edited lanes. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
61acf25b8e Initialize intersections converted live to traffic signals. #312 2020-09-09 15:03:14 -07:00
Dustin Carlino
d8011a90f4 Handle live edits by just aborting any current trips that cross an
edited road or closed intersection. #312

Along the way, refactor more context plumbing in DrivingSimState.
2020-09-09 15:03:14 -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
193a3b1515 Restructure the trip mode choice in one of the activity models to more clearly branch based on trip distance, for #227 2020-09-04 11:15:17 -07:00
Dustin Carlino
f610c66572 Remove the weird shifting/angle inversions from DrivingSide. First step
of #311. Tested to not break righthand maps.
2020-09-04 10:01:06 -07:00
Dustin Carlino
74aca40c0c
Mechanicallyish rename TurnGroup -> Movement for #197, as decided in (#306)
https://github.com/dabreegster/abstreet/pull/302#discussion_r479571931
2020-08-29 15:18:54 -07:00
Dustin Carlino
a36ef99c06
Rename Phase -> Stage, to be more in line with standard traffic signal (#302)
controller terminology. Part of #197.

Holding off on touching PhaseType and all of the serialized
seattle_traffic_signals format, since this will all change in Kyle's PR
anyway.
2020-08-28 17:19:23 -07:00