modelTransition

Transition between steps (optionally with delayed transition and/or condition input port and/or synchronization and/or receiver connector of asynchronous communication)

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

TypeNameDefaultDescription
Booleanuse_conditionPortfalse= true, if conditionPort enabled
Booleanuse_afterfalse= true, if after construct should be enabled.
Modelica.SIunits.TimeafterTime0Wait time before transition can fire after the source state has been enabled.
Booleanuse_firePortfalse= true, if firePort enabled
Booleanuse_syncSendfalse= true, if using synchronization of kind SEND
Booleanuse_syncReceivefalse= true, if using synchronization of kind SEND
Booleanuse_messageReceivefalse= true, if using asynchron messages of kind TRIGGER
IntegernumberOfSyncSend0
IntegernumberOfSyncReceive0
IntegernumberOfMessageReceive0
IntegernumberOfMessageIntegers0size of the Integer parameter array of a received message
IntegernumberOfMessageBooleans0size of the Boolean parameter array of a received message
IntegernumberOfMessageReals0size of the Real parameter array of a received message
StringsyncChannelName"channelName"name of the synchronization channel
Advanced
BooleanloopChecktrue= true, if one after transition per loop required

Connectors

TypeNameDefaultDescription
Modelica_StateGraph2.Internal.Interfaces.Transition_ininPortInput port of transition (exactly one connection to this port is required)
Modelica_StateGraph2.Internal.Interfaces.Transition_outoutPortOutput port of transition (exactly one connection from this port is required)
Modelica.Blocks.Interfaces.BooleanInputconditionPortFire condition as Boolean input.
Modelica.Blocks.Interfaces.BooleanOutputfirePortpre(fire)= true, if transition fires
RealTimeCoordinationLibrary.Internal.Interfaces.Synchron.sender[numberOfSyncSend]sendersend port for synchronization channel
RealTimeCoordinationLibrary.Internal.Interfaces.Synchron.receiver[numberOfSyncReceive]receiverreceive port for synchronization channel
RealTimeCoordinationLibrary.Internal.Interfaces.Asynchron.transition_input_port[numberOfMessageReceive]transition_input_portport for trigger message

Components

TypeNameDefaultDescription
BooleanconditiontrueFire condition (time varying Boolean expression)
Booleanfire= true, if transition fires
BooleanpreFire= true, if transition could fire
BooleanhasFiredtrue for 0.3 seconds if transition fires