In the 2024x version, Alf can now be utilized as a scripting language to write simple expressions (for example, using dot notation) without the need for compilation. These scripts can be employed in Opaque Actions, Opaque Behaviors, Opaque Expressions, State Machine Guards, and even directly in the Simulation Console. Learn more >>>
Image Added
Simple Alf scripts used in State Machine diagram
Helper Functions
The following Helper Functions have been added to the Alf model library to provide certain Action Language Helper capabilities that are not natively available as part of the Alf language.
InState – Checks if a particular object is in a certain state.
WasInState – Checks if a particular object has ever visited a certain state.
GetCurrentTime – Gets the current simulation time.
GetTimeUnit – Gets the name of the configured simulation time unit.