Engee documentation

Model

Model-link to create a hierarchy of models.

model reference

Description

The Model block references the specified model (model-reference). It displays input and output ports corresponding to the top-level input and output ports of the reference model. These ports allow the reference model to be connected to other blocks of the parent model (Model block).

The Model block displays a representation of the contents of the reference model. Double-click the Model block to view its contents.


The input port properties (block In1) of the reference model are not inherited from the parent model, but are extracted from the input ports of the reference model itself. A mismatch between the properties of the input ports of the reference model and the parent model will result in an error. Therefore, manual parameter setting is required for each input port of the reference model.

To open the properties of an input port, double click on it with the left mouse button:

inport model settings 1

Therefore, you must manually specify for each input port of the reference model:

  • Sample Time (sampling period), Main tab;

  • Output data type, Signal Attributes tab;

  • Port dimensions, Signal Attributes tab;

  • Signal type (signal type), Signal Attributes tab.

To display information about some signal attributes in the model, open Settings debug article icon 1 and select the necessary option in the "Debug" tab.

  • The step of the fixed-step model-reference solver must be a multiple of the step of the fixed-step solver of the parent model (with Model block). If this condition is not fulfilled, a solver error will occur.

  • Different solvers can be used in the parent model and the reference model:

    • A link model can only apply a variable-pitch solver if the parent model also uses a variable-pitch solver.

    • The step of the fixed-pitch solver of the reference model must be a multiple of the step of the fixed-pitch solver of the parent model.

  • Reference models do not support Physical Modeling library blocks and multivariate signals.

  • Reference models support multilevel nesting of Subsystem and other Model blocks.

Ports

Input

Port_1 - model input
scalar | vector | matrix | array | bus

The Model block has an input port for each input port of the model-reference. Each input port of the Model block is the top-level input of the reference model.

The input port name of the Model block is the same as the name of the corresponding input port of the reference model.

The input port can read duplicated model-reference ports (e.g. using the In1 block):

example model hierarchy shadowinport

Output

Port_2 - model output
scalar | vector | matrix | array | bus

The Model block has an output port for each model-reference output port. Each output port of the Model block is a top-level model-reference output, e.g., an output via the Out1 block .

The name of the output port in the Model block is the same as the name of the corresponding output port of the reference model.

Parameters

Basic

Select model - name of the model-reference file
no by default

Specify the name of the reference model file. To select a model reference, click Select Model in the block setup menu and select the model by its name. To view the specified model, click on the path to the selected model in the same menu or double-click on the Model block.

Update Connectors - updates the input/output ports of the model
`no by default'

Update the input/output ports of the Model block after making changes to the model-reference. For the changes to appear in the Model block, save the model-reference beforehand.