FMU¶
- class pathsim.blocks.fmu.CoSimulationFMU(fmu_path, instance_name='fmu_instance', start_values=None, dt=None, verbose=False)[source]¶
Bases:
BlockCo-Simulation FMU block using FMPy with support for FMI 2.0 and FMI 3.0.
This block wraps an FMU (Functional Mock-up Unit) for co-simulation. The FMU encapsulates a simulation model that can be executed independently and synchronized with the main simulation.
- Parameters:
fmu_path (str) – path to the FMU file (.fmu)
instance_name (str, optional) – name for the FMU instance (default: ‘fmu_instance’)
start_values (dict, optional) – dictionary of variable names and their initial values
dt (float, optional) – communication step size for co-simulation. If None, uses the FMU’s default experiment step size if available.
- model_description¶
FMI model description from FMPy
- Type:
ModelDescription
- fmu¶
FMPy FMU instance for co-simulation
- Type:
FMU2Slave or FMU3Slave
- FMU Capabilities
- ----------------
- class pathsim.blocks.fmu.ModelExchangeFMU(fmu_path, instance_name='fmu_instance', start_values=None, tolerance=1e-10, verbose=False)[source]¶
Bases:
DynamicalSystemModel Exchange FMU block using FMPy with support for FMI 2.0 and FMI 3.0.
This block wraps an FMU (Functional Mock-up Unit) for model exchange. The FMU provides the right-hand side of an ODE system that is integrated by PathSim’s numerical solvers. Internal FMU events (state events, time events, and step completion events) are translated to PathSim events.
- Parameters:
fmu_path (str) – path to the FMU file (.fmu)
instance_name (str, optional) – name for the FMU instance (default: ‘fmu_instance’)
start_values (dict, optional) – dictionary of variable names and their initial values
tolerance (float, optional) – tolerance for event detection (default: 1e-10)
verbose (bool, optional) – enable verbose output (default: False)
- model_description¶
FMI model description from FMPy
- Type:
ModelDescription
- fmu¶
FMPy FMU instance for model exchange
- Type:
FMU2Model or FMU3Model
- time_event¶
dynamic time event for FMU-scheduled events
- Type:
ScheduleList or None