36 PerformCaseFinding(std::move(pop), rnManager, simDay);
42 unsigned short int simDay)
45 if (m_detection_probability <= 0.0) {
49 using namespace ContactType;
51 auto& logger = pop->RefContactLogger();
54 std::initializer_list<Id> AgencyPoolIdList{Id::Household};
56 for (
auto& p_case : *pop) {
57 if (p_case.GetHealth().IsSymptomatic() && p_case.GetHealth().SymptomsStartedToday()) {
58 for (
Id typ : AgencyPoolIdList) {
60 const auto& pools = pop->CRefPoolSys().CRefPools(typ);
61 const auto poolId = p_case.GetPoolId(typ);
66 for (
const auto& p_member : pools[poolId].GetPool()) {
67 if (p_case != *p_member && p_member->GetHealth().IsSusceptible() &&
68 uniform01Gen() < m_detection_probability) {
71 p_member->GetHealth().SetImmune();
74 logger->info(
"[VACC] {} {} {} {} {} {} {}", p_member->GetId(),
75 p_member->GetAge(),
ToString(typ), poolId, p_case.GetId(),
76 p_case.GetAge(), simDay);
string ToString(Id l)
Converts a LogMode value to corresponding name.
void PerformCaseFinding(std::shared_ptr< Population > pop, util::RnMan &rnMan, unsigned short int simDay)
Public Health Strategy: look for symptomatic cases and vaccinate their household. ...
void Exec(std::shared_ptr< Population > pop, util::RnMan &rnManager, unsigned short int sim_day)
Execute.
void Initialize(double detection_probability)
Initialize.
std::function< double()> GetUniform01Generator(unsigned int i=0U)
Return a generator for uniform doubles in [0, 1[ using i-th random stream.
Header file for the core Population class.
Header for the PublicHealthAgency class.
Namespace for the simulator and related classes.