Giter VIP home page Giter VIP logo

ordermanagementsystem's Introduction

Logo

License Twitter: @hukicamer

This project showcases the implementation of an order management system used for management of delivery orders for a kitchen.

System description

It's a real-time system that simulates the fulfillment of delivery orders for a kitchen. The system receives 2 delivery orders per second (defined in dispatch_orders.json in the project). Each order takes some time (defined as prepTime) to be prepared. Once an order is prepared, it is waiting and ready for courier pickup.

Upon receiving an order, the system immediately dispatches a courier to pick it up. Couriers arrive randomly following a uniform distribution, 3-15 seconds after they’ve been dispatched. Couriers have to wait at the kitchen if the order they are picking up is not ready. Once a courier picks up an order it is instantaneously delivered.

The system supports two courier dispatch strategies and evaluates their performance.

  • Matched: a courier is dispatched for a specific order and may only pick up that order
  • First-in-first-out: a courier picks up the next available order upon arrival. If there are multiple orders available, an arbitrary order is picked up. If there are no available orders, couriers wait for the next available one. When there are multiple couriers waiting, the next available order is assigned to the earliest arrived courier.

The system prints the statistics each time an order is picked up. After the system has finished processing all orders the following statistics are shown:

  • Average food wait time (milliseconds) between order ready and pickup
  • Average courier wait time (milliseconds) between arrival and order pickup

Usage

The project was developed as an iOS app that is used to run the simulation. To run the project:

  1. Open the OrderManagementSystem.xcodeproj file
  2. Run the app in one of the simulators
  3. The app will show 2 buttons that correspond to the 2 courier dispatch strategies - FIFO and matched.
  4. Tap one of the buttons to run the simulation with the desired strategy.
  5. The system will output events (order received, order prepared, courier dispatched, courier arrived, order picked up) in the Xcode console. Once the simulation finishes the average waiting time will be shown in the Xcode console.

Author

Amer Hukić

License

OrderManagementSystem is licensed under the MIT license. Check the LICENSE file for details.

ordermanagementsystem's People

Contributors

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