modelTransition
Information
Transitions are used to change the state of a StateGraph2. When the Step connected to the input of a Transition is active and the Transition condition becomes true, then the Transition fires. This means that the Step connected to the input to the Transition is deactivated and the Step connected to the output of the Transition is activated.
We changed the transition of StateGraph2 as follows. Instead of delayTransition and delayTime we added the use_after and afterTime parameter. The after time construct differs from the delay time in the original version of the StateGraph2 library in that at least the after time must have expired to let the transition fire. In contrast, the semantics of the delay time is that exactly the after time must have expired in order to let the transition fire. We introduced the after time semantics because it might happen that for two transitions that need to synchronize the time instants in which they are allowed to fire might not match due to their delay time.
We extended the transition of StateGraph2 as follows. We added the parameters use_syncSend, use_syncReceive, use_messageReceive, numberOfMessageIntegers, numberOfMessageBooleans, numberOfMessageReals, and syncChannelName.
We use this parameters to syncronize the firing of parallel transitions as described in "Synchronization" and to receive asynchronous messages as described in "Message and Mailbox".

Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | use_conditionPort | false | = true, if conditionPort enabled |
| Boolean | use_after | false | = true, if after construct should be enabled. |
| Modelica.SIunits.Time | afterTime | 0 | Wait time before transition can fire after the source state has been enabled. |
| Boolean | use_firePort | false | = true, if firePort enabled |
| Boolean | use_syncSend | false | = true, if using synchronization of kind SEND |
| Boolean | use_syncReceive | false | = true, if using synchronization of kind SEND |
| Boolean | use_messageReceive | false | = true, if using asynchron messages of kind TRIGGER |
| Integer | numberOfSyncSend | 0 | |
| Integer | numberOfSyncReceive | 0 | |
| Integer | numberOfMessageReceive | 0 | |
| Integer | numberOfMessageIntegers | 0 | size of the Integer parameter array of a received message |
| Integer | numberOfMessageBooleans | 0 | size of the Boolean parameter array of a received message |
| Integer | numberOfMessageReals | 0 | size of the Real parameter array of a received message |
| String | syncChannelName | "channelName" | name of the synchronization channel |
| Advanced | |||
| Boolean | loopCheck | true | = true, if one after transition per loop required |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_StateGraph2.Internal.Interfaces.Transition_in | inPort | Input port of transition (exactly one connection to this port is required) | |
| Modelica_StateGraph2.Internal.Interfaces.Transition_out | outPort | Output port of transition (exactly one connection from this port is required) | |
| Modelica.Blocks.Interfaces.BooleanInput | conditionPort | Fire condition as Boolean input. | |
| Modelica.Blocks.Interfaces.BooleanOutput | firePort | pre(fire) | = true, if transition fires |
| RealTimeCoordinationLibrary.Internal.Interfaces.Synchron.sender[numberOfSyncSend] | sender | send port for synchronization channel | |
| RealTimeCoordinationLibrary.Internal.Interfaces.Synchron.receiver[numberOfSyncReceive] | receiver | receive port for synchronization channel | |
| RealTimeCoordinationLibrary.Internal.Interfaces.Asynchron.transition_input_port[numberOfMessageReceive] | transition_input_port | port for trigger message |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | condition | true | Fire condition (time varying Boolean expression) |
| Boolean | fire | = true, if transition fires | |
| Boolean | preFire | = true, if transition could fire | |
| Boolean | hasFired | true for 0.3 seconds if transition fires |