Commit Graph

683 Commits

Author SHA1 Message Date
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
Dustin Carlino
661fedaa28 fix PSRC trips with borders on larger maps 2019-06-01 18:41:45 -07:00
Dustin Carlino
314489c63f overhaul unzoomed agent rendering -- just colored circles 2019-06-01 10:13:17 -07:00
Dustin Carlino
142f84a232 display passengers on a bus in debug mode. also sort PSRC trips by
departure time to make later viz a little easier to follow
2019-05-31 13:52:14 -07:00
Dustin Carlino
c65bb09801 dont allow spawning random agents after seeding psrc trips 2019-05-27 18:00:28 -07:00
Dustin Carlino
72ac85f540 stability round: loading ballard broke, spawning PSRC trips in most maps hit little bugs 2019-05-27 10:45:53 -07:00
Dustin Carlino
0e298c756f make it a bit easier to jump to the time when trips are actually
starting. and prepping popdat for release
2019-05-26 21:31:44 -07:00
Dustin Carlino
40efcc7b05 generalize a parallelize method for timers, use for all trip viz 2019-05-25 19:35:35 -07:00
Dustin Carlino
bc69a6b4d4 spawn as many trips from PSRC as possible 2019-05-25 18:34:50 -07:00
Dustin Carlino
ef60359cc8 spawn trips from data. not working yet; hitting a problem with
sidewalk->bike lane on oneways
2019-05-25 18:22:07 -07:00
Dustin Carlino
1cdbe0ea81 refactor parallelized pathfinding and use it in trip viz too 2019-05-24 12:50:01 -07:00
Dustin Carlino
f674527ef2 interpolate along route for trip viz 2019-05-24 12:28:57 -07:00
Dustin Carlino
6819889f49 draw car blinkers for everybody Queued too 2019-05-15 15:05:45 -07:00
Dustin Carlino
75d1cdd3b9 slightly improve traffic signal runtime: Priority > Yield 2019-05-13 15:47:25 -07:00
Dustin Carlino
ba71d2d5e6 dont be so confusing with CarAppearing in interactive commands -- dont retry if there's not room 2019-05-12 15:06:12 -07:00
Dustin Carlino
b9f80f3e0f make cars pause at stop signs properly 2019-05-12 08:50:46 -07:00
Dustin Carlino
8bd4ab72d4 draw full stop sign octagon when editing a single intersection 2019-05-10 15:23:31 -07:00
Dustin Carlino
8e949d5fa9 make --num_agents work exactly when specified 2019-05-09 10:51:07 -07:00
Dustin Carlino
a4f6a773a9 fix up time limits for headless/tests. fix a few tests now that peds
walk slowly.
2019-05-08 20:05:52 -07:00
Dustin Carlino
fce5d0f6dc animate pedestrian feet smoothly regardless of sim speed 2019-05-08 18:34:41 -07:00
Dustin Carlino
60eea9b413 change sim API to step forward by a variable duration, not a fixed timestep. adjust UI callers accordingly. some bugs introduced, but solid start 2019-05-08 17:44:01 -07:00
Dustin Carlino
73ae88bd98 adjust how periodic savestating happens to prep for truly variable timesteps 2019-05-08 12:36:46 -07:00
Dustin Carlino
89b74b9137 random ped speeds. lots of plumbing needed to implement this. :\ 2019-05-07 10:54:58 -07:00
Dustin Carlino
d66b0cb511 in most causes, dont have route previews cover half of peds 2019-05-06 19:19:20 -07:00
Dustin Carlino
fd6155ef0e make peds travel at a realistic speed 2019-05-06 18:51:16 -07:00
Dustin Carlino
95b664e394 one fixed bike length. makes rendering easier, and having different lengths is pretty useless 2019-05-06 18:06:49 -07:00
Dustin Carlino
b060a3ecc2 giving pedestrians more shape 2019-05-06 12:45:52 -07:00
Dustin Carlino
103e7f28ca combine TripLeg::Bike and ::Drive, fixing a bug and simplifying some cases 2019-05-06 11:21:29 -07:00
Dustin Carlino
3ba56a76fb fix a panic with bike parking 2019-05-06 11:00:41 -07:00
Dustin Carlino
f31f46e483 draw peds on one side of the sidewalk 2019-05-05 23:18:24 -07:00
Dustin Carlino
e25af2e450 remove sim's dependency on ezgui and hopefully speed up draw_unzoomed in the process 2019-05-01 19:32:39 -07:00
Dustin Carlino
1fabf29747 start the sandbox mode, just with sim controls. remove unused sim score
plugin.
2019-04-25 12:22:12 -07:00
Dustin Carlino
beba58924c pedestrian turn arrows 2019-04-19 15:35:51 -07:00
Dustin Carlino
dc2649ad59 fix some crashes when spawning agents 2019-04-18 18:42:52 -07:00
Dustin Carlino
5ed6f2256e also spawn peds around an intersection 2019-04-16 13:37:30 -07:00
Dustin Carlino
7885477e59 a round of clippy 2019-04-15 18:54:19 -07:00
Dustin Carlino
834384fb10 remove the Trace type rename; serves no purpose. also the unused
stopping_buffer; no more lookahead
2019-04-11 10:27:28 -07:00
Dustin Carlino
c25d544fe2 fixing edits_name in map paths and also supporting Windows backslashes in paths 2019-04-10 11:22:36 -07:00
Dustin Carlino
20e41fa2b4 cleaning up unused data in ParkingSpotGeometry 2019-04-10 10:37:16 -07:00
Dustin Carlino
27fc74c05a implement a stop sign-ish policy 2019-04-10 10:22:13 -07:00
Dustin Carlino
da3152a0e7 revamp road editor plugin. recalculate DrawMap changes. fixing some
apply_edits bugs
2019-03-18 18:53:32 -07:00
Dustin Carlino
3f47c00e03 slowly reintroduce MapEdits, just with lane type overrides. load and
"apply" them
2019-03-18 16:40:27 -07:00
Dustin Carlino
3ea3ea199a completely remove most traces of MapEdits. quietly disconnect some
editor plugins
2019-03-18 15:37:02 -07:00
Dustin Carlino
f99a20163d rip out stubbed MapEdits stuff in sim layer, letting basic UI for
editing work again. only let UI plugins work if sim is empty.
2019-03-18 13:36:46 -07:00
Dustin Carlino
c7dc028601 Display for Traversable 2019-03-18 13:21:57 -07:00
Dustin Carlino
1a395d7e4f clean up dead code 2019-03-17 20:31:48 -07:00
Dustin Carlino
7422877bcb handle ending while clipping into stuff 2019-03-17 18:48:24 -07:00
Dustin Carlino
440ff358cd option to headless to 'draw' everything, flush out all bugs 2019-03-17 18:13:30 -07:00
Dustin Carlino
ef4a4b18cf handle short lanes for get_car_positions 2019-03-17 18:04:25 -07:00
Dustin Carlino
96785a3c5c oops, considering somebody out of the way slightly early wasnt actually safe, it turns out 2019-03-17 17:55:24 -07:00
Dustin Carlino
652e01ba87 deal with short lanes. also dont mark turn_finished until the car is
totally out the intersection.
2019-03-17 17:13:28 -07:00
Dustin Carlino
b8c15b5ced different formulation, where follower of laggy leader immediately at end of queue when laggy leader is out of the way. make get_car_positions recurse. great start! 2019-03-16 15:26:37 -07:00
Dustin Carlino
c40c4fdff4 eager impl to not hit the back of cars. no handling of short lanes, and
follower waits before starting to cross the end of a lane.
2019-03-16 14:53:46 -07:00
Dustin Carlino
db536a04d5 refactor an exact_slice for polylines 2019-03-15 14:02:43 -07:00
Dustin Carlino
961b70d1f4 kind of improved draw_unzoomed, except there are just tons of weird
situations to represent
2019-03-15 13:39:25 -07:00
Dustin Carlino
88c9630f7a check for gridlock every 5m and savestate when it happens 2019-03-15 12:17:35 -07:00
Dustin Carlino
dd198bb37f overly conservative gridlock detection, triggered kind of manually 2019-03-15 12:10:47 -07:00
Dustin Carlino
1ba7e5d325 woops, not so easy to figure out a proper retry for room_at_end 2019-03-14 16:05:07 -07:00
Dustin Carlino
e482e10666 show agent state in tooltips 2019-03-14 14:36:46 -07:00
Dustin Carlino
17ef2c5a3a separate Queued and WaitingToTurn states for cars. populate
waiting_to_turn in DrawCar
2019-03-13 15:14:49 -07:00
Dustin Carlino
15f6981b1d make tests pull events new way, stop returning from step(). fix termion
and test runner.
2019-03-12 13:29:58 -07:00
Dustin Carlino
505b0a9496 store events in Sim, not a plugin. switch tutorial mode. 2019-03-12 13:23:39 -07:00
Dustin Carlino
5711e343e8 spawn cars around an intersection 2019-03-12 11:06:42 -07:00
Dustin Carlino
5ca359998c upgrade some dependencies and list data source licenses in README 2019-03-11 16:04:47 -07:00
Dustin Carlino
5bba5ce31e track num_active_trips to speedup is_done query 2019-03-08 16:02:56 -08:00
Dustin Carlino
8f5dd61ce5 handle cars with one-step routes 2019-03-08 15:57:20 -08:00
Dustin Carlino
7adf7d4e27 print what paths fail in trip transitions, fix a tiny parking sim bug 2019-03-08 12:52:37 -08:00
Dustin Carlino
5013cae4f9 fixing tests 2019-03-08 12:19:05 -08:00
Dustin Carlino
6fd021be91 filter out nonsense trips 2019-03-08 11:06:55 -08:00
Dustin Carlino
1eebea8001 cutting over to new graph search in some cases. adding support for
one-step walking paths.
2019-03-08 10:47:39 -08:00
Dustin Carlino
08e54612b8 cache bus routes 2019-03-06 18:16:08 -08:00
Dustin Carlino
a975d0efd4 print progress while calculating paths in parallel 2019-03-06 17:41:28 -08:00
Dustin Carlino
4ae478a7a5 smarter estimate about cars queued on last step... but disabled it :( 2019-03-05 18:12:32 -08:00
Dustin Carlino
ce340f5668 more frequent status updates, based on real time passing, not sim time 2019-03-05 17:10:27 -08:00
Dustin Carlino
063fb85155 amp up BLIND_RETRY to something reasonable for the remaining, difficult cases. fix a race condition where a bus blips through the Queued state. and deal with idling state causing queued followers 2019-03-05 16:57:27 -08:00
Dustin Carlino
84d24da73d decent retries for intersections 2019-03-05 15:32:36 -08:00
Dustin Carlino
2a7da98a09 give some control of retries to intersections 2019-03-05 14:32:33 -08:00
Dustin Carlino
1d0dca77b8 woops, was still advancing time in 0.1s chunks 2019-03-05 14:02:39 -08:00
Dustin Carlino
bc9a9aa360 histogram of how far events are in the future 2019-03-05 13:43:49 -08:00
Dustin Carlino
3567f2451f count active agents better 2019-03-05 10:08:06 -08:00
Dustin Carlino
194d3b3b57 keep simple state when roaming for parking 2019-03-05 10:00:05 -08:00
Dustin Carlino
0bcb18b4b0 handle unreachable case 2019-03-05 09:36:48 -08:00
Dustin Carlino
0c824e8d0d flag to headless to control sim size, roughly 2019-03-05 09:30:39 -08:00
Dustin Carlino
f866c99758 add some basic stats for how many events go through, how many are EPSILON in the future 2019-03-05 09:17:36 -08:00
Dustin Carlino
3047c67e2b modest speedup using binary search 2019-03-04 21:08:45 -08:00
Dustin Carlino
b69c01ea5f preps to swap out scheduler priority queue impl 2019-03-04 20:50:36 -08:00
Dustin Carlino
88ce753243 making one PriorityQueue for all of sim, doing dispatch 2019-03-04 14:56:38 -08:00
Dustin Carlino
434a4aa019 cutover driving sim to events! 2019-03-04 14:11:27 -08:00
Dustin Carlino
b58a4097b5 changing PriorityQueue to emit one item at a time 2019-03-04 13:12:38 -08:00
Dustin Carlino
6f0dffdc75 move all driving sim to per-car updates, by calculating distances only
when needed
2019-03-04 13:04:23 -08:00
Dustin Carlino
0cfbc2f7da move the code to advance Queued head cars to next turn/lane into the
main per-car loop
2019-03-04 12:15:16 -08:00
Dustin Carlino
8e7cc2c11e delete peds inline 2019-03-04 11:03:15 -08:00
Dustin Carlino
b52e7bd991 lift Idling handler to the loop that's trivially event-based 2019-03-04 10:47:20 -08:00
Dustin Carlino
385a9044db store requests to intersections, as a prep for notifying them when to retry 2019-03-03 20:01:38 -08:00