Opened 6 years ago
Closed 6 years ago
#4840 closed defect (fixed)
OMEdit does not use displayUnit unit conversion on parameter arrays of component array instances
Reported by: | ceraolo | Owned by: | adeas31 |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: |
Description (last modified by ceraolo)
Consider the enclosed model BugSources. the source voltages are correct (plot1.png).
Let us now set phase of sineVoltage component to {0,120,240} It should still create three sines equally spaced in time. However this happens not to be true (plot2.png).
Since the circuit is very simple, and uses only MSL components, I think this issue is severe.
Attachments (3)
Change History (8)
Changed 6 years ago by ceraolo
Changed 6 years ago by ceraolo
Changed 6 years ago by ceraolo
comment:1 Changed 6 years ago by casella
comment:2 Changed 6 years ago by ceraolo
- Description modified (diff)
comment:3 Changed 6 years ago by casella
- Summary changed from Error in evaluating sine phases to OMEdit does not use displayUnit unit conversion on parameter arrays of component array instances
Changed title to better reflect the issue
comment:4 Changed 6 years ago by adeas31
At least the array expression with constant values should work fine with 862a324/OMEdit.
comment:5 Changed 6 years ago by casella
- Resolution set to fixed
- Status changed from new to closed
This issue is fixed in 1.13.0-dev.beta1
The problem here is that the expression {0, 120, 240} is not converted from deg to radians, but just passed literally as a modifier; hence, the meaning is 0, 120 rad, 240 rad.
There is some ambiguity on the meaning of the units tab: when a literal constant is used, it is converted from the display unit to SI unit, while any other type of expression is passed literally as a modifier. Unfortunately there is no feedback about this from the GUI, one has to check the code in the text view. In this case, the array {0, 120, 240} is interpreted as an expression and thus used literally as a modifier.
In fact, what this ticket points out is that it is actually impossible to use displayUnit for parameter input of component arrays, which is a serious limitation.
@adeas31, do you think that also converting arrays of literal values from displayUnit to SI unit is doable for 1.13.0?