-
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
Merge HeatingNMOS/HeatingPMOS with NMOS/PMOS #3167
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 believe there is a change hidden here:
- The old ?MOS had useHeatPort=false;
- The new ?MOS has useHeatPort=true
- The old Heating?MOS had useHeatPort=true;
As I understand that means that old models that used a ?MOS without changes will now have a dangling heatPort - which will imply a singularity (since the temperature isn't given).
I believe that the right approach is to have useHeatPort=false for the new ?MOS, which implies that the example model will still need useHeatPort=true.
There are other alternative, but I believe they have more complicated conversions.
I guess, this also was overlooked in #3010 then. Easiest would be to set useHeatPort=useTemperatureDependency in the new models, right? |
That is one possibility, I tried to list all of them below:
To me the heat-port seems like the primary parameter, and thus the last option seems preferable; but I'm not an electrical engineer so I don't know which parameter is most natural. |
If we have useTemperatureDependency=useHeatPort and have useHeatPort=true (as new default) we do not get the old Diode/PMOS/NMOS behavior when using that new model (of v4.0.0). |
Yes, I had just realized that as well. It's just that to me it seems natural to enable both temperature dependency and heat-port (if you want either of them), and thus that should be natural in the user-interface; i.e. the natural user experience is to set useTemperatureDependency. I don't know how we can do that in a simple way. |
Parameters useTemperatureDependency and useHeatPort are independent, actually. useTemperatureDependency=false was introduced as new parameter for v4.0.0. Having useHeatPort=useTemperatureDependency enables a clean conversion. Users still can set useHeatPort to false/true since it is no final modification. |
Is it actually a problem that useHeatPort is shown as check box in the UI? |
Dymola uses a tri-state checkbox if its neither explicitly true nor false, and in this case the value is useTemperatureDependency (which happens to be false). Using the normal two-state would make it graphically difficult to see if a user changed the value between false and useTemperatureDependency. Obviously we could use a different marker, but that adds complexity. However, the point I wanted to make earlier was something else: can we make it easier for users to understand that it would be good to change useTemperatureDependency instead of useHeatPort? I don't see any amazing solutions, so just having it "earlier" in the dialog (as in this case), and reusing the logic in other models seems like the way forward. |
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.
Looks good.
Which is a nice idea to avoid confusion.
Still, you need to update the UI if the value of the tri-state checkbox changes due to changes of the connected parameter. |
See #2899.