Engee documentation

Model

The model is a reference for creating a hierarchy of models.

blockType: ModelReference

Path in the library:

/Basic/Ports & Subsystems/Model

Description

Block Model refers to the specified model (the reference model). It displays the input and output ports corresponding to the top-level ports of the reference model. These ports allow you to connect the reference model to other blocks of the parent model.

In the block Model A representation of the link model content is displayed. To view its contents, double-click on the block Model.

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

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

inport model settings 1

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

  • Sample Time on the tab Main;

  • Output data type on the tab Signal Attributes;

  • Port dimensions on the tab Signal Attributes;

  • Signal type on the tab Signal Attributes.

Ports are updated automatically when a model is selected or a reference model is saved.

To display information about some attributes of the signals in the model, open Settings debug article icon 1 and select the required option on the tab «Debugging».
  • The step of the solver with a fixed step of the reference model must be a multiple of the step of the solver with a fixed step of the parent model (with a block Model). If this condition is not met, a solver error will occur.

  • You can use different solvers in the parent model and the reference model.:

    • The reference model can only use a variable-step solver if the parent model also uses a variable-step solver.

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

  • Link models do not support library blocks Physical Modeling and multidimensional signals.

  • Link models support multi-level embedding Subsystem and other blocks Model.

Ports

Entrance

# Port_1 — model input

+ scalar | vector | the matrix | array | the tire

Details

Block Model It has an input port for each input port of the reference model. Each input port of the block Model — this is the top-level input of the link model.

Block input port name Model matches the name of the corresponding input port of the reference model.

The input port can read duplicated ports of the reference model (for example, using the block In1):

example model hierarchy shadowinport

Output

# Port_2 — model output

+ scalar | vector | the matrix | array | the tire

Details

Block Model It has an output port for each output port of the reference model. Each output port of the block Model — this is the top-level output of the link model, for example, the output through the block Out1.

The name of the output port in the block Model matches the name of the corresponding output port of the reference model.

Parameters

Select a model — Model selection button

Details

Select the model in the file manager window.