Opened 7 years ago
Last modified 3 years ago
#4518 new enhancement
Optionally introduce aliases for variables with composite names in the declarative debugger
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OMEdit | Version: | |
Keywords: | Cc: |
Description
Equations shown in the declarative debugger tend to be extremely long and span multiple lines even on a large screen, because fully qualified variable names are used, such as
powerPlant.steamPlant.superheater.steamSide.flowModel.fluidModel.p powerPlant.steamPlant.superheater.steamSide.flowModel.fluidModel.T
It's easy to envision how an equation containing more than a handful of such long names will be extremely cumbersome and, what's more important, almost impossible to read and understand for a human reader. On the other hand, in most cases large parts of those names are redundant, and actually not needed at all to identify the variables for the person doing the debugging, once he/she understands the context.
In fact, when I need to analyze such an equation, I usually copy&paste it in a text editor, then remove all the redundant stuff, so I'm left, in this case, with just p
and T
. This obiously makes the equations much shorter and a lot more readable. It would be nice if the OMEdit debugger interface did this for me automatically. This could be done along the following lines.
A button "Show short aliases" is introduced above the equation window. If you select an equation and click on this button, the program collects the fully qualified names of all the variables shown in this equation and removes as many prefixes as possible from them so that the shortest possible variable names are left, that are not ambiguous. Then, it replaces these shorter aliases in the equation for display purposes.
For example, if you have a.b.c.x
and a.b.c.y
, only x
and y
will be displayed, while if you have a.b.c.x
and a.e.c.x
, b.c.x
and e.c.x
will be shown.
These aliases will be also be shown in the Variables windows before the fully qualified name, so you have a legend to understand their meaning, e.g.,
p (powerPlant.steamPlant.superheater.steamSide.flowModel.fluidModel.p) T (powerPlant.steamPlant.superheater.steamSide.flowModel.fluidModel.T)
This simple feature would make the debugger a lot more effective on real-life, non-trivial hierarchical models than it is today.
Change History (5)
comment:1 by , 6 years ago
Milestone: | 1.13.0 → 1.14.0 |
---|
comment:2 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:4 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Rescheduled to 1.14.0 after 1.13.0 releasee