Cameo Simulation Toolkit 18.5 Documentation

Skip to end of metadata
Go to start of metadata

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 figures shows the <<SimulationConfig>> and the SimulationConfig stereotypes. To show these two figures, 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. Next, click the SimulationProfile [SimulationProfile.mdzip] stereotype in the Containment tree > 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 definitionDescription
UIA 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. 
executionTargetAn 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.

  • If the resultLocation is specified by an InstanceSpecification, the values of the context object will be saved as slot values of the specified InstanceSpecification. 
  • If the resultLocation is specified by a Package or a Model, Cameo Simulation Toolkit will create a new InstanceSpecification owned by the Package or the Model after the simulation. The values of the context object will then be saved as slot values of the created InstanceSpecification. 
  • If the resultLocation is specified by an InstanceTable , the values of the context object will be only saved as slot values of the predefined columns. Other existing slots, if any, remain the same (not deleted). Only the slots for primitive values represented as columns must be overwritten. See also InstanceTable in MagicDraw user guide.

 

Note

Nothing will be saved for the following elements:

  • InstanceTable without the Classifier set.
  • Nested instances inside slots.
  • If the resultLocation is not specified, the simulation results will not be saved even though the simulationTarget is the InstanceSpecification
enginesPrioritySimulation 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.
autoStartIf the value is true, a model simulation will start running automatically once it has been initialized. Otherwise, you need to click the Start button in the Simulation window to run the simulation.
clock ratioA 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.
decimalPlacesDecimal 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.
fireValueChangeEventIf 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. 
InitializeReferencesIf true, all references will be initialized at run time (the default value is false).
startTimeSpecifies when simulation will initiate (in integer).
endTimeThe time simulation terminates (in integer).
stepSizeIncreases as simulation time does (in real numbers or decimal places).
numberOfStepsSpecifies the number of steps through which simulation will run.
timeVariableNameThis property returns time from the simulation clock (the default value is "simtime"). It returns the time on the simulation clock.
stepDelaySpecifies how long the delay will be, if any, for each step.
runForksInParallelIf the value is true or undefined, all outgoing edges from the fork will run in parallel.
cloneReferencesIf 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.

solveAfterInitializationIf true, automatically starts initial solving. If false, manual start is required via Refresh in the Variables pane, or press Start (F8).
addControlPanelIf the value is true, adds the simulation control panel into the exported HTML UI.
animationSpeedSpecifies 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.


Info

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 sample CoffeeMachine.mdzip. 

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 that are created inside a system.

This type of reference occurs when you create a project similar to the following example. The 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 (see the first figure below). The connector specifies that reference property will get the run time object value from part property b (see the second figure below). If there is no connector, an auto-generated value will be given to reference property b.

Initialization of Property
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.

  • No labels