-
Notifications
You must be signed in to change notification settings - Fork 175
Avoid wildcard effect in default unity gains #4660
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
base: master
Are you sure you want to change the base?
Conversation
I agree with you on the fact of getting weird units ... |
By the way, I believe that those removed |
To me this is not a drawback, it is precisely how it should be! |
I recommend taking a look at the bugfixes for |
That's ok (Sometimes I prefer having signals with units). |
Right, and the new default is not preventing this. One alternative is to modify the unit along with the value of the gain:
A better alternative in my opinion is to introduce a new time constant:
Note how the modification of Edit: Not that I would recommend it, but it is also possible to opt in for the wildcard effect and have the unit of
The important part of the change in this PR is that when all you want is pure integration and you don't modify |
I should also mention the relation to modelica/ModelicaSpecification#3688. With that syntax, the definition of
or
(Unfortunately, I am not allowed to explain how the syntax can be enabled in Wolfram System Modeler, but let me know if you would like a demonstration.) |
I like that idea! Additionally, it should be possible to adapt the unit not only textually but also in the graphical menu. |
The proposal looks good to me, but since I'm not a language specialist I'd like to hear the opinion of e.g. @HansOlsson |
So far so good, but now we must make sure that this side-topic is not growing too big in the discussion of this PR. To be continued in modelica/ModelicaSpecification#3688. |
Too often, I have been bitten by the hidden gains in blocks such as
Integrator
andAdd
, where unit errors are absorbed by inferring unexpected units for these gains with value 1. This PR comes in three parts corresponding to the initial three commits:1
when one wants a 1 with unit"1"
.I must warn that I will soon be off for vacation, and may not be able to respond to feedback until July 7.