wang890
wang890
> That's #2340 which would take a bit more work. Unit literals actually have a lot more quirks to get them right and will take quite lot more work. **The...
I also encountered the same situation. I needed to replace the type of a component in a model. For this , Modelica has two keywords that can be used together:...
Still in version v9.46.1, when `@extend` multiple times, only the last one takes effect, that is, only the last extended component in the `:extend` field of `ModelingToolkit.Model` > > ModelingToolkit...
> Sounds like something that can be supported. I'll take a look. Thanks @ven-k when `@extend` multiple times as following, only the last one` (@extend ConditionalHeatPort)` takes effect ``` @mtkmodel...
please see https://github.com/SciML/ModelingToolkit.jl/issues/2342#issuecomment-2194731989 and the response of ChrisRackauckas. It will takes time to improve the Unit system. Unit is just for displaying to user, not for modeling and equation solving....
This feature is great, but will take time to implement. If it had been handled, how to use, where is the code modification in the corresponding section of `src code`,...
> @AayushSabharwal or @ven-k just handled something of the sort? Maybe, like: `@mtkbuild sys = Rc(; ConditionalHeatPort.useHeatPort=true)`, OR `@mtkbuild sys = Rc(; Rc.Resistor.ConditionalHeatPort.useHeatPort=true)` @AayushSabharwal, @ven-k
> Interesting concept. Assuming we propagate structural parameters up this would lower to something like > > ```julia > Rc(; ConditionalHeatPort__useHeatPort = true) > ``` Rc model call Resistor, Resistor...
Because MTK does not support argument "resistor__conditionalHeatPort__useHeatPort" now, I set `resistorUseHeatPort`, `use_Heat_Port`, `useHeatPort` as the structural parameter of model `Rc`, `Resistor`, `ConditionalHeatPort`, respectively, pass the structural_parameters step by step (Not...
> What if you have two resistors in a model, one of which has a heat port and one doesn't? Or if you have two child components which just so...