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. Magic Model Analyst 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. A Question dialog will open asking if you want to redefine the values in the Subtype. Click Yes

The Question Dialog

Magic Model Analyst 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

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

Updating Default Values in the Variables Pane

4. 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

If Magic Model Analyst cannot create redefined properties, a warning message will appear.

A Warning Message

Related page