Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide a working code in python . Will rate thank you! Python code for simulating an age structured SIR model Prompt: Assume we have

Please provide a working code in python. Will rate thank you!

image text in transcribed

Python code for simulating an age structured SIR model Prompt: Assume we have a population with 10,000 people and with two age classes; kids and adults. Kids are f_1=25% of the population, and adults are f_2=75% of the population. Further, assume that kids make 27 contacts each day, 2/3 of which are with other kids. Assume that adults make 15 contacts each day. The contact matrix is: C = (18 12 The system of ordinary differential equations for a SIR model with age structure includes the contact matrix, and looks like this: ds; 65; C;;!;/N; dt j dl; dt = +35; CijIj/N; 1 dR; dt = +y1; such that i and j are the indices of the age classes, and N_j is the population in age group j. The quantity beta is the probability of transmission on contact. The quantity gamma is the recovery rate. Note that in this simple model we assume that beta and gamma are the same for all age classes. The reproduction number, RO=1.5, and 1/gamma=3 days, and beta=0.05. Your objective is to write a code in Python that numerically solves the system of ODE's above, for the age-structured SIR model with the two age classes and plot a case versus time graph. Python code for simulating an age structured SIR model Prompt: Assume we have a population with 10,000 people and with two age classes; kids and adults. Kids are f_1=25% of the population, and adults are f_2=75% of the population. Further, assume that kids make 27 contacts each day, 2/3 of which are with other kids. Assume that adults make 15 contacts each day. The contact matrix is: C = (18 12 The system of ordinary differential equations for a SIR model with age structure includes the contact matrix, and looks like this: ds; 65; C;;!;/N; dt j dl; dt = +35; CijIj/N; 1 dR; dt = +y1; such that i and j are the indices of the age classes, and N_j is the population in age group j. The quantity beta is the probability of transmission on contact. The quantity gamma is the recovery rate. Note that in this simple model we assume that beta and gamma are the same for all age classes. The reproduction number, RO=1.5, and 1/gamma=3 days, and beta=0.05. Your objective is to write a code in Python that numerically solves the system of ODE's above, for the age-structured SIR model with the two age classes and plot a case versus time graph

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

Students also viewed these Databases questions

Question

Describe elasticity of demand in your own words.

Answered: 1 week ago

Question

b. Did you suppress any of your anger? Explain.

Answered: 1 week ago

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago