From b75e37e94adff9a06d3440b57745afa348f03226 Mon Sep 17 00:00:00 2001 From: PeterMeisrimelModelon <92585725+PeterMeisrimelModelon@users.noreply.github.com> Date: Thu, 5 Jun 2025 08:31:08 +0000 Subject: [PATCH 1/2] Testing a fix for coupled FMUs --- src/pyfmi/fmi_coupled.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyfmi/fmi_coupled.pyx b/src/pyfmi/fmi_coupled.pyx index 8c4ca582..a79748ce 100644 --- a/src/pyfmi/fmi_coupled.pyx +++ b/src/pyfmi/fmi_coupled.pyx @@ -725,7 +725,7 @@ cdef class CoupledFMUModelBase(CoupledModelBase): cdef FMIL2.fmi2_value_reference_t _get_local_vr(self, valueref): return valueref & 0x00000000FFFFFFFF - cdef _get_model_index_from_vr(self, long valueref): + cdef _get_model_index_from_vr(self, valueref): return valueref >> 32 cdef _get_global_name(self, model_ind, name): From b2d83b2149b065586f9f8ea11a4677a7cb7ac18d Mon Sep 17 00:00:00 2001 From: PeterMeisrimelModelon <92585725+PeterMeisrimelModelon@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:52:16 +0000 Subject: [PATCH 2/2] Changelog entry --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 3006985c..eec7ec9b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ --- PyFMI-2.17.2 --- * Fixed an issue for dynamic_diagnostics, where failures to evaluate the Jacobian would result in invalid XML. * Fixed a race-condition in using ResultDymolaBinary.get_variables_data(). + * Fixed a bug introduced in PyFMI 2.17.1 that could when retreiving variables with very large value references in CoupledFMUModelME2. --- PyFMI-2.17.1 --- * Fixed compilation issue with Cython 3.1.