McMasterPandemic icon indicating copy to clipboard operation
McMasterPandemic copied to clipboard

Compute sums of state variables grouped by vaccine categories without `condense_state`

Open stevencarlislewalker opened this issue 4 years ago • 1 comments

For the vaccine models described here https://raw.githack.com/mac-theobio/McMasterPandemic/ip_devel/notes/vaxify_for_devs.html, there is a simulation step that (I think) only requires operations of the form sum(x[grepl(...)]) (or better yet, precompute indices using grepl and then apply these indices throughout the simulations). However, instead of these more efficient idioms, excessive data frame manipulations and convertions are done and these will very likely cause big and unnecessary performance bottlenecks.

  • [ ] Create alternative to calls to condense_state in make_vaxrate
  • [ ] Test for equivalence
  • [ ] Review by @papsti

Note: none of this requires C++

stevencarlislewalker avatar Oct 01 '21 13:10 stevencarlislewalker

this sounds reasonable! please let me know when this is ready for review.

papsti avatar Oct 01 '21 15:10 papsti