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

Cyclical definition in Modelica.Media.Incompressible.TableBased #1390

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

Comments

@modelica-trac-importer
Copy link

Reported by eshmoylova on 10 Jan 2014 17:23 UTC
When package Modelica.Media.Incompressible.TableBased extends Modelica.Media.Interfaces.PartialMedium it modifies the definition of the Temperature type as
Temperature(min = T_min, max = T_max));
T_min and T_max are later defined to be of type Temperature:
constant Temperature T_min "Minimum temperature valid for medium model";
constant Temperature T_max "Maximum temperature valid for medium model";

It creates a cyclical definition of type Temperature in this class. In order to resolve the definition of Temperature we need to determine T_min and T_max, in order to determine T_min and T_max we need to resolve their type Temperature, which we can resolve only when we resolve the type of T_min and T_max.
A simple fix would be to define T_min and T_max to be of type Modelica.SIunits.Temperature.


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

@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: Media Issue addresses Modelica.Media P: highest Highest priority issue labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by eshmoylova on 6 Feb 2014 20:30 UTC
What is the resolution on this ticket? Is it a bug in the library that should be fixed?

@modelica-trac-importer
Copy link
Author

Comment by hubertus on 6 Feb 2014 20:36 UTC
This is a bug that should be fixed. Your fix will work.

@modelica-trac-importer
Copy link
Author

Comment by hubertus on 6 Feb 2014 20:41 UTC
Fixed in 21bf512. Only checks performed no detailed testing, but it is a minimal change.

@modelica-trac-importer
Copy link
Author

Comment by dietmarw on 6 Feb 2014 21:59 UTC
The ticket was filed as blocker but without specifying a milestone. Am I right that this should be fixed for MSL 3.2.2? Also when closing tickets, please fill in the Release Notes field with a short summary what was fixed (will appear later in the release notes).

@modelica-trac-importer
Copy link
Author

Modified by hubertus on 6 Feb 2014 22:23 UTC

@modelica-trac-importer
Copy link
Author

Changelog modified by hubertus on 6 Feb 2014 22:23 UTC
Removed circular type definition for temperature

@modelica-trac-importer
Copy link
Author

Modified by hubertus on 6 Feb 2014 22:24 UTC

@modelica-trac-importer
Copy link
Author

Changelog modified by hubertus on 6 Feb 2014 22:24 UTC
Removed circular type definition for Temperature type

@modelica-trac-importer
Copy link
Author

Comment by dietmarw on 6 Feb 2014 22:29 UTC
Hubertus, you'll need to also fix it in the maintenance branch since trunk is only 3.2.2.

@modelica-trac-importer
Copy link
Author

Comment by beutlich on 17 Aug 2015 10:16 UTC
Fixed in b915cac for maintenance branch.

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: highest Highest priority issue
Projects
None yet
Development

No branches or pull requests

2 participants