GithubHelp home page GithubHelp logo

mturkol / eventdrivenrestaurantsimulator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 202 KB

An event-driven simulator with randomized customer arrival and service times drawn from probability distributions. Utilizes personally developed Sorted Doubly Linked List and Queue templated classes.

C++ 97.72% Makefile 1.93% C 0.35%

eventdrivenrestaurantsimulator's Introduction

Event Driven Restaurant Service Simulator

simRes - an event-driven simulator written in C++, by Mert Türkol.

Table of Contents

Description

This repository provides the source-code of an event-driven restaurant service simulator.

The program considers randomized customer arrival and service times from probability distributions. Sorted Doubly Linked List and Queue templated classes were personally developed for the event list and the customer line respectively. Statistical accumulations such as the longest line, average service and waiting times, as well as the percentages of server busy time, customers served and customers waited in line are computed and reported.

The project is written in C++ by Mert Türkol, for coursework in EECS402: Computer Programming For Scientists and Engineers, offered at the University of Michigan.

Installation

Compilation

Only requirement is the g++ compiler. Makefile utilizes g++ to compile simRes. To compile all the source-code, at the command shell simply type:

$ make

An executable named simRes.exe will be produced under the same directory.

Usage

After the source-code gets compiled, simRes can be called from the command line:

$ ./simRes.exe

An interactive menu will greet the user and ask for input (via keyboard) the following simulation parameters:

  • Duration of simulation
  • The seed of the random number generator
  • The minimum and maximum ranges of the uniformly distributed random customer arrival times
  • The mean and standard deviation of the normally distributed random service times

Output

After a simulation completes, the following statistics are computed and reported along with the simulation history:

  • Total customers simulated
  • Percentage of time the server was busy
  • Percentage of customers the server completed serving
  • Average service time
  • Percentage of customers waited in the line
  • Average waiting time
  • Number of customers the longest line was composed of during the simulation

Sample output of a simulation that was 60 time-units long can be accessed using the link below:

eventdrivenrestaurantsimulator's People

Contributors

mturkol avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.