Occurrences
An occurrence is used to designate something that has an extent in time, which is the occurrence's lifetime. Occurrences can be structural (parts, items) and behavioral (actions). There are two types of suboccurrences:
- Timeslice - represents a portion of the occurrence's lifetime.
- Snapshot - is a time slice with zero duration, representing an occurrence at a specific point in time.
Any occurrence can be specified as an individual, representing an entity with a distinct identity within a modeled system, allowing for its full or partial characterization.
Creating occurrence usage and definition elements
Creating occurrence usage and definition elements via the Textual Editor
To create occurrence usage and definition elements via the Textual Editor
- In the Textual Editor, place the cursor where you want to create the element and declare one of the following keywords:
occurrence def for an occurrence definition.
- occurrence for an occurrence usage.
- Name the element.
- (Optional) Specify the occurrence features in the element body.
- Click the Synchronize button.
occurrence def CruiseControlInteraction; // occurrence definition
occurrence cruiseController; // occurrence usage
Creating occurrence usage and definition elements via the Create Element command
To create occurrence usage and definition elements via the Create Element command
In the Containment tree, right-click an element, and in the shortcut menu, click Create Element.
- In the Create Element dialog, select one of the following:
- occurrence def to create an occurrence definition element.
- occurrence to create an occurrence usage element.
- event occurrence to create an event occurrence usage element.
- Name the element.
- (Optional) Specify the occurrence features via the Textual Editor.
Specifying or creating elements as timeslices
Specifying or creating elements as timeslices via the Textual Editor
To specify or create elements as timeslices via the Textual Editor
- In the Textual Editor, declare the timeslice keyword prior to the declaration of the element that you want to specify as a timeslice.
- Click the Synchronize button.
timeslice part carInMotion;
Specifying elements as timeslices via the shortcut menu
To specify elements as timeslices via the shortcut menu
- Right-click a usage element in the Containment tree or its symbol in a view and in its shortcut menu, in the Properties group, click Portion Kind, and in its submenu, click timeslice.
Creating elements as timeslices via the view palette
To create elements as timeslices via the view palette
In the view palette, under the Items/Ports/Attributes group, do one of the following:
To create an occurrence usage timeslice or one that will correspond to the element kind for which the timeslice will be created:
Click the timeslice button.
- Click in the view pane or the element symbol for which you want the timeslice to be created:
- Creating an element on the empty space of the view pane creates an occurrence usage element as a timeslice by default.
- Creating an element on another element symbol creates a timeslice for it:
- If the element symbol is a definition, the created timeslice is also a usage (e.g. part) that corresponds to the definition element for which the timeslice is created (e.g. part def).
- If the element is a usage, the created timeslice is also a usage of the same kind as the element for which the timeslice is created.
- To specify the timeslice's element kind:
- Click the down-facing arrow next to the timeslice button, and in its dropdown menu, click any timeslice... and select the specific element kind you need.
- Click in the view pane or the element symbol for which you want to create the timeslice.
If a timeslice element is created for an element specified as an individual, the timeslice is also created as an individual by default.
Specifying or creating elements as snapshots
Specifying or creating elements as snapshots via the Textual Editor
To specify or create elements as snapshots via Textual Editor
- In the Textual Editor, declare the snapshot keyword prior to the declaration of the element that you want to specify as a snapshot.
- Click the Synchronize button.
snapshot part carInMotion;
Specifying elements as snapshots via the shortcut menu
To specify elements as snapshots via the shortcut menu
- Right-click a usage element in the Containment tree or its symbol in a view and in its shortcut menu, in the Properties group, click Portion Kind, and in its submenu, click snapshot.
Creating elements as snapshots via the view palette
To create elements as snapshots via the view palette
In the view palette, under the Items/Ports/Attributes group, do one of the following:
To create an occurrence usage snapshot or one that will correspond to the element kind for which the snapshot will be created:
Click the snapshot button. If it is not displayed, click the down-facing arrow next to the timeslice button and click the snapshot button in the dropdown menu.
- Click in the view pane or the element symbol for which you want the snapshot to be created:
- Creating an element on the empty space of the view pane creates an occurrence usage element as a snapshot by default.
- Creating an element on another element symbol creates a snapshot for it:
- If the element symbol is a definition, the created snapshot is also a usage (e.g. part) that corresponds to the definition element for which the snapshot is created (e.g. part def).
- If the element is a usage, the created snapshot is also a usage of the same kind as the element for which the snapshot is created.
- To specify the snapshot's element kind:
- Click the down-facing arrow next to the timeslice button, and in its dropdown menu, click any snapshot... and select the specific element kind you need.
- Click in the view pane or the element symbol for which you want to create the snapshot.
If a snapshot element is created for an element specified as an individual, the snapshot is also created as an individual by default.
Specifying elements as individuals
Specifying elements as individuals via the Textual Editor
To specify elements as individuals via the Textual Editor
- In the Textual Editor, declare the individual keyword prior to the declaration of the element that you want to designate as an individual.
- Click the Synchronize button.
individual part def MyCar :> Car;
Specifying elements as individuals via the element shortcut menu
To specify elements as individuals via the element shortcut menu
- Right-click an element in the Containment tree or its symbol in a view and in its shortcut menu, in the Properties group, select the Is Individual property.