Dustin Carlino
8e6aa08d59
Breakdown agent counts much more in the tooltips. #331
2020-10-21 14:26:59 -07:00
Dustin Carlino
3d1ca3af9e
Handle live map edits that rip away parking while a car is actively parking in it. #312
2020-10-21 13:00:49 -07:00
Dustin Carlino
adcd0f65fe
Clean up some of the trips state when abruptly deleting agents. #312
2020-10-21 12:32:14 -07:00
Dustin Carlino
d98c5bc6bc
Better error message when the GPU doesn't support the requested mode. #103
2020-10-21 12:19:06 -07:00
Dustin Carlino
3c81480550
Make sure DrivingSimState has the correct queues after live map edits. #312
2020-10-21 12:00:56 -07:00
Dustin Carlino
011ed8c7cf
Handle agents deleted mid-turn. #312
2020-10-21 11:17:27 -07:00
Dustin Carlino
035b8ee96f
Fix alpha colors on the web by making the background canvas black instead of white. https://webglfundamentals.org/webgl/lessons/webgl-and-alpha.html has other workarounds, but I can't figure out how to control the webgl context parameters.
...
Also improve the loading message that appears before wasm has taken
over.
2020-10-21 10:50:40 -07:00
Dustin Carlino
8bc6b09b10
Upgrade to rust 1.47. No relevant changes except that stack traces hide some useless boilerplate now.
2020-10-21 10:25:55 -07:00
Dustin Carlino
a579cb4f74
Add a sanity check to catch live map edit bugs faster. Deleted turns
...
aren't getting cleaned up properly.
Also fix broken headless build, woops.
2020-10-21 10:23:56 -07:00
Dustin Carlino
e9f9d3884b
Simplify the traffic seitan tool's logging and make it easier to find
...
the last savestate and edits of a crash.
2020-10-21 09:59:17 -07:00
Dustin Carlino
4760d6b2cf
Fix one bug with live edits, found using traffic seitan. Agents may be
...
deleted in the middle of a turn.
2020-10-21 09:40:45 -07:00
Dustin Carlino
8a1525ddfa
Lift parsing of --scenario_modifiers to a more common place, so it can be done in run_scenario too. #368
2020-10-21 08:35:38 -07:00
Dustin Carlino
ead7960112
Collapse one case of possible nested loading screens. Slightly simpler
...
code, but this doesn't solve the bug of a second squished loading screen
for scenarios.
2020-10-20 18:24:37 -07:00
Dustin Carlino
ebc632d9f8
Add a flag to skip sim analytics, to work even faster on large scenarios. #368
...
On the downtown benchmark, now we drop from 96s to 88s. Since we don't
need to collect analytics to debug gridlock on this map, another huge
win!
2020-10-20 16:38:28 -07:00
Dustin Carlino
45e6a79e7d
Use a HashMap to store driving queues. Modest speedup on the downtown
...
benchmark from ~101s to ~96s. #368
2020-10-20 16:23:18 -07:00
Dustin Carlino
36c1ce02ac
Fix how scenario modifiers cancel trips, from
...
c435d3fce2
. If we cancel one trip, have to
cancel all others after that.
2020-10-20 15:39:27 -07:00
Michael Kirk
6025d89598
Mkirk/perf 2 ( #370 )
...
* perf: return Line iterator rather than Vec
avoids allocating vector memory, cleans up some call sites too.
2020-10-20 11:51:00 -07:00
Dustin Carlino
d8910ad04f
Build a quadtree of unzoomed agents while drawing, to later speedup mouseover. This seems to make performance fine in debug mode, so get rid of the flag guarding of this feature! [rebuild]
2020-10-20 11:38:38 -07:00
Dustin Carlino
bc3110ba9d
Add sidewalk borders to the new color scheme. Possibly need to rethink
...
sidewalk geometry again for this.
2020-10-20 11:28:45 -07:00
Dustin Carlino
177484d2b6
A few adjustments to the mapbox-ish color scheme: highway marking color, solid center lines
2020-10-20 10:51:03 -07:00
Dustin Carlino
af70904377
Document as much of geom as I can before my battery dies. And a mechanical API changes, Angle::new_degs -> Angle::degrees
2020-10-19 19:55:05 -05:00
Dustin Carlino
262c48721b
Track some very basic stats on how many events we're processing. #368
...
Didn't run the benchmarks yet, but hopefully this should't slow things
down.
2020-10-19 19:12:19 -05:00
Dustin Carlino
c435d3fce2
Consolidate two scenario modifiers, allowing all walking trips to be cancelled, for #368
2020-10-19 18:03:17 -05:00
Dustin Carlino
87d233299a
Use a HashMap instead of a BTreeMap in Scheduler's internals. Doesn't
...
affect determistic simulation, but yields a crazy speedup. #54
- 8 hours of downtown: 122s to 102s!!!
- prebake: 181s to 160s
2020-10-19 16:30:41 -05:00
Michael Kirk
82827bd60b
perf: only allocate vector for inner_get_car_positions
when necessary ( #369 )
2020-10-19 14:58:16 -05:00
Dustin Carlino
bb669b7c1a
Dump a savestate in the run_scenario tool when interrupted. Useful for
...
investigating why downtown has 45k live agents by 5pm... #368
2020-10-19 14:52:26 -05:00
Dustin Carlino
21e30aac94
Stop drawing arrows in the trip info panels to show where off-map trips begin/end. These were added way back when modelling remote trips for the pandemic sim, but they're just noisy otherwise.
2020-10-19 14:29:36 -05:00
Dustin Carlino
3f69b76bae
Make the 'cancelled' and future trip info panels closer to the others, with buttons to jump to the start/end point
2020-10-19 14:27:58 -05:00
Dustin Carlino
954aab953e
Add an "abstract" camera angle to just show buildings as uniform shapes.
...
A place to play around with showing symbols, not real geometry.
2020-10-19 13:14:44 -05:00
Dustin Carlino
913dd0c4db
Try Yuwen's new colors for the 'faded zoom' color scheme
2020-10-19 12:52:02 -05:00
Dustin Carlino
0a64cda947
Distinguish cancellation reasons for capped trips better. #325
2020-10-17 09:39:37 -05:00
Dustin Carlino
0259750eb3
Add a flag to detect drivers who're destined to pass through a currently delayed area. #325
2020-10-17 09:22:49 -05:00
Dustin Carlino
06f088afcc
More clearly handle the different strategies for filesystem access. On
...
native, only look at local files -- so now importing new maps locally
works again. On web, look at statically bundled files AND remote files
declared through the manifest.
In the future for native, we will also want to sometimes show remote
files available and integrate part of the updater, but only in a
specific view, not in general for all files.
2020-10-16 13:44:05 -05:00
Dustin Carlino
a18f494416
Don't crash on the web when loading a nonexistent file. This now happens, because we try to load prebaked results for synthetic scenarios.
2020-10-16 13:38:39 -05:00
Dustin Carlino
32b11f03e8
Avoid cloning a car's path when creating it. #368
...
- 8 hours of downtown: 135s down to 126s
- prebaking: still hovering around 3m4s, plus or minus a few seconds
2020-10-16 13:12:19 -05:00
Dustin Carlino
e66b058439
Disable a simulation sanity check that happens frequently and hasn't had
...
problems in a long time. Marginal speedup of a few seconds. #368
2020-10-16 12:29:46 -05:00
Dustin Carlino
491f4bbffe
Speed up the simulation by replacing BTreeMaps with a simple Vec lookup. #368
...
No behavioral changes. Dramatic performance boost:
- 8 hours of downtown: 170s down to 135s
- prebaking: 3m33s down to 3m4s
2020-10-16 12:10:05 -05:00
Dustin Carlino
422882c03b
Ditch cpuprofiler in favor of cargo flamegraph. Add a tool that just
...
runs a scenario headlessly, since that's easier than sending a few curl
commands to the API. #368
2020-10-15 17:12:38 -05:00
Dustin Carlino
b3525f95a2
Enable profiling in the headless server. #368
...
(Although actually, I'm liking cargo flamegraph better than cpuprofiler.
Might rip out the support for cpuprofiler.)
2020-10-15 16:21:57 -05:00
Dustin Carlino
39ec4a13de
Import forests as park areas (for Salzburg) and add a warning about JOSM. #366
2020-10-15 15:10:12 -05:00
Dustin Carlino
4a197fa13d
Until there's a faster implementation, just flag-guard selecting unzoomed agents
2020-10-15 14:58:07 -05:00
Dustin Carlino
38394c4a08
Comment some code to clarify things in #365 , and switch the color for
...
selecting unzoomed agents
2020-10-15 14:58:07 -05:00
Dustin Carlino
028d1df62c
Allow selecting and clicking unzoomed agents. [rebuild]
2020-10-15 14:58:07 -05:00
Dustin Carlino
1e0d8536a4
Fix #367 by making all constructors of SandboxMode appropriately defer
...
work that must happen after the map/scenario are loaded.
2020-10-14 17:43:28 -05:00
Dustin Carlino
e7fb9b1a4a
Handle the info panel rewind-sim case for #367 . I'm increasingly happier
...
with how the async reactions to loading SandboxMode are.
2020-10-14 17:24:39 -05:00
Dustin Carlino
81dae1e39c
Slightly simplify some plumbing of variables through nested closures, by
...
remembering that FnOnce exists
2020-10-14 15:36:08 -05:00
Dustin Carlino
5ef48a5d1c
Express the SandboxMode constructor as a full state machine, with the
...
ability to defer things like pushing the time warp state onto the stack
of states. This fixes the edit mode case of #367 , but other callers of
SandboxMode::new still need updating.
2020-10-14 15:13:10 -05:00
Dustin Carlino
20b4f15e86
Another attempt to write down a sort of roadmap for modularizing abst
2020-10-14 13:14:53 -05:00
Dustin Carlino
c0513a3d64
Reduce time to park/unpark offstreet when --infinite_parking is used.
...
Downtown forms gridock just from everyone pouring into Harborview! The
point of --infinite_parking is to simplify the sim by not modelling the
impact of parking. #368
2020-10-14 12:40:26 -05:00
Dustin Carlino
84a65c293b
Make it easier to test scenario modifiers by specifying them on the CLI
2020-10-14 12:16:38 -05:00