Same physical wagons (coupled / decoupled) — each leg carries its own availableWagons set, so capacity is recomputed leg-by-leg.
availableWagons + maxTeu recompute capacity.A weight rule splits one TRAIN run (Origin → Dest) into two segments — the second leg moves via an external line.
The full 20-wagon consist runs A→B, drops 3 into a reserved slot at B, and a shorter 17-wagon consist continues to C. On the way back the same 3 wagons are re-coupled at B — capacity is recomputed leg-by-leg.
The full consist runs A→B, decouples 3 wagons into a reserved slot at B, and the shorter 17-wagon consist continues to C. On the return the same 3 are re-coupled at B. Per-leg availableWagons and maxTeu recompute capacity.
A weight rule splits one TRAIN run (Origin → Dest) into TRAIN_INTERNAL (Origin → Malmö) plus EXTERNAL (Malmö → Dest, via barge / other carrier).
Capacity, TEU and wagon figures are illustrative placeholders for the planning concept.
How it works: each leg carries its own availableWagons set, so maxTeu (capacity) is recomputed leg-by-leg — 20 wagons A→B and B→A, 17 wagons B→C and C→B. Capacity / TEU figures are illustrative placeholders.