#3337 closed defect (fixed)
Make array type modifiers more useful
Reported by: | Per Östlund | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: | Adrian Pop |
Description
In the following model:
model M type A = Real[4](unit = {"m3/d", "g/m3", "g/m3", "g/m3"}); input A[3] a3; end M;
we propagate the modifier on A so that we get the invalid model:
model M input A[3, 4] a3(unit = {"m3/d", "g/m3", "g/m3", "g/m3"}); end M;
It would be much more useful if the modifier was applied to each element of the array a3 instead, as most users would expect. The current instantiation just merges the modifiers when resolving the type of an array component though, and it's not clear how to change this behaviour without rewriting a lot of the array instantiation. Maybe it's easier to fix this in the graph based instantiation?
This has been reported as Modelica issue #1687, since it's not yet specified how it should be handled. But there's pretty much only one sane way of handling it, so we might as well fix it if possible (and we have some users who want to use this).
Change History (3)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:3 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Fixed in b406a81/OMCompiler.