Opened 8 years ago
Last modified 3 years ago
#4238 assigned defect
OMEdit shows strange behavior when loading system libraries automatically
Reported by: | Rüdiger Franke | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Interactive Environment | Version: | v1.11.0 |
Keywords: | Cc: | Martin Sjölund |
Description
OMEdit ships with numerous so called System Libraries. They are currently loaded when invoking "Check Model". A couple of problems show up. This is why the automatic loading should happen earlier, e.g. when a model is loaded.
See the attached file ControlledMixingUnit2.mo
.
So far OMEdit just reports upon file open:
[1] 13:34:35 Übersetzung Fehler [ControlledMixingUnit2: 3:3-4:50]: Klasse Modelica_Synchronous.Examples.Systems.ControlledMixingUnit konnte nicht im Geltungsbereich von <global scope> gefunden werden.
Check model reports:
[1] 13:43:56 Skripting Meldung Automatically loaded package Modelica_Synchronous 0.92.1 due to uses annotation. [2] 13:43:57 Skripting Fehler Unable to find component feedback.y while parsing connection {feedback.y,gain.u, ""}. [3] 13:43:57 Skripting Fehler Unable to find component gain.y while parsing connection {gain.y,add.u2, ""}. [4] 13:43:57 Skripting Fehler Unable to find component inverseBlockConstraints.y2 while parsing connection {inverseBlockConstraints.y2,invMixingUnit.T_c, ""}. [5] 13:43:57 Skripting Fehler Unable to find component invMixingUnit.c while parsing connection {invMixingUnit.c,inverseBlockConstraints.u2, ""}. [6] 13:43:57 Skripting Fehler Unable to find component invMixingUnit.T while parsing connection {invMixingUnit.T,feedback.u1, ""}. [7] 13:43:57 Skripting Fehler Unable to find component filter.y while parsing connection {filter.y,inverseBlockConstraints.u1, ""}. [8] 13:43:57 Skripting Fehler Unable to find component hold1.y while parsing connection {hold1.y,mixingUnit.T_c, ""}. [9] 13:43:57 Skripting Fehler Unable to find component add.y while parsing connection {add.y,hold1.u, ""}. [10] 13:43:57 Skripting Fehler Unable to find component sample1.u while parsing connection {sample1.u,mixingUnit.T, ""}. [11] 13:43:57 Skripting Fehler Unable to find component sample1.y while parsing connection {sample1.y,feedback.u2, ""}. [12] 13:43:57 Skripting Fehler Unable to find component inverseBlockConstraints.y1 while parsing connection {inverseBlockConstraints.y1,add.u1, ""}. [13] 13:43:57 Skripting Fehler Unable to find component sample2.u while parsing connection {sample2.u,step.y, ""}. [14] 13:43:57 Skripting Fehler Unable to find component filter.u while parsing connection {filter.u,sample2.y, ""}. [15] 13:43:57 Skripting Fehler Unable to find component periodicClock1.y while parsing connection {periodicClock1.y,sample2.clock, ""}. [16] 13:43:57 Skripting Meldung Check of ControlledMixingUnit2 completed successfully.
Simulation works afterwards. The model graphics remains wrong though.
Attachments (4)
Change History (14)
by , 8 years ago
Attachment: | ControlledMixingUnit2.mo added |
---|
comment:1 by , 8 years ago
by , 8 years ago
Attachment: | ControlledMixingUnit2.mos added |
---|
comment:2 by , 8 years ago
Your error "Class Clock not found" is because omc requires the flag "+std=3.3" for synchronous features.
When omc runs on command line, it does not make a difference if it loads dependend libaries early during model load or late during model translation. OMEdit appears to require early load, before it builds up caches for model graphics and the like.
comment:3 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone changed to 1.12.0 since 1.11.0 was released.
by , 7 years ago
Attachment: | ControlledMixingUnit2_Error.mos added |
---|
by , 7 years ago
Attachment: | ControlledMixingUnit2_Success.mos added |
---|
comment:4 by , 7 years ago
Cc: | added |
---|---|
Component: | OMEdit → Interactive Environment |
Owner: | changed from | to
Status: | new → assigned |
I debugged a bit more into this and the issue is that the getComponents
API fails depending on the order of loaded libraries.
I attached two script files that demonstrates the problem.
comment:5 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:7 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:9 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Its omc that does the automatic loading not OMEdit.
Btw I am getting this error,
Perhaps you have a different version of Modelica_Synchronous. Mine is
Modelica_Synchronous 0.92.1
.