#2059 closed defect (fixed)
Strange look-up errors when dealing with replaceable functions
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | trunk |
Keywords: | Cc: |
Description
Please load the attached version of the ThermoPower library, which uses MSL 3.2.1.
Running checkModel(ThermoPower.Examples.RankineCycle.PrescribedSpeedPump) returns the following errors:
[ThermoPower/Examples.mo:2455:68-2455:79:writable] Error: Variable q_nom not found in scope ThermoPower.Examples.RankineCycle.PrescribedSpeedPump [ThermoPower/Water.mo:6461:7-6465:36:writable] Error: Class flowCharacteristic not found in scope ThermoPower.Water.Pump (looking for a function or record).
I cannot explain them: q_nom is declared in PrescribedSpeedPump a few lines above, and it is also the name of one of the inputs of ThermoPower.Functions.PumpCharacteristics.quadraticFlow, while the function flowCharacteristic is defined in the base class of ThermoPower.Water.Pump named ThermoPower.Water.BaseClasses.PumpBase.
What's wrong here?
Attachments (1)
Change History (13)
by , 12 years ago
Attachment: | ThermoPower.zip added |
---|
comment:2 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:3 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:7 by , 8 years ago
Milestone: | 1.10.0 → 2.0.0 |
---|---|
Priority: | high → blocker |
comment:8 by , 7 years ago
Component: | Frontend → New Instantiation |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:9 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
As of v1.13.0-dev-676-gd9899db2c, checking this model with the NF is successful.
comment:10 by , 6 years ago
Was this ever figured out? I understand this was posted quite some time ago. However, whenever using pump components from ThermoPower Library, there is always issues like the one mentioned above.
Thanks for your time! Let me know when you get the chance.
comment:11 by , 6 years ago
Replying to KieranF <kieran.fung@…>:
Was this ever figured out?
It was, the model has been working with the new frontend for 10 months now.
To summarize, we are currently in the process of replacing the old frontend of the OpenModelica Compiler with a new one, see #4138. The frontend takes the Modelica code and flattens it out to a bunch of variable declarations, function declarations, parameters, variables, and equations.
The new front-end can currently be activated optionally with the compilation flag -d=newInst
. We expect that when we release 1.14.0 it will be better than the current one for most libraries, and it will become the default one in 2.0.0, see the roadmap.
The current development policy is that we try to fix this kind of issues in the new frontend only. Those who get fixed, are marked as fixed for 2.0.0 (when the NF will be the default), though you can get them running today with a nightly build, as long as you turn on -d=newInst
.
The new frontend still has some issues with ThermoPower, compare the coverage with the old frontend to the coverage with the new frontend. However, most pending issues have been identified already, and I expect the new frontend to take over the old one in a matter of weeks, and to get 100% coverage in a few months at most.
BTW, there are some broken models in ThermoPower, because we updated some basic models several years ago, and made the old ones obsolete, but I haven't had the time to update all the examples yet. This is particularly true for the PowerPlants package. I'm trying to fix that as well, but I can't give you any dates for this process.
comment:12 by , 6 years ago
@KieranF, I have completely overhauled the ThermoPower.Electric package, and I have applied several fixes to the Examples package. Everything is now pushed to master.
I still need to overhaul the PowerPlants package, that will require some more time.
ThermoPower library, development version