Commit Graph

662 Commits

Author SHA1 Message Date
Dustin Carlino
be71aa42fc remove old unused get_unzoomed_agents, always return details. may be a little slower than the other, but it's worthwhile to prioritize optimizing the richer representation instead of maintaining awkward dupe code 2019-08-18 15:08:02 -07:00
Dustin Carlino
dd28afcd29 making all AgentColorScheme values work the same, with the same caching 2019-08-18 15:05:22 -07:00
Dustin Carlino
9d58ee12a4 properly merging nearby pedestrians by intervals of dist_along 2019-08-18 14:32:07 -07:00
Dustin Carlino
d0d7bb79e3 color unzoomed agents by distance remaining 2019-08-16 16:25:27 -07:00
Dustin Carlino
a9267c76c7 debug tooltip showing how far an agent has traveled and how much
remains. seems to have small perf impact on initially calculating paths.
:(
2019-08-16 15:43:20 -07:00
Dustin Carlino
bbc4492205 be able to toggle off block-the-box protection. initial findings:
sometimes the protection makes things worse!
2019-08-16 13:59:07 -07:00
Dustin Carlino
a5b73c060a make savestate_every a flag again 2019-08-16 13:34:38 -07:00
Dustin Carlino
3cebc3cc44 try using freeform policy at all intersections, to see how it affects gridlock 2019-08-16 11:17:27 -07:00
Dustin Carlino
4e83f492d8 upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps 2019-08-15 12:14:35 -07:00
Dustin Carlino
a3cd03a5bc rephrase time_since_last_turn as time_spent_blocked, so things like pedestrians walking on long roads don't show up as spurious gridlockedness 2019-08-13 14:26:45 -07:00
Dustin Carlino
4c7c9156d0 label buses with route number! 2019-08-13 12:50:14 -07:00
Dustin Carlino
6950c22394 simplify rules for starting a turn through a stop sign. should retain priority, but be opportunistic when higher-ranked agents are actually blocked 2019-08-12 14:43:13 -07:00
Dustin Carlino
784e076aff fixes for 'dont block the box'... handle cars vanishing at borders 2019-08-12 14:14:15 -07:00
Dustin Carlino
51cfd49a43 unstick a poor pedestrian who couldn't cross a SharedSidewalkCorner in
the signal time. be reasonably loud when a turn is impossible to finish
in the cycle duration.
2019-08-12 12:37:29 -07:00
Dustin Carlino
a37b3fe58c part 1 of of 'dont block the box'. disabled, because something's broken,
but a solid start.
2019-08-11 19:24:13 -07:00
Dustin Carlino
b8489cbea8 switched sim scheduler to a proper BinaryHeap + tracker for valid time
of a command. approximately 3x speedup in release mode -- simulating
midnight -> 5am for full psrc day on 23rd goes from ~30s to ~9s!!!
further optimization definitely possible
2019-08-09 16:09:13 -07:00
Dustin Carlino
950fb65bea visually expose time since last completed turn 2019-08-07 10:37:25 -07:00
Dustin Carlino
04566efbd9 tracking time since last turn completed. want to expose this in the
unzoomed view, but major perf regression from plumbing it back...
2019-08-06 15:57:15 -07:00
Dustin Carlino
c64243cd4f remove slow, useless ShowActivity plugin 2019-08-06 15:22:51 -07:00
Dustin Carlino
bf5c45cd72 menu to load any savestate 2019-08-06 13:18:34 -07:00
Dustin Carlino
1ff4933f6a unblock agents at stop signs in a few cases 2019-08-06 11:56:46 -07:00
Dustin Carlino
e5850dcc7b fix crash in trip_status for border trips 2019-08-06 09:45:44 -07:00
Dustin Carlino
77c01580f1 refactoring path references... 2019-08-04 17:11:33 -07:00
Dustin Carlino
27e933fbf8 replace small_spawn with something to instantiate any scenario for the map 2019-08-04 08:18:53 -07:00
Dustin Carlino
4a9a40c09f cycle indices got out of sync easily. no need to store them at all. 2019-08-02 16:25:22 +02:00
Dustin Carlino
334081b844 very basic tool to explore an agent's full trip 2019-06-27 11:58:55 -07:00
Dustin Carlino
ab088479dd use bincode, not json, for savestates. add loading screens around saving/loading 2019-06-27 09:56:04 -07:00
Dustin Carlino
284a0f8c69 dont start crossing a traffic signal if the timer will run out. optimistically move at full speed. 2019-06-20 15:36:31 -07:00
Dustin Carlino
5a3862dda0 expunge the concept of traffic signals being in overtime. not realistic to how people drive, the current rules allow progress without impacting safety. also disable gridlock detection -- noisy results, easier to visually spot, and slow. 2019-06-19 14:51:09 -07:00
Dustin Carlino
1835155a47 dont recalculate pathfinder after every map edit; just once at the end 2019-06-18 14:28:14 -07:00
Dustin Carlino
b2874193ec limit the amount of realtime spent on sim step when running live. that way, if speed is too high, the UI doesnt seem to just freeze 2019-06-14 12:28:13 -07:00
Dustin Carlino
0acfc84c3c browse trips in scoreboard 2019-06-13 17:19:50 -07:00
Dustin Carlino
8b5690c1a4 now actually plumbing data for scoreboard 2019-06-13 14:46:28 -07:00
Dustin Carlino
e0edc4851d starting a blank scoreboard for sandbox mode. removing old defunct attempts at
score stuff first...
2019-06-13 14:06:35 -07:00
Dustin Carlino
4e2d16af29 consistently using file extensions of .json and .bin, merging duplicate abstutil io functions accordingly 2019-06-11 14:30:11 -07:00
Dustin Carlino
3ab49fd795 use a loading screen and timer when jumping forward large amounts 2019-06-10 12:32:54 -07:00
Dustin Carlino
c76738a678 upgraded to rustc 1.35, fixing a few cases of https://github.com/rust-lang/rust/issues/59159 2019-06-09 14:09:27 -07:00
Dustin Carlino
8eb03b81c3 remove edits_name from SimFlags and refactor loading MapEdits by name. fixes bug where quitting an a/b test breaks loading other maps by retaining edits_name 2019-06-08 16:32:10 -07:00
Dustin Carlino
d0de5d8bd6 make sim.get_stats actually fast; why was I ever doing the other way? 2019-06-08 13:05:29 -07:00
Dustin Carlino
7d4df3df8e do a/b test setup in one loading screen timer 2019-06-07 11:04:16 -07:00
Dustin Carlino
c29769a6b4 print bus stops and routes nicely in OSD 2019-06-06 15:31:59 -07:00
Dustin Carlino
5ab5b7b3d3 actually apply scenario name when instantiating to sim run name, so savestates look nice. fix find next/prev savestate to not require exact current match -- why did I ever do that? 2019-06-06 11:55:49 -07:00
Dustin Carlino
df88486b5e better default for run name when there are scenarios 2019-06-05 17:23:04 -07:00
Dustin Carlino
4f6cb2db60 fixed bug with UpdateLaggyHead's blind retry 2019-06-05 17:08:45 -07:00
Dustin Carlino
0923bfd1ac write scenarios in binary, not json. -shrug- 2019-06-05 13:32:02 -07:00
Dustin Carlino
b2ad0b5ae7 converting PSRC trips to a repeatable scenario. along the way,
parallelizing and refactoring a bit of psrc stuff
2019-06-05 12:58:06 -07:00
Dustin Carlino
c8846b9e74 color unzoomed agents by mode, not stuckness 2019-06-04 18:38:26 -07:00
Dustin Carlino
12d981c654 speed up initial trip spawning by not constantly maintaining an in-order priority queue 2019-06-04 17:37:53 -07:00
Dustin Carlino
69a7b92499 make headless use something custom, remove Benchmark. oops, and also convert ab test mode to SpeedControls. 2019-06-04 16:15:46 -07:00
Dustin Carlino
46bf806b49 make loading screens more accurately portray what's happening, by adjusting timers 2019-06-03 11:50:34 -07:00