Skip to main content
Weighted modes transport operations model a single shipment leg when the exact transport operation is unknown, but the possible alternatives and their probabilities or shares are known. Set the transport operation type to WEIGHTED_MODES within a transport chain when a leg should be calculated as the weighted average of several possible AIR, RAIL, ROAD, or WATER operations. TerraTwin calculates each underlying transport operation between the same origin and destination boundaries, then combines the results using the percentage assigned to each operation. This makes WEIGHTED_MODES useful for probability based emissions, fleet-mix modelling, lane-level service mixes, and policy scenarios where the shipment could have moved in one of several known ways.

Mode

Use type: "WEIGHTED_MODES" in a transportChain transport element.TerraTwin treats that element as a single requested leg with several possible underlying transport operations.

Weights

Use weightedTransportOperations to list the alternatives.Each alternative has a percent value. The percentages must sum to 100.

Operations

Each weighted item contains a full transport operation.The same mode can appear multiple times with different properties, or the alternatives can use different modes.

Result

TerraTwin returns one combined WEIGHTED_MODES result.The response also includes the weighted child results, showing the contribution from each alternative.
WEIGHTED_MODES does not perform sampling or simulation. It calculates all provided operations and combines them according to their assigned percentages.

Basic shape

A weighted modes operation needs type: "WEIGHTED_MODES" and a weightedTransportOperations array. Each item in the array contains a percent and a nested transportOperation. For example, a carrier may know that 40% of the cargo on a lane between Madrid and Milan is transported by rail, while the remaining 60% moves by water.

Madrid to Milan by RAIL (40%) and WATER (60%)

The same pattern also works when the possible operations use the same transport mode. For example, a carrier may know that a lane is served by a fleet with 20% electric vehicle capacity and 80% diesel vehicle capacity, without knowing which vehicle served a particular package. The same approach can also be used when the route itself is uncertain. For example, a carrier may know that 70% of containerized cargo moving between Asia and Europe travels via the Suez Canal, while the remaining 30% travels around Africa. WEIGHTED_MODES can model both water transport operations and combine them according to the expected route mix.

Port of Shekou [CNSHK] to the Port of Rotterdam [NLRTM] - 70% via Suez Canal and 30% around Cape of Good Hope


Properties

Weighted modes transport has a small top-level shape. The top-level object identifies the transport type and contains the list of weighted alternatives. Each item in weightedTransportOperations describes one possible transport operation and the weighting applied to it. The nested transportOperation uses the same properties as the equivalent operation in a normal transport chain. For example, a nested ROAD operation can use grossWeightBand, vehicle, energyType, loadFactor, emptyRunning, and energyConsumption; a nested WATER operation can use vehicle, capacity, size, containerTypeCode, and navigationConstraints.
WEIGHTED_MODES cannot contain another WEIGHTED_MODES operation as a nested alternative. If a scenario has nested probability branches, flatten the branches into one weightedTransportOperations array whose percentages still sum to 100.

Selecting weighted modes as the transport type

The mode is selected with the type property on the transport operation:
The weighted operation runs between the nearest transport chain boundaries. Those boundaries come from the top-level origin and destination, or from surrounding HUB elements in a larger transportChain. The nested alternatives do not define their own origins or destinations. They are operation definitions that inherit the same start and end boundaries from the parent WEIGHTED_MODES element.
In this larger chain, the weighted leg is bounded by the London and Bucharest hub elements. Before the weighted leg, goods move by rail from the Glasgow industrial site to the London warehouse, and after it, they continue by rail from Bucharest to Chișinău. Within the weighted leg, WEIGHTED_MODES models two alternatives:
  • Express air freight via Heathrow and Otopeni 15% of the time.
  • Sea freight via the ports of Tilbury and Constanța for the remaining 85%.
The required hub and connection elements are inserted automatically along each alternative:
  • Road connections to and from the air and sea hubs.
  • Transshipment hubs for the air route.
  • Marine terminal hubs for the sea route.

Glasgow to Chișinău, with the London–Bucharest leg modelled as either standard WATER delivery (85%) or express AIR delivery (15%)

The London and Bucharest hubs omit hubType. For WEIGHTED_MODES, TerraTwin evaluates each possible incoming/outgoing mode pair and uses the hub type with the highest emissions intensity. Set hubType explicitly when the facility type is known. See Weighted modes transitions.

What the percentages mean

percent is the weighting applied to each alternative transport operation. The percentages are expressed as values out of 100 and must sum to 100 across the weightedTransportOperations array. The meaning of the weighting depends on what the request is modelling. In each case, the percentages should use a consistent basis across all alternatives. percent is not the same as loadFactor, emptyRunning, cargo weight, or vehicle utilization. Use the mode-specific properties inside the nested transportOperation to describe how full the vehicle was, how much empty running occurred, which fuel was used, or which vessel, aircraft, train, or truck was selected.
Do not base percent on vehicle counts unless each vehicle provides a comparable share of transport capacity or activity. Use a consistent basis across all alternatives, such as probability, capacity share, shipment share, or lane activity share.

Same mode weighting

Use same-mode weighting when every alternative uses the same transport mode, but differs by vehicle type, energy source, route, or service level. The same mode can appear multiple times in weightedTransportOperations. Common examples include:

Different mode weighting

Use different-mode weighting when the same leg may be carried by different transport modes. Each alternative is still a complete transport operation with its own mode specific modelling inputs. Common examples include: This example extends the road and rail service mix pattern by adding a water alternative. It models containerized cargo moving from the Port of Toronto to a warehouse in Vancouver as a weighted mix of three alternatives:
  • 70% moves by container train using a RAIL operation.
  • 25% moves by articulated truck using a ROAD operation.
  • 5% moves by POST_PANAMAX container ship using a WATER operation.

Vancouver to Toronto by diesel-electric train (70%), articulated truck (25%) and post-panamax container ship (5%)

The water alternative will select suitable harbors, insert marine terminal hubs, and may add road connector movements. The rail alternative will select suitable rail terminals and may add road connector movements. An air alternative would similarly select suitable airports, insert transshipment hubs, and may add road connector movements.
Weighted mode alternatives do not need to have the same realized structure. One child may realize as a direct road movement, while another may realize as first-mile road, hub, rail, hub, and last-mile road. TerraTwin weights the fully realized result for each alternative.