private void PersonExposed(Human agent, IRandomProvider random) { var symptoms = Parameters.SymptomWeights.Sample(random); agent.Symptoms = symptoms; var incubationRate = 1d / Parameters.IncubationPeriod; agent.IncubationPeriod = random.SampleDaysInState(incubationRate); var infectiousRate = 1d / Parameters.TimeInfectious; agent.DaysInfectious = random.SampleDaysInState(infectiousRate); }
private void IncubationEndsSevere(Human agent, IRandomProvider random) { agent.SevereToHospital = random.Chance(Parameters.PropStoH); var meanTimeToAdmission = agent.SevereToHospital ? Parameters.TimeStoH : Parameters.TimeStoC; var progressionRate = 1d / meanTimeToAdmission; agent.DaysIsolated = random.SampleDaysInState(progressionRate); }
private void PersonMovedToIcu(Human agent, IRandomProvider random) { agent.DiesInIcu = random.Chance(Parameters.PropDieInIcu); var meanTimeInIcu = agent.DiesInIcu ? Parameters.TimeCtoD : Parameters.TimeCtoR; var rateOfExit = 1d / meanTimeInIcu; agent.DaysInIntensiveCare = random.SampleDaysInState(rateOfExit); }
private void PersonAdmitToHospital(Human agent, IRandomProvider random) { agent.HospitalOutcome = Parameters.HospitalizationOutcomes.Sample(random); var meanLengthOfStay = agent.HospitalOutcome switch { HospitalOutcome.Recover => Parameters.TimeHtoR, HospitalOutcome.IntensiveCare => Parameters.TimeHToC, HospitalOutcome.Die => Parameters.TimeHtoD, _ => throw new InvalidEnumArgumentException( $"Mean time in hospital for outcome {agent.HospitalOutcome} has not been mapped in the disease parameters") }; var dischargeRate = 1d / meanLengthOfStay; agent.DaysInHospital = random.SampleDaysInState(dischargeRate); }
private void AgentExposed(SirAgent agent, IRandomProvider random) { agent.IncubationTime = random.SampleDaysInState(agent.SirContext.SigmaParam); }
private void AgentBecomesInfectious(SirAgent agent, IRandomProvider random) { agent.InfectiousDays = random.SampleDaysInState(agent.SirContext.GammaParam); }