Skip to main content

This mosaik-fmi adapter allows to couple FMUs, which are based on the FMI standard (https://fmi-standard.org) with mosaik.

Installation

Test

The FMUs for the test is based on https://github.com/modelica/Reference-FMUs.

How to Use

Specify simulator configurations within your scenario script:

sim_config = {
    'FMI': {
        'python': 'mosaik_fmi.mosaik_fmi:FmuAdapter',
    },
    ...
}

Initialize the FMU Simulator:

fmu_sim = world.start('FMI',
                    integrator='integratorCK',
                    work_dir='path/to/the/fmu/directory',
                    fmu_name='FMU_name',
                    fmi_version='2',
                    fmi_type='cs',
                    logging_on=False,
                    instance_name='FMU_name',
                    step_size=60*60)

Instantiate FMU model entity:

fmu_entity = fmu_sim.FMU_name.create(1,
                             input_1=1.0,          #  FMU input variable
                             input_2=2.0,          #  All variables are listed in modelDescription.xml
                             ...
                             )

Connect FMU output to another simulator’s input:

world.connect(fmu_entity[0], other_simulator,'fmu_output_1', 'simulator_input_1')

Selecting integrator

Refer to https://fmipp.readthedocs.io/projects/py-fmipp/en/latest/getting-started/model-exchange.html#classes-fmumodelexchangev1-and-fmumodelexchangev2 for choosing different integration algorithms

Getting help

If you need help, please visit the mosaik-users mailing list .

Metadata

Release files for mosaik-fmi 1.1.0.post0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosaik-fmi 1.1.0.post0
File Size Uploaded
mosaik_fmi-1.1.0.post0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mosaik-fmi 1.1.0.post0
File Interpreter ABI Platform
mosaik_fmi-1.1.0.post0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / mosaik_fmi-1.1.0.post0.tar.gz

Download URL mosaik_fmi-1.1.0.post0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dfcf3e61a65b63262ca47258623a4c0158603c305ea7c81beb549d91b8250a33
BLAKE2b-256 checksum
How to use checksums
7ce7ae1fbb695f00b2aee3f77af9ca9aae6385577bfb5989aaaaeae066246548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release files / mosaik_fmi-1.1.0.post0-py3-none-any.whl

Download URL mosaik_fmi-1.1.0.post0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
504c912ecf72a1c3f57d1b1d1aaa9fdd12de68c1e230a56e698df17dac56426d
BLAKE2b-256 checksum
How to use checksums
86f3763e53bf319f652bb0154e4269a82329c40fa2bfde49694ee99769167455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release history Release notifications | RSS feed

This release

1.1.0.post0 This release

2 release files

1.1.0

2 release files

1.0

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page