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.

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.

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.

Updates

Adding another program with the recovery rate represented by a sigmoid function (in addition to the infection rate).

4 Jun 2020

5.40

Minor updates.

2 Jun 2020

5.35

Adding the cumulative plot to the update-3 program (SimCOVID5\Update_3_NEW).

2 Jun 2020

5.30

Minor updates.

2 Jun 2020

5.20

Adding another generalized method (Update_3_NEW) to predict the future outbreak regardless of the length of the simulation time. Change the simulation time to get the short-, medium-, and long-term estimation.

1 Jun 2020

5.10

Some improvements.

31 May 2020

5.00

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

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

28 May 2020

4.175

Minor comments.

28 May 2020

4.105

Minor corrections (labeling, comments...)

27 May 2020

4.100

Adding another generalized case with multiple scenarios plots.

27 May 2020

4.095

Minor comments.

26 May 2020

4.090

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

26 May 2020

4.085

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

26 May 2020

4.075

Adding another generalized program for estimation.

26 May 2020

4.05

Some improvements and comments in the "generalized" program.

23 May 2020

4.02

Minor updates.

22 May 2020

4.01

Some minor notes.

22 May 2020

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

22 May 2020

3.90

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

19 May 2020

3.85

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

10 May 2020

3.81

Some improvements in the older versions.

8 May 2020

3.80

Some improvements in the latest MATLAB files (faster).

7 May 2020

3.70

Minor improvements.

6 May 2020

3.61

Minor comments.

6 May 2020

3.60

Minor updates.

6 May 2020

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 May 2020

3.30

The sigmoid function and parameter limits are updated.

2 May 2020

3.20

Minor comment.

2 May 2020

3.2

Minor comments.

2 May 2020

3.1

Update: Adding R0 (reproduction number) plot.

2 May 2020

3.0

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

29 Apr 2020

2.3000

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

29 Apr 2020

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.

28 Apr 2020

2.1111

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

27 Apr 2020

2.0111

Adding a folder for plotting all state variables.

27 Apr 2020

2.011

Fixing the x-axis label (date).

27 Apr 2020

2.010

Minor comments.

27 Apr 2020

2.01

Adding some comments.

27 Apr 2020

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.

26 Apr 2020

1.1222

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

26 Apr 2020

1.1221

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

23 Apr 2020

1.1211

Improving some detailed comments.

23 Apr 2020

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

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

20 Apr 2020

1.102

Adding some comments

20 Apr 2020

1.101

Adding a change in the beta parameter.

19 Apr 2020

1.10

Minor coding comments.

19 Apr 2020

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.

17 Apr 2020

1.0.11

Minor code comments

17 Apr 2020

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.