The SYSTEM command allows configuring different aspects of the simulation engine. Its basic syntax is:
SYSTEM {TYPE:..., ...}
Simulation parameters (speed, precision...)
You can control the simulation speed, temporal precision, and time decimal precision:
SYSTEM {TYPE:OPTIONS, SPEED:3}
SYSTEM {TYPE:OPTIONS, TIME_DECIMALS:2}
SYSTEM {TYPE:OPTIONS, width:1400, height:1400}
SYSTEM {TYPE:OPTIONS, SEED:1400}
SPEED: Initial playback speed (default:5).TIME_DECIMALS: Allows AC1 time to have decimal values like 3.14 instead of integers (default:0).WIDTH: Width of the simulation canvas. Default 800.HEIGHT: Height of the simulation canvas. Default 600.SEED: Generates the random number sequence using Xorshift128+.TRACE_ROUTES: Generates traces for V&V.
2.- Show basic system information
You can enable or disable the display of key engine elements:
SYSTEM {TYPE:OPTIONS, SHOW_BASICS:1}
This will display at the bottom:
TG1: Initial global timeAC1: Current timeSPEED: Simulation speed
3.- Timers (TIMER)
Timers allow procedures to be executed periodically, without entity intervention:
SYSTEM {TYPE:ON_TIMER, TRIGGER:fill, INTERVAL:0.1}
TRIGGER: Name of the procedure to execute.INTERVAL: Time interval (in simulation units) between executions.
This is useful for monitoring tasks, logging, periodic loads, etc.
Example
SYSTEM {TYPE:OPTIONS, SPEED:5, TIME_DECIMALS:1, SHOW_BASICS:0}
SYSTEM {TYPE:ON_TIMER, TRIGGER:updateGraphics, INTERVAL:0.5}
PROCEDURE updateGraphics
move {name:text1:text: "Text updated at AC1$"}
TERMINATE_VE
ENDPROCEDURE