-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add new power block for raising an input to a user parameterized exponent #4006
Conversation
54b9892
to
67d9295
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.
Please add a test model in ModelicaTest.Blocks together with the comparisonSignals.txt file of the reference variables.
Done |
Still missing: a test example. |
@AHaumer I added a test example in ModelicaTest. However, I didn't add an example within MSL itself because none of the other math blocks seem to have examples either. Let me know what you suggest. Regarding the conversion script, agreed with your concerns. Potentially if I use a temporary name (PowerNew or PowerFuture) it would make the conversion easier in the future (Power-->Exponentiation and PowerNew-->Power). @HansOlsson any thoughts/suggestions on a future rename/conversion? Are direct name swaps possible with the current conversion script specification? |
A name swap should be possible with conversion scripts. However, there's also the issue of explaining it and user understanding, and I think a name swap will just create a mess for that, and I would prefer if we didn't plan to do that. At least they are not plug-compatible so users will at least notice if they make an error. |
Any other naming suggestions? Assuming there is no issue on a direct conversion script name swap, then I think probably the best names are maybe as is in the PR or change to Pow. A few additional thoughts/notes here:
|
@MartinOtter @AHaumer Any additional concerns here? Or can we approve and merge? |
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.
Seems ok.
This block adds a key missing mathematical function that is not available in Modelica.Blocks.Math. It was previously discussed here: #3967
Note that ideally this block should be called "Power" while the existing block called "Power" should be called "Exponentiation". Potentially in the future a conversion script could be used to swap the naming.