{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"queue\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Introduction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/liuxfiu/qmodels.git/master?filepath=notebooks%2Fintro.ipynb)\n", "\n", "This is a tutorial describing how to use [simulus](https://simulus.readthedocs.io/en/latest/) 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." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## How to Follow this Tutorial" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You have three options:\n", "\n", "1. Launch a live notebook server with these notebooks using [Binder](https://beta.mybinder.org/), 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\n", "\n", "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:\n", " * **jupyter**: a web application for sharing interactive documents that contain text, code, and data visualization\n", " * **numpy**: a library for efficient representation of multi-dimensional arrays\n", " * **scipy**: a library for numerical computations, including linear algebra and statistics\n", " * **matplotlib**: a 2-D plotting library\n", " * **simulus**: the discrete-event simulator for which we developed this tutorial\n", "\n", " You can install all these packages including the examples of this tutorial using the `pip` command, such as the following:\n", " ```\n", " python -m pip install --user qmodels\n", " ```\n", " 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. \n", " \n", "3. Read the documents online: http://qmodels.readthedocs.io/. However, you won't be able to run the code within the notebooks with this option." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Test the Environment" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numpy: 1.16.4\n", "scipy: 1.3.0\n", "matplotlib: 3.1.1\n", "simulus: 1.1.4\n", "qmodels: 1.0.1\n" ] } ], "source": [ "import numpy as np\n", "print('numpy:', np.__version__)\n", "\n", "import scipy\n", "print('scipy:', scipy.__version__)\n", "\n", "import matplotlib\n", "print('matplotlib:', matplotlib.__version__)\n", "\n", "import simulus\n", "print('simulus:', simulus.__version__)\n", "\n", "import qmodels\n", "print('qmodels:', qmodels.__version__)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Rest of the Tutorial" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* [Queuing Models](qmodels.ipynb)\n", "* [Random Number Generation](rng.ipynb)\n", "* [Basic Queuing Models](basics.rst)\n", " - [Event-Driven Simulation of M/M/1 Queues](mm1.ipynb)\n", " - [Process-Oriented Simulation of M/G/1 Queues](mg1.ipynb)\n", " - [Common Queuing Disciplines](qdis.ipynb)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 2 }