/smart-assigning-driver

Smart driver capacity management to assign meal orders to delivery drivers, assigning more than one order to the same driver at the same time.

Primary LanguagePHPMIT LicenseMIT

Smart Driver Capacity Management

Smart driver capacity management to assign meal orders to delivery drivers, assigning more than one order to the same driver at the same time.

Untitled drawing (1)

Let's agree on glossaries below:

  1. Trip : is a journey that Driver makes to a particular place ( Customer's location ).
  2. Collection : is the driver basket that inlcudes set of orders.

There are main 3 entities in the algorithm

  1. Driver
  2. Restaurant
  3. Order and Order Item

When it comes to food, temperature is just as important as taste. No matter how delicious your juicy burger is, no one will take a bite if it’s as cold as ice. Transporting hot and cold foods together, in the same container, can compromise the safety and integrity of your meals. Train delivery staff to use insulated hot and cold bags to keep food at the appropriate temperature.

Database Structure:

Screen Shot 2021-06-29 at 11 09 46 PM

Where

  1. prepare_tolerence_minutes = how many minutes you are allowed to wait between orders
  2. collection_tolerence_minutes = how many minutes you are allowed to wait the whole collection before you leave the rest
  3. max_agg_orders = Max orders per collection to get from rest before you leave.
  4. max_agg_order_items = Max order items per collection to get from rest before you leave.
  • here you take the minmum between max_agg_orders and max_agg_order_items.
  1. item_handling_seconds and order_handling_seconds = handling time per order and item order

Installation

Screen Shot 2021-06-19 at 2 42 59 PM

Screen Shot 2021-06-19 at 2 43 14 PM

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Ramzi Alqrainy - @RamziAlqrainy - ramzi.alqrainy@gmail.com