Opened 8 years ago
Last modified 6 years ago
#4442 assigned defect
Incorrect evaluation of inner/outer and record dependencies
Reported by: | Owned by: | Per Östlund | |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | v1.11.0 |
Keywords: | inner/outer, records | Cc: |
Description
The type of the replaceable parameter “medium_01” is exchanged in global “SIM” object and the medium’s record instance is copied to the component level using Modelica’s inner/outer concept. The record’s instance is then further copied using modifiers.
OpenModelica does not succeed in evaluating the dependencies within the records in the correct order. This applies to array sizes, which are dependent on the exchanged type and the corresponding instance copied using inner/outer and modifiers.
The top-level model to be simulated is the tester “Tester_ShellAndTubeCondenser” in the package “DynamicSolarSystem”.
Attachments (1)
Change History (5)
by , 8 years ago
Attachment: | Record analysis routine.zip added |
---|
comment:1 by , 6 years ago
Component: | Backend → New Instantiation |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 6 years ago
With -d=newInst
and script:
loadModel(Modelica); getErrorString(); loadFile("MediumTypes.mo"); getErrorString(); loadFile("DynamicSolarSystem.mo"); getErrorString(); instantiateModel(DynamicSolarSystem.Tester_ShellAndTubeCondenser); getErrorString();
we get:
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OMTesting/bugs/4442 $ ~/dev/OpenModelica/build/bin/omc -d=newInst t.mos true "" true "" true "" "" "[C:/home/adrpo33/dev/OMTesting/bugs/4442/MediumTypes.mo:12:5-12:74:writable] Error: Could not evaluate structural parameter (or constant): shellAndTubeCondenser.sim.medium_01.nc_propertyCalculation which gives dimensions of array: mixingRatio_propertyCalculation. Array dimensions must be known at compile time.
comment:3 by , 6 years ago
Milestone: | Future → 2.0.0 |
---|
Example