INSA
  • Tutorials
  • Documentation
  • Api Documentation
  • Changelog
Show / Hide Table of Contents
  • Scenario Engine
    • What is a scenario Engine?
    • Main Definitions
      • Scenario
      • Transition
      • Sensor
      • Effector
      • Context
    • All Definitions
      • Comment
      • Complex Sequence
      • Context
      • Decision Tree
      • Effector
      • Event
      • Event Context
      • External Context
      • External Scenario
      • Function
      • Node
      • Net
      • Petri-Net
      • Place
      • Safe Petri-Net
      • Scenario
      • Scenario Context
      • Sensor
      • Sequence
      • State
      • State Machine
      • Token
      • Token Assign
      • Token Merge
      • Token Split
      • Transition
    • How to deal with asynchronous events?
  • Relation Engine
    • What is a relation Engine?
  • Scenario with Relation

Transition

A Transition is a type of node within a scenario.

Transitions are usually linked to :

  • one or more upstream places.
  • one (for state machines) or more downstream places.

Transitions can usually have :

  • Zero or mutiple Sensor functions
  • Zero or mutiple Effector functions
  • A Token merge function
  • A Token assign function
  • A priority

Firing a transition

1-Petri net with a transition ready to be fired
A transition that can be fired.

Transitions can fire if :

  • All upstream places contain a token
  • There is no Sensor function OR all the Sensor functions are valid. When checked, the sensors have access to the token data of all upstream places in the form of a merged token. This action does not consume the tokens from the upstream places yet.

When a transition fires (i.e. it meets the requirements above) it sequentially:

  1. Consumes all upstream places tokens
  2. Merges all sensors event contexts in an array of contexts. Each sensor context data path is prefixed with it's order number (i.e. the first sensors context data is in EventContext.0.xxxxx)
  3. Sequencially runs all the Effector functions (see Effector)
  4. Assigns a token in every downstream place (see Token Assign) (note that if at least one of these downstream place contains a token, an error occurs)
1-Petri net with a transition ready to be fired
A transition that has been fired.
Note

As we are working with 1-safe petri nets, the downstream places of a transition being fired must hold no token prior to the assignation. They can however hold a token anytime before that, including right before the merging of the tokens of upstream places if a place is both an upstream and a downstream place to a transition.

Transitions also contain a priority value, defaulted to zero. A higher priority transition gets to be checked before lower priority transitions. For more details on the order in which all functions of a transition are called, see Safe Petri Network.

INSA     IRISA     Inria     Ouest Valorisation Back to top