Problem
docs/design/conveyors.md section 10 (lines 1001-1006) states that for arrayed conveyors, "Non-apply-to-all arrays (<element> blocks) may give each element its own <len> and other per-element attributes", citing XMILE spec section 4.5.2 (which indeed says each element MAY define its own simulation attributes "such as event poster and transit time").
The engine cannot represent or honor a per-element <len>:
datamodel::Conveyor is one shared block per stock -- transit_time is a single expression.
- The XMILE reader's
<element> struct carries only eqn/gf; there is no per-element conveyor sub-block, so a <len> inside an <element> has nowhere to land (it is not parsed).
conveyor_compile::expand_conveyors synthesizes the len aux from the ONE shared conv.transit_time, arrayed apply-to-all over the stock's dims (param_equation(&conv.transit_time, &stock_dims) in src/simlin-engine/src/conveyor_compile.rs).
So the design doc promises per-element transit times that the implementation cannot parse or simulate. A shared <len> EXPRESSION can still vary per element -- but only if the expression itself is arrayed (e.g. references an arrayed aux); a per-element <len> literal inside <element> blocks has no representation.
Why it matters
Doc/implementation divergence: the design doc is the specification of record for conveyor behavior, and section 10 currently documents a capability that silently does not exist. A model author (or future implementer) reading the doc would expect per-element <len> to work; today the reader drops it without diagnostic (the element sub-block is simply not parsed).
Components
src/simlin-engine/src/conveyor_compile.rs (expansion uses the single shared transit_time)
src/simlin-engine XMILE reader (<element> struct has no conveyor sub-block)
docs/design/conveyors.md section 10
Possible dispositions
Either:
- Implement per-element conveyor attributes: add a datamodel representation (per-element conveyor overrides), reader support for a conveyor sub-block (or at least
<len>) inside <element>, and expansion changes so each element belt gets its own transit-time expression; or
- Amend conveyors.md section 10 to state the current limitation: the conveyor block is shared across elements; per-element variation of transit time is achievable only via an arrayed
<len> expression (e.g. referencing an arrayed aux), and per-element <len> inside <element> blocks is not supported (ideally with a loud reader diagnostic if encountered).
Context
Noticed on branch conveyor-engine (PR #869 line of work) while implementing #889 (per-element explicit init lists on arrayed conveyors, which ARE supported -- this issue is only about per-element <len>/conveyor-block attributes). Related but distinct: #889 (init lists), #874 (per-slat init reachability), #865 (deferred edge cases), #881 (other doc violations).
Problem
docs/design/conveyors.mdsection 10 (lines 1001-1006) states that for arrayed conveyors, "Non-apply-to-all arrays (<element>blocks) may give each element its own<len>and other per-element attributes", citing XMILE spec section 4.5.2 (which indeed says each element MAY define its own simulation attributes "such as event poster and transit time").The engine cannot represent or honor a per-element
<len>:datamodel::Conveyoris one shared block per stock --transit_timeis a single expression.<element>struct carries onlyeqn/gf; there is no per-element conveyor sub-block, so a<len>inside an<element>has nowhere to land (it is not parsed).conveyor_compile::expand_conveyorssynthesizes the len aux from the ONE sharedconv.transit_time, arrayed apply-to-all over the stock's dims (param_equation(&conv.transit_time, &stock_dims)insrc/simlin-engine/src/conveyor_compile.rs).So the design doc promises per-element transit times that the implementation cannot parse or simulate. A shared
<len>EXPRESSION can still vary per element -- but only if the expression itself is arrayed (e.g. references an arrayed aux); a per-element<len>literal inside<element>blocks has no representation.Why it matters
Doc/implementation divergence: the design doc is the specification of record for conveyor behavior, and section 10 currently documents a capability that silently does not exist. A model author (or future implementer) reading the doc would expect per-element
<len>to work; today the reader drops it without diagnostic (the element sub-block is simply not parsed).Components
src/simlin-engine/src/conveyor_compile.rs(expansion uses the single sharedtransit_time)src/simlin-engineXMILE reader (<element>struct has no conveyor sub-block)docs/design/conveyors.mdsection 10Possible dispositions
Either:
<len>) inside<element>, and expansion changes so each element belt gets its own transit-time expression; or<len>expression (e.g. referencing an arrayed aux), and per-element<len>inside<element>blocks is not supported (ideally with a loud reader diagnostic if encountered).Context
Noticed on branch
conveyor-engine(PR #869 line of work) while implementing #889 (per-element explicit init lists on arrayed conveyors, which ARE supported -- this issue is only about per-element<len>/conveyor-block attributes). Related but distinct: #889 (init lists), #874 (per-slat init reachability), #865 (deferred edge cases), #881 (other doc violations).