Skip to content

xmile: per-element <len> on an arrayed conveyor is silently dropped #904

Open

Description

@bpowers

An arrayed conveyor in Simlin has one <conveyor> block shared by all elements.
XMILE section 4.5.2 lets a non-apply-to-all array's <element> blocks carry their own simulation attributes, so a file can give each element its own <len>.
The reader ignores a <len> (or <conveyor>) inside an <element> without any warning, and the model runs with the shared transit time.

Example

<stock name="belt">
  <dimensions><dim name="board"/></dimensions>
  <element subscript="a"><eqn>0</eqn><len>2</len></element>
  <element subscript="b"><eqn>0</eqn><len>4</len></element>
  <conveyor><len>3</len></conveyor>
  ...
</stock>

Both belts run with transit time 3; nothing reports that the per-element values were dropped.

Why it matters

Per-element transit times already work by writing the shared <len> as an arrayed expression (<len>transit</len> with transit arrayed, as in test/conveyors/arrayed_conveyor.xmile).
No real model we have uses per-element <len> inside <element>; it is unverified whether Stella ever writes it.
The cost is only that such a file would be silently wrong.

Fix

Report it at import: have the XMILE unread-content report (xmile/unread.rs, which already produces "not kept" import warnings) flag a <len> or <conveyor> inside a stock's <element>.
docs/design/conveyors.md §10 already states the limitation; also fix its stale claim that an <element> without <eqn> fails to open (the eqn field is optional now).

Alternative: per-element conveyor attributes in the datamodel, reader, protobuf, and expansion (days of work), if a real file ever needs it.

Pointers

  • src/simlin-engine/src/xmile/variables.rs: VarElement
  • src/simlin-engine/src/xmile/unread.rs
  • docs/design/conveyors.md §10

Activity

  1. changed the title [-]conveyor-engine: per-element <len>/conveyor attributes in <element> blocks have no representation, contra conveyors.md section 10[/-] [+]xmile: per-element <len> on an arrayed conveyor is silently dropped[/+] on Oct 12, 2026
  2. added
    engine
    compat
    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

    bugcompatengine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions