1. Introduction

Binder

This is 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. The tutorial also comes with a python module containing all example code.

1.1. How to Follow this Tutorial

You have three options:

  1. 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%2Fintro.ipynb
  2. Run the notebooks on your own machine. The notebooks are available in the github repository (https://github.com/liuxfiu/qmodels.git) under the ‘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
  • simulus: the discrete-event simulator for which we developed this tutorial

You can install all these packages including the examples of this tutorial using the pip command, such as the following: python -m pip install --user qmodels The qmodels package contains all the notebooks as well as the example code. Since qmodels depends on all the packages listed above, they will be installed by pip before the qmodels package is installed.

  1. 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 matplotlib
print('matplotlib:', matplotlib.__version__)

import simulus
print('simulus:', simulus.__version__)

import qmodels
print('qmodels:', qmodels.__version__)
numpy: 1.16.4
scipy: 1.3.0
matplotlib: 3.1.1
simulus: 1.1.4
qmodels: 1.0.1