File Exchange

image thumbnail

SimCOVID5

version 5.75 (24.1 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.

41 Downloads

Updated 20 Oct 2020

View Version History

View License

Introduction:
----------------
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.

Data Source:
------------------
A simple script was coded to extract the data for each country from the excel sheet provided by the website below and updated daily. you only need to enter the country name and run the model. You can easily edit the programs for your own uses. All worldwide countries are included.
https://www.ecdc.europa.eu/en/geographical-distribution-2019-ncov-cases

SimCOVID consists of two separate programs:
MATLAB Version:
-----------------------
Several MATLAB programs with different versions are available using various models including SIR and SEIR representation. The programs are used for:
(1) parameter estimation
(2) tracking existing data
(3) forecasting future spread
You can edit the codes, add new differential equations, define new functions for the inputs such as the infection and recovery rates, and build a GUI for your model and use.

Simulink Version:
-----------------------
The same basic models created in MATLAB are available in Simulink with a block diagram display. This was the first version of SimCOVID to be used for estimating the parameters in the model, simulating the model to track the virus spread and predict its path and size. In addition, an adaptive neuro-fuzzy inference system is created to replace the differential equations in the model and predict the future outbreak. The program is included in the Simulink version of SimCOVID. Further, several demonstrating videos were created and available below for educational purposes. For those who have different versions of Simulink, the same programs were saved in the following versions: R2018a, R2018b, R2019a, R2019b, and R2020a.

Preprint Publication:
---------------------------
https://www.medrxiv.org/content/10.1101/2020.04.13.20063354v2
https://www.researchgate.net/publication/340600580_SimCOVID5_Short-_Medium-_and_Long-Term_Estimation_SIR_and_SEIR_Models_-_Worldwide_Countries

Educational Videos:
--------------------------
https://www.dropbox.com/s/ncihp1dbqx1p35m/Italy_Optimization.webm?dl=0
https://www.dropbox.com/s/illjl95v4r603og/Italy.webm?dl=0
https://www.dropbox.com/s/mj6bi1jbiik9c03/Italy_SEIRD.webm?dl=0
https://www.dropbox.com/s/mxbz8j9ogoom65g/China_Wuhan_SEIRD.webm?dl=0
https://www.dropbox.com/s/myi95d6dwnttoc8/ChinaOneStep.webm?dl=0
https://www.dropbox.com/s/sbnn1784a00hiw7/ANFIS.webm?dl=0

Cite As

Ismael Abdulrahman (2020). SimCOVID5 (https://www.mathworks.com/matlabcentral/fileexchange/75025-simcovid5), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (14)

Abbi McKann

Carlos Muñiz

harendra singh

milan batista

Ismael Abdulrahman

The data source changed the population year from 2018 to 2019. If you download and use the new data, update a related line in the code from:
"popData2018" to "popData2019".

Ismael Abdulrahman

Make sure your excel sheet in the same folder where the code is and make sure of its name. That is what the error message tells you.

harendra singh

I get the following error when trying to run your code.
Error using readtable (line 216)
Unable to open file
'COVID-19-geographic-disbtribution-worldwide-2020-05-30.txt'.

Error in SEIR_Long_Term (line 6)
COVID19_Data =
readtable('COVID-19-geographic-disbtribution-worldwide-2020-05-30',
'ReadVariableNames', true);

Ismael Abdulrahman

For estimation, start with a low value of "MaxNumChanges" (> 1), that is, 2, 3, 4, 5, and so on. You can increase it if you have enough data or the outbreak passed the peak. Typical values 3-5.

Ismael Abdulrahman

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.

suhail suhail

How to make future predictions using this model

harendra singh

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...).

Ismael Abdulrahman

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.

harendra singh

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.

Ismael Abdulrahman

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

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

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/SimCOVID5/Update_3

SimCOVID5/SimCOVID5/Update_4

SimCOVID5/SimCOVID5/Update_5

SimCOVID5/SimCOVID5/Update_5/Plotting Beta Gamma

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