This project is a Python implementation for a SEIRS-NIMFA compartmental epideiologic model that describes the evolution of a malware infection in an IoT network. This is an individual-based approach described by the following flow diagram:
The SEIRS-NIMFA flow diagram for a device i
Here xi(t), wi(t), yi(t), and zi(t) represent the probability of the device i being at each of the compartments, S, E, I, R, repectively, at time t, and bi(t), αi, σi, and ɣi represent the transition rates between the compartments for device i (although these are homogeneous for all the network in the implementation).
├── SEIRSModel/ # Root directory
│ ├── assets/ # Folder containing images, diagrams, or other assets
│ ├── data/ # Folder containing sample initial configurations
│ │ ├── results/ # Folder where results of the simulation are dynamically saved
│ │ ├── test_case_examples/ # Folder with network configurations in the form of adjacency matrices used for the test cases from the article
│ ├── independent_scripts/ # Folder containing scripts to run code without GUI
│ ├── interface/ # Folder containing Python files for the GUI
│ ├── model/ # Folder containing Python files for the logic of the simulation
│ │ ├── network.py # Network class: IoT device network construction
│ │ ├── seirs_model.py # NIMFA SEIRS model for a homogeneous network with constant parameters
│ │ └── states.py # Enumeration for the states definition
│ ├── interface_seirs.py # File containing main Python script
│ ├── .gitignore # Gitignore file
│ ├── README.md # Project README file
│ └── requirements.txt # Dependencies specification file
Follow these steps to run the SEIRSModel project:
-
Clone the project
git clone https://github.com/Lauraquiroga/SEIRSModel.git cd SEIRSModel
-
Install Dependencies
Create and activate a virtual environment. Install requirements mentioned in the requirements.txt file.pip install -r requirements.txt
Ensure that you have Python installed on your system.
-
Configure
Modify or add initial configuration files for your scenarios. These might be found in the data folder.
-
Run the GUI
python interface_seirs.py
Follow the steps indicated in the GUI according to your requirements.
-
View Results
Visualize and save the graphs of the results through the GUI if needed.
Explore the results in the data/results folder. The simulation dynamically saves output files there.