-
Notifications
You must be signed in to change notification settings - Fork 164
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
Evaluate number of phases parameter #3119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid I do not understand this PR. Why should m
be constant
in thePolyphase
package, which is intended to model an arbitrary number of phases. The case m = 3
is very common in power engineering, but Polyphase
is definitely not limited to three phases.
No problem. I don't have any more PRs like this in the pipe. I've done what I can to improve the situation, and now it's time to enjoy the show. |
The key change here, is that the phase index is now a constant (fixing #1966). The constants were given a Then, with the phase index being a constant, it follows naturally that also the number of phases is also a constant. In the end, I guess the lack of respect for |
I dislike the idea to use a constant with annotation(Dialog) instead of a parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the idea to use a constant with annotation(Dialog) instead of a parameter.
Should that be interpreted as preferring the use of Out of curiosity, is it because of the lack of Dymola support for constants with |
@henrikt-ma |
OK, so it's the confusion about the name constant, not the Modelica variability |
@henrikt-ma Is it fine for you to close this one? |
Please don't close, as I'm planning to do this with the |
…ameter to constant" This reverts commit 0c367ba. The use of constants was not accepted by AHaumer, so I'll have to resort to the use of Evaluate=true instead. See discussion in PR: modelica#3119
…ing" This reverts commit 12e0458. The use of constants was not accepted by AHaumer, so I'll have to resort to the use of Evaluate=true instead. See discussion in PR: modelica#3119
…r to constant" This reverts commit 800c702. The use of constants was not accepted by AHaumer, so I'll have to resort to the use of Evaluate=true instead. See discussion in PR: modelica#3119
@AHaumer, per your request, I have now reverted the changes from Although hidden inside an annotation, this still gives the user a chance to see that the intention is that these parameters should be evaluated during translation. As long as new components are created by means of copying an existing component and modifying the copy, there's a chance that the |
95a38d3
to
de290d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Just a side comment: This PR actually also reveals that we have two different implementation of the
@AHaumer I guess we should replace case 1. by 2. one day, shouldn't we? |
I am OK with this PR but I would like to have @AHaumer's explicit review before merging. |
de290d6
to
590a153
Compare
I rebased and resolved the merge conflict. @AHaumer Can you please add your review as @christiankral requested. Thank you. |
Depends where these 2 lines are found. |
This is a constant-free replacement for 800c702 'Change variability of "Phase index" and friends from parameter to constant'. Let's hope that one doesn't forget to set Evaluate=true when adding new components in the future... (With the use of constant, the Modelica tool would let you know when you accidentally try to introduce a component with a parameter instead of a constant.) Fixes modelica#1966
This is a constant-free replacement for 0c367ba 'Change variability of "Number of phases" and friends from parameter to constant'. Let's hope that one doesn't forget to set Evaluate=true when adding new components in the future... (With the use of constant, the Modelica tool would let you know when you accidentally try to introduce a component with a parameter instead of a constant.)
590a153
to
10c651a
Compare
I resolved the pseudo-merge conflicts again. |
This PR is limited to
Modelica.Electrical
andModelica.Magnetic
. It does for these sub-libraries what #3113 does forModelica.Mechanics
, namely change some components declaredparameter
to beconstant
instead in order to make clear to both users and tools that they can and are expected to be evaluated during translation.There is ongoing discussion in #3113 whether the right way to do this would be with
Evaluate=true
instead ofconstant
, and the two PRs should be settled the same way.Note connection to #1966, which is fixed by the first commit.
Fix #1966.