-
Notifications
You must be signed in to change notification settings - Fork 0
Assigner
An assigner state model arbitrates competition for instances across a relationship.
There are two kinds of assigner, single and multiple.
The elevator example has only one assigner which happens to be multiple, so let's take a look at that one.
The declaration line looks like this:
relationship R53 / Shaft
And the grammar is:
assigner = "relationship" SP rnum (SP '/' SP name)? EOL*
rnum = r'O?R[1-9][0-9]*' // Relationship number
Reading it left to right: the keyword relationship, one space, the relationship number and in the case
of a multiple assigner, one space, a slash, one space, and then a partitioning class name.
An assigner may only be defined on an association relationship, one with or without an association class. If you try to define an assigner state model on a generalization or an ordinal, the parser won't stop you, but you won't be able to populate it in the metamodel.
The / Shaft component indicates that competition is local to each Shaft instance. Transfer requests for a Cabin
in Shaft S1, for example, don't compete with requests for a Cabin in Shaft S2. Thus there are multiple assigner
mediators on the association, one per instance of Shaft. We refer to Shaft as the partitioning class.
For a single assigner, there is no partitioning class. So you would just see a line like:
relationship R302
No partitioning class is specified.
Copyright 2023-2026 © Leon Starr under MIT Open Source License