What is a trip?

A trip is request for a vehicle to be assigned to transport cargo or people. A trip specifies waypoints, which contain locations and actions in a sequence, that must be fulfilled. Interplai processes the trip and recommends a route.

What is a trip used for?

In order for Interplai to recommend routes, a trip is sent by the user. The trip requires tripId, routingScenarioMode, and waypoints information. Other optional parameters can be used as well.

Required Parameters

Everything is done within the context of a zone, therefore the first required parameter is the zoneId. This allows Interplai to look at which vehicles and locations have been created in that zone and determine the best vehicle to be assigned to the route.

Each trip needs to specify how the routes should be constructed. The routingScenarioMode (required) allows users to control the delivery scenario, with options that include spsd, spmd, mpsd, mpmd, and none. These allow users to indicate how many pickup and drop-off locations can be visited in a single route. More information about the routingScenarioMode can be found under Delivery Scenarios.

The action at each location is established by creating a waypoint (required). This information for a waypoint includes the location with ID of the previously existing location in the zone and also create a new location if not created previously. The waypoint details for a trip are contained inside an array called waypoints.

Additionally, the order in which the waypoints should be carried out is given by the waypointSequence (required) number. For example, if a vehicle needs to transport a food order, it must be picked up before the vehicle goes to the drop-off location. So the sequence would specify the pickup location is visited first, then the drop-off location second.

Optional Parameters

For additional flexibility, Interplai offers many other parameters to customize routes.

Parameters that affect the vehicle suggestion include:

  • The excludedVehicles array, which removes certain vehicles from consideration. Any vehicle in this array will not be assigned to the route solution for the trip. For example, if the trip requires moving a very large object, the user may want to exclude any vehicles that are not large enough to transport the object.
  • The demand number is the quantity of cargo to be handled at a waypoint. The amount of cargo for pickup will be a positive value, and the amount for drop-off will be a negative value. For example, if a vehicle picks up one unit of cargo at a waypoint, the demand for that waypoint is 1. Then, if a vehicle drops off that unit of cargo at the next waypoint, the demand for that waypoint is -1.
  • The maxStopsAllowed parameter is the maximum number of locations that can be visited in a route. Usually, a route will include at minimum two stops: a pickup location and a drop-off location. However, the default value is set at 4.
  • The manifestsarray contains information about deliveries.
  • The mobileApp contains information about the driver fees, customizable settings related to the mobile app screen based on trips, and rating information.

Several types of time parameters can also be used for customizability.

  • The timeWindow parameter is the window of time in which a vehicle must arrive at a waypoint location.
  • The optimizationTimeWindow is an interval of time for which Interplai can create an optimized route solution.
  • The serviceTime is the estimated time required for a service action to take place at a waypoint.

Additionally, there are parameters for connecting the trip to other aspects of the business.

  • Trips can be connected to the type of service being offered. For example, if a business offers more than one service, such as food delivery and ride-hailing, then the service can be put into the service parameter.
  • The userTripId is a user-defined trip identifier. This is meant as an identifier in the client's internal system and is not used by Interplai.

Update trip action

In order to execute the mobility task in the trip, the user is allowed to update the action performed by the vehicle as pickup, dropoff, or cancel. For example, a trip is generated for the vehicle to load the cargo from the user, then the action in the trip is updated as pickup.