In a container yard, boxes are stacked in blocks, several high. Only the top box can be lifted. If the container a truck needs today sits under three others, the crane must move those three first. These extra moves are called rehandles. They use crane time and fuel, and they keep trucks waiting at the block. They rarely show up in a berth schedule, yet they slow the whole terminal.
Stacking rules decide where each container goes when it arrives. A rule may group boxes by vessel, size, weight class or destination. A rule that looks tidy on paper can still create rehandles. If one group holds containers that leave on very different days, the early ones end up buried under the late ones. It is hard to see this by reading a rulebook. It is much easier to see in a replay.
A port twin holds a 3D model of the yard blocks, the stack height limits and the position of cranes and trucks. It receives data from the terminal operating system, which records every container and every move. To test a rule, the planner replays a real week of arrivals and pick-up requests. For each arrival the twin places the box according to the rule. When a pick-up request comes in, it counts the moves needed to reach the box. Then the planner runs the same week with another rule and compares the results.
Take a block that stores import containers collected by truck over five days. Stacking by vessel puts early and late pick-ups in the same stack. The replay may show that most rehandles pile up in one block on the busiest day. The planner can then try a rule that uses the pick-up appointment day as the main grouping, and check the result in rehandles per block, crane travel and truck queue length.
The test must stay honest about uncertainty. Pick-up appointments change, so the planner should also replay the week with some pick-ups moved by a day, and see whether the new rule still holds up. The rule must also respect fixed constraints, such as slots with power for refrigerated containers and the separation distances for dangerous goods. A rule that cuts rehandles but breaks these constraints is not usable.
Before trusting the results, check the baseline. Run the current rule on last week's data and compare the twin's rehandle count with what actually happened. If the numbers differ, fix the model first. When the baseline matches, try the new rule in one block, measure it for a few weeks, and keep the decision with the yard planners. TwinUp builds port twins that bring yard, equipment and gate data into one 3D model, which is the kind of setting where such rule changes can be rehearsed before they reach the yard.
