kassonlab / covid19-epi Goto Github PK
View Code? Open in Web Editor NEWIndividual-based epidemiological modeling for COVID-19
License: GNU Lesser General Public License v2.1
Individual-based epidemiological modeling for COVID-19
License: GNU Lesser General Public License v2.1
Reproducing query from earlier issue:
"/* Modified factors to account for difference between population in Southeast Asia from Ferguson Model and Swedish population. This adjustment maintains 1/3 transmission in community, 1/3 transmission in household, and 1/3 transmission in workplace.
Overall population is 8.4X smaller in Sweden, attributed as a 8.4X increase in community transmission factor.
Household size is approximately 2X smaller in Sweden, 2 vs. 4, attributed as a 2X increase in household transmission factor.
R0 Scaling factor used to set approximate doubling time. R0_scale=2.2 attributes to a doubling time of approximately 3 days while R0_scale=1.8 attributes to a doubling time of approximately 5 days.
*/"
Roger--I'm not sure this was properly answered earlier, and I'd like to make sure this is fully addressed.
Am I correct in thinking that there may be unresolved questions in your mind?
Line 749 in 3dab229
Intentionally or?
Line 379 in 3dab229
There is probably existing data that has been used to calculate the percentages you use to put individuals in different classes, by doing so you could get vastly different starting states.
From all working to none working...
Why not a simple calculation without randomness?
(count number in group) place in sub-groups using percentages
Then the randomness would move only to infection transfer
This is a list of things that need to be looked at, it is by no means complete, so if anyone thinks of anything else just add a comment to this issue.
One of the goals is to be able to run with the full population of Sweden for at least 500 days.
And to run multiple scenarios with varying parameters.
Line 2078 in 254de2c
Ic, Ih, Iw is never initialized will be null causing core dump
valgrind ./build/covid19
==12714== Memcheck, a memory error detector
==12714== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12714== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==12714== Command: ./build/covid19
==12714==
Using seed 14755718885144
==12714== Conditional jump or move depends on uninitialised value(s)
==12714== at 0x40AA80: household_lat_long (in /home/roger/Documents/2_code/covid19-epi/build/covid19)
==12714== by 0x4032AE: main (in /home/roger/Documents/2_code/covid19-epi/build/covid19)
==12714==
max_HH_size = 7
All infections initialized
Starting density kernel calculations
Done with density kernel calculations in 65220.19
Total initialization time 67010.45
Starting simulation
Timestep 0.00
Line 139 in 3dab229
HH_count is limited, but this accesses outside the limit...
(gdb) list 0x40aa80
0x40aa80 is in household_lat_long (covid19.c:139).
134 tmp_lat = lat_locale[HH_count];
135 tmp_lon = lon_locale[HH_count];
136 / Scale population density */
137 pop_density_init_num[HH_count] = ceil(pop_density_init_num[HH_count] * population / land_pop_total_density);
138 tot_pop_density += pop_density_init_num[HH_count];
139 if (tot_pop_density > population || ceil(pop_density_init_num[HH_count+1] * population / land_pop_total_density) < 0.5) {
140 *num_locale = HH_count + 1;
141 }
142
143 // Determine city of each population square. Use city data to determine which schools students attend. Workplaces are placed by county. //
HH_count is limited to number, but here one more is added...
Builds correctly but then crashes when run on a stock Amazon Ubuntu 18.04 Deep Learning image AMI as of 2020-05-13T1412.
A machine instantiated from this image is pre-installed with cmake 13.3.3, CUDA 10.0, and nvcc. It has the GNU compiler, not the Intel compiler.
I'm not sure if this is intended to be a supported configuration, but the README suggests it is, and it compiles without errors, so I thought I would report this.
I tried this on the following exactly AWS AMI ID and instance type:
aws_ami_id=ami-09517d3f1a9a1cd9a
aws_instance_type=g3s.xlarge
Mortality rate in ICU should depend on whether ICU resources are overwhelmed. Just testing the code a little bit with 100k population yields scenarios with up to 43 ICU patients per 100k, which is about 7 times the number that Sweden usually maintains.
I recall seeing an article a couple of weeks ago estimating the change in CFR between a non-overwhelmed healthcare system and an overwhelmed one, but I cannot locate it anymore.
An alternative, if mortality rate cannot be quantified accurately, is to not report deaths in this simulation. Number of hospital and ICU beds required is perhaps more useful information in any case.
Line 2174 in 7c288c2
Usually 'i' loops over population, here the loop is missing => 'i' reuses old value
most likely from last loop, i.e i=population
This is likely to result in an access out of range 0..population-1
/* Modified factors to account for difference between population in Southeast Asia from Ferguson Model and Swedish population. This adjustment maintains 1/3 transmission in community, 1/3 transmission in household, and 1/3 transmission in workplace.
Overall population is 8.4X smaller in Sweden, attributed as a 8.4X increase in community transmission factor.
Household size is approximately 2X smaller in Sweden, 2 vs. 4, attributed as a 2X increase in household transmission factor.
R0 Scaling factor used to set approximate doubling time. R0_scale=2.2 attributes to a doubling time of approximately 3 days while R0_scale=1.8 attributes to a doubling time of approximately 5 days.
*/
Line 29 in 3dab229
used as
double betac=0.103 ; // Scaled from betac=0.075 in influenza pandemic with R0=1.6, COVID-19 R0=2.2 (Ferguson 2020)
fd=1/(1+pow((d/4), 3)); //kernel density function as parameterized for GB.
return (betac_scale*betac*kappa*fd*(1+severe*(omega-1)));
shouldn't betac_scale rather be 1/8.4 if anything? "8.4X smaller"
Do Ferguson really scale this too in his calculations depending on population size?
Same for the 2x factor for household size (can't imagine why you need an extra factor if simulation of houshold tranmissions are correct)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.