Block that sorts the elements of the input signal u.
If the parameter ascending = true
, then the output signal y satisfies
yi <= yi+1 for all i ∈ {1, ..., n-1}.
Otherwise, it satisfies
yi >= yi+1 for all i ∈ {1, ..., n-1}.
The output signal yIdx contains the indices of the sorted elements,
with respect to the input vector u.
Note that this block shall only be used for input signals u
that are
time sampled.
Otherwise, in simulation, numerical noise from a nonlinear solver or from an
implicit time integration algorithm may cause the simulation to stall.
Numerical noise can be present if an input depends
on a state variable or a quantity that requires an iterative solution,
such as a temperature or a mass flow rate of an HVAC system.
In real controllers, measurement noise may cause the output to change frequently.
This block may for example be used in a variable air volume flow controller to access the position of the dampers that are most open.
assert
statement.