File Exchange

image thumbnail

SimCOVID5: Short, Medium, Long-Term Estimation (SIR & SEIR)

version 5.10 (17.3 MB) by Ismael Abdulrahman
This package is used for simulating, tracking, and estimating the COVID-19 spread worldwide in a generalized, easy, and efficient way.

230 Downloads

Updated 01 Jun 2020

View License

This work presents open-source computer simulation programs developed for simulating, tracking, and forecasting the COVID-19 outbreak. The programs are built in Simulink and MATLAB (two separate programs) and are aimed to be used for educational and research studies. It is not directed for any other reason such as medical or commercial purposes. The mathematical model used in this program is the SIR, SEIR, and SEIRD models represented by a set of differential-algebraic equations. It can be easily modified to develop new models for the problem. The package simulates all the outbreaks around the world in a generalized, easy, and efficient way. The infection and recovery rate functions are treated as constant, variable, or a combination of the two. In addition, an adaptive neuro-fuzzy inference system is employed and proposed to train the model and predict its output. As with any other open-source programs, this package comes without any guarantee. Please use it at your own risk.

Cite As

Ismael Abdulrahman (2020). SimCOVID5: Short, Medium, Long-Term Estimation (SIR & SEIR) (https://www.mathworks.com/matlabcentral/fileexchange/75025-simcovid5-short-medium-long-term-estimation-sir-seir), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

For estimating the future outbreak, just change the simulation time to a value greater than the last day of reported cases.
(see the comments in the file "Generalized_Method").
Some keynotes are also mentioned in the file as comments. For instance, select the number of sigmoid functions between 3-10. If you choose a high number of the sigmoid functions, you will let the last simulated value affect the prediction which is not preferred.

How to make future predictions using this model

Thanks Ismael for reply. Good work. Folder 'Newly_Added2' created with a newer version (R2020a) of Simulink. This folder is not compatible with older version of Matlab. Please create the above folder that is compatible with older version of matlab (2019, 2018...).

Please note that there are several updated folders in which different formulas are used for the beta function. The latest one uses (1) similar functions for the beta and gamma variables without an exponential power (2) constant gamma and variable beta without an exponential power. You can use one of these. In the paper, section 2, paragraph 3, it is mentioned that (A reasonable set of initial values were selected for the parameters positive values between 0-2 for the recovery gains and negative similar values for the exponential powers used for the infection function). I hope that helps.

Beta*e^u is not mentioned in your paper (Only mentioned Beta) but it is used in Simulink block. Why? What is the mathematical expression of Beta*e^u in terms of zeta1,2,3 and sigmoid function and Gamma in terms of gamma1,2,3 and sigmoid function.

For optimizing the parameters (beta and gamma), use the Simulink tools "Parameter Estimation" as explained in the following video:

https://www.dropbox.com/s/ncihp1dbqx1p35m/Italy_Optimization.webm?dl=0

Updates

5.10

Some improvements.

5.00

NEW:
Adding short-, medium-, and long-term estimation of the COVID-19 spread using the SIR and SEIR models (MATLAB version).

4.300

Update:
Adding the SEIR model to the MATLAB files (folder "3_NEW_Generalized_Detailed").

4.210

Minor updates.

4.200

Adding a new folder to plot both infection and death cases on the same graph. The name of the folder is "Death_and_Infectious_Combined_Plots".

4.175

Minor comments.

4.105

Minor corrections (labeling, comments...)

4.100

Adding another generalized case with multiple scenarios plots.

4.095

Minor comments.

4.090

Tracking and estimating the outbreak using the death cases (in addition to the infectious cases).

4.085

Adding a file to let plot the changes at any time "Generalized_Method3".

4.075

Adding another generalized program for estimation.

4.05

Some improvements and comments in the "generalized" program.

4.02

Minor updates.

4.01

Some minor notes.

4.0

NEW:
A generalized method is adopted to determine the number of sigmoid functions needed for the beta function (each outbreak will have a different number of sigmoid functions as needed).

3.90

Adding a detailed model of the beta function with 20 sigmoid functions to the MATLAB folder.

3.85

Adding another program to the MATLAB files with ten sigmoid steps (smoother results but relatively slower "in terms of seconds").

3.81

Some improvements in the older versions.

3.80

Some improvements in the latest MATLAB files (faster).

3.70

Minor improvements.

3.61

Minor comments.

3.60

Minor updates.

3.50

Update 1: The initial values for the time parameters used in the sigmoid function are now selected automatically based on the given data (variables).

Update 2: The sigmoid function is updated to capture some fast dynamic changes.

3.30

The sigmoid function and parameter limits are updated.

3.20

Minor comment.

3.2

Minor comments.

3.1

Update: Adding R0 (reproduction number) plot.

3.0

Now, the outbreaks in all countries around the world can be simulated in a generalized, easy, fast, and efficient way.

2.3000

Adding the case of "variable beta - variable gamma" to the MATLAB folder (program 4 in the latest "Newly-Added" folder).

2.2000

Adding a file to the MATLAB-version folder (the latest "Newly-Added" folder) to simulate the problem with considering multiple values of parameters (a percentage change in the beta function) and to plot the corresponding area.

2.1111

Adding another folder to the MATLAB version for estimating the outbreak for the rest of the simulation time (selected by the user).

2.0111

Adding a folder for plotting all state variables.

2.011

Fixing the x-axis label (date).

2.010

Minor comments.

2.01

Adding some comments.

2.0

NEW:
MATLAB version of SimCOVID is added.
Cases considered are the:
USA, UK, Italy, Spain, France, and Germany.
It can be easily modified for new case studies.

1.1222

The Simulink files in the folder "Newly_Added" are also saved for the use of older versions (R2019b, R2019a, R2018b, R2018a).

1.1221

The Simulink files in the folder "Newly_Added" are also saved for the use of older versions (R2018a, R2018b, R2019a, R2019b).

1.1211

Improving some detailed comments.

1.121

Three versions of initial Susceptible (S0) are used:
1. The entire population is considered as susceptible (S0=N) as simulated before.
2. Half of the population is considered as susceptible (S0=1/2*N)
3. 10% of the population is considered as S0

1.120

Simpler models of SIR are presented here in this folder.
1. Variable beta, constant gamma (see L. Zhong, L. Mu1, J. Li, J. Wang, Z. Yin, and D. Liu, “Early Prediction of the 2019 Novel Coronavirus Outbreak in the Mainland China Based on Simple Mathe

1.110

Adding changes in the beta parameter at time zero using parallel loop computation.

1.102

Adding some comments

1.101

Adding a change in the beta parameter.

1.10

Minor coding comments.

1.1

A new folder is added to perform a parallel loop for the infection rate variable. This lets you automatically plot some figures like Fig. 5a-b in the paper.
A new version is also coming soon for automatically optimizing the parameters from MATLAB.

1.0.11

Minor code comments

1.0.1

1. A new smooth step function replaced the old one to give smooth results using a sigmoid function.
2. Old versions (R2018a, R2018b, and R2019a) are also included, in addition to the R2019b, the version which is used to create the Simulink files.

MATLAB Release Compatibility
Created with R2020a
Compatible with R2018a to R2020a
Platform Compatibility
Windows macOS Linux

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/1_Fast_Simple

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/2_With_10_20_sigmoids

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/3_NEW_Generalized_Detailed

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/3_NEW_Generalized_Detailed/Death_and_Infectious_Combined_Plots

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/3_NEW_Generalized_Detailed/PreviousVersion

SimCOVID5/SimCOVID4_MATLAB_Simulink/All_Countries/3_NEW_Generalized_Detailed/SEIR

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/All_Outbreaks

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/All_Outbreaks/Simulink_Version_of_This_Model

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/Newly_Added_1

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/Newly_Added_2 (latest)

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Constant_Gamma

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Gamma

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2018a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2018b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2019a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2019b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2020a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2018a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2018b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2019a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2019b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2020a

SimCOVID5/SimCOVID5/Update_1

SimCOVID5/SimCOVID5/Update_2

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/All_Outbreaks/Simulink_Version_of_This_Model

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/MATLAB/All_Outbreaks/Simulink_Version_of_This_Model/Older Versions

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Constant_Gamma

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Constant_Gamma/Older Versions

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Gamma

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/Newly_Added2/Variable_Beta_Gamma/Older Versions

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018a/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2018b/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019a/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_1_SIR_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_1_SIR_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_2_SEIRD_China

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_2_SEIRD_Italy

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_3_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/All/SimCOVID_R2019b/Program_3_SIR_China_for_ANFIS

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2018a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2018b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2019a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2019b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_68/R2020a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2018a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2018b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2019a

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2019b

SimCOVID5/SimCOVID4_MATLAB_Simulink/SimCOVID___V2.3/Simulink/SimCOVID/Newly_Added/Time_Change_Zero/R2020a