Giter Site home page Giter Site logo

bank-simulation's Introduction

Bank-Simulation Project - Spring 2022

This project was for my CSCI 154 - Simulation course at CSU - Fresno.

Project Prompt:

Simulate a bank with 10 windows with the same efficiency of 10 work-units/hour. Assume that 160 customers arrive in a working day (of 8 hours) following a uniform distribution. The work-units of the customers follow a normal distribution ~N(5,0.5) truncated within the range [5,15].

To execute, run main.py in a terminal or your favorite integrated development environment. Code was written using python 3.8 but will execute on newer versions as well.

These global variables will affect results and execution time (especially totalLoops):

*Maxiumum length of the deque*
cust = deque(maxlen=160)

Size of the VIP line
fastService = deque(maxlen=20)

*Number of teller windows*
tellerTotal = 10

*Total number of iterations*
totalLoops = 5000

5000 iterations on a 2019 Macbook pro (Intel Core i7 9750H) took almost 5 minutes. At the end of the run, it will produce graphs. Therefore, make sure you save them before your next iteration. Otherwise they will be overwritten. In linux and MacOS they will be found in the Home folder. In windows, I'm not sure, haven't done enough testing.

Note: The normal distribution is calculated with integers instead of decimal precision, further debugging is required and is likely skewing simulation results by a tracable amount but for the purposes of this project, it was acceptable.

Screenshots of simulation run: 1000 iterations(days).

Customer Arrival Times Wait Times Customers Not Served Customers Served

bank-simulation's People

Contributors

romevang 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.