Fmi2 directional derivatives - #807
Open
davidhjp01 wants to merge 5 commits into
Open
davidhjp01 wants to merge 5 commits into
davidhjp01 wants to merge 5 commits into
Conversation
Use FMI Library 3.0.4 and carry the repository CI/package updates needed by the FMI 3 stack.
Implement validated FMI 2 directional derivatives with a dedicated fixture, reference-FMU wiring, and contract tests.
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.
Add FMI 2 directional derivative support
Summary
Adds validated FMI 2.0 directional-derivative support to
fmi::v2::slave_instance, lifecycle-aware FMU state handling, deterministicfixture coverage, and the dependency/CI updates required to build and test it.
Changes
Add
provides_directional_derivatives()andget_directional_derivative().Read and cache directional-derivative metadata from
modelDescription.xml.Validate lifecycle, value-reference type, reference validity, and seed and
sensitivity sizes before calling the FMU.
Compute the Jacobian-vector product:
Accept FMI
OKandWarning; surfaceDiscard,Error,Fatal, andPendingas errors.Preserve caller output when the FMU call fails.
Track
instantiated,initialization,step, andterminatedstates.Serialize lifecycle state in export scheme 1 while retaining safe scheme 0
compatibility.
Add cleanup and ownership checks for imported FMU state.
Test coverage
Real outputs, a fixed 2-by-3 Jacobian, configurable statuses, a call counter,
and a non-Real reference.
fmi_v2_fmu_unittestfor lifecycle behavior, expected derivatives,reordered references, invalid inputs, status handling, output preservation,
and unsupported capabilities.
v0.0.41and package the fixture asFmi2Derivatives.fmu; expose them throughREFERENCE_FMU_V2_DIR.Dependency and CI updates
~3.0.4and proxyFMU to0.4.3@osp/testing.