Repository navigation
Set discrete inputs of ME FMUs in event mode - #1733
Merged
Merged
Conversation
An ME FMU in its own solver unit gets discrete inputs (discrete Real, Integer, Boolean) from a different unit. SystemSC sets these inputs during continuous-time mode, and the FMU rejects the call: fmi2SetBoolean: Illegal call sequence. This commit adds a test that expects the correct values. The fix follows. Assisted-by: Claude Code
An ME FMU accepts discrete inputs (Integer, Boolean and discrete Real) only in event mode. When an ME FMU was in its own solver unit, the master set these inputs in continuous-time mode. Now a changed discrete input in continuous-time mode is kept and handled in an event of the SC system: - If the input is set between two steps, the event occurs right away. The outputs are then correct when the master reads them in the same exchange. - If the input is set during a step, the event occurs at the start of the next step. The test now has a third CS FMU that reads the outputs of the ME FMU, to check that the values arrive at the same time. Assisted-by: Claude Code
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1733 +/- ##
==========================================
+ Coverage 32.89% 33.18% +0.29%
==========================================
Files 74 74
Lines 14809 14943 +134
Branches 9526 9584 +58
==========================================
+ Hits 4871 4959 +88
- Misses 8420 8446 +26
- Partials 1518 1538 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
An ME FMU in its own solver unit gets discrete inputs (discrete Real, Integer, Boolean) from a different unit. SystemSC sets these inputs during continuous-time mode, and the FMU rejects the call: fmi2SetBoolean: Illegal call sequence. This commit adds a test that expects the correct values.
Assisted-by: Claude Code