Ranking Criterion - modelint/shlaer-mellor-metamodel GitHub Wiki
Each instance or tuple is ordered by the Attribute value and only the highest (ascending) or lowest (descending) tuples are chosen.
Here is a Scrall Restrict Action example with a combined Ranking Criterion and Comparison Criterion:
destination heights(1, ^-Height >= current floor height)
In the destination heights
Table Flow we compare each tuple's Height
value against all of those of all of the other tuples to obtain all tuples with the minimum (^-
means rank ascending) Height
value. The Comparison Criterion then evaluates that subset of Height values greater than or equal to the value of the input Scalar Flow labled as current floor height
. The 1
to the left of the expression ensures that at most one tuple will be in the output Table Flow.
images/relational-action-subsystem/ranking-criterion-10.png
Identifiers
- ID + Action + Activity + Class + Domain
Attributes
Ascending
If ascending, highest values are chosen, otherwise descending with lowest values chosen.
Type: Ascending Descending :: [ ascending | descending ]