Online vs Offline Optimization

When creating requests for trips, the optimizationMode helps Interplai know whether the trips should be optimized in real-time (online) or scheduled for later (offline). This parameter is set for each zone and applies to all trips created in that zone.

Online Optimization

Online optimization is best for trips that need to be completed shortly after being created. For example, this applies to same-day delivery orders, such as restaurant or grocery delivery. It considers the status of everything else in the zone to create the most efficient suggestions. For optimization solutions to be produced in real-time, the optimizer will suggest routing and vehicle information based on the data that it has at that moment.

However, updates are continually sent to the server, so new information may lead to better or different routes. This is referred to as online optimization, where Interplai makes suggestions based on current information, but allows for the possibility that the solution is created with partial data, since new data may be obtained.

📘

Benefits of online optimization

  • Suitable for continuous updates and changes.
  • Dynamic solutions can be obtained.
  • The optimizer continuously generates recommendations based on the latest information in real-time, usually within seconds.

Offline Optimization

The opposite of online optimization is referred to as offline optimization. If solutions are to be planned for a later point in time, offline optimization assumes the data submitted is complete and no new information will be received. This is best suited for trips that will be carried out at a future time, such as retail or scheduled-appointment deliveries. This way, the route can be fully planned in advance and executed at a later date. Information may be submitted to Interplai in groups or individually. When trips or vehicles are created separately, Interplai will not automatically begin optimizing the information; it will be stored until optimization is requested by Interplai. Optimization will only begin once the client explicitly performs the action startOptimization on the zone.

📘

Notes on Offline Optimization

  • Once a large batch of information has been optimized, Interplai will not generate anything new until another large batch of information is available and the startOptimization action has been triggered.
  • At any given time, only one optimization can be carried out.
  • It can take up to 50 minutes, which is typically longer than performing online optimization.

Tips

The Interplai Driver App supports both online and offline optimization. However, the Driver App is recommended for online optimization, since it automatically sends updates back to Interplai in real-time.

After an optimization solution is provided, the user is given an option to either accept or reject routes and/or segments. The below scenarios must be kept in mind while performing any action such as accept or reject.

  • If using online optimization, it is expected that users send Interplai real-time updates. Interplai will re-optimize using current information to produce the most efficient routes possible. A webhook will be sent to the user every time a new optimization solution has been created, regardless of whether the previous solution was accepted or rejected.
  • During offline optimization, real-time updates will not affect the optimization solution. Once a solution is offered by Interplai, it will not be re-optimized until the user asks for a new optimization solution.