Settings
The settings window is a Engee tool for customising blocks, models and simulations.
To open the model and simulation settings window, click the gear icon in the model workspace.
The settings window consists of three tabs:
and other tabs if block settings are selected.
To switch between the settings tabs, click on their titles or hover over the status bar:
To access block settings, double-click the block icon or click once on a block with the settings window already open:
Block Parameters
The tabs of the settings window for blocks differ depending on the block selected. By default, each block has two main tabs - Main (main) and tab Information:
-
The Main tab specifies parameters of the block, as well as other special settings that allow you to control its behaviour. For example, for Engee Function it is an opportunity to edit the source code of the block:
Parameters of blocks can be set using expressions (see here for details). -
The tab Information tab provides useful information on the selected block. Block name can be changed through this tab. Click
to go to the reference documentation for the selected block.
Properties tab
This tab is used to configure the main parameters of the model in Engee. The tab provides parameters for solvers, event detection, and callbacks control. These options allow you to influence the model calculation, control the model’s response to events, and use custom features to enhance your modelling capabilities.
Thus, the tab consists of the following fields:
-
Name - displays the name of the current model (by default newmodel_1).
-
Mode - defines the way the simulation is executed, balancing between the speed of model initialisation and the speed of calculation. Two modes are available:
-
Fast initialization - A mode in which the model runs as fast as possible due to simplified typing and disabling optimisations. It is suitable for debugging large models when you need to minimise the simulation run time, e.g. when the model structure changes frequently;
-
Fast simulation - the mode intended for maximum reduction of computation time due to deeper code optimisation and high degree of specialisation of computational algorithms. It is most suitable for final calculations or simulations where high performance and minimal computation time are important.
-
-
Enable pacing to slow down simulation - Specifies how many seconds of simulation should be traversed in a real second. Use this setting to slow down the simulation and simplify analysis and interaction with the model.
-
Start - initial simulation time (by default
0.0
). -
End - final simulation time (by default
10
). -
Type - selecting the type of solver (Fixed step / Variable step):
Fixed step Variable step -
Solver - selection of the solver (by default Euler).
-
Fixed-step size - integration step value (by default
0.01
).
-
Max step size - setting the maximum integration step (by default
auto
). -
Min step size - setting the minimum integration step (by default
auto
). -
Initial step size - setting the initial integration step (by default
auto
). -
Relative tolerance - setting the relative integration accuracy (by default
auto
). -
Absolute tolerance - setting the absolute integration accuracy (by default
auto
). -
Dense output - enables/disables the tight dispensing function. If checked, Engee will output results at a higher frequency (by default on).
-
Interval - the interval at which dense output occurs (by default
1e-2
).
-
-
Save signals at events - saves signals at the moments of event detection (enabled by default).
-
Signal threshold - signal threshold used for event detection (by default
1e-10
). -
Edit source code - opening of the callbacks source code editor. The option is intended for more advanced control over the behaviour of the model.
Tab "Code generation"
About the functions of the tab Code generation read the article Code generator options.
More about code generation in Engee can be found in the article series Code generation.
Tab "Debugging"
Use this tab to display model information and save simulation results in variable window . The tab helps in debugging models and consists of the following operations:
-
Data types - displays the data types of the signal lines between model blocks. If an incorrect data type is present in the model, when selecting the function Data types diagnostics window will automatically appear with the error indication.
*Data type display example
-
Line dimensions - displays the dimensions of signal lines between model blocks. Model signals can be scalar, vector and matrix.
Mapping examples with different signals
-
Scalar signal is a single data value that has no direction and is the simplest type of signal:
scalar_signal = 1 #Пример скалярного сигнала #Вывод 1
-
Vector signal - an ordered set of data of the same type, organised as a vector, which has a direction and may contain multiple elements.
vector_signal = [1, 2, 3] #Пример векторного сигнала #Вывод 3-element Vector{Int64}: 1 2 3
-
Matrix signal is a two-dimensional data array consisting of rows and columns and can contain data of different types. A matrix can be used to represent multiple signals simultaneously.
matrix_signal = [1:2 2:3 3:4] #Вывод 2×3 Matrix{Int64}: 1 2 3 2 3 4
-
-
Signal sampling rate - displays the sampling rate of the model blocks. A small sampling step may result in a larger amount of data, which may slow down the simulation. Too large a step may result in a loss of model calculation accuracy. Choose the best option based on your model and goals.
*Sampling rate display example.
-
Highlighting - option sub-item Signal sampling rate allows to highlight in colour one of the following options: signals with the current sampling rate, signal source, or do not highlight anything (selected by default). Discrete signals can be displayed in different colours depending on the sampling rate of the signal.
*Colour highlighting example
-
-
Blocks execution sequence - allows to find out the order of execution of blocks in the model. The sequence of model execution will be displayed by numbers, where 1 is the first executable block in the model. This option helps to control the sequence of block execution to avoid unwanted dependencies and improves the readability of the model.
*Example of execution order
-
Save simulation results to workspace - allows you to save the results of model simulation to the working area (variable window
). Read more about saving simulation results in the article Software processing of simulation results in Engee.
-
Physical variables - allows to record data from selected blocks. Only blocks from the library are suitable for writing Physical Modeling. Right-click on the block whose signal you want to record and select the option Log Physical Signals option in the context menu:
The recorded variables are displayed in the module Plots
and in the application Data Inspector.
*Examples of recorded signals
Recorded variables in the module Plots:
Recorded variables in the application Data inspector:
-
Results of physical variables initialization - displays the values of physical variables in the physical variables window
.
-
Enable stepping back - allows you to run the model one time step at a time. Enabling the setting adds additional buttons to the top Engee modelling menu:
This mode allows you to customise parameters:
-
Maximum number of saved back steps - parameter determines how many simulation steps will be stored in memory. Useful for understanding how the model reached the current state and for debugging, as it allows you to compare the changes at each step.
-
Interval between stored back steps - parameter sets how many time steps the model state will be stored in memory.
-
Move back/forward by - parameter defines the number of steps the model will advance:
-
Step forward
- the simulation continues for the specified number of steps. For example, if the value of the parameters "Step forward/backward by" is
2
, the simulation will advance by two steps. -
Step back
- the simulation goes back the specified number of steps. Engee restores the working point of the model state, from which the selected number of steps is returned.
-
-
-
Showing current signal value - allows marking signals to display instantaneous value during simulation or step-by-step execution.
-
Animation speed - controls the speed of finite automaton (supported inside the Chart block). It has four modes: off (by default), slow, medium and fast.
-
Breakpoint - opens the editor to create breakpoints where model execution will be paused.