Running Simulations Automatically in ModelCenter

ModelCenter-related features only function if you have valid licenses for the corresponding ModelCenter applications. If you acquired Behavior Execution Engine as part of ModelCenter Enterprise, you already have all the necessary licenses. If you acquired Behavior Execution Engine as part of STK Enterprise, you will need to separately acquire the ModelCenter licenses.

In addition to executing Behavior Execution Engine independently, you can execute SysML models automatically as part of ModelCenter workflows. In particular, this enables you to scale up to large numbers of parallel simulation runs for trade studies or optimization. If you do not have access to ModelCenter, please contact us at support@agi.com to explore alternate ways of executing Behavior Execution Engine automatically using custom scripts.

  • For documentation on ModelCenter's included Behavior Execution Engine component, see /ModelCenter 23.2/Plug-Ins/BEE/BEEPlugIn.chm in the ModelCenter installation directory.
  • For more information on ModelCenter products, see the ModelCenter product page.

Scalability

The primary use for running Behavior Execution Engine through ModelCenter is to run simulations many times in parallel, varying the input values for each run. ModelCenter enables you to do this with built-in parametric trade study and optimization tools, or with custom automated analysis involving parallel workflows. If your simulations use STK, you may want to use STK Engine when running automatically to avoid the graphical overhead of the STK desktop application.

Input and output values

ModelCenter enables you to specify SysML value property slots from your simulation as either inputs that ModelCenter will pass in before running the simulation or outputs that it will read after the simulation completes. Double-click the Behavior Execution Engine component in the ModelCenter workflow or Component Tree and select Select Variables to specify these inputs and outputs.

Deploying projects

Model dependencies

Your MDZIP project likely has dependencies on other MDZIP projects, such as standard libraries or reusable SysML model libraries. To ensure these dependencies are available when executing your project, save or copy them all into one of the following locations.

Be careful to avoid duplicates of any dependency among these locations, as multiple copies of a dependency may cause problems when loading your project, especially if the dependency is referenced in multiple locations.

  • Absolute file paths inside your project file - AGI does not recommend relying on the absolute file paths in an MDZIP file. Unfortunately, this is often where your project will find its dependencies if you run the project on the same machine that you saved it on.
  • Alongside your project file - This is an easy method of deploying exactly the dependencies your project requires. However, it may lead to some duplication if you deploy multiple projects that depend on the same reusable libraries. To avoid this duplication, consider using the modelDependencies directory.
  • The modelDependencies directory in the Behavior Execution Engine installation - This serves as a common repository for reusable dependencies, and is where Behavior Execution Engine's model libraries reside. You can add standard libraries and your own reusable MDZIP files here so that all of your projects can share the dependencies. You can open the Behavior Execution Engine Installation Directory directly from the Windows Start menu or Taskbar search box.

Delegate modules

When running from ModelCenter, the delegate module home directory is the delegates directory in the Behavior Execution Engine installation. You can still specify delegate module paths explicitly using the MoxieDelegateModulePaths stereotype.

Logging

When running from ModelCenter, Behavior Execution Engine saves all its logs to the ModelCenter logs folder. To open this folder from ModelCenter, select Tools > Preferences > Logging > Open Logs Folder. ModelCenter uses a separate process for each parallel Behavior Execution Engine session, which you will see as simple console windows. Each session logs to a subdirectory named <timestamp>_<processID>@<machineName> and may contain several simulation runs.


File Description
bee.log Contains the Behavior Execution Engine session's log messages
run_information.json Contains the run's input and output values
simulation_trace.json Contains the run's state history: the transitions between SysML elements and simulation times at which they occurred
HTML files Contain ModelCenter's log messages

Troubleshooting

Please refer to the Troubleshooting Page if you have any issues running your simulation from ModelCenter.