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

Fix usage of GenerateEvents and Inline annotations in Modelica.Fluid #1017

Closed
modelica-trac-importer opened this issue Jan 14, 2017 · 4 comments
Assignees
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media P: high High priority issue
Milestone

Comments

@modelica-trac-importer
Copy link

Reported by fcasella on 12 Mar 2013 14:28 UTC
All GenerateEvents = false instances in Modelica.Fluid can be safely removed (because that is the default option, and the annotation might just be confusing).

The GenerateEvents annotation in Modelica.Media.IdealGases.Common.Functions.s0_T(), s0_Tlow(),and s0Tlow_der could be removed (the functions are smooth enough)

Based on the new definition of the GenerateEvents in Modelica 3.2 rev2, all setState_XX() functions in Modelica.Media.Water.WaterIF97_base should have the annotation GenerateEvents = true, as well as all the chain of functions from setState_XX() down to the functions that contain the conditional expressions in the algorithm.


Migrated-From: https://trac.modelica.org/Modelica/ticket/1017

@modelica-trac-importer modelica-trac-importer added this to the MSL3.2.1 milestone Jan 14, 2017
@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: Media Issue addresses Modelica.Media P: high High priority issue labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by fcasella on 12 Mar 2013 15:02 UTC
setState_XX functions in WaterIF97_base and in WaterIF97_fixedregion handle the phase input differently. The reason of that should be made clear, and annotations set up accordingly in the whole function call chain.

@modelica-trac-importer
Copy link
Author

Comment by fcasella on 12 Mar 2013 15:04 UTC
setState_XX functions in WaterIF97_base and WaterIF97_fixedregion do not have the Inline = true annotation. Shouldn't they have it?

@modelica-trac-importer
Copy link
Author

Comment by fcasella on 13 Mar 2013 09:32 UTC
Hubertus advises to add the Inline = true annotation to all one-liner functions in Media that don't have any Inline or LateInline annotation, as this allows to exploit all equation-based optimization.

This is also important because different tools have different default attitudes towards inlining, so if that can become important for efficiency, it should be explicitly specified.

@modelica-trac-importer modelica-trac-importer changed the title Fix usage of GenerateEvents annotation in Modelica.Fluid Fix usage of GenerateEvents and Inline annotations in Modelica.Fluid Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by fcasella on 13 Mar 2013 22:11 UTC
The last changes in the Modelica Specification 3.2 ver2 regarding GenerateEvents make it only necessary to set the GenerateEvent annotation on three functions in Media (it is no longer necessary to set the annotation through the entire function call chain). All unnecessary or wrong annotations have been removed in cfa31e6.

Inline = true annotations have also been set in cfa31e6, for all function of Modelica.Media that can benefit in terms of reduced overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media P: high High priority issue
Projects
None yet
Development

No branches or pull requests

3 participants