Dustin Carlino
1e903c6cee
pass a flag to disable using mapfixes, since it's annoying to keep temporarily deleting these
2019-10-25 10:09:47 -07:00
Dustin Carlino
2d02f90d9b
another easy one -- one phase per road
2019-10-22 14:29:58 -07:00
Dustin Carlino
c9db056c3a
start representing shared left turn lanes. nothing uses them yet,
...
just draw them (without the left turn markings)
2019-10-21 16:14:16 -07:00
Dustin Carlino
c9a6f0a7d8
call out agents that've been blocked in an intersection for a while.
...
this is basically a fast gridlock detector
2019-10-20 12:49:25 -07:00
Dustin Carlino
8c826a870c
try waking up people at intersections in waiting-order, for proper fairness
2019-10-19 21:41:53 -07:00
Dustin Carlino
d04b6a240e
when trip starts from a garage, dont walk down the front path uselessly first
2019-10-19 20:18:06 -07:00
Dustin Carlino
f78b11d633
(temporarily) filter out driveways too close to either end of the road.
...
get cars unparking from driveways properly.
2019-10-19 19:10:59 -07:00
Dustin Carlino
28bb1ba194
interactively spawn a parked car in a garage
2019-10-19 17:17:33 -07:00
Dustin Carlino
5b9a8dd914
seeding buses more robustly. spot fixes to maps to prevent regressions
2019-10-19 16:54:54 -07:00
Dustin Carlino
7020544073
show which bus a ped is waiting for
2019-10-19 16:00:55 -07:00
Dustin Carlino
f1f951fc1c
Revert "distinguish parked cars that have a trip scheduled or not"
...
This reverts commit dba7ced094
.
Is slow, not so useful. Could implement more intelligently, but not
worthwhile yet.
2019-10-19 15:24:40 -07:00
Dustin Carlino
a4b24c2643
speed up some stuff indirectly used in bus locations to not be so terrible
2019-10-19 15:00:36 -07:00
Dustin Carlino
6989c72aa1
show location of all buses serving a route
2019-10-19 13:40:24 -07:00
Dustin Carlino
44e74d1ed3
trips from border to a bldg make that bldg own the car, so it can be reused. vastly reduces the number of aborted trips in the full montlake run
2019-10-18 12:50:48 -07:00
Dustin Carlino
d6a9e0e541
just one copy of the code to calculate parked car seeding per bldg, in popdat. remove variant in scenario manager
2019-10-18 11:47:03 -07:00
Dustin Carlino
dba7ced094
distinguish parked cars that have a trip scheduled or not
2019-10-17 14:54:30 -07:00
Dustin Carlino
012d5bdd1d
make parking/unparking on offside shift the correct direction.
...
theoretically also handle unparking from a driveway, but cant test that
easily yet...
2019-10-17 14:40:27 -07:00
Dustin Carlino
5e41a607fd
adjust starting pos of parked cars going to offside driving lane
2019-10-17 14:11:07 -07:00
Dustin Carlino
b28874d5bc
find trips using a parked car later
2019-10-16 18:54:28 -07:00
Dustin Carlino
03d31477af
make sim handle parking lanes on off-side of a oneway. ostensibly.
...
haven't forced a test case yet
2019-10-16 17:55:22 -07:00
Dustin Carlino
f6865fac43
Get rid of ID::Trip, not sure why that ever made sense
2019-10-14 13:57:37 -07:00
Dustin Carlino
85ff33e72d
basic, but working, impl of cars lane-changing opportunistically
2019-10-13 14:30:20 -07:00
Dustin Carlino
05b953d639
split sim summary onto two nice lines
2019-10-11 13:25:41 -07:00
Dustin Carlino
2edb275d3c
rename cycle -> phase, match the literature
2019-10-09 15:27:25 -07:00
Dustin Carlino
b40b26def8
dont draw agents when unzoomed and showing some kind of heatmap
2019-10-04 16:07:07 -07:00
Dustin Carlino
1a10e8982a
basic heatmap showing busiest roads and intersections. have to revive
...
Sim Events kind of.
2019-10-04 15:33:26 -07:00
Dustin Carlino
a85d7fffcd
let yields go at a traffic signal when the priorities are blocked. wake up waiting agents a little more granularly.
2019-10-04 11:51:25 -07:00
Dustin Carlino
393eaff249
compacting SimOptions and SimFlags
2019-10-01 14:22:00 -07:00
Dustin Carlino
6f75cf32eb
mvp of graphing finished trips over time
2019-10-01 14:09:17 -07:00
Dustin Carlino
3fd73af32b
fix edge case crash when spawning agents interactively
2019-10-01 12:44:26 -07:00
Dustin Carlino
db4db7e0d9
very basic tool to point out intersections with the most contention
2019-09-30 11:39:55 -07:00
Dustin Carlino
2e5649bf7e
show count of aborted trips in scoreboard too
2019-09-29 19:19:51 -07:00
Dustin Carlino
909ce857fb
count aborted trips with active agent counter better
2019-09-29 14:44:09 -07:00
Dustin Carlino
35892aee61
just abort a trip if theres literally no room for a car to park.
2019-09-27 14:11:26 -07:00
Dustin Carlino
0ae0a88abb
actually, serialize MapFixes as json for now. will switch to binary when this is large later, but for now, this is easier to handle schema changes and debug.
2019-09-19 14:39:31 -07:00
Dustin Carlino
3eb9acf0aa
plumb parking lane hints around through tags too; simplifies a few places
2019-09-19 13:30:07 -07:00
Dustin Carlino
fbb7d8ac96
cleaning up CmdArgs usage
2019-09-19 10:42:16 -07:00
Dustin Carlino
f18fc72265
finish structopt removal
2019-09-18 17:29:34 -07:00
Dustin Carlino
0543cb015e
fix an awesome parking contention bug
2019-09-15 14:10:54 -07:00
Dustin Carlino
72c391fe15
clean up stuck/vanish case for drivers, now that parking blackholes have been fixed
2019-09-15 13:46:40 -07:00
Dustin Carlino
1f2c4e3797
make route viewer also handle mode changes and trips ending
2019-09-15 13:07:58 -07:00
Dustin Carlino
8d8237a40e
making sure we only consider appropriate lane types for parking searches
2019-09-15 10:11:13 -07:00
Dustin Carlino
b757efd644
verify vehicles dont wind up on nonsense lane types...
2019-09-14 14:10:41 -07:00
Dustin Carlino
fb3e4e5177
cancel turn requests when deleting a car forcibly
2019-09-08 15:21:15 -07:00
Dustin Carlino
19135c7461
debug feature to kill off a stuck car
2019-09-07 13:46:47 -07:00
Dustin Carlino
caaf0954ab
rename the main editor crate to game -- map editing is just a tiny piece ;)
2019-09-07 13:09:09 -07:00
Dustin Carlino
68269530fe
refactor intersection type checks
2019-09-07 12:34:39 -07:00
Dustin Carlino
219a6feacd
rework trip start/end
2019-09-07 12:26:00 -07:00
Dustin Carlino
c5fd22ae81
refactor sim->editor metadata for unzoomed/zoomed agents
2019-09-07 12:01:45 -07:00
Dustin Carlino
8bf4711053
abort trips using parked cars if they dont work out
2019-09-05 17:37:36 -07:00
Dustin Carlino
36f4ccecb6
do the last-minute work of gluing a ped to an available car
2019-09-05 13:39:19 -07:00
Dustin Carlino
cf7d847f32
some of the plumbing to make psrc trips dynamically use a parked car, when possible. very
...
complicated impl. should blow up when one of these trips actually
starts.
2019-09-05 13:01:46 -07:00
Dustin Carlino
8a05e59865
shuffle spots per road, so we dont start with an eerily even line of cars
2019-09-05 10:54:19 -07:00
Dustin Carlino
048976a256
spawn a specific number of parked cars per bldg for a scenario. dont use
...
them yet.
2019-09-05 09:45:02 -07:00
Dustin Carlino
ccdae6e54b
show total parking spots available
2019-09-04 14:56:50 -07:00
Dustin Carlino
e35709fc51
calculate number of parked cars needed for PSRC trips in a very
...
primitive way
2019-09-04 13:58:48 -07:00
Dustin Carlino
528010f308
render cars on driveways a little better
2019-09-02 22:34:01 -07:00
Dustin Carlino
6d7d3d4a43
warp to car parked in garage, without having to define a DrawCar for it
2019-09-02 11:42:29 -07:00
Dustin Carlino
d404d938f6
browse cars parked in garage more easily
2019-09-02 11:08:01 -07:00
Dustin Carlino
fcc3863dab
proper walking connections after parking in a garage, debug support for
...
cars parked in a bldg
2019-09-01 21:25:31 -07:00
Dustin Carlino
814313df98
make cars start parking in garages. parking animation is wrong and trip
...
connections wrong, that'll come next.
2019-08-31 12:41:23 -07:00
Dustin Carlino
03b685673b
remove two unused deps caught by cargo-udeps
2019-08-30 15:06:45 -07:00
Dustin Carlino
abe4d218f0
adding new type of ParkingSpot to sim layer. not glued to everything
...
yet.
2019-08-30 14:16:34 -07:00
Dustin Carlino
7fffb8d6e5
use modalmenu, not logscroller, for scenario and a/b test info. remove
...
logscroller from public ezgui api
2019-08-24 14:53:26 -07:00
Dustin Carlino
e983e754d2
cars and bikes parking werent actually freeing reserved space... doh
2019-08-23 16:26:55 -07:00
Dustin Carlino
0451f9919e
make time_limited_step snappier, so we block less long when we can't run fast nuff
2019-08-23 13:52:21 -07:00
Dustin Carlino
f58519d723
dont try to start biking on a blackhole
2019-08-23 12:51:43 -07:00
Dustin Carlino
17136509cf
the parking redirects dont have to be before the lane... they can also be after. just nearby is the goal. this fixes a few more aborted trips
2019-08-23 12:30:25 -07:00
Dustin Carlino
b644f1d86d
dont seed parked cars in blackholes
2019-08-23 10:06:22 -07:00
Dustin Carlino
9f897ef094
removing ezgui inline color parsing. pretty much unused, isn't helping
...
compile time. also fixing clippy issues
2019-08-22 13:38:16 -07:00
Dustin Carlino
bb70594c65
be more clear when following an agent and similar fail due to temporary mode-change vs trip being done/aborted
2019-08-21 15:20:39 -07:00
Dustin Carlino
f012660da7
floodfill and pathfind to a free parking spot, instead of randomly picking one turn at a time
2019-08-21 00:01:28 -07:00
Dustin Carlino
f9376cddcb
dont leak unfinished trips when things cant spawn
2019-08-19 15:05:10 -07:00
Dustin Carlino
f62965b5e2
small refactor: rename time param -> now. more clear and will help the Duration / Instant split later.
2019-08-19 14:56:07 -07:00
Dustin Carlino
7001139dc0
fix div by 0 bug with percent_dist_crossed for empty paths
2019-08-19 14:41:56 -07:00
Dustin Carlino
0ba3ab92ed
fix very, very, very dumb block-the-box bug. >_<
2019-08-19 14:32:15 -07:00
Dustin Carlino
2fe2559f67
new colorscheme showing trip time so far
2019-08-19 14:14:19 -07:00
Dustin Carlino
f3f4f98290
also use AgentColorScheme for zoomed color
2019-08-19 14:00:12 -07:00
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
758c5494d8
remove old unused deps
2019-08-09 13:34:40 -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
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