Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ab206b6
Added various hacks and changes to compare to Epicast:
stevenhofmeyr Oct 23, 2025
5a7000e
added python script for comparing epicast and exaepi
stevenhofmeyr Oct 23, 2025
e83e016
fixed to properly use the transition probs of epicast
stevenhofmeyr Nov 19, 2025
20d1300
dump agents in debug mode.
stevenhofmeyr Nov 19, 2025
b72f4ad
added household cluster and do it per community, not neighborhood
stevenhofmeyr Nov 19, 2025
fd1b4a6
initialize hh cluster for census
stevenhofmeyr Nov 19, 2025
cb0517f
hospitalize on day 2 (as per epicast), using hospital_delay to set
stevenhofmeyr Nov 20, 2025
3a12c7e
used some macros to simplify parallel reductions
stevenhofmeyr Nov 20, 2025
c408aa4
fixed issue with dead become immune
stevenhofmeyr Nov 20, 2025
6f440ad
Create a #define for enabling Epicast comparisons
stevenhofmeyr Nov 20, 2025
3527ad9
converted quaryArray into a templated function
stevenhofmeyr Nov 20, 2025
4c3f7a2
Made withdrawal compliance into arrays for days 0, 1, 2 with differen…
stevenhofmeyr Nov 20, 2025
56a7318
Removed the AgeGroups_Hosp. Confusing and potential for error
stevenhofmeyr Nov 20, 2025
09d11c0
Don't allow hospital treatment on first day
stevenhofmeyr Nov 20, 2025
236c2f2
Very minor tweaks
stevenhofmeyr Nov 20, 2025
935b503
Fixed incorrect use of fields for Epicast data. Needed the ones with …
stevenhofmeyr Nov 20, 2025
001271a
include ventilated and icu in hosp counts for comparison to epicast
stevenhofmeyr Nov 21, 2025
e4889bf
Don't use epicast hack transition probabilities.
stevenhofmeyr Nov 21, 2025
cde880f
transit actions should be commented out
stevenhofmeyr Nov 22, 2025
ddfe642
cleaned up code related to neighborhoods
stevenhofmeyr Dec 2, 2025
81101ab
Assign initial infections one at a time to spread more across communi…
stevenhofmeyr Dec 3, 2025
54c1eae
A few changes to bring the code more in line with development
stevenhofmeyr Dec 3, 2025
c0aaaf4
minor tweak
stevenhofmeyr Dec 3, 2025
6dde589
set defaults for several parameters to match the Epicast defaults
stevenhofmeyr Dec 3, 2025
2989b2e
fixed GPU build issue
stevenhofmeyr Dec 3, 2025
e42c2d5
Fixed bug in plotfile writing
stevenhofmeyr Dec 3, 2025
5c4590c
formatting fix
stevenhofmeyr Dec 3, 2025
c2139bc
fixed some build errors that show with c++20
stevenhofmeyr Dec 4, 2025
b412a98
default UrbanPop to inter-neighborhood definition of household clesters.
stevenhofmeyr Dec 10, 2025
12c700e
Updated NM config file
stevenhofmeyr Dec 11, 2025
ab84932
Collecting more aggregate statistics by age.
stevenhofmeyr Dec 11, 2025
e24494f
removed unused variable
stevenhofmeyr Dec 11, 2025
a331b03
merging with development
atmyers Dec 16, 2025
993482b
make sure to include hh_cluster fix
atmyers Dec 16, 2025
cdc8eb3
add more macros
atmyers Dec 16, 2025
b7de5dd
a few more fixes
atmyers Dec 16, 2025
ff52577
clang-tidy
atmyers Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docs/source/usage/how_to_run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@ The following are inputs for the overall simulation:
Number of days shelter-in-place is in effect.
* ``agent.shelter_compliance`` (`float`, default ``0.95``)
Fraction of agents that comply with shelter-in-place order.
* ``agent.symptomatic_withdraw_compliance`` (`float`, default: ``0.95``)
Compliance rate for agents withdrawing when they have symptoms. Should be 0.0 to 1.0. Set it to 0 if not using withdrawal.
* ``agent.symptomatic_withdraw_compliance_0`` (`float`, default: ``0.3 0.3 0.3 0.3 0.3 0.3``)
Compliance rate for agents withdrawing on day 0 when they have symptoms, per age groups u5, 6-17, 18-29, 30-49, 50-64, 64+.
Should be 0.0 to 1.0. Set it to 0 if not using withdrawal.
* ``agent.symptomatic_withdraw_compliance_1`` (`float`, default: ``0.8 0.6 0.5 0.5 0.5 0.5``)
Compliance rate for agents withdrawing on day 1 when they have symptoms, per age groups u5, 6-17, 18-29, 30-49, 50-64, 64+.
Should be 0.0 to 1.0. Set it to 0 if not using withdrawal.
* ``agent.symptomatic_withdraw_compliance_2`` (`float`, default: ``0.9 0.8 0.7 0.7 0.7 0.7``)
Compliance rate for agents withdrawing on day 2 when they have symptoms, per age groups u5, 6-17, 18-29, 30-49, 50-64, 64+.
Should be 0.0 to 1.0. Set it to 0 if not using withdrawal.
* ``agent.child_compliance`` (`float`, default ``0.95``)
Compliance rate for children when schools are closed. This reduces the probability of transmission within
neighborhood clusters, neighborhoods and communities.
Expand All @@ -98,11 +105,8 @@ The following are inputs for the overall simulation:
* ``agent.student_teacher_ratio`` (`list of int`, default: ``0 15 15 15 15 15``)
This option sets the desired student-teacher ratio for school levels (none, college, high, middle, elementary, daycare).
The first entry is ignored and should always be set to 0. This option is only used with ``ic_type = census``.
* ``agent.max_box_size`` (`integer`, default ``16`` or ``500`` or ``100``)
This option sets the maximum box size used for MPI domain decomposition. If set to
``16``, for example, for ``ic_type = census``, the domain will be broken up into boxes of `16^2` communities, and
these boxes will be assigned to different MPI ranks / GPUs.
The default for ``ictype = census`` is 16, and for ``ic_type = urbanpop`` it is 500 when using GPUs, and 100 otherwise.
* ``agent.max_box_size`` (`integer`, default ``16``)
This option sets the maximum box size used for MPI domain decomposition.
* ``diag.output_filename`` (`string`, default ``output.dat`` for a single disease,
``diag.output_[disease name].dat`` for multiple diseases)
Filename for the output data; the number of list elements must be the same as ``agent.number_of_diseases``.
Expand Down
21 changes: 11 additions & 10 deletions examples/inputs.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ agent.shelter_start = -1
agent.shelter_length = 0
# The compliance rate for shelter-in-place, i.e. the probability of an agent actually sheltering.
agent.shelter_compliance = 0.95
# The probability of an agent withdrawing when first becoming symptomatic.
agent.symptomatic_withdraw_compliance = 0.95
# The probability of an agent withdrawing on day 0, day 1 and day 2 for age groups u5, 5-17, 18-29, 30-49, 50-64, 65+
agent.symptomatic_withdraw_compliance_day_0 = 0.3 0.3 0.3 0.3 0.3 0.3
agent.symptomatic_withdraw_compliance_day_1 = 0.8 0.6 0.5 0.5 0.5 0.5
agent.symptomatic_withdraw_compliance_day_2 = 0.9 0.8 0.7 0.7 0.7 0.7
# The compliance rate for children when schools are closed. This reduces the probability of transmission in the neighborhood.
agent.child_compliance = 0.5
# A factor for increasing transmission by children within households when schools are closed.
Expand All @@ -55,12 +57,7 @@ agent.child_HH_closure = 2
# This is only used for the census data.
agent.student_teacher_ratio = 0 15 15 15 15 15
# The maximum grid size used for MPI domain decomposition. Adjusting this can change the computation time and load balance.
# if ic_type is census
# agent.max_box_size = 16
# if ic_type is urbanpop and using GPUs
# agent.max_box_size = 500
# if ic_type is urbanpop and not using GPUs
# agent.max_box_size = 100
agent.max_box_size = 16

# A list of file names, one per disease, each one of which will be the output for the counts of the statuses for that disease.
# defalut for one disease
Expand Down Expand Up @@ -112,8 +109,12 @@ disease.hospital_delay_length_alpha = 1.0
# Beta parameter for the hospital_delay length Gamma distribution. The hospital_delay length is the length in days after developing symptoms that agents seek treatment.
disease.hospital_delay_length_beta = 1.0

# Number of days in hospital for the age groups under 50, 50 to 64 and over 64.
disease.hospitalization_days = 3 8 7
# Number of days in hospital for age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
disease.hospitalization_days = 3 3 3 3 8 7
# Alpha parameter for days in hospital Gamma distribution, for age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
disease.hospitalization_days_alpha = 1.33 1.33 1.33 1.33 0.5 0.57
# Beta parameter for days in hospital Gamma distribution, for age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
disease.hospitalization_days_beta = 1.5 1.5 1.5 1.5 4.0 3.5

# Transmission probabilites at the community level, for both work and home locations,
# for the age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
Expand Down
34 changes: 9 additions & 25 deletions examples/inputs.nm
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
# settings for the census input type
# agent.ic_type = "census"
agent.census_filename = "../CensusData/NM_TX_2010.dat"
agent.workerflow_filename = "../CensusData/US-wf.bin"

# settings for the urbanpop input type
# agent.ic_type = "urbanpop"
agent.urbanpop_filename = "../UrbanPop/NM_35/urbanpop_nm"
# The input data file for urbanpop ic_type. Do not include the extension. There must be two files, with extensions .csv and .idx.
agent.ic_type = "urbanpop"
agent.urbanpop_filename = "data/UrbanPop/urbanpop_nm"

agent.nsteps = 70
#agent.seed = 11
agent.plot_int = -1

disease.initial_case_type = "file"
disease.case_filename = "../CaseData/nm-july4.cases"
agent.aggregated_diag_int = -1

# agent.number_of_diseases = 2
# agent.disease_names = "covid" "flu"
agent.seed = 0

# disease.initial_case_type = "random" "random"
# disease.num_initial_cases = 1000
diag.output_filename = output_nm.dat

# setting these results in simulations with similar outcomes between UrbanPop and Census
# disease.hospitalization_days = 6 6 6
# disease.CHR = 0.1 0.1 0.1 0.1 0.1 0.1
# disease.CIC = 0.3 0.3 0.3 0.3 0.3 0.3
# disease.CVE = 0.15 0.15 0.15 0.15 0.15 0.15
# disease.hospCVF = 0 0 0 0 0 0
# disease.icuCVF = 0 0 0 0 0 0.0
# disease.ventCVF = 0.3 0.3 0.3 0.3 0.3 0.3
disease.initial_case_type = "file"
disease.case_filename = "data/CaseData/nm-july4.cases"

# disease_flu.num_initial_cases = 100
# disease_flu.p_trans = 0.3
22 changes: 15 additions & 7 deletions src/AgentContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class AgentContainer : public amrex::ParticleContainer<0, 0, RealIdx::nattribs,

std::array<amrex::Long, OutputStatus::nattribs> getTotals(const int);

std::array<amrex::Long, AgeGroups::total> getNewStatusByAge(const int a_d, const int output_status);

int getMaxGroup(const int group_idx);

void moveAgentsToWork();
Expand All @@ -97,9 +99,6 @@ class AgentContainer : public amrex::ParticleContainer<0, 0, RealIdx::nattribs,
/*! \brief Return the number of diseases */
inline int numDiseases () const { return m_num_diseases; }

/*! \brief return the symptomatic withdrawal compliance */
inline amrex::Real symptomaticWithdrawCompliance () const { return m_symptomatic_withdraw_compliance; }

void printStudentTeacherCounts() const;

void printAgeGroupCounts() const;
Expand All @@ -108,18 +107,27 @@ class AgentContainer : public amrex::ParticleContainer<0, 0, RealIdx::nattribs,
/// Used only for Census data. A ratio for each school type: none, college, high, middle, elem, daycare
amrex::GpuArray<int, SchoolType::total> m_student_teacher_ratio = {0, 15, 15, 15, 15, 15};

/*!< Symptomatic withdrawal compliance rate, day 0, AgeGroups u5, 5-17, 18-29, 30-49, 50-64, 65+*/
amrex::GpuArray<amrex::Real, AgeGroups::total> m_symptomatic_withdraw_compliance_day_0 = {0.3_rt, 0.3_rt, 0.3_rt,
0.3_rt, 0.3_rt, 0.3_rt};
/*!< Symptomatic withdrawal compliance rate, day 1 */
amrex::GpuArray<amrex::Real, AgeGroups::total> m_symptomatic_withdraw_compliance_day_1 = {0.8_rt, 0.7_rt, 0.5_rt,
0.5_rt, 0.5_rt, 0.5_rt};
/*!< Symptomatic withdrawal compliance rate, day 2 */
amrex::GpuArray<amrex::Real, AgeGroups::total> m_symptomatic_withdraw_compliance_day_2 = {0.9_rt, 0.8_rt, 0.7_rt,
0.7_rt, 0.7_rt, 0.7_rt};

int m_num_diseases; /*!< Number of diseases */

amrex::iMultiFab comm_mf;

short ic_type;

protected:
amrex::Real m_shelter_compliance = 0.95_rt; /*!< Shelter-in-place compliance rate */
amrex::Real m_symptomatic_withdraw_compliance = 0.95_rt; /*!< Symptomatic withdrawal compliance rate */
amrex::Real m_shelter_compliance = 0.95_rt; /*!< Shelter-in-place compliance rate */

std::vector<DiseaseParm*> m_h_parm; /*!< Disease parameters */
std::vector<DiseaseParm*> m_d_parm; /*!< Disease parameters (GPU device) */
std::vector<DiseaseParm*> m_h_parm; /*!< Disease parameters */
std::vector<DiseaseParm*> m_d_parm; /*!< Disease parameters (GPU device) */

std::unique_ptr<DiseaseCouplingParm<PTDType>> m_disease_coupling;

Expand Down
Loading
Loading