Replies: 5 comments 1 reply
-
Any input on this one? I think the power operation one ( Square isn't strictly required (assuming the new power block is added), but I think it's a nice quality of life element. And, on that note, below are some additional ones that could be added as well: Unary Minus: Reciprocal: |
Beta Was this translation helpful? Give feedback.
-
Feel free to prepare a PR, but keep the special cases in mind: |
Beta Was this translation helpful? Give feedback.
-
As long as there isn't a source block that produces a true constant (see #3112), there's a techical use case for a
Since we don't allow
By comparison, using a parameter signal for the numerator (coming from
where In addition to the lack of a block that produces a true constant, it is also a matter of convenience to not have to add a separate block for the constant 1 in the numerator. An alternative could be to make the numerator connector of the |
Beta Was this translation helpful? Give feedback.
-
Similar arguments can be made regarding the need for a
|
Beta Was this translation helpful? Give feedback.
-
Sounds like there is consensus regarding the need for the power block at the very least. Maybe I'll create a PR on that one first. The main issue is naming. Ideally, the block should be called "Power" I think, but that name is taken. Another option is "Pow" as mentioned in the first post, but that is of course just short for power and is potentially a bad choice since we would be left with "Pow" and "Power" blocks which is a little awkward. Ideally, I think the naming should be the following: Am I correct in assuming this would be too disruptive to make this change (even if Modelica conversions scripts were used)? Another choice is to use the name "Exponentiation" for the new block ( |
Beta Was this translation helpful? Give feedback.
-
Two math blocks that are often useful for me, but appear to be missing in MSL, are square and pow blocks. The basic equations:
Square:
y = u^2;
Pow:
y = u^p;
where p is a parameter (say default of 2)
...I would prefer "Power", but that's already taken
Thoughts/comments? Any idea why these aren't part of MSL already? They seem like common enough operations that they should be included. Note we already have a "Sqrt" block (
y = u^0.5
), which is a wrapper around the built-insqrt
function, which I'm guessing is why that one is present but the above ones are not.Beta Was this translation helpful? Give feedback.
All reactions