- Joined
- Feb 3, 2013
The mathematical modeling has mostly been done here (hat tip to that underpaid autist on the Github issue):but shouldn't the first task be to just express the model mathematically instead of trying to code it up without specs like a webshit?
https://static-content.springer.com...jects/41586_2005_BFnature04017_MOESM1_ESM.pdf
Though there are a few things where they say "We came up with something for this but this margin is too narrow to contain it".
This paper is from 2005 and specific to Thailand, I think they've parameterized it and generalized it more since then.
EDIT: here's another chuckler from Model.h (edited by me for clarity)
C:
typedef struct PERSON {
// (omitted extra code)
unsigned int esocdist_comply : 1;
unsigned int keyworker : 1;
unsigned int to_die : 1;
unsigned int detected : 1;
// (snipped a whole bunch more fields)
unsigned int digitalContactTraced : 1;
unsigned int index_case_dct : 2;
unsigned int digitalContactTracingUser : 1;
So we have two sets of bit fields here, which add up to 8 bits in total, but we're using 64 bits of space to store them. You could just as easily give each one of these its own byte, and then they'd at least be addressable.
Most likely what happened is that this started out as 8 bits packed into a byte, but then it got transmogrified into an int at some point, and then someone who didn't understand just went in and inserted more fields wherever they wanted.
Last edited: