Commit Graph

76 Commits

Author SHA1 Message Date
Dustin Carlino
ffef0279bf Refactor the support for making browsers download files, and use more widely 2022-05-18 14:43:16 +01:00
Dustin Carlino
231acf47a2 Step 2: try to get the sim crate to build again
Scenario and TripEndpoint have some methods defined on them that're
specific to sim. Do we rearrange these methods entirely or make some
kind of wrapper types?
2022-01-28 13:13:43 +00:00
Dustin Carlino
bd340a1970 Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path! 2022-01-17 17:30:51 +00:00
Dustin Carlino
0464ab4499 Convert the headless server from CmdArgs to structopt. #745 2021-10-26 11:10:08 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dustin Carlino
e99def9124 Switch all error handling to anyhow. Nothing consumes our code as a
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
d529ae2e5c Upgrade usvg and rand 2021-01-04 09:19:54 -08:00
Dustin Carlino
2945913fb3 Upgrade rand 2021-01-03 19:48:03 -08:00
Dustin Carlino
5c04923dff Split abstio crate out from abstutil. #253
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08: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
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
6439c026ea Set up the boilerplate for two parking impls 2020-09-15 13:27:56 -07:00
Michael Kirk
f685af47a5
proletariat robot considers resident/worker capacity (#320)
proles: account for work capacity

previously all residents went to work on the map, but if the
neighborhood is mostly residential that meant they were "competing"
heavily for the scarce jobs available on the map.

with this commit, we do a better job of spreading worker/residential
demand to account for what is available, and fill in the gap with
off-map trip origins/desitinations.

e.g. if a neighborhood is mostly residential, we have folks commute off
of map. If a neighborhood is mostly commercial, we have folks commute
into the map.
2020-09-10 14:04:20 -07:00
Dustin Carlino
f662d9e34f Get rid of PartialEq on all of the Sim structs. It was originally there for a unit test that simulations are deterministic, but that test is long gone. (Determinism is now tested a bit more indirectly, but usefully, by looking for diffs to prebaked results. It could also be done by diffing serialized Sims.) 2020-08-28 14:26:22 -07:00
Dustin Carlino
287d56efd9 generalizing the old gridlock checker. removing unused savestate_every
support. reimpl it later using the callbacks if needed.
2020-06-09 14:29:35 -07:00
Dustin Carlino
855d8f4d22 update glutin, winit, glium now that a fix for linux startup time is upstreamed in glutin. and a few other packages too. ditch geo-offset dependency, since it uses old versions and isn't being used yet 2020-06-01 09:18:17 -07:00
Dustin Carlino
ddf6de5f59 stop dependending directly on serde_derive 2020-05-19 15:06:32 -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
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
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
79de16a840 get the sim crate to build to wasm. a small step towards #21 2020-01-30 17:28:52 -08:00
Dustin Carlino
facd9c68b3 remove old gridlock detector, in favor of a tool to find the front of a
chain of blockage
2019-11-01 15:31:26 -07:00
Dustin Carlino
f18fc72265 finish structopt removal 2019-09-18 17:29:34 -07:00
Dustin Carlino
03b685673b remove two unused deps caught by cargo-udeps 2019-08-30 15:06:45 -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
758c5494d8 remove old unused deps 2019-08-09 13:34:40 -07:00
Dustin Carlino
8b5690c1a4 now actually plumbing data for scoreboard 2019-06-13 14:46:28 -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
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
dd198bb37f overly conservative gridlock detection, triggered kind of manually 2019-03-15 12:10:47 -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
a975d0efd4 print progress while calculating paths in parallel 2019-03-06 17:41:28 -08:00
Dustin Carlino
bc9a9aa360 histogram of how far events are in the future 2019-03-05 13:43:49 -08:00
Dustin Carlino
5f6d7e1b66 fix sim nondet test failure by using BTreeMap in my MultiMap 2019-03-01 12:16:52 -08:00
Dustin Carlino
11c549331e finally, the big cutover! editor and headless work. tests dont compile. 2019-02-27 11:53:45 -08:00
Dustin Carlino
42c7c21246 removing many external dependencies on Tick. moving time parsing to
Duration.
2019-02-26 14:09:08 -08:00
Dustin Carlino
e4ef1ec79d removing log from sim 2019-02-20 11:22:51 -08:00
Dustin Carlino
ec01207369 try upgrading rand and serde again 2019-02-10 15:57:28 -08:00
Dustin Carlino
ac2b8f5a9a switch to new units in sim... and editor, darnit, accidentally ammended
commit
2019-01-30 14:19:48 -08:00
Dustin Carlino
c09fa98f57 upgrade a few dependencies 2019-01-11 10:55:58 -08:00
Dustin Carlino
f64f411093 upgrade all crates to 2018 in Cargo.toml. this requires switching to
crate:: paths everywhere. not yet fiddling with 'extern crate's
2018-12-06 10:57:31 -08:00
Dustin Carlino
4d7c1203a6 the great control layer merge 2018-11-30 13:52:50 -08:00
Dustin Carlino
a863283571 different parser for ticks from filenames 2018-11-18 14:54:36 -08:00
Dustin Carlino
f011f8f56d making hierarchial progress timer to replace flamegraphs. using in many,
but not all, places
2018-10-28 16:40:37 -07:00
Dustin Carlino
792c25b40b removing failure crate in sim too 2018-10-10 16:29:43 -07:00
Dustin Carlino
94ac54d7e8 stop using Color and Vec2d types from piston, to slowly move away from dependence on piston 2018-10-05 14:58:48 -07:00
Dustin Carlino
190d9be972 sharing flags for specifying sim to load 2018-10-02 16:34:27 -07:00