blockRemoveFromStagingOrder

Remove flagged units from staging order

Information

This block takes a staging order – a list of units ranked by increasing runtime – together with a flag for each unit, and produces a revised staging order in which the flagged units have been removed.

The position of each removed unit is filled with the next unflagged unit found further down the order. As a result, the enable logic that reads any position of the revised order is directed to a unit that is allowed to be enabled, while the ranking by runtime is preserved.

If all units ranked at or after a given position are flagged, that position falls back to the last unit in the order. The last position therefore always returns its own unit, whether or not it is flagged.

Parameters

TypeNameDefaultDescription
IntegernUniNumber of units

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nUni]uIdxSorIndices of polyvalent units sorted by increasing runtime
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nUni]u1Flag of each unit to be removed from the staging order, indexed by unit number
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput[nUni]yIdxSorStaging order with each flagged unit replaced by the next non-flagged unit

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicatorrepFlaReplicate unit flags for each position of the staging order
Buildings.Controls.OBC.CDL.Routing.BooleanExtractor[nUni]extFlaExtract flag of unit at each position of the staging order
Buildings.Controls.OBC.CDL.Integers.Sources.Constant[nUni]conPosPosition index within staging order
Buildings.Controls.OBC.CDL.Integers.Sources.Constant[nUni]conNUniNumber of units
Buildings.Controls.OBC.CDL.Integers.Switch[nUni]swiValPenalized position: nUni if unit at position is flagged, position index otherwise
Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicatorrepPosPosition index matrix: element (i, j) is j
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator[nUni]repRowPosition index matrix: element (i, j) is i
Buildings.Controls.OBC.CDL.Integers.GreaterEqual[nUni,nUni]greEquTrue if j >= i: candidate positions for resolving position i
Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicatorrepValReplicate penalized positions for each position
Buildings.Controls.OBC.CDL.Integers.Sources.Constant[nUni,nUni]conNUniMatNumber of units
Buildings.Controls.OBC.CDL.Integers.Switch[nUni,nUni]swiMasMask out positions before position i with nUni
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal[nUni,nUni]intToReaConvert to real for row-wise minimum
Buildings.Controls.OBC.CDL.Reals.MultiMin[nUni]mulMinFirst non-flagged position at or after position i, nUni if none
Buildings.Controls.OBC.CDL.Conversions.RealToInteger[nUni]reaToIntConvert resolved position back to integer
Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicatorrepIdxReplicate sorted unit indices for each position
Buildings.Controls.OBC.CDL.Routing.IntegerExtractor[nUni]extIdxExtract unit index at resolved position: uIdxSor[k[i]]

Revisions

  • July 10, 2026, by Antoine Gautier:
    First implementation.