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 needstype: "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%)
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.
Selecting weighted modes as the transport type
The mode is selected with thetype property on the transport operation:
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.
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%.
- 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.
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 inweightedTransportOperations.
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 aRAILoperation.25%moves by articulated truck using aROADoperation.5%moves byPOST_PANAMAXcontainer ship using aWATERoperation.
Vancouver to Toronto by diesel-electric train (70%), articulated truck (25%) and post-panamax container ship (5%)
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.