Symbolics.jl
Symbolics.jl copied to clipboard
Inconsistent display of equations with and without connectors
Because systems of equations with and without connectors are displayed in different Latex environments, they are displayed without and with alignment, respectively. This makes the ModelingToolkit big RC circuit tutorial equations unreadable:
Bad (before structural_simplify())
Good (after structural_simplify())
oh that's not good 😅
why would connectors be in a different environment?
They are currently displayed in this "function form", which does not have an equality sign that makes sense to align with:
One way to fix it would be to show equations(expand_connections(sys)) instead of equations(sys). But that would have to be done in ModelingToolkit, since expand_connections() is only defined there. And that would not fix the general problem in Symbolics.
Are connections used at all in Symbolics? I can't find it in any example or test. Or is it some historic remnant from Symbolics including (parts of?) ModelingToolkit before?
Are connections used at all in Symbolics? I can't find it in any example or test. Or is it some historic remnant from Symbolics including (parts of?) ModelingToolkit before?
Connections don't make sense in the Symbolics world. They really require systems to make sense.
They are currently displayed in this "function form", which does not have an equality sign that makes sense to align with:
What about just displaying it as 0 = connect?
I suppose that would fix it, yes. That might require some some changes in MTK, since it affect more than just the Latex rendering to be consistent throughout MTK.
Connections don't make sense in the Symbolics world. They really require systems to make sense.
Then I also think this connector equation logic should be moved to MTK.
yes that would make sense.