Solution Architecture: The Decoupled Model

Updated: 2026-05-29

To achieve the solution, we divide the Conveyor resource into two layers with radically different responsibilities. This approach greatly simplifies the problem.

  • The visual layer
  • The logical layer

Although it may not seem so, the entire solution comes from completely disregarding the visual layer: rendering.

The visual layer:

Each box has its length, whether it is moving or not, and the last known [position,time].
Nothing else.
Rendering at each instant takes care of the rest.

  • If the box is stationary: It is drawn at the stored position.
  • If it is moving: Visual_Position = Position + Velocity * (AC1 - Time).

Therefore, the goal is to emit a perfect current vector state for all boxes, and the renderer does whatever is necessary to display it at that instant.

If we limit ourselves to these rendering requirements, the logic becomes simpler in its underlying philosophy.

The logical layer:

The logic is freed from the burden of simulating continuous motion. It is reduced exclusively to managing which entities are moving and which are not, and the exact moment when that state changes.

  • No integration: The system does not calculate position step by step. It calculates the position vector.
  • Events: In this Next Event algorithm, a box does not "move forward until it encounters" a constraint. Instead, the system calculates the mathematically feasible future time at which a constraint could arise (such as a collision with the preceding box or reaching the end of the conveyor).
  • The Shift in Perspective: It is not the box that searches for the obstacle; it is the constraint that "finds" the box in time.

In other words:
time determines when a state ceases to be valid.
Position is neither searched for nor integrated step by step.

The challenge is to model this behavior without resorting to cells or continuous recalculations, but rather through discrete events that represent only the relevant changes. To achieve this, we will build an explicit causal topology among the entities present on the conveyor, allowing all control decisions to be resolved without searching through the set of boxes.