Configuring a Project for Simulation

Overview

Before you can run a simulation with Behavior Execution Engine, you need to ensure your SysML project (MDZIP file) is configured correctly. There are two ways to do this:

  1. Create a new project using the Behavior Execution Engine simulation project template. Use this option if you would like to start from scratch with a new project.
  2. Update an existing project to use Behavior Execution Engine. Use this option if you already have a model or state machines in a project and you would like to configure that project to use Behavior Execution Engine.

This section covers the following concepts:

Figure A1: The Behavior Execution Engine simulation project packages

As of 2024R2, all dependencies and references to the Cameo SimulationProfile.mdzip have been removed and are no longer required to create simulation projects with Behavior Execution Engine.

These tutorials instruct you to name many diagrams in a specific way (Simulation Configuration, System Definition, Simulation Dashboard, etc.). These specific names are not required and are simply to help you distinguish between the different content.

Prerequisites

Prerequisite Description
Behavior Execution Engine Installation You must have installed Behavior Execution Engine.
Install the optional project template Make sure you include the installation step to install the "Behavior Execution Engine Simulation" project template.
Recommended Reading Before completing this section, you may want to read the following help topics:

Instructions for creating new projects

  1. In your No Magic modeling tool, select File > New Project... (or press CtrlShiftN).
  2. On the left side of the New Project dialog box shown in Figure B1, in the Simulation category, select Behavior Execution Engine Simulation Project.
  3. Enter a Name and Project location.
  4. (Optional) Select the Create directory for project and related data check box. This makes it easier to see which files are associated with which project.
  5. Click OK when finished.

    Figure B1: Creating a Behavior Execution Engine simulation project

  6. In the Containment Tree, you should now see the Moxie-Base, Moxie-Core, and Simulation packages. The Simulation package should contain a simulation InstanceSpecification with the Ansys logo.
  7. Double-click the Simulation diagram to open it and notice the simulation instance specification on the diagram. Notice that the instance has the MoxieSimulation stereotype applied. This denotes that instance as the complete composition of a simulation to run and any other instances referenced from that instance will be included. You can have more than one instance tagged as a MoxieSimulation in your project.
  8. (Optional) Applying the MoxieDelegateModulePaths stereotype is optional but provides a useful way of ensuring the correct code is loaded to delegate implementation from SysML to the analysis tools. If these tags are not present, the simulation will resolve all available delegates from the delegate "home" location from the application settings.
  9. Save your work before continuing.
To learn more about the components that make up a Behavior Execution Engine simulation project, see Running Simulations. In particular, see the following sections:

Next Section >

Instructions for updating existing projects

Import the Behavior Execution Engine model libraries

  1. Open your No Magic project file (MDZIP).
  2. In your No Magic modeling tool, select Options > Project Usages and click Use Project.
  3. In the Use Project dialog box shown in Figure C1, select From predefined location.
  4. Locate the model libraries provided with Behavior Execution Engine. Depending on how they were installed, they may or may not be available in the <install.root>\modelLibraries folder of your No Magic tool. By default, look in the installation folder of Behavior Execution Engine under modelDependencies.
  5. Navigate to the appropriate folder where the Moxie-Core.mdzip exists.
  6. Select Moxie-Core.mdzip and click Finish.

    Figure C1: Importing the Behavior Execution Engine model libraries

  7. Close the Used Projects window.
  8. In the Containment Tree, you should now see the Moxie-Base and Moxie-Core packages.

Create a simulation definition diagram

  1. In the Containment Tree, right-click the top-level Model and select Create Element (or press CtrlShiftE).
  2. In the General category, select Package, enter Simulation as its name, and press Enter.
  3. Right-click the Simulation package and select Create Diagram (or press CtrlShiftD).
  4. Select SysML Block Definition Diagram, enter Simulation Definition Diagram as its name, and press Enter.
  5. On the diagram, create a Block named AnalysisCase. You will use this as a context type for your simulation.
  6. On the AnalysisCase block, add a reference property named subject and set its type to Moxie-Base::Structure::Thing and multiplicity to [1..*].
  7. Again on the Simulation Definition Diagram, add an Instance Specification (which may show up as simply "instance" in the pallet). Name the instance simulation and set the type to AnalysisCase.
  8. Right click on the instance and look at its Stereotypes. In the stereotype filter, type Moxie to filter to the relevant stereotypes. Then apply the MoxieSimulation stereotype. This will indicate this instance as a simulation that can run in Behavior Execution Engine.
  9. (Optional) You can take this opportunity to apply other stereotypes such as MoxieDelegateModulePaths which will be used later in the tutorial. The tags of these stereotypes allow you to configure various simulation-specific settings and overrides, even though defaults are provided. To see the tags, open the specification for the simulation instance and look at the Tags there. At first, there will not be any values, but you can provide values just like you would for Slots.

You can use your own base type for the "subject" of the analysis rather than "Thing". "Thing" here is an example of a base type of all other types that can participate in a simulation, but you can easily replace that with your own base type from your domain ontology. It doesn't even need to be the true base of all types, just so long as it is a base type for all other instances you intend to include as subjects of a simulation. This includes both separate co-simulating systems of interest or system context types that themselves aggregate the other systems of interest.

You will still need to set the simulation instance specification's subject slot before running the simulation. This will point to the system of interest that you want to simulate.

To learn more about the components that make up a Behavior Execution Engine simulation project, see the Running Simulations. In particular, see the following sections:

Final Section >