Skip to content

Commit

Permalink
fixed the issue: subject_id should be included
Browse files Browse the repository at this point in the history
  • Loading branch information
eMaerthin committed Mar 18, 2022
1 parent beccebf commit 164e328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event_execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function quarantinehousehold!(state::SimState, params::SimParams, subject_id::In
if !include_subject && (member == subject_id)
continue
end
if rand(state.rng) > params.household_params.quarantine_prob
if rand(state.rng) > params.household_params.quarantine_prob && member != subject_id
continue
end
member_freedom = freedom(state, member)
Expand All @@ -452,7 +452,7 @@ end

function tracehousehold!(state::SimState, params::SimParams, subject_id::Integer; trace_household_connections::Bool)
for member in householdof(params, subject_id)
if rand(state.rng) > params.household_params.trace_prob
if rand(state.rng) > params.household_params.trace_prob && member != subject_id
continue
end
backtrace!(state, params, member, trace_household_connections=trace_household_connections)
Expand Down

0 comments on commit 164e328

Please sign in to comment.