Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More ModelStructure verification #31

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

filip-stenstrom
Copy link
Collaborator

@filip-stenstrom filip-stenstrom commented Mar 31, 2023

Work remaining: implementation for FMI3

Adding ModelStructure verification:

1.
    a. MS.Outputs.Unknown.index must be an output  # (issues/23)
    b. MV.SV.causality="output" must exist in MS.Outputs.Unknown.index  # (issues/23)
2. MS.Outputs.Unknown.dependencies[i] must be a valid dependency  # (issues/23)
3. MS.Derivatives.Unknown.dependencies[i] must be a valid dependency  # (no explicit issue, but related to issues/23)
4. MS.InitialUnknowns.Unknown.dependencies[i] must be a valid dependency  # (no explicit issue, but related to both issues)
5. MS.InitialUnknown.index must be valid  # (issues/27, also noted in first comment in issues/23)

Intends to solve Checker github issues:

We already had code that performed the check, but no test for it.

The committed test code is in large parts copied from PR 21. When
possible (either before merging this story, or after both are merged),
remember to extract the test functions to some test utils unit.
Also started to create a more flexible way of testing the log output.
It's copied + built on the content of other branches, but I'll
merge/extract everything as the branches get merged.
Also make bad dependency indices fatal error, to avoid potential segfaults
Function names do not follow the naming convention for types, but it's
readable, and the code is isolated to testing.
I believe this element existed in FMI 2.0 alpha/beta, but never made it
to the release.
Using 'class' pattern because it makes code less messy and makes
function encapsulation better. Downside is a lot of structural code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant