Developing Delegates

Behavior Execution Engine provides you with the ability to integrate APIs from external analysis tools into your simulation. These analysis tools, such as STK, can handle the physics complexities implicitly, without your needing to explicitly build that logic in your system models. Behavior Execution Engine frees you from the burden of needing to provide the underlying simulation infrastructure; instead, you can focus on the design of your system. You can create custom functionality in this infrastructure by using "delegates".

A delegate is a Java interface or class that represents a one-to-one correspondence between itself and a block in your model. A delegate class contains custom code that implements the properties and operations of a block. This code is executed when the opaque expressions in state machines are evaluated at simulation runtime. Though any arbitrary Java code may exist inside a delegate, you reap the true benefit of Behavior Execution Engine when you use delegates to integrate the analytical rigor of physics-based analysis tools to precisely drive state machine transitions in a simulation.

This topic provides a comprehensive overview of the Behavior Execution Engine delegate architecture. It covers the Java API and various tools we provide to make developing your delegates as painless as possible. It also makes special note of how to expose physics-based events in ways that are not feasible or scalable when using No Magic Cameo Simulation Toolkit alone.

If you plan to use an Integrated Development Environment (IDE) such as Eclipse, IntelliJ IDEA, or VS Code, you should set it up before you get started writing delegates.

For discussion of specific delegate development topics, refer to the following:

Understanding of Java is required for this reference. Custom analysis tools you intend to integrate do not need to be written in Java, but must expose a Java interface.

Troubleshooting

Please refer to the Troubleshooting Page if you have any issues running your simulation with your custom delegates.