Behavior modeling in Dalus enables you to define how your system operates through executable actions and state machines. Create action nodes to perform computations, connect them with signal edges to transfer data, and design state machines using state nodes and transition edges to control system behavior.

Behavior Modeling Overview

Dalus provides a complete canvas for modeling dynamic system behavior with executable elements. The left sidebar shows your behavior elements, making it easy to navigate between actions and states in your system. Action node simulation showing data flow and execution

What are Action Nodes

Action nodes are executable elements that perform computations, process data, or trigger system behaviors. Each action contains a script that can read input variables, perform calculations, and produce output variables. Actions connect to other actions through signal edges to create complex behavior flows.

Creating Action Nodes

Create action nodes using the toolbar on the left side of the canvas. Click the Action button (or press A) to add new actions to your model. You can name actions by editing their labels directly. Creating an action node on the canvas using the toolbar Double-click any action to open it in a new tab and work with its script editor, allowing you to define the executable behavior.

Action Properties and Scripts

When you select an action, the right sidebar shows all its properties including input/output variables, script name, and execution settings. Each action contains:
  • Script Editor: Write Python code that defines the action’s behavior
  • Input Variables: Data inputs that the action receives from other actions
  • Output Variables: Data outputs that the action produces for other actions
  • Notes: Additional documentation about the action’s purpose
Adding input variables to an action node in the right sidebar Actions can process variables of different types (numbers, strings, arrays) and perform complex calculations, data transformations, or system operations.

Script Editor Interface

The script editor provides a comprehensive environment for writing and executing Python code. Access all variables in your model through the built-in search functionality. Script editor interface showing code area, output console, and controls

Writing Python Scripts

Write Python code directly in the editor to define your action’s behavior. The editor provides syntax highlighting and supports standard Python libraries. Writing Python code in the script editor

Using Variables in Scripts

Search for and copy variable IDs from anywhere in your model to use them in your scripts. Click the Variables button to access the search interface. Searching for variables and copying their IDs for use in scripts

Running Scripts

Execute your scripts directly from the editor using the Run button. Monitor execution status and view outputs in the console below. Running a script and viewing execution results in the output console

Data Visualizations

Actions can generate and display data visualizations including tables, line charts, and pie charts. These visualizations automatically appear in the right sidebar after script execution and help you analyze your action’s outputs. Data visualizations generated by action scripts showing tables and charts Available visualization types:
  • Tables: Display structured data in tabular format with sortable columns
  • Line Charts: Show data trends and relationships over continuous variables
  • Pie Charts: Visualize proportional data and categorical distributions
Click any visualization preview to open it in a full-screen dialog for detailed analysis. You can also delete individual visualizations using the trash icon that appears on hover.

Creating Signal Edges

Signal edges connect action nodes to transfer data between them. They represent the flow of information (variables) from one action’s outputs to another action’s inputs. To create signal edges:
  1. Click and drag from an output handle on one action
  2. Connect to an input handle on another action
  3. The signal edge automatically links the corresponding variables
Connecting multiple action nodes with signal edges to propagate data Signal edges are displayed as dashed lines with flow animation, indicating the direction of data transfer.

What are State Nodes

State nodes represent distinct operational modes or conditions of your system. Each state can have associated actions that execute when entering, staying in, or exiting the state. States connect through transition edges to form state machines that control system behavior.

Creating State Nodes

Create state nodes using the toolbar on the left side of the canvas. Click the State button (or press S) to add new states to your model. You can name states by editing their labels directly. Creating a state node on the canvas using the toolbar Double-click any state to open it in a new tab and define its internal structure or associated actions.

State Properties and Actions

When you select a state, the right sidebar shows all its properties including associated actions and notes. Each state can contain:
  • Entry Actions: Actions that execute when entering the state
  • Do Actions: Actions that execute continuously while in the state
  • Exit Actions: Actions that execute when leaving the state
  • Notes: Additional documentation about the state’s purpose
States provide a powerful way to organize and control when different actions execute based on system conditions.

Creating Transition Edges

Transition edges connect state nodes to define valid state changes in your system. They represent the paths your system can take between different operational modes. State machine overview showing multiple states and their relationships To create transition edges:
  1. Click and drag from one state node
  2. Connect to another state node
  3. Configure the transition’s trigger effects
Creating a transition edge between state nodes

Transition Properties and Effects

When you select a transition, the right sidebar shows its properties including:
  • Label: Name or description of the transition
  • Effects: Actions that execute during the state transition
  • Notes: Additional documentation about when and why the transition occurs
Assigning an action node as an effect to a transition in the right sidebar Transitions enable complex state machine logic where actions can be triggered by state changes, creating sophisticated behavioral control systems.

State Machine Execution

The behavior modeling system supports runtime execution where:
  1. The system starts in an initial state
  2. Actions execute when transitioning states, triggered using the States Dropdown below:
Executing a state transition and observing the system behavior change This creates dynamic, controllable system behavior.
Coming Soon: Advanced transition control with triggers and guards. Triggers will allow you to specify when state transitions automatically occur based on conditions or events, while guards will define when transitions cannot occur under any circumstances, providing fine-grained control over state machine behavior.

Essential Tips

  1. Plan Data Flow: Design signal connections before writing action scripts
  2. Use State Machines: Organize complex behaviors into clear operational modes
  3. Test Incrementally: Build and test actions individually before connecting them
  4. Document Behavior: Use notes to explain action purposes and state meanings
  5. Monitor Execution: Use the simulation features to verify behavior logic
The behavior modeling system enables you to create sophisticated, executable system models that can be simulated and validated before implementation.