-
Notifications
You must be signed in to change notification settings - Fork 42
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
Components of partial type in non-partial class #3435
Comments
It is somewhat useful for some template-models. To give examples consider a model such as: Modelica.Blocks.Examples.Filter where the source is replaceable instead - starting with (skipping some parameters):
Here source is a component of a That can be used as a test-bench for different sources and you can have a similar situation for sub-components, e.g., Note that Dymola since some years allow you to check such a model (by setting Advanced.Check.TopLevelStructural = true;) to ensure that the model is balanced (e.g., it would find a missing connection in Filter). That isn't possible for partial models, since there is no balancing requirement. |
I would thus propose to close this without any change; see discussion of template models in https://modelica.org/events/conference2008/sessions/session1a3.pdf |
Good point. Let me reformulate: Couldn't we deprecate having non-replaceable components of partial type in classes that are not partial? |
Well, it could also be that the partial type is replaceable (or part of a replaceable package or ...). So, the issue would be using a non-replaceable component of a partial type that is transitively non-replaceable in a class that is not partial. I don't know if deprecating that case would be that helpful, and whether I missed something. |
I think you are describing additional situations where a model would effectively be partial, but it might be OK to not work out the exact classification of which models are effectively partial. It's just that there is currently a big gap between being declared as Hopefully, we can eliminate the gap entirely in the end, so that a (non-package) class not being declared |
With the selective model extension you can have a partial non-replaceable component and still get rid of it by the time of simulation. |
But aren't you then extending the class so that the class you want to simulate no longer has a partial non-replaceable component? |
This is an attempt to factor out a small part about the details of what it means to be a simulation model in #2999.
It seems strange to me that we're considering a formulation where it is both required that:
Couldn't we deprecate having components of partial type in classes that are not partial?
The text was updated successfully, but these errors were encountered: