If your vehicles need to transport something but have limited capacity, quantity
and capacity
are very useful attributes. capacity
defines how much of a certain type of commodity/thing a vehicle can carry at maximum. It is defined on the individual vehicle (or globally in the defaults/vehicles section). The quantity
defines how much a vehicle's capacity changes at a stop:
- a negative
quantity
reduces the available capacity by thequantity
at a stop (pickup operation), - a positive
quantity
defines how much is replenished / returned (dropoff operation).
Naturally, only include positive quantity stops if it complements a negative quantity.
Although the number of stops can be limited per vehicle by setting -1
quantities to all of them, we recommend using the route limit functionality for improved performance.
Quantities of different dimensions do not count towards the same capacity, e.g., pallets and bins can be counted directly but may both consume the same shared space. If this is needed, they can be combined in a more abstract dimension like weight or volume.
The following example combines capacities with precedence relations to form pickup & delivery orders. In this case the vehicles need to transport items of particular size and weight. (Note that the items and units chosen are just an example, the capacity
and quantity
properties and values can be used in whatever way best matches your system.)
Single capacity and quantity values
The prior method of specifying capacity and quantity as scalar values is still supported as an alternative to the object dictionary. A code example is shown below.