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

fmi3GetNumberOfEventIndicators/fmi3GetNumberOfContinuousStates #741

Closed
friedrichatgc opened this issue Feb 10, 2020 · 8 comments
Closed
Assignees
Milestone

Comments

@friedrichatgc
Copy link
Member

The number of event indicators and the number states can change dependent on the "structural parameters".

For the number of event indicators this dependency must be defined in modelDescription.xml using the "numberOfEventIndicators" attribute in "ModelStructure". An C-API function is provided to get the number at runtime. However, this dependency definition is fully unclear to me and seem not to be described in the standard document.

For the number of continuous states no such dependency is provided in modelDescription.xml. Only a C-API function is provided to get the number. This look inconsistent to me.

Please clarify and unify the number of event and states handling in the document.

@t-sommer
Copy link
Collaborator

Alternatively we could use the numberOfEventIndicators as a fixed (maximum) number of event indicators and provide an additional array of type fmi3Boolean that indicates which event indicator is currently active.

@friedrichatgc
Copy link
Member Author

What is the number of states/eventindicators if state/eventindicators variables are of type array?
I think each element in the array count as one state/eventindicator but I can't find a definition of this in the document.

@t-sommer
Copy link
Collaborator

@friedrichatgc, would it be sufficient to define that the event indicators / states vectors must be "compressed" (i.e. all active elements at the beginning) and attribute "numberOf..." defines the max. length of these vectors?

@friedrichatgc
Copy link
Member Author

I don't think that we can define a maximal number of states/event indicators since this is only possible if all Dimension's of array variables being states/event indicators have a max attribute.

I think we need to remove numberOfEventIndicators from the xml file as it was already done for numberOfContinousStates. The importing tool must than calculate this value based all other information in the xml file or even at runtime if structural parameters change.

@t-sommer
Copy link
Collaborator

The importing tool must than calculate this value based all other information in the xml file

How would that work?

@chrbertsch
Copy link
Collaborator

chrbertsch commented Feb 26, 2020

Design Meeting:
Klaus: for the getNumberOfContinues states : you can derive this from the modelstructure and their dimensions
Torsten: one can count the number of states
Klaus: I do not think we have to change anything
Markus: So this is only needed for event indicators because they do not have a corresponding variable.
Klaus: There is a request from the QSS people also to have a variable for the event indicators (#587)
Klaus: Klaus #587 would also be nice for debugging. Would be new section in the modelstructure. This would be a new causality.

Decision: check for non-normative text. @friedrichatgc : Will do it

In 2.1.13 we have an API call for getNumber for continuous states (which provides redundant information, it is there for convenience)

Masoud: We should add a comment that this information is redundant

@friedrichatgc
Copy link
Member Author

A clarification is added with PR #829. Issue #587 is still open and will be addressed with another PR.

friedrichatgc pushed a commit that referenced this issue Mar 5, 2020
Clarify the number of states/event indicators (#741)
Parts of this commit will be changed again when #587 gets implemented next.
@chrbertsch chrbertsch removed the PR_open label Mar 5, 2020
@chrbertsch
Copy link
Collaborator

fixed with #829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants