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

Enable an assert just once #3553

Open
PYF-FR opened this issue Jul 30, 2024 · 2 comments
Open

Enable an assert just once #3553

PYF-FR opened this issue Jul 30, 2024 · 2 comments
Labels
tool-issue Issue in tool(s) - not the specification itself

Comments

@PYF-FR
Copy link

PYF-FR commented Jul 30, 2024

As explain here,
https://stackoverflow.com/q/78695608/26398063
The assert function behaves differently when called within a function.
It could be nice to add a new characteristic to the assert in order to use it only once even if used in a function.

It could help to reach the : "It is recommended to report the warning only once when the condition becomes false, and it is reported that the condition is no longer violated when the condition returns to true." of the specification : https://specification.modelica.org/master/equations.html#S3.SS7.p1 in 8.3.7

@HansOlsson HansOlsson added the tool-issue Issue in tool(s) - not the specification itself label Aug 8, 2024
@HansOlsson
Copy link
Collaborator

To me this is primarily a tool-issue. The problem here is that it is difficult to keep track of whether it is the same warning or not - but I believe it can be improved.

However, you should duplicate the contents of the stackoverflow question here, since it seems the question has been removed for some reason.

@PYF-FR
Copy link
Author

PYF-FR commented Aug 8, 2024

Hi, Thanks for having a look to my suggestion
I updated the link in my first comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool-issue Issue in tool(s) - not the specification itself
Projects
None yet
Development

No branches or pull requests

2 participants