grattan / covid19.model.sa2

4 stars 0 forks source link

PolicyGrid for current run #47

Closed wfmackey closed 4 years ago

wfmackey commented 4 years ago

Sorry -- I think I was meant to provide the PolicyGrid for this run. See below.

If you've started it already, feel free to ignore this.

library(data.table)
library(magrittr)
library(hutils)

PolicyGrid <-
  CJ(by_state = c(FALSE, TRUE),
     schools_open = c(TRUE, FALSE),
     only_Year12 = c(TRUE, FALSE),
     school_days_per_wk = c(1, 3, 5),
     do_contact_tracing = c(TRUE, FALSE),
     contact_tracing_days_before_test = c(1, 2),
     contact_tracing_days_until_result = c(3, 5),
     workplaces_open = c(0, 0.5, 1.0),
     workplace_size_max = c(10, 75),
     incubation_distribution = c("pois", "cauchy"),
     incubation_mean = c(4, 7, 10),
     a_workplace_rate = c(0.50, 0.75),
     q_school = c(1/3000, 0.01, 0.05),
     q_household = c(0.04, 0.09, 0.15)
  ) %>%
  .[only_Year12 %implies% schools_open] %>%
  .[(school_days_per_wk > 1L) %implies% schools_open] %>%
  .[(workplace_size_max > 10) %implies% (workplaces_open > 0)] %>%
  .[]
HughParsonage commented 4 years ago

Running at grattan/covid19-results-0522

Results are posted as single columns. To obtain the corresponding columns, you can use scan and grouped replications. (Or use the columns directly.)

rep_each <- function(x, len) {
  rep(x, each = len / length(x), length.out = len)
}

ans <- scan("~/covid19-results-0522/00/02/0/20-1-MB220.csv", what = integer())
DT <- data.table(N = ans)
DT[, Day := rep_each(1:48, .N)]
DT[, State := rep_each(1:9, .N), by = .(Day)]
DT[, Status := rep_each(-2:3, .N), by = .(Day, State)]
DT[, Isolated := rep_len(0:1, .N)]
wfmackey commented 4 years ago

Oh man this makes me nervous

HughParsonage commented 4 years ago

To be fair that's all I was doing with returner == 2. I just hid it a bit better.

wfmackey commented 4 years ago

lol okay that's comforting