Opened 7 years ago

Last modified 6 years ago

#4442 assigned defect

Incorrect evaluation of inner/outer and record dependencies

Reported by: j.schulz@… 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)

Record analysis routine.zip (1.3 KB ) - added by j.schulz@… 7 years ago.
Example

Download all attachments as: .zip

Change History (5)

by j.schulz@…, 7 years ago

Attachment: Record analysis routine.zip added

Example

comment:1 by Adrian Pop, 6 years ago

Component: BackendNew Instantiation
Owner: changed from Lennart Ochel to Per Östlund
Status: newassigned

comment:2 by Adrian Pop, 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 Francesco Casella, 6 years ago

Milestone: Future2.0.0

comment:4 by Francesco Casella, 6 years ago

Still the same issue. Probably a duplicate of #5204

Note: See TracTickets for help on using tickets.