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

A decision tree is a kind of graph that is used to gather multiple decisions results. It can only have one initial node (the root node) and must contain 2 or more final nodes (the leaves). It is meant to be resolved in one call, meaning that when a token is set in the root node, it should reach one of the leaves before the current scenario engine update finishes. A decision tree cannot hold effectors.

Decision Tree
A simple decision tree.

When a decision tree is resolved by the scenario engine, the result of the path taken will be found in the resulting token, provided the user fills it in the tree nodes (see below).

Sensors

Sensors in a decision tree will trigger the transition (or decision) they are attached to whether they return true or false. If they return true, the token will go to the TrueDownstreamNode or to the FalseDownstreamNode otherwise

Nodes

Each Node in a decision tree can hold a ATokenInit function in order to add data in the token. This is the recommended way to be able to manage the result or the path taken in the decision tree later on.

INSA     IRISA     Inria     Ouest Valorisation Back to top