Starting from:

$30

IE306 - System Simulation - Homework 1 - Solved

Consider a system where N independent individuals can get sick following an exponential rate of λ. An individual who is sick either goes to the hospital with probability p1 = 0.2 or stays at home with probability p2 = 1−p1. The hospital has K beds for the patients. If a person cannot be admitted to the hospital due to full capacity s/he goes home for self care. The healing process of these patients take r,r ∼ U[1,2], times longer than it would in the hospital. A sick person is healed following an independent exponential time with rate µi,i = 1,2,3, where i = 1 denotes a patient being treated in the hospital, i = 2 denotes a patient that does not need to go to the hospital and i = 3 denotes a patient that is rejected by the hospital due to full capacity. Thus (µ3)−1 = (µ1)−1∗r is the rate of healing at home. Note that the times of healing are still independent.

•    Generate a discrete event simulation model for this problem: Report the Future Event List, Simulation Time, Number of sick people, number in the hospital and other necessary model outputs in a table for the first 50 events.

•    Compare the following model responses: long run probability of the hospital being empty, average number of occupied beds in the hospital, average proportion of sick people in the population, total average sickness time using the following simulation time, random number seed and starting condition settings.

–    Run the simulation by starting with the hospital empty, half full and full.

–    For each condition of hospital state run each simulation for 1000, 10000, 100000 units of time using the same random number seed.

–    Change the random number seed and repeat the previous runs.

•    The input variable values have to be generated as follows:

–    For S = P3i=1 last three digits of student ID numberi, if 1000 < S set N = S else if, 10 < S set N = S + 1000, else set N = S × 300.

–    Let K = dN/12e[beds],λ = N/300[patients/day],(µ1)−1 = 6[days],(µ2)−1 = 10[days].

For each step of the simulation an understandable and proper reporting is required. You are also required to compare and discuss the results of your simulations thoroughly with the knowledge you have gathered in the course so far.

You should base your code on the SimPy pseudocode provided in the Jupyter notebook. For coding use Python 3.6 or higher. Your report has to follow standard reporting lines and should be uploaded as a pdf file. One zipped file that contains the code and the report should be uploaded. The file should not be larger than 2 Mb, it must be submitted through the Moodle website (e-mails and other means will be disregarded) and it should be named as: IE306- Asn-1-Group-yy-Lastname1-Lastname2-Lastname3.zip with names in alphabetical order.

More products