-
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
Convert "HeatingResistor" to "Resistor" in Electrical.Analog #2983
Convert "HeatingResistor" to "Resistor" in Electrical.Analog #2983
Conversation
Do you want me to exclude the "invalid" commit on V.A? |
The conversion script proposed in #2899 (comment) does not work in Dymola. I therefore changed it in c31d6a8 -- which triggers Dymola to convert However, I do not understand why the performed change in c31d6a8 works, as this makes only sense to me if convertElement("Modelica.Electrical.Analog.Basic.HeatingResistor",
{"R_ref"},
{"R"}); is performed before convertClass("Modelica.Electrical.Analog.Basic.HeatingResistor",
"Modelica.Electrical.Analog.Basic.Resistor"); even though the two conversions are implemented in the conversion script in the opposite order. @beutlich Can you please double check if the conversion script is correct? |
@christiankral Can only check in Dymola, too, which is the only kown tool to support conversion currently. We could also rename R to R_ref in Resistor. |
Conversion of ModelicaTestConversion4.Electrical.Analog.Issue2899 works as expected. |
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 update Modelica.Electrical.Analog.Examples.HeatingResistor to no longer use the HeatingResistor.
Yes, you can do so. |
Thanks, first I thought about it then then I forgot about it... I will change the example. |
Previous conversion did not work as expected, as parameter "R_ref" was not converted to "R" in Dymola; the updated conversion script now works in Dymola
289aae8
to
b99ddfa
Compare
The script-commands don't convert models one by one, but they sort of create a conversion table that is then applied in one go - and that's why the order doesn't matter. |
…r examples The heating resistor of Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature has not been converted by modelica#2983
see #2899