Opened 5 years ago
Last modified 3 years ago
#5639 new defect
Issues with WasteWater library
Reported by: | casella | Owned by: | perost |
---|---|---|---|
Priority: | blocker | Milestone: | 1.19.0 |
Component: | *unknown* | Version: | |
Keywords: | Cc: | adrpo, adeas31, dietmarw |
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)
Changed 5 years ago by adeas31
Changed 5 years ago by adeas31
comment:1 Changed 5 years ago by adeas31
comment:2 in reply to: ↑ description Changed 5 years ago by perost
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, and BioTreat 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.
comment:3 follow-up: ↓ 5 Changed 5 years ago by casella
@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 Changed 5 years ago by 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.
comment:5 in reply to: ↑ 3 Changed 5 years ago by perost
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 Changed 5 years ago by casella
- Milestone changed from 1.14.0 to 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 Changed 5 years ago by adrpo
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 Changed 4 years ago by casella
- Milestone changed from 1.15.0 to 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
comment:9 Changed 4 years ago by casella
- Milestone changed from 1.16.0 to 1.17.0
Retargeted to 1.17.0 after 1.16.0 release
comment:10 Changed 4 years ago by casella
- Milestone changed from 1.17.0 to 1.18.0
Rescheduled to 1.18.0
comment:11 Changed 3 years ago by casella
- Milestone 1.18.0 deleted
Ticket retargeted after milestone closed
comment:12 Changed 3 years ago by casella
- Milestone set to 1.19.0
1.18.0 blocker tickets moved to 1.19.0
The getComponents API behaves weird when nfAPI flag is set. I have created two scripts one uses nfAPI called getComponentsNFAPI.mos and the other don't called getComponentsAPI.mos. The package.mo used in the scripts is the waste water library downloaded from the link provided in the description.
Note in getComponentsNFAPI.mos calling getComponents first time gives wrong results but the later calls gives correct results. That is totally strange.