On this page

You can run a Class element that is not a Behavior. Cameo Simulation Toolkit will initialize an object from the selected Class. The default value of its parts and properties will be used for initialization. If the selected Class has a defined Classifier Behavior which is Activity, State Machine or Interaction, it will also be simulated. For example, if you execute the Calculator.mdzip Class, the simulation will be performed on the Calculator State Machine as shown in the figure Animation of a State Machine Simulation in the State Machine section. 

State Machine as the Classifier Behavior of the Calculator Class

State Machine as the Classifier Behavior of the Calculator Class.

If the Class does not have a Classifier Behavior, Cameo Simulation Toolkit will initialize the object from the selected Class and show its values and parts in the Variables pane. For a SysML model, Cameo Simulation Toolkit will update the values within the object with the constraint properties and the binding connectors. Therefore, you can manipulate the values of the object when working with the parametric model of the Class.                                   

Running a SysML Block that Has No Defined Classifier Behavior

Running a SysML block that has no defined Classifier Behavior.
Animation of a SysML Parametric Diagram
Animation of a SysML Parametric diagram.

You can simulate a system even though there is no Classifier Behavior in either the parent or its subsystems. When Cameo Simulation Toolkit runs the system, all Classifiers that have or do not have Classifier Behaviors will be simulated. The simulation will run the system and will stop only if you terminate it by clicking the Stop button.

Initialization of value properties using Arrays of default values

Cameo Simulation Toolkit supports use of Arrays in Class/Block as a data type. A primitive value type, e.g., String, Boolean, Integer, and Real, as a value property with a default value using an Array can be initialized. The value property is shown in tree control structure on the Variables pane as shown in the figure below.


Primitive value types are initialized as value properties with default values using Arrays.

Furthermore, the value property name as a variable can be used as a member of an Array. For example, x = 5 and v = [2, 3, 4, x] make the initialized v = [2, 3, 4, 5].

Note

  • The initialization through an instance replaces the default value in the Array of the Block.
  • Any missing values in Array slots are replaced by default values from the Array of the Block.