{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Introduction\n", "\n", "\"queue\"" ] }, { "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 repository contains 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." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## How to Read this Tutorial\n", "\n", "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%2Findex.ipynb\n", "\n", "2. 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:\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", "\n", " You can install these packages using the `pip` command, such as the following:\n", "\n", " ```\n", " python -m pip install --user jupyter numpy scipy matplotlib\n", " ```\n", "\n", " You'll also need to install simulus. Check out [simulus quick start](https://simulus.readthedocs.io/en/latest/readme.html) for installation instructions. The simplest way to install simulus is to run the `pip` command, such as:\n", "\n", " ```\n", " python -m pip install --user simulus\n", " ```\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\n", "\n", "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", "simulus: 1.1.4\n", "matplotlib: 3.1.1\n" ] } ], "source": [ "import numpy as np\n", "print('numpy:', np.__version__)\n", "\n", "import scipy\n", "print('scipy:', scipy.__version__)\n", "\n", "import simulus\n", "print('simulus:', simulus.__version__)\n", "\n", "import matplotlib\n", "print('matplotlib:', matplotlib.__version__)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The Rest of the Tutorial\n", "\n", "* [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 }