Commit Graph

999 Commits

Author SHA1 Message Date
Dustin Carlino
14b38f917e add a link from person->their parked car, and show the percentage of
population with a car
2020-04-16 13:19:17 -07:00
Dustin Carlino
ec409742e7 work around parking leak for multi-day scenarios 2020-04-15 16:36:56 -07:00
Dustin Carlino
97d31fe682 remove the fixed end-of-day; make it easier to jump to times in multi-day scenarios 2020-04-15 16:26:01 -07:00
Dustin Carlino
a104088ccd pt2: rest of sim layer, which forces the UI changes too 2020-04-15 15:48:16 -07:00
Dustin Carlino
35c193eebc associated parked cars with people, not buildings
pt1: scenario layer
2020-04-15 15:01:49 -07:00
Dustin Carlino
b7be5aa804 filter trip summaries by modes, better scatter plot tooltip 2020-04-15 13:41:16 -07:00
Dustin Carlino
bde09a08e4 scatter plot: move to ezgui, add a grid, interactive cursor 2020-04-14 12:50:16 -07:00
Dustin Carlino
bf2f2eccfd monochrome scale for delay, and more info on the bike lane layer 2020-04-13 15:30:56 -07:00
Dustin Carlino
97a2434e1b work around infinite cycle of laggy heads. #30 2020-04-12 15:54:46 -07:00
Dustin Carlino
aa765f70ed cargo +nightly fmt 2020-04-11 19:07:48 -07:00
Orestis
c811c7e044
New state-machine-like pandemicmodel (#47)
* started porting to new algo. init done

* continuing adaptation

* conitnuing the work

* added state machine model. needs testing now

* updated pèandemic model with state machine

* removed mod

* removed warnings

* added dead

* removed useless stuff

* adapted game too
2020-04-11 19:06:29 -07:00
Dustin Carlino
b7eda16443 move experimental stuff off the trip results page. start deleting old
dashboard stuff.
2020-04-11 14:58:40 -07:00
Dustin Carlino
ddd98d315e remove the old trip histogram, make room for cleaning it up 2020-04-10 12:15:24 -07:00
Dustin Carlino
69a8b88583 experimenting with new summaries of trip diffs 2020-04-10 11:44:47 -07:00
Dustin Carlino
bced89ce85 less dumb choices for nearest parking spot, ordering by distance and not number of lanes 2020-04-09 14:20:12 -07:00
Dustin Carlino
ff093e79f4 pick the closest parked car when dynamically reserving 2020-04-09 14:02:56 -07:00
Dustin Carlino
ff68a77979 have to fork rng again to prevent ped speeds from changing. wow. 2020-04-09 13:02:10 -07:00
Dustin Carlino
a1b24b1a29 wire in info on commuter's trips 2020-04-08 18:26:59 -07:00
Dustin Carlino
3e49134088 track blocked time for finished trips, make a way to find people with
high blocked times
2020-04-08 15:50:25 -07:00
Dustin Carlino
7e07448098 in trip panels, show comparison to trip time in baseline 2020-04-08 12:33:15 -07:00
Dustin Carlino
9591699463 start working on cancelling future trips. uncovered a few bugs, but this
is a step forwards
2020-04-08 10:38:26 -07:00
Dustin Carlino
22ea48a355 repeat a weekday scenario many times to experiment with longer-term pandemic modelling 2020-04-06 15:20:29 -07:00
Dustin Carlino
3e462cda90 cargo fmt, mostly just to trigger [rebuild] 2020-04-05 18:20:19 -07:00
Orestis
ec29ade70e
Pandemic modeling (#46)
* i think I managed to add a field that analyses who stands at a bus stop

* draining the people at waiting a bus stop in analytics and resturning the stopid, pedestrianid and times of arrival and leave

* trying to add sccache to see if it speeds up the compil

* small update

* need libm to have the erf function

* added pandemic stuff

* must check probabilities bug with them

* removed explicit sane state and refactored probas to correct bug. looks to be working. added info about pandemic situation

* moved the code of transition E/I/R

* i think its working now. every time we check for a dt around t0 + tinf

* updated value

* removed warning from mutable_borrow_reservation_conflict

* updated comments

* started adpting code

* refactoring models

* game compiles. must still adapt overla

* corrected bug

* added count of different catergories of people

* added quarantined state to see how it work but nothing implemented yet. trying to generalize a bit parameters

* made the model a bit more generic. not there yet though

* corrected bug

* rustfmt

* Update game/src/common/overlays.rs

Co-Authored-By: Dustin Carlino <dabreegster@gmail.com>

* Update sim/src/pmodel/mod.rs

Co-Authored-By: Dustin Carlino <dabreegster@gmail.com>

* Update sim/src/pandemic.rs

Co-Authored-By: Dustin Carlino <dabreegster@gmail.com>

* corrected compilation error. and bug

* modified the dir structure

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-04-05 13:41:37 -07:00
Dustin Carlino
2ef76b5e7c generate nicer active agent area diagram, use in jump-to-time 2020-04-05 13:10:31 -07:00
Dustin Carlino
2d4095fd8d except for layout/style, I think the trip/agent panels now have the
right information
2020-04-03 13:02:23 -07:00
Dustin Carlino
88bad05d39 clean up agent properties. lots of tweaks needed, but i'm exhausted 2020-04-02 21:36:19 -07:00
Dustin Carlino
51a81fc74d handle people being in the same building, bus stop, and bus in one
uniform way. also the first unit tests in an amusingly long time
2020-04-02 16:08:20 -07:00
Dustin Carlino
29c86d656d plumb more info in sim events. this will allow for some consolidated pandemic modeling 2020-04-02 15:12:46 -07:00
Dustin Carlino
c12775e5ea change the pandemic model to be a first-class, optional part of Sim 2020-04-02 14:30:18 -07:00
Dustin Carlino
1e63078096 pandemic model ideas:
- use a priority queue to handle events more sanely
- seed with all people
2020-04-02 13:38:14 -07:00
Dustin Carlino
ef90c6935c use the locate header button to follow/unfollow people 2020-04-01 15:50:11 -07:00
Dustin Carlino
70875d104d Scenario should just have specific trips. split a different structure for generating Scenarios. has the happy side effect of removing lots of weird old spawning code, duplicated checks 2020-04-01 13:50:36 -07:00
Dustin Carlino
62b49ad884 refactor: properly generic histogram, and remove unnecessary boilerplate
from Plot. Rust generics are so awesome.
2020-03-31 20:57:50 -07:00
Dustin Carlino
2181d8a56d two sanity refactors
- btreeset macro
- switch to "ID #123" by default
2020-03-31 16:40:07 -07:00
Dustin Carlino
f733763f73 get trip panel closer to the new design. start trying to use fixed size
panels [rebuild]
2020-03-31 15:46:46 -07:00
Dustin Carlino
c49fc20a88 checkbox to toggle running the pandemic model in the population map 2020-03-31 10:33:59 -07:00
Dustin Carlino
b16aceaa9a be more precise with building entry/exit events. they can also happen when a car parks inside a building's garage. also emit events at the start of day to get rid of the weird initial case. 2020-03-30 22:31:36 -07:00
Dustin Carlino
7f35d06c96 prototyping an example of finding overlapping time indoors by "infected"
agents
2020-03-30 22:12:48 -07:00
Dustin Carlino
5bb5e70000 plumb PersonID in some events, to make it easier to do analysis about people spending time indoors 2020-03-30 09:36:02 -07:00
Dustin Carlino
fff8c8ae9d try a huge cutover to the new info panel organization. few implemented,
going to do this in another branch
2020-03-27 10:37:26 -07:00
Dustin Carlino
ce180f7228 merge TripStart and TripEnd 2020-03-25 13:42:33 -07:00
Dustin Carlino
f89fcb9b93 stop associating trips with buses. it makes no sense. 2020-03-25 13:18:16 -07:00
Dustin Carlino
0bed515bc6 more info about inactive trips 2020-03-25 12:22:19 -07:00
Dustin Carlino
dad4c9bef2 more fluidly glue together agents, trips, people 2020-03-24 22:47:06 -07:00
Dustin Carlino
e22727ee98 reorganizing info panel code, splitting into modules 2020-03-23 14:25:16 -07:00
Dustin Carlino
4df64b4c83 remove last users of ModalMenu. so long, (some variant of) the original widget. 2020-03-22 20:59:44 -07:00
Dustin Carlino
d7886fa85b move person counters to population panel 2020-03-22 10:34:32 -07:00
Dustin Carlino
3045f99266 stop plumbing back unused agent metadata from sim, now that ACS is gone 2020-03-21 13:13:46 -07:00
Dustin Carlino
760ee795e7 scrap intersection delay, make a new road-or-intersection delay, based just on waiting turns 2020-03-19 08:34:02 -07:00
Dustin Carlino
87e605a119 prototype a live dot map in debug mode 2020-03-18 19:17:54 -07:00
Dustin Carlino
41ce8fe8f3 force trips per person to be time ordered 2020-03-18 14:01:03 -07:00
Dustin Carlino
e47d5f7917 fix parking markings and where pedestrians walk for left-hand maps for #27 2020-03-17 10:09:44 -07:00
Dustin Carlino
8f285be4fe jump from agent or trip to person, and from person to building and trips 2020-03-13 18:41:49 -07:00
Dustin Carlino
7775546a7e really awkward manual way of going from building to people inside 2020-03-13 12:36:55 -07:00
Dustin Carlino
10a8466d5d represent people in sim layer, track their state transitions 2020-03-12 16:28:47 -07:00
Dustin Carlino
5c8529a201 argh, fix bug in prev commit. seed_parked_car happens in the middle of the TripSpawner existing. 2020-03-12 15:53:06 -07:00
Dustin Carlino
87e9431f91 rearrange people/trips in the Scenario layer 2020-03-12 15:38:58 -07:00
Dustin Carlino
d852d69535 make TripSpawner a temporary setup object, not something permanently stored in Sim 2020-03-12 15:00:50 -07:00
Dustin Carlino
78407dd529 upgrade to rust 1.42 for better unwrap() errors and use of matches! 2020-03-12 12:55:48 -07:00
Dustin Carlino
4eae0c8394 trip timeline shows relative duration of each phase [rebuild] 2020-03-06 08:58:52 -08:00
Dustin Carlino
bd2cb6ddd1 first steps towards representing people, not just trips 2020-03-05 17:28:57 -08:00
Dustin Carlino
cc1ee8384a enum for trip phases 2020-03-03 12:42:51 -08:00
Dustin Carlino
08cd956faa filling out the trip timeline a bit more 2020-03-03 12:12:42 -08:00
Dustin Carlino
52eba43522 stop and warp to gridlock in jump-to-time 2020-02-28 15:19:37 -08:00
Dustin Carlino
e5d9d80c14 make sim stepping way more precise, doing minimal amount of time
advancement in the innermost layer

tested by making sure prebaked results don't budge
2020-02-28 14:52:41 -08:00
Dustin Carlino
e19f88cd40 experiment with finding sources of gridlock, exposed as a new heatmap 2020-02-26 12:13:28 -08:00
Dustin Carlino
0ee45bd0e7 track total time agents spend blocked vs moving. be more precise with
tracking blocked_since in the FSMs.
2020-02-26 09:56:57 -08:00
Dustin Carlino
db69dbd4df fix the active agents calculation. buckets... don't make any sense. 2020-02-20 17:50:42 -08:00
Dustin Carlino
d29839fa27 display a plot of activity over the day. the windowing is incorrect! but
it's some kind of start
2020-02-20 15:11:50 -08:00
Dustin Carlino
848347a9b5 change up agent meters 2020-02-19 08:23:06 -08:00
Dustin Carlino
d112707261 more info about trips to/from bldgs and intersections [rebuild] 2020-02-18 15:15:31 -08:00
Dustin Carlino
0f0924ac56 restore an old debug tool to spot what agents are blocking an intersection. optional mode to avoid some gridlock... seemingly working for a few cases, but breaking other stuff, so disabled. 2020-02-18 08:40:05 -08:00
Dustin Carlino
d56803a12a include ongoing trips in measured trip times. adjust wording of
"finished trips" things.
2020-02-17 15:58:27 -08:00
Dustin Carlino
d292e29ad0 get the game crate running in wasm. bundle in lots of data files, fake out a few more IO things, glue timer println's to console log 2020-02-15 16:44:06 -08:00
Dustin Carlino
9a9619ec32 moving game assets to data/system, to more easily bundle in wasm
[rebuild]
2020-02-15 16:19:23 -08:00
Dustin Carlino
b2c92ab8f9 upstreaming some changes for wasm here
- use instant crate
- bring in the wasm ezgui backend and necessary setup tweaks
- upgrade stdweb

but no map editor build magic yet
2020-02-14 14:28:25 -08:00
Dustin Carlino
1f0b225b6b cleaning up trip_details 2020-02-12 16:17:41 -08:00
Dustin Carlino
691dcdfbbc also revamp panels for other objects, except for the trip details part 2020-02-12 12:22:43 -08:00
Dustin Carlino
b033c4f720 round of quick fixes to avoid crashes 2020-02-11 16:13:42 -08:00
Dustin Carlino
a3149d2219 no_edits -> untitled edits 2020-02-06 13:15:09 -08:00
Dustin Carlino
872cd0cba6 'save as' feature for map edits. autosave otherwise. 2020-02-06 12:31:06 -08:00
Dustin Carlino
91234bf49a slow day. prototype a dot map from scenarios 2020-02-04 16:30:44 -08:00
Dustin Carlino
79de16a840 get the sim crate to build to wasm. a small step towards #21 2020-01-30 17:28:52 -08:00
Dustin Carlino
b2216bb482 not all lanes have to be the same width. make sidewalks a bit thinner. 2020-01-28 17:26:14 -08:00
Dustin Carlino
8a966395af prevent a crash with spawning agents around intersections. tiny tutorial tweaks 2020-01-28 14:33:55 -08:00
Dustin Carlino
8d3f58f214 whoa, time_limited_step always jumped too much 2020-01-28 09:07:09 -08:00
Dustin Carlino
07995fb060 starting a tutorial for bus lanes too 2020-01-27 12:38:51 -08:00
Dustin Carlino
426ebdc606 let vehicles spawn on all lanes from a border. lets the bike tutorial have a better solution 2020-01-27 11:54:36 -08:00
Dustin Carlino
2747ca5181 bike trips were counting as driving trips 2020-01-27 11:01:02 -08:00
Dustin Carlino
5f82c855ed slidey windows for thruput plots 2020-01-25 14:19:03 -08:00
Dustin Carlino
a45405055a start a tutorial stage to justify bike lanes 2020-01-24 16:04:58 -08:00
Dustin Carlino
89e27b5e3d associate cars with owner buildings 2020-01-24 13:10:24 -08:00
Dustin Carlino
95a84fd26a tweaking rustfmt options; the long literal string vecs in tutorial look awful 2020-01-21 15:20:02 -08:00
Dustin Carlino
e9d40fe494 just kidding, use two counters in meters panel 2020-01-19 15:34:53 -08:00
Dustin Carlino
7ce3d5dd24 adjust agent meters panel (move info button there, display (un)finished
trips more succinctly)
2020-01-19 15:20:19 -08:00
Dustin Carlino
ad49e37706 gracefully exit info panels for agents that go away 2020-01-16 16:13:21 -08:00
Dustin Carlino
f85ca54a44 bail out of spawning parked cars if we're totally out of space. still
horribly slow in maps without enough onstreet parking.

also fix the name of github artifacts [rebuild]
2020-01-16 11:27:15 -08:00
Dustin Carlino
f28029c69f dont crash when peds are waiting for a bus that isnt spawned, and dont walk in place while waiting 2020-01-13 09:21:23 -08:00
Dustin Carlino
53f33a31e4 hide IDs unless in dev mode 2020-01-09 11:50:56 -06:00