Opened 14 years ago
Last modified 14 years ago
#1234 closed defect (fixed)
Biochem model gives lookup error message but succeeds with instantiation
Reported by: | Peter Aronsson | Owned by: | Peter Aronsson |
---|---|---|---|
Priority: | critical | Milestone: | Red October |
Component: | Version: | ||
Keywords: | Cc: | Peter Aronsson, Adrian Pop, AlexeyLebedev |
Description
The attached model gives the following message:
"Error: Variable PN.n1 not found in scope BioChem.Examples.centralMetabolism.cytosol
Error: Variable cytosol.V not found in scope BioChem.Examples.centralMetabolism.extra_cellular
But it succeeds with instantiation.
Attachments (4)
Change History (9)
by , 14 years ago
Attachment: | extra_cellularTotal.mo added |
---|
by , 14 years ago
Attachment: | CytosolTotal.mo added |
---|
comment:1 by , 14 years ago
Added two more examples with similar problems, but these fail to instantiate.
comment:3 by , 14 years ago
All three models are incorrect: they contain components whose names coincide with their types' names. In extra_cellularTotal.mo, it is cytosol in Biochem.Examples.centralMetabolism.extra_cellular; in cytosolTotal.mo, it is Endoplasmic_Reticulum in Biochem.Examples.CaOscillations.Cytosol; in ConatainerTotal.mo, these are Nucleus and Cytoplasm in BioChem.Examples.CircadianOscillator.Container . Modelica specifications forbid this (section 4.2).
If one fixes the names, no error messages are produced anymore. However, the files cytosolTotal.mo and ConatainerTotal.mo still fail to instantiate.
comment:4 by , 14 years ago
The file cytosolTotal.mo can be instantiated if one removes the lines
{{{ import BioChem.Math.*;
import BioChem.Constants.*;}}}
in Biochem.Examples.CaOscillations.Cytosol; ContainerTotal.mo can be instantiated if one removes the same lines in BioChem.Examples.CircadianOscillator.Container .
Don't know why it happens, though.
by , 14 years ago
Attachment: | ContainerSimple.mo added |
---|
A simplified version of ContainerTotal.mo with the same problem
comment:5 by , 14 years ago
Found the problem: InstExtends.getLocalIdentElement
did not handle Absyn.UNQUAL_IMPORT
.
I'll push a fix as soon as I run the testsuite.
More examples with similar error.