Capacities and Alternative Capacities

Vehicles carry load, and that load is measured in various dimensions (think of weight, ground area, height, volume, count, and many more). The capacities of a vehicle is the maximum that can be transported by the vehicle in all these dimensions. However, the loading area of a vehicle may have several configurations, and each configuration comes with its own capacities. This is when alternative capacities are helpful.

Example Use Cases
  • Pallets and boxes

    Suppose a vehicle can transport pallets and boxes. The (alternative) capacities describe a combination of a number of pallets and a number of boxes that can be loaded onto the vehicle at the same time, e.g. 10 boxes and 1 pallet or 2 boxes and 2 pallets. Boxes are modeled as the first dimension of the capacities vector, pallets as the second dimension.

    You can either specify the vehicle like this

    
    								"vehicles": [
    								{
    									"id": "Truck",
    									"capacities": [10,1],
    									"alternativeCapacities": [ [2,2] ]
    								}
    						]

    or like this

    
    								"vehicles": [
    								{
    									"id": "Truck",
    									"alternativeCapacities": [ [10,1],[2,2] ]
    								}
    						]
  • Multiple compartments with mobile partition wall

    Consider a vehicle that has multiple compartments to transport groceries, e.g. one for frozen and one for fresh vegetables. Between the compartments is a partition wall that can be moved such that either more frozen or more fresh vegetables can be transported. Alternative capacities can be used to model every configuration of that partition wall. This is how it could look like:

    
    									"vehicles": [
    									{
    										"id": "Truck",
    										"alternativeCapacities": [ [0,9],[1,8],[2,7],[3,6],[4,5],[5,4],[6,3],[7,2],[8,1],[9,0] ]
    									}
    							]
Where Changing the Capacities Alternative is Feasible

In the second above example, moving the partition wall requires some tools and these tools may only be available at a depot. In other words, switching between the capacities alternatives could only be done between trips. To this end, you can specify whether the capacities alternatives can be switched at every stop or only between trips. In the first above example, you would set


						"vehicles": [
						{
						"id": "Truck",
						"alternativeCapacities": [ [10,1],[2,2] ],						
						"capacitiesChangePosition": "AT_STOP"
						}
				]

whereas in the second above example you would set


						"vehicles": [
						{
						"id": "Truck",
						"alternativeCapacities": [ [0,9],[1,8],[2,7],[3,6],[4,5],[5,4],[6,3],[7,2],[8,1],[9,0] ],
						"capacitiesChangePosition": "BETWEEN_TRIPS"
						}
				]
Example

Consider a vehicle with two capacities alternatives:

  • Alternative 1: 4 units of load type A fit onto the vehicle with 2 units of load type B and 1 unit of load type C.
  • Alternative 2: 3 units of load type C only fit onto the vehicle with 0 units of load type A and B

Now consider two transports in a request:

  • A delivery from a depot to a customer with load of one unit of load type A and B each.
  • A pickup from that same customer with three units load of type C.

Assume that switching the capacities alternative is only allowed between trips. Then these two transports can only be transported in separate trips.

If switching the capacities alternative is allowed at any stop, the two transports can be served in one trip. The valid capacities alternative switches at the customer from alternative 1 to alternative 2.

Choosing the Right Capacities Alternative

Depending on the load on a vehicle, multiple capacities alternatives may be valid at the same time. The algorithm chooses the capacities alternatives in a way that the number of changes is minimized. As a second criterion, the capacities alternatives are chosen in order of their appearance where capacities are always the preferred ones. If no valid capacities alternative can be found for an input route, the violations are reported with respect to capacities and if they are not defined with respect to the very first capacities alternative for the whole route. This means, that even if there is a valid capacities alternative for parts of the route, violations for these parts are also considered with respect to capacities respectively the very first capacities alternative.

Performance

Allowing to switch capacities alternatives only between trips requires more computation time than allowing it at every stop. Furthermore, the computational effort increases with the number of alternatives as well as with their size. To avoid unnecessary performance loss, only use pareto-optimal capacities alternatives, i.e. do not use alternatives that fit into others.