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):
Vehicle | Length (cm) | Width (cm) | Height (cm) | Weight (kg) | Max Distance (km) |
---|---|---|---|---|---|
Pushbike | 40 | 30 | 30 | 10 | 80.47 |
Cargo bike | 100 | 100 | 100 | 100 | 80.47 |
Motorcycle | 45 | 45 | 45 | 15 | 600 |
Car | 90 | 60 | 60 | 100 | None |
Small van | 150 | 120 | 90 | 350 | None |
Large van | 350 | 200 | 160 | 900 | None |
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
andlength
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 thewidth
andlength
. - 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.
Updated 5 months ago