- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OM ver 1.14 and use of redeclare etc
OM ver 1.14 and use of redeclare etc
OM ver 1.14 and use of redeclare etc
I try to use OpenModelica 1.14 nightly build 2019-03-18.
It works directly for the most basic models I have.
For more recent models where I use “redeclare” etc like in the enclosed example I get all the translation error message like
“Translation error:
Cannot instantiate DEMO_v10 due to class specialisation PACKAGE”
If I check the code for the system Test that I want to run and that combine the different components then I get the error:
“Translation error:
Class Medium.Concentration not found in scope DEMO_v10.Equipment.LiquidCon
In one way I can understand the comment but in another not.
The “LiquidCon” is used as a kind formal parameter for the package and is defined outside the package when Equipment3 is made from Equipment using redeclare and giving Medium the “value” Medium3”.
I think this is the technique to make packages parametrizesed and easy to adapt to various application codes. So what is wrong here?
The code works both in OpenModelica 1.13 as well as in JModelica.
Thanks for your help!
Jan Peter
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OM ver 1.14 and use of redeclare etc