When an object acquires the properties of another, there is an inheritance relationship between them. The object that inherits the properties is called Subtype or Subclass (child) and the inheriting object is called Supertype or Class (parent). This inheritance relationship allows the child and the parent to have identical properties. If the property has a value, the Subclass will also inherits the value. Cameo Simulation Toolkit allows you to change the default value of an object or a Subtype whose property is defined in the Supertype or a read-only property. You can override this existing value in the subtype without changing the default value of the property of the Supertype by creating a redefine property of the subtype that represents the default values. The value of the property can be integer, real, or string. 

When you change the inherited value in the subtype, e.g., from 2 to 3, in the Variables pane, the simulation will initiate at 3. 

This example uses the model depicted in to show you how to update default values to an inherited and/or read-only property by creating redefined properties as follows

Inherited and Read Only Properties of a Subtype
Inherited and read-only Properties of a Subtype.

To update default value(s) from an Instance Specification 


  1. Run a simulation on your model as follows

    Running a Model Simulation
  2. Do one of the following

  • Right-click the Instance of the Class (ExternalSubSystem in this example) on the Variable pane and select Save ToDefault Value(s).
The Variable's Save To Default Value(s) Context Menu
  • Right-click the Instance of the Class (ExternalSubSystem in this example) on the diagram pane and select Tools > Save ToDefault Value(s).
The Property's Save To Default Value(s) Context Menu

3. A Question dialog will open asking if you want to redefine the values in the Subtype. Click Yes

The Question Dialog

Cameo Simulation Toolkit will create new redefined properties for the ExternalSubSystem (i, r, and s), and save the default values (i = 0, r = 0.0000, and s = null) to the new properties.

The Redefining Properties of a Subtype

4. On the Variables pane, change the default value of property i, r, and s of ExternalSubSystem.

Updating Default Values in the Variables Pane

5. Each time you finish updating the value, right-click the property in the Variables pane and select Save ToDefault Value(s).

Saving the Updated Default Value in the Variables Pane

6. If the Subtype Instance is read-only, you need to click the Classifier and select Tools > SaveTo Default Value(s).

Updating the Default Value of a Read-Only Property

If Cameo Simulation Toolkit cannot create redefined properties, a warning message will appear.

A Warning Message

Related page