1 #ifndef COVIDSIM_MODELMACROS_H_INCLUDED_ 2 #define COVIDSIM_MODELMACROS_H_INCLUDED_ 6 #define HOST_TREATED(x) ((Hosts[x].treat_stop_time > ts) && (Hosts[x].treat_start_time <= ts)) 7 #define HOST_TO_BE_TREATED(x) (Hosts[x].treat_stop_time > ts) 8 #define PLACE_TREATED(x, y) (Places[x][y].treat_end_time > ts) 9 #define PLACE_CLOSED(x, y) ((Places[x][y].close_start_time <= ts) && (Places[x][y].close_end_time > ts)) 10 #define HOST_TO_BE_VACCED(x) (Hosts[x].vacc_start_time < USHRT_MAX - 1) 11 #define HOST_VACCED(x) (Hosts[x].vacc_start_time+P.usVaccTimeToEfficacy<=ts) 12 #define HOST_VACCED_SWITCH(x) (Hosts[x].vacc_start_time >= P.usVaccTimeEfficacySwitch) 13 #define HOST_QUARANTINED(x) ((Hosts[x].quar_comply == 1) && (Hosts[x].quar_start_time + P.usHQuarantineHouseDuration > ts) && (Hosts[x].quar_start_time <= ts)) 14 #define HOST_TO_BE_QUARANTINED(x) ((Hosts[x].quar_start_time + P.usHQuarantineHouseDuration > ts) && (Hosts[x].quar_comply < 2)) 15 #define HOST_ISOLATED(x) ((Hosts[x].isolation_start_time + P.usCaseIsolationDelay <= ts) && (Hosts[x].isolation_start_time + P.usCaseIsolationDelay + P.usCaseIsolationDuration > ts)) 16 #define HOST_ABSENT(x) ((Hosts[x].absent_start_time <= ts) && (Hosts[x].absent_stop_time > ts)) 22 #define HOST_AGE_YEAR(x) (Hosts[x].age) 23 #define HOST_AGE_GROUP(x) (Hosts[x].age / AGE_GROUP_WIDTH) 25 #endif // COVIDSIM_MODELMACROS_H_INCLUDED_