1. Team
    1. Apoorva Ram
      1. Rahul Parwal
  2. Variables
    1. Delivery System (DB)
      1. Historical Data
        1. Customer Orders
        2. Restaurant Orders
        3. Previous Delivery Time(s)
    2. Real Time Signals
      1. Traffic
      2. Weather
      3. Other Factors
        1. Sudden Logout
        2. Increase in Demand
    3. Customer Location
    4. Serviceable Restaurants
    5. Available Delivery Agents
    6. Current Demand for Orders
    7. Customer Conversion Ratio
      1. Not all customers will end up with an order
  3. Delivery Equation Factors
    1. Assignment Delay
      1. Time to assign a delivery executive
    2. First Mile
      1. Time for delivery executive to arrive at restaurant
    3. Prep Time
      1. Food Preparation Time (By Restaurant)
    4. Last Mile
      1. Time for delivery executive to reach customer location
  4. Risk
    1. Time to fetch serviceable restaurants must be <= 0.5 second
    2. Too low serviceable restaurants displayed
    3. Too high delivery time
    4. Too low delivery time
      1. Breaking promised time - Bad Customer Experience
    5. Delivery Agent rejects order
    6. Historical data only gives average values for making decision
    7. Customer might leave the app
  5. Assignment Algorithm
    1. Computing available delivery executives
      1. Track all delivery executives
        1. Read their status
          1. If Status <> Available
          2. Calculate time pending to be available
    2. Strategies
      1. Just In Time Assignment (JIT)
        1. Delivery executive is idle right now
        2. Restaurant starts preparing
        3. Delivery Executive search begins
        4. Risk
          1. Delivery Executive might end up waiting if food preparation takes long
          2. Delay = Estimated Prep Time - Avg. First Mile
        5. In Parallel
      2. Next Order Assignment (NOA)
        1. Delivery executive is working on order 'n' already
        2. Next assignment is given based on the completion of the first order and nearby order that they can pick.
        3. Increases the pool of eligible executives.
      3. Batching
        1. Clubbing two orders at the same time from two customers located nearby.
        2. Enables more deliveries with limited set of executives.
        3. Complexity: NP-Hard
          1. For two (or more) orders to be batchable, we need to calculate the new Delivery times of all the orders in the Batch and make sure they still adhere to the promise made to the customer.
        4. Factors
          1. Concurrent Orders
          2. Proximity of Customers
          3. Proximity of Restaurants
          4. Time / Order Rate
          5. Traffic, Other Factors
        5. Similar to Vehicle Routing Problem