Skip to content

Vehicle types

A vehicle type models a collection of vehicles sharing the same attributes. During optimisation, the solver assigns routes to vehicles such that costs are minimised while satisfying all constraints. Every vehicle can be assigned at most one route, and every route is executed by a single vehicle.

Start and end depots

The start and end depots define where a vehicle begins and ends its assigned route. When specified, the vehicle departs from the start depot and must return to the end depot after completing all tasks. If unspecified, the vehicle starts at its first task location and ends at its last task location. The Start and end locations tutorial explores this further.

Number of available vehicles

Each vehicle type specifies how many vehicles of that type are available. The solver may use any of the available vehicles to serve all tasks, and it tries to use as few vehicles as possible.

Capacity

The capacity defines the maximum load a vehicle can carry per load dimension. Load dimensions correspond to the delivery and pickup amounts on tasks, and can represent weight, volume, pallets, or any other measure. The total load on a vehicle never exceeds its capacity for each dimension. The Load and capacities tutorial covers this in detail.

Shift

The shift defines the time constraints for vehicles of this type:

  • Earliest start time: The vehicle cannot begin its assigned route before this time.
  • Latest start time: The vehicle must begin its assigned route by this time.
  • Latest end time: The vehicle must complete its assigned route by this time.
  • Nominal shift duration: The regular working time for the vehicle.
  • Maximum overtime: Additional time the vehicle may work beyond the nominal duration. Working overtime incurs extra cost, but allows extra flexibility when needed.

For worked examples, see the Vehicle shifts tutorial.

Costs

Vehicles incur costs in three ways:

  • Fixed cost: a one-time cost incurred when a vehicle is assigned to a route. This can be helpful to encourage the solver to use fewer vehicles, or when differentiating between in-house and third-party vehicles.
  • Cost per kilometre: cost based on travel distance. Setting only a cost per kilometre optimises for shortest routes, for example to reduce fuel consumption.
  • Cost per hour: hourly operating cost for the total route duration, and an additional cost per hour overtime for time exceeding the nominal shift duration.

Learn more in the Cost optimisation tutorial.

Maximum distance

The maximum distance limits the total travel distance of a route in metres. This is useful for modelling vehicles with a limited range, such as electric vehicles.

Reloading

When a vehicle's capacity is insufficient to serve all its tasks in one go, it can return to a depot mid-route to reload. You can specify which depots a vehicle may visit to reload and the maximum number of reloads per route. FastVRP decides which reload depot to visit and when, respecting depot time windows and loading durations. When no reload depots are specified, the vehicle cannot reload during its route. See the Reloading tutorial for a worked example.

Profile

The routing profile determines how travel distances and durations between locations are calculated. By default, all vehicle types use the car profile, which uses road network data to compute realistic travel times. Different vehicle types can use different profiles, for example to model a mixed fleet of cars and cargo bikes. You can also provide custom profiles with your own distance and duration matrices. The Custom routing profiles tutorial shows how.