Replies: 3 comments 4 replies
-
Yes. This is an absolutely valid application. |
Beta Was this translation helpful? Give feedback.
-
First, assuming everything I presented is OK, then the issues I'm referring to probably just fall under the "tool issue" category. As mentioned, I am testing this in Dymola 2024x. With that said, the issue I'm seeing specifically happens when 1) a model is removed with the break/selective model extension feature, and then 2) a new component is declared, and that component's name is set to the same name as the component that was removed. In fact, given the issues that showed up, this is specifically what made me question whether this was a safe/allowable thing to do. Now, to explain these issues in Dymola (@HansOlsson FYI):
...this causes issues on check and translation until I manually clear the |
Beta Was this translation helpful? Give feedback.
-
Answered and seems the issues are tool issues. |
Beta Was this translation helpful? Give feedback.
-
One apparent potential usage of the break feature is to roughly emulate replaceable behavior but without having the upstream component actually be marked replaceable and also without having to rely on common base classes for the component that is being replaced. Let me give an example where I give an input parameter and apply two operations in series:
Now let's say I want to replace that operation1 with a log operation instead of a gain, but instead of starting a new model I can extend from the above one.
I can do this in the code the following way via code:
Now, I will note that I tested this, and it worked fine in Dymola 2024x (but there are some setup quirks....which can explain if helpful), but my question is whether this is considered safe/valid usage of the new break feature?
Beta Was this translation helpful? Give feedback.
All reactions