Engee documentation

Model Architecture in Engee

Practical guidelines for building model architectures with usage of specific blocks are described in the article Practical work with model architecture in Engee.

Any model, even the most complex one, can be built from individual blocks. However, as their number grows, difficulties inevitably arise. Thus, if the model consists of many blocks, it becomes problematic to understand the location of necessary elements and their interaction. In such cases, it takes too much time to maintain and modify the model. Therefore, for clarity and simplification, it is recommended to divide complex models into semantically homogeneous pieces using subsystems.

A subsystem is a block Subsystem, designed to create a hierarchy in the model. For example, with the help of a subsystem it is possible to realise a model in which:

  • 20 blocks describing the behaviour of the wheels are connected to the Wheels subsystem;

  • 300 blocks related to the engine are connected in the subsystem "Engine";

  • 50 blocks responsible for the hull are connected in the subsystem "Hull".

Such unions create an intermediate level of abstraction, where logical objects are used instead of individual blocks. As a result, we obtain the following conditional model:

subsystem model example 1

This transition to certain levels of abstraction by means of subsystems allows:

  • Think in terms of real objects (engine, transmission, chassis) instead of signals and blocks;

  • Group some subsystems into other, larger subsystems, increasing the level of abstraction;

  • Disable or replace entire subsystems with a single action, rather than modifying blocks manually.

This, in turn, forms a number of advantages:

  • Split debugging - thanks to subsystems, you can isolate and test individual parts of the model. For example, first make sure that the engine works, and then check how it interacts with the transmission;

  • Logic within subsystems - subsystems are no longer just a set of blocks within another block. They become objects with their own logic: they can react to external signals, activate under certain conditions (see Practical work with model architecture in Engee);

  • Usage of masks - masks allow you to hide complex internal details of subsystems and display only important parameters or configure additional functionality on top of the subsystem;

  • Flexibility and reuse - blocks can be reused in different models. You can also experiment with structures, changing blocks or their parameters to evaluate the result.

Not only subsystems can be used to create levels of abstraction in Engee. Submodels (block Model) are the next step, allowing you to work with models as separate objects, which allows:

  • Introduce parallel development - with usage of the Model block it is possible to distribute development between different specialists. For example, one engineer deals with the "Wheels" subsystem and another with the "Engine". In this case, they do not introduce potential errors or unnecessary edits to each other’s subsystems, being responsible only for their own area of interest. Their changes can be easily incorporated into the Main Model by simply updating the Model block in the desired model;

  • Versioning and reusing blocks - the Model block is great for saving entire models for future reuse or integration.

Basic steps to create models from subsystems/submodels

  1. The initial stage is modelling from individual blocks. This approach is suitable for small models where detail is more important than structure.

  2. Transition to subsystems - the model starts to be grouped into functional modules. For example, from 100 blocks several subsystems are made: engine, transmission, chassis.

  3. Usage of submodels and masks - opportunities appear:

    1. 1. Component reuses.

    1. 2. Hiding implementation details (masks)/adding new functionality.

    1. 3. Simplifications of interactions between modules (subsystems or submodels).

  4. The final stage is the creation of an overall system that integrates multiple submodels. This is a layered design approach characteristic of Model-Based Design.

Recommendations for creating models

Number of blocks

Try to use no more than 10 blocks at one nesting level to keep the model readable.

Organisation of subsystems

Organise the model into logical nodes: each subsystem block should represent a functional element of the system.

What to put in submodels

For complex components with high detail, use submodels, leaving subsystems to group functional units.

Flexibility and modularity

Design the model so that it can be easily changed by replacing components or modifying logic.

General recommendations:

  • Break models into logical parts.

  • Use masks to hide complex parts and simplify interaction.

  • Adhere to a hierarchical approach: the top level should be simple and logical.

  • Check and test subsystems at each stage to ensure that the model works correctly.