Opened 5 years ago
Last modified 3 years ago
#5639 new defect
Issues with WasteWater library
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | blocker | Milestone: | 1.19.0 |
Component: | *unknown* | Version: | |
Keywords: | Cc: | Adrian Pop, Adeel Asghar, Dietmar Winkler |
Description
@dietmarw reports some issues with the WasteWater library that we shuould address, because they may also affect other libraries and users quite badly.
The first issue is reported in ticket:5461#comment:16
I think I found another related quirk. I described in the small screen cast. The library version I used to demonstrate is this: https://github.com/dietmarw/WasteWater/releases/tag/v3.0.0-alpha.2
Here the screen cast: https://www.dropbox.com/s/7i1pu67j2iyqw46/2019-09-20_OMCNameLookup.mkv?dl=0
On one hand, probably due to component lookup failure by the API, one component icon does not show up. This is a new issue, since some time ago the diagram was displayed correctly. Could be either a NF issue or a nfAPI issue. I don't see anything strange with that lookup, @perost could you comment on that?
Furthermore, if a new component is added manually to the text layer, all the icons get broken, as demonstrated in the video. This is quite scary and shouldn't really happen.
Additionally, it seems that there are some issues with inner/outer lookup: if I check the model, I get the following error:
[1] 19:22:19 Translation Error [WasteWater.Components: 231:3-231:95]: Variable WWS.BioTreat not found in scope Deni.
Now, WWS
is the system object, that shows up neatly in the bottom left corner of the diagram, and BioTreat
is a parameter of that model, so this is also quite strange.
@perost, @adrpo, @adeas31, can you please download the library, check the video, and comment on what is going on in this case?
I guess since we have a regression we should try to fix this for 1.14.0. If this turns out to be too time-consuming, we'll reschedule to the next release.
Thanks!
Attachments (2)
Change History (14)
by , 5 years ago
Attachment: | getComponentsNFAPI.mos added |
---|
by , 5 years ago
Attachment: | getComponentsAPI.mos added |
---|
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Replying to casella:
Additionally, it seems that there are some issues with inner/outer lookup: if I check the model, I get the following error:
[1] 19:22:19 Translation Error [WasteWater.Components: 231:3-231:95]: Variable WWS.BioTreat not found in scope Deni.Now,
WWS
is the system object, that shows up neatly in the bottom left corner of the diagram, andBioTreat
is a parameter of that model, so this is also quite strange.
The issue seems to be that the NF doesn't handle inner/outer records correctly.
follow-up: 5 comment:3 by , 5 years ago
@perost, do you think we can fix this in 1.14.0, or at least in a subsequent 1.14.x maintenance release?
comment:4 by , 5 years ago
No proper support for inner and outer should be enough to be a blocker for any stable release version. As this is quite a common used feature in models.
comment:5 by , 5 years ago
Replying to casella:
@perost, do you think we can fix this in 1.14.0, or at least in a subsequent 1.14.x maintenance release?
If you mean the inner/outer record issue it's probably not a trivial fix, so I can't really say.
Replying to dietmarw:
No proper support for inner and outer should be enough to be a blocker for any stable release version. As this is quite a common used feature in models.
It's not a regression in terms of the new frontend though, this specific case of inner/outer has never worked as far as I know. It does seem to work with the old frontend, but the old frontend has lots of other inner/outer issues on its own.
My understanding is that it's been decided to switch to the new frontend by default in 1.14.0 and handle regressions by falling back to the old frontend. Obviously that doesn't seem to work in all cases yet though.
comment:6 by , 5 years ago
Milestone: | 1.14.0 → 1.15.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2.
This issue, previously marked as blocker for 1.14.0, is rescheduled to 1.15.0
comment:7 by , 5 years ago
This is a really strange bug. I tried to make a smaller model with this issue but I could not, it worked fine anything I tried. If you do the change below, it starts working fine so maybe this gives Per some idea where the problem is.
-
WasteWater/Components.mo
diff --git a/WasteWater/Components.mo b/WasteWater/Components.mo index db0ebcb..4e51062 100644
a b model Deni "Denitrification tank" 226 226 // replaceable model ASMx = Interfaces.ASM2d 227 227 // constrainedby Interfaces.ASMbase 228 228 // annotation (choicesAllMatching=true); 229 229 protected 230 parameter Types.BioTreatment BioTreat=WWS.BioTreat "Type of biological treatment set in WWS"; 230 Components.WWSystem w = WWS; 231 parameter Types.BioTreatment BioTreat=w.BioTreat "Type of biological treatment set in WWS";
comment:8 by , 5 years ago
Milestone: | 1.15.0 → 1.16.0 |
---|
Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0
The
getComponents
API behaves weird whennfAPI
flag is set. I have created two scripts one usesnfAPI
calledgetComponentsNFAPI.mos
and the other don't calledgetComponentsAPI.mos
. Thepackage.mo
used in the scripts is the waste water library downloaded from the link provided in the description.Note in
getComponentsNFAPI.mos
callinggetComponents
first time gives wrong results but the later calls gives correct results. That is totally strange.