Cameo Simulation Toolkit provides a model-based execution configuration through the «stereotype» SimulationConfig. You can configure the stereotypes in the Specification window of «SimulationConfig». The following figure shows the «SimulationConfig» and the SimulationConfig stereotypes
To show up the «SimulationConfig» and the SimulationConfig stereotype
- Right-click a Package in the Containment tree in a simulation project and select Create Diagram > Simulation Configuration Diagram, which is the SimulationProfile stereotype applied.
- Right-click the SimulationProfile [SimulationProfile.mdzip] stereotype in the Containment tree and select Config > SimulationConfig [Class] and drag the Class to the diagram pane.
The <<SimulationConfig>> and Simulation Config stereotypes.
The SimulationConfig «stereotype» contains tag definitions. You can sort these tag definitions alphabetically by right-clicking it, and select Symbol Properties > Attributes Sort Mode > By Name. Click the «SimulationConfig» to open its Specification window and see all of the tag definitions.
Tag definition | Description |
---|---|
UI | A user interface for configuration mockups that will start with a model simulation. |
silent | If the value is true, simulation will run without animation or idle time. |
executionTarget | An element from which simulation should start. |
log | An element in which the execution trace will be recorded. |
resultLocation | A Package, a Model, InstanceSpecification, or an InstanceTable in which a context object will be stored after simulation.
Note The following elements will not be saved
|
enginesPriority | Simulation engines that can be used to simulate a model ordered by priority. The first engine on the list has the highest priority. If the Simulation Configuration does not have a tagged value for this tag definition, Cameo Simulation Toolkit will use the values that are defined in the registered Simulation Engine Priority in the Environment Options dialog. |
autoStart | If true, a model simulation starts running automatically once it has been initialized. Otherwise, you must click the Start button in the Simulation pane to run the simulation. Note For Monte Carlo Simulation and Table Simulation, the conditions are as follows:
|
clock ratio | A ratio between a simulation clock and a real-time clock (1:10). For example, if the clock ratio is 10, it means that one second on the simulation clock is equal to 10 seconds on the real-time clock. |
autostartActiveObjects | If the value is true, the runtime objects whose classifier is active will start their behavior automatically in an asynchronous mode. Otherwise, their behavior will start using a startObjectBehaviorAction. |
executionListeners | A list of execution listeners that will receive events from a model simulation. An execution listener can be a SequenceDiagramGeneratorConfig. |
decimalPlaces | Decimal places of all displayed numerical values in a model simulation, for example, in the Variables pane, Tooltip, and the SimulationConsole pane. Their values must be integers. If the precision of displayed numerical values is greater than or equal to 10% of the absolute value, the numerical values will be displayed in exponential form. |
fireValueChangeEvent | If this value is true, a parametric simulation will be repeated immediately whenever the value of any structural feature changes. Repeating simulation will give an impact on both values carried over by binding connectors and specified in a constraint. |
timeValue | A property that will be used in a model-based clock. If the tagged value is specified, the run-time value specified by the property will be used as the simulation time. |
timeUnit | A unit of a runtime value that specifies the simulation time. If the tagged value is unspecified, the millisecond will be used by default. |
constraintFailureAsBreakpoint | A flag that indicates a simulation will pause at the constraint element where the failure occurs. |
durationSimulationMode | Specifies a duration mode of simulation in min, max, average, or random. Cameo Simulation Toolkit uses the duration mode to calculate the duration of an Action simulation to which a duration constraint is applied. |
TreatAllClassifiersAsActive | This option (true by default) runs all Behaviors, including the ones in the subsystems. Even though the isActive property is false, if TreatAllClassifiersAsActive is true, Cameo Simulation Toolkit will run all of the Behaviors of non-active Classifiers. |
InitializeReferences | If true, references will be initialized by creating new objects, instead of referencing to existing parts of the system. |
startTime | Specifies when simulation will initiate (in integer). |
endTime | The time simulation terminates (in integer). |
stepSize | Increases as simulation time does (in real numbers or decimal places). |
numberOfSteps | Specifies the number of steps through which simulation will run. |
numberOfRuns | A number of runs of a particular configuration, especially for the sample size in Monte Carlo simulation. The value must be greater than or equal to 1. |
timeVariableName | This property returns time from the simulation clock (the default value is "simtime"). It returns the time on the simulation clock. |
stepDelay | Specifies how long the delay will be, if any, for each step. |
runForksInParallel | If the value is true or undefined, all outgoing edges from the fork will run in parallel. |
cloneReferences | If true, creates new instances for all objects recursively. Otherwise, it creates instances only for the first level and others remain in their original locations (the default is false). |
startWebServer | If true, starts a web server for a remote web-based UI mockup. Note that the HTML UI must be generated first using the Generate HTML button in the UI diagram. After starting SimulationConfig, the web server URL will appear in the Simulation Console window. |
solveAfterInitialization | If true, automatically starts initial solving. If false, manual start is required via Refresh in the Variables pane, or press Start (F8). |
addControlPanel | If the value is true, adds the simulation control panel into the exported HTML UI. |
animationSpeed | Specifies the animation speed of a particular configuration in percentage. The default value is 95, but you can enter your preferred value from 1 to 100. |
Information
You can drag any element that can be simulated to a Simulation Configuration in order to set a simulationTarget (a simulationTarget tag will be set to the dragged element.).
The property Initialize References in the Specification window of «SimulationConfig» allows Cameo Simulation Toolkit to initialize all references between objects owned in a composite owner. The following is the Specification window of «SimulationConfig» from the CoffeeMachine.mdzip sample.
Initialize references in the Specification window of «SimulationConfig» Coffee Machine.
Note
Initialize References appears if you open the Specification window in the All or Expert Properties mode.
The following are two types of references that you can initialize using the Initialize References option in SimulationConfig
- References between objects created inside a system
This type of reference occurs when you create a project similar to the following example. The following figure shows «block» c as a root context, a is a Part Property, and b is both the part and reference properties. The «block c» contains an Internal Block diagram with a connector line (the type of the connector is association named a-b) that connects two part properties a:a to b:b. The connector specifies that reference property b will get the run time object value from Part Property b. If there is no connector, an auto-generated value will be given to reference property b.
Initialization of Property.
- References to external objects
If you run a block, for example, the Variables pane will show the classifiers of the references. When the InitializeReferences is false, the reference property in the block will not be initialized. When it is true, the reference property will be initialized at run time.
Related pages
- SimulationConfig stereotype
- Simulation log
- Simulation time and simulation clock
- Automatic start of active objects
- UI modeling diagram simulation
- ImageSwitcher and ActiveImage
- Time series chart
- Timeline chart
- Histogram
- Nested UI Configuration stereotype
- Reusable UI Mockup
- SimulationConfig stereotype
- CSV export
- Nested property selection for configurations
- Instance table