Engee documentation

EULER Cosimulation

Transferring data to EULER and obtaining simulation results from EULER. Before starting the exchange, the block establishes a connection between Engee And EULER.

blockType: EngeeFunction

Path in the library:

/Interfaces/EULER/EULER Cosimulation

Description

To work with the block, install/update the support package. equipment.

Block EULER Cosimulation it is intended for the organization of cosimulation between Engee And EULER. At each step of the simulation, the unit transmits input signals from Engee in EULER and receives calculated output values from EULER, which are fed to the output of the block.

Cosimulation configuration

The parameters of the block are the main source of the cosimulation configuration from the side Engee: composition and names of signals, address and port EULER, timeouts, calculation step, etc. These values are used Engee directly when exchanging signals with EULER.

To make the same settings available to EULER, use the command Сгенерировать конфигурационный файл by clicking the button in the block: Engee extracts block parameters and generates a file settings.cfg in the folder specified in the parameter Путь к Эйлер:.

Block settings in Engee and the contents of the file settings.cfg They must be coordinated among themselves. If you can’t generate the block again after changing the parameters settings.cfg EULER will work with obsolete signal names, ports, or timeouts, and the simulation may fail.

Ports

Input

# In — input signals of the type BusSignal, transmitted from Engee in EULER
vector

Details
Data types

Float64

Complex numbers support

No

Output

# Out — output signals of the type BusSignal returned by EULER in Engee
vector

Details
Data types

Float64

Complex numbers support

No

Parameters

Parameters

# IP адрес Эйлер: — IPv4 address where the EULER server is located

Details

IPv4 is the address of the node where the EULER instance is running. By default, the local address is 127.0.0.1, which corresponds to the EULER run and subsystem Engee.Integrations on the same car. To communicate between different machines, specify the appropriate IPv4 address.

Default value

"127.0.0.1"

Program usage name

m_ip

Tunable

No

Evaluatable

Yes

# Порт приёма Эйлер: — data transfer port from EULER to Engee

Details

The port where the EULER transmits data to Engee. In projects with multiple cosimulation blocks for each pair Engee ↔ EULER a unique port is selected.

Default value

7489

Program usage name

m_rcv_port

Tunable

No

Evaluatable

Yes

# Порт передачи Эйлер: — data transfer port from Engee in EULER

Details

The port where the EULER receives data from Engee. It must not match the receiving port of the same block or the ports of other active EULER instances.

Default value

7949

Program usage name

m_snd_port

Tunable

No

Evaluatable

Yes

# Имена входных сигналов: — names of the signals in the input bus

Details

The names of the block’s input signals, that is, the signals transmitted from Engee to EULER. Are set as NamedTuple.

Default value

(:F1, :F2, :pos1, :pos2, :FS, :WhlT)

Program usage name

m_input_signal_names

Tunable

No

Evaluatable

Yes

# Единицы измерения входных сигналов: — units of measurement of input signals

Details

The units of measurement of the input signals are separated by a space in square brackets, for example "[N] [N] [m]". Used for display in the EULER interface. The number of units must correspond to the number of input signals.

Default value

"[N] [N] [m] [m] [deg] [kg m2/s2]"

Program usage name

m_input_measure_units

Tunable

No

Evaluatable

Yes

# Имена выходных сигналов: — names of the signals in the output bus

Details

The names of the block’s output signals, that is, the signals returned by EULER in Engee. The recording format is similar to the names of the input signals.

Default value

(:Vel1, :Vel2, :Pos1, :Pos2, :Sang_L, :Sang_R, :WhlW1, :WhlW2, :WhlW3, :WhlW4)

Program usage name

m_output_signal_names

Tunable

No

Evaluatable

Yes

# Единицы измерения выходных сигналов: — units of measurement of output signals

Details

The units of measurement of the output signals are in the same format as in the input. The number of units must correspond to the number of output signals.

Default value

"[m/s] [m/s] [m] [m] [deg] [deg] [deg/s] [deg/s] [deg/s] [deg/s]"

Program usage name

m_output_measure_units

Tunable

No

Evaluatable

Yes

# Максимальное время ожидания соединения, мс: — waiting time for communication with EULER

Details

The waiting time for establishing a connection with EULER at the start of the simulation. By default 120 000 ms (2 minutes) — this is enough to manually start the EULER after Engee.

Default value

120000.0

Program usage name

m_handshake_timeout

Tunable

No

Evaluatable

Yes

# Максимальное время ожидания приёма данных Эйлер, мс: — waiting time for the next data packet from EULER

Details

The waiting time for the next data packet from EULER during data exchange. If the package has not arrived within the allotted time, the calculation ends with a waiting time exchange error.

Default value

20000.0

Program usage name

m_euler_rcv_timeout

Tunable

No

Evaluatable

Yes

# Максимальное время ожидания приёма данных Engee, мс: — waiting time for a data packet from Engee on the EULER side

Details
Default value

20000.0

Program usage name

m_engee_rcv_timeout

Tunable

No

Evaluatable

Yes

# Размер буфера приёма данных, байт: — The size of the receive buffer is EULER

Details

The size of the EULER receive buffer. An increase may be required with a large number of signals.

Default value

4096

Program usage name

m_euler_rcv_bufsize

Tunable

No

Evaluatable

Yes

# Размер буфера передачи данных, байт: — The size of the transfer buffer is EULER

Details
Default value

4096

Program usage name

m_euler_snd_bufsize

Tunable

No

Evaluatable

Yes

# Путь к Эйлер: — the path to the installed executable file or the EULER directory

Details

The directory of the EULER project where the file will be generated settings.cfg.

Default value

C:\Users\RITM\Desktop\Тактор без примитивов

Program usage name

m_um_path

Tunable

No

Evaluatable

Yes

# Шаг расчёта, с: — block calculation step

Details

The block calculation step in seconds. Must match the parameter FixedStep models Engee. Inconsistency of values leads to an error «Invalid setting for fixed-step size» when starting the calculation. Can’t take the value −1 (Inherited).

Default value

0.001

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes

# Включить профилирование — collecting data on the performance and parameters of the simulation execution

Details

It includes diagnostic logging of the exchange during cosimulation. By true near settings.cfg a file is being created engee_logs.txt, in which the current EULER model time is recorded and Engee, values of received and sent signals, as well as diagnostic messages. The file is overwritten on subsequent runs.

Default value

false (switched off)

Program usage name

m_is_diagnostic

Tunable

No

Evaluatable

Yes

# Сгенерировать конфигурационный файл — generates a settings.cfg file for simulation

Details

Generates a configuration file settings.cfg based on the block parameters (model name, composition and names of input/output signals, parameters and logging mode). The resulting file is used by EULER to read the simulation configuration. Saving is performed to the directory specified in the parameter Путь к Эйлер:.

Default value

Program usage name

m_gen_cfg

Tunable

No

Evaluatable

No

Example

An example of the minimum settings.cfg for a couple Engee ↔ EULER. The full set of fields is described in the article EULER Support Package.

MODEL_NAME multicosim_parent
INPUT_SIGNAL_COUNT 1
INPUT_SIGNAL_NAMES e_out
INPUT_MEASURE_UNITS [m/s]
OUTPUT_SIGNAL_COUNT 1
OUTPUT_SIGNAL_NAMES e_in
OUTPUT_MEASURE_UNITS [N]
IP 127.0.0.1
RCV_PORT 7479
SND_PORT 7959
MAX_RCV_BUFFER_SIZE 4096
MAX_SND_BUFFER_SIZE 4096
SRVCIO_TIMEOUT 200000.0
HANDSHAKE_TIMEOUT 120000.0
SAMPLE_TIME 0.001
DIAGNOSTIC 0

Names in INPUT_SIGNAL_NAMES / OUTPUT_SIGNAL_NAMES interpreted from the EULER side: e_out — this is the output of EULER (EULER gives it to Engee), e_in — input EULER (EULER accepts from Engee). In the file settings.cfg this substitution has already been taken into account.