Skip to content

engine: queue-fed discrete conveyor holds fractional amounts #950

Open

Description

@bpowers

A discrete conveyor fed by a queue receives fractional amounts, so its slat contents and exits are not whole numbers.
docs/design/conveyors.md section 6.4 rule 1 says they stay integral, on the assumption that what a queue hands a discrete belt is already integral.
The code and the doc disagree; one of them should change.

Example

test/conveyors/queue_coupled_conveyor.xmile: discrete belt, transit 1, DT 0.5, capacity 2 + STEP(20, 2), queue fed by arrivals = TIME + 1, default batch attributes.

time   belt    boarding  departing
0      0       1         0
0.5    0.5     1.5       0
1      1.25    2         1
1.5    1.75    2         1.5
2      2       3         2

Belt contents 0.5, 1.25, 1.75 are not whole.
The VM and wasm agree.

Why it matters

The queue's default batch_integrity="false" lets it split its front batch to fill exactly the room the belt reports, and nothing on the coupled path rounds the result.
XMILE 1.0 section 3.7.2 defines batch_integrity false as "partial batches are allowed" and says nothing about whole units, so the runtime matches the spec's text.
What Stella does is unverified.
The fixture is constructed; no real model with a queue-fed conveyor has been seen.

Fix

Recommended: correct section 6.4 rule 1 to say a queue-fed belt is integral only when what arrives is (for example, integral arrivals with batch_integrity="true"), cite XMILE 3.7.2, and mark Stella's behaviour unverified.
No code change; drop the "Unresolved" note in the doc and the README remark.

Alternative, only with Stella output that shows whole units: round the coupled admission down to whole units in admission_budget / take_for_conveyor, in conveyor.rs and wasmgen/belt.rs together.

Pointers

Activity

  1. added
    engine
    on Oct 12, 2026
  2. changed the title [-]conveyor-engine: a queue-coupled discrete conveyor's slat contents are not integral, contra conveyors.md 6.4 rule 1[/-] [+]engine: queue-fed discrete conveyor holds fractional amounts[/+] on Oct 12, 2026
  3. added
    docs
    bug
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocsengine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions