Vehicle Types

Vehicle Limits

When creating a job you may specify a preferred vehicle type. If the total weight and size of the parcels you send fall within the given vehicle restrictions then we'll assign that job to a courier with the given vehicle. If the total parcel size and weight does not fall within these restrictions, we'll allocate the job to the most appropriate vehicle available.

Below is a list of offered vehicles along with their maximum capacities (sum of all the parcels sent):

VehicleLength (cm)Width (cm)Height (cm)Weight (kg)Max Distance (km)
Pushbike4030301080.47
Cargo bike10010010010080.47
Motorcycle45454515600
Car906060100None
Small van15012090350None
Large van350200160900None

How Gophr Calculates The Required Vehicle Type

Gophr uses the following factors when deciding which vehicle to assign a job to:

  • Consignment type - some items are not suitable for certain vehicles. e.g. we do not assign jobs that contain glass to our bike couriers.
  • The aggregated dimensions of all the parcels in the consignment.
  • The total weight of the consignment.
  • The distance of the job.

Parcel Dimension Aggregation

When determining the total consignment dimensions, it's difficult to write an algorithm that will compensate for every possible vehicle and parcel shape. We take a pragmatic approach to this problem by making the following assumptions:

  • We think of vehicles as boxes with the dimensions stated in the table above.
  • We think of parcels as cuboids based on the provided width, height and length measurements.

In order to determine if a consignment will fit into a vehicle, we use the following model:

  • Order the parcels by volume (largest first)
  • Stack the parcels vertically up one side of the vehicle
  • By default we rotate about all axis to try and make the parcel fit, unless the is_not_rotatable flag is set on the parcel.
  • If the is_not_rotatable flag is set, we only rotate about the width and length.
  • Once one side of the box is full, we begin packing the parcels side-by-side where one will fit alongside the previous. Again we rotate the parcels to achieve this if we can.

The above is an example of a Bin packing algorithm and whilst it doesn't compute every single stacking permutation possible (complete solutions are NP hard in complexity) it does a good job of imitating how the parcels might be placed in the vehicle by a real courier.