1. Introduction¶
This repository contains a tutorial describing how to use simulus to model queuing systems. Simulus is an open-source discrete-event simulator in Python. The tutorial consists of several Jupyter notebooks, on which we develop and run simulation code.
1.1. How to Read this Tutorial¶
You have three options:
- Launch a live notebook server with these notebooks using Binder, which provides an executable environment for running Jupyter notebooks. Access the binder at the following URL: https://mybinder.org/v2/gh/liuxfiu/qmodels.git/master?filepath=notebooks%2Findex.ipynb
- Run these notebooks on your own machine. The notebooks are available in this repository’s ‘notebooks’ directory. To run the notebooks, you need to first have the following packages installed:
- jupyter: a web application for sharing interactive documents that contain text, code, and data visualization
- numpy: a library for efficient representation of multi-dimensional arrays
- scipy: a library for numerical computations, including linear algebra and statistics
- matplotlib: a 2-D plotting library
You can install these packages using the pip command, such as the following:
python -m pip install --user jupyter numpy scipy matplotlib
You’ll also need to install simulus. Check out simulus quick start for installation instructions. The simplest way to install simulus is to run the pip command, such as:
python -m pip install --user simulus
- Read the documents online: http://qmodels.readthedocs.io/. However, you won’t be able to run the code within the notebooks with this option.
1.2. Test the Environment¶
If you are running this tutorial inside Jupyter, make sure you are able to the run the following cell. If an error occurs, it means you are missing some needed packages. If that happens, you need to install the missing packages and restart the notebook to continue with the tutorial.
[1]:
import numpy as np
print('numpy:', np.__version__)
import scipy
print('scipy:', scipy.__version__)
import simulus
print('simulus:', simulus.__version__)
import matplotlib
print('matplotlib:', matplotlib.__version__)
numpy: 1.16.4
scipy: 1.3.0
simulus: 1.1.4
matplotlib: 3.1.1