OrderManagementSystem - A real-time system that simulates the fulfillment of delivery orders for a kitchen

Overview

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.

You might also like...
A UIKit custom modal transition that simulates an elastic drag
A UIKit custom modal transition that simulates an elastic drag

A UIKit custom transition that simulates an elastic drag.This is the Objective-C Version of Elastic Transition written in Swift by lkzhao

Projeto base de uma app de Delivery utilizado nas Sprints da Devpass.
Projeto base de uma app de Delivery utilizado nas Sprints da Devpass.

Delivery App Challenge 🍕 Neste desafio, implementaremos uma app de Delivery em equipe, dividindo tarefas e seguindo todas as boas práticos de desenvo

Moit: a single delivery platform for college students living in dormitories
Moit: a single delivery platform for college students living in dormitories

Moit: a single delivery platform for college students living in dormitories

A food delivery app using firebase as the database.
A food delivery app using firebase as the database.

FDA-ONE Food Delivery Application is a mobile application that users can use to find the best restaurant around their location and order the meals the

A simple, reliable and scalable delivery API for transactional push notifications for websites and applications
A simple, reliable and scalable delivery API for transactional push notifications for websites and applications

Catapush is a simple, reliable and scalable delivery API for transactional push notifications for websites and applications. Ideal for sending data-dr

An automated insulin delivery app template for iOS, built on LoopKit
An automated insulin delivery app template for iOS, built on LoopKit

Loop for iOS Loop is an app template for building an automated insulin delivery system. It is a stone resting on the boulders of work done by many oth

Contentful.swift : Swift Delivery SDK for Contentful
Contentful.swift : Swift Delivery SDK for Contentful

contentful.swift - Swift Delivery SDK for Contentful Swift SDK for the Contentfu

Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass
Challenge-vip-delivery - Project for VIP (Clean Swift) Architecture Dev Sprints on Devpass

VIP (Clean Swift) - Delivery App 🍕 Neste desafio, aplicaremos conceitos da arquitetura VIP para finalizar a implementação de um aplicativo. Desenvolv

DeliveryOnboardingSwiftUI - A Delivery Onboarding screen made with SwiftUI
DeliveryOnboardingSwiftUI - A Delivery Onboarding screen made with SwiftUI

DeliveryOnboardingSwiftUI Its a Onboarding screen made with SwiftUI

Auto scrollable multi platform header menu usually used in food delivery applications - SwiftUI & Combine
Auto scrollable multi platform header menu usually used in food delivery applications - SwiftUI & Combine

Auto scrollable header menu - SwiftUI & Combine Features Auto scrollable up menu while navigating the list up and down Navigate to any section from up

This is an online food delivery app.
This is an online food delivery app.

Foodiezz Online Food delivery App About This is an authenticated Food delivery App where the authenticated user can find dishes and place order easily

Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift
Messenger Clone - Real-time iOS Chat with Firebase Firestore written in Swift

Real time Swift iOS Chat with Firebase - Messenger Clone This is an extremely simple chat app source code of an iOS Swift Chat app. It leverages Messa

iOS - Real-time messaging app  🎨
iOS - Real-time messaging app 🎨

General mChat is a real-time messaging app written in Swift for iOS devices. Since mChat uses a fast and reliable Firebase Database, it receives data

A collaborative Augmented Reality iOS experience using Real-time Messaging

Collaborative AR Experience This project creates an augmented reality experience where you can build a scene together with anyone around the world, se

The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

Open Source Real Time Strategy game based on Warfare Incorporated

About Hostile Takeover is the open source release of the wildly popular mobile Real Time Strategy game Warfare Incorporated. Warfare Incorporated's de

 A library that allows you to generate and update environment maps in real-time using the camera feed and ARKit's tracking capabilities.
A library that allows you to generate and update environment maps in real-time using the camera feed and ARKit's tracking capabilities.

ARKitEnvironmentMapper Example To run the example project, clone the repo, and run pod install from the Example directory first. Installation ARKitEnv

A real-time, votable, democratized music queue on iPad and iPhone using Spotify
A real-time, votable, democratized music queue on iPad and iPhone using Spotify

Queue'd Music Queue'd is the best way to enjoy music with your friends. Add your favorite songs to a shared music queue at your favorite bars, restaur

Real-Time image recognition for iOS with Vision(CoreML) and InceptionV3
Real-Time image recognition for iOS with Vision(CoreML) and InceptionV3

Kesan-ML-iOS Real-Time image recognition for iOS with CoreML and InceptionV3  Test Flight Description Real-Time image recognition Integrating app wit

Owner
Amer Hukić
iOS @poviolabs, previously @NXP
Amer Hukić
This is an online food delivery app.

Foodiezz Online Food delivery App About This is an authenticated Food delivery App where the authenticated user can find dishes and place order easily

Muskan Rao 2 Jul 28, 2022
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

CurvSurf 27 Aug 24, 2022
Demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypaths ensure compile-time safety for all injectable services.

Injectable Demo Preliminary musings and demonstration code for a simple Swift property-wrapper, keypath-based dependency injection system. The keypath

Michael Long 12 Aug 5, 2022
This is an app for a craft beer company called Cacique Bier that allows to see their available products and place orders. Made with Swift and SwiftUI.

Cacique Bier App This is an app for a Craft Beer company that shows their catalogue of products and in the future will allow purchases. The app is com

Augusto Galindo Ali 5 Jun 21, 2022
Will Powell 1.2k Sep 16, 2022
Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter 40 Sep 16, 2022
Teatanic is an iOS application that simulates a tea shop.

teatanic Teatanic is an iOS application that simulates a tea shop. A user is able to search among different tea types and "buy" it. purpose This appli

null 2 Oct 6, 2021
ClearScore - This application simulates a credit check on a user by making a call to an API and displaying the data

ClearScore Description This application simulates a credit check on a user by ma

Sashen Pillay 0 Jan 11, 2022
Simulates cellular automata patterns according to rules of Wolfram Alpha.

Cellular Automata App Simulates cellular automata patterns according to rules of Wolfram Alpha. What can I do with this? This app is designed with the

Natalie 0 Jan 15, 2022