This block generates the equipment enable commands based on the
active stage index uSta
, the equipment available
signal u1Ava
and the indices of lead/lag alternate
equipment, sorted by increasing staging runtime.
A staging matrix staEqu
is required as a parameter.
staEqu[i, j]
equal to 0
means that equipment j
shall not be enabled at
stage i
.staEqu[i, j]
equal to 1
means that equipment j
is required at stage i
.
If equipment j
is unavailable, stage i
is
deemed unavailable.
staEqu[i, j]
strictly lower than 1
and strictly greater than 0 means that equipment j
may be enabled at stage i
as a lead/lag alternate equipment.
If equipment j
is unavailable but another lead/lag alternate
equipment is available, then the latter equipment is enabled.
Stage i
is only deemed unavailable if all
lead/lag alternate equipment specified for stage i
are unavailable.
∑_j staEqu[i, j]
gives the number of equipment required at stage i
.
If this number cannot be achieved with the available equipment,
stage i
is deemed unavailable.
∑_j staEqu[i+1, j] ≥ ∑_j staEqu[i, j]
is required for all i < size(staEqu, 1)
.
The state of the enable signals is only updated at stage change, or if the number of previously enabled equipment that is available is strictly less than the number of equipment required to run. This avoids hot swapping equipment, e.g., an equipment would not be started and another stopped during operation just to fulfill the priority order. However, when a lead/lag alternate equipment becomes unavailable and another lead/lag alternate equipment can be enabled to meet the number of required equipment, then the state of the enable signals is updated.