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

Handling of time-based Clocks with interval=0 #1916

Closed
PTaeuberDS opened this issue Dec 19, 2023 · 5 comments · Fixed by #1937
Closed

Handling of time-based Clocks with interval=0 #1916

PTaeuberDS opened this issue Dec 19, 2023 · 5 comments · Fixed by #1937
Assignees

Comments

@PTaeuberDS
Copy link
Contributor

In section 2.3.5. State: Event Mode in the description of the fmi3SetClock function the following restriction is made for time-based clocks:

"Only time-based Clocks must not be active for more than one call of fmi3UpdateDiscreteStates per Event Mode."

This restriction contradicts the possibility for aperiodic time-based clocks to return an interval=0, which is possible according to the interval definition for, e.g., changing clocks:
image

The restriction should only be made for periodic clocks:
"Only time-based Clocks periodic Clocks must not be active for more ..."

@chrbertsch
Copy link
Collaborator

FMI Design Webmeeting:

Klaus: is it possible to call fmi3getInterval in event mode?
Patrick: yes
Klaus: This question sound familiar ... Implicitely we would make a time-based clock a triggered clock. This was perhaps the intention.
Patrick: But allowing an interval=0 is a contradiction.

Does someone remember why we have it as it is defined currently?

@PTaeuberDS
Copy link
Contributor Author

Any new insights here?

@masoud-najafi
Copy link
Collaborator

"Only time-based-clock must not be active for more than one call of [fmi3UpdateDiscreteStates] per [Event Mode]"
is very hard to understand, it would be good to reformulate this phrase to be easier to read.
Yes, I agree that a changing clock (which is apriodic) can have a zero Time Interval. So it contradicts.

@PTaeuberDS
Copy link
Contributor Author

How would you propose to fix that? I think it makes sense to allow interval=0 for aperiodic and triggered clocks and to disallow it for periodic clocks.

@masoud-najafi
Copy link
Collaborator

I agree with this change..

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 a pull request may close this issue.

5 participants