Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » johnmannisto@gmail.com
  • » Profile

Posts

Posts

Jun-17-16 01:46:48
losing redeclare after any change in widget

I have been having trouble with the redeclare Medium statement.

I can take the ThreeTanks example, run it successfully, then change the height of Tank1, at which time the error

[2] 21:21:10 Translation Error
[MyThreeTanks: 12:3-21:20]: component tank1 contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.


If I edit back in the appropriate statement:

  redeclare package Medium = Medium,

The problem will again run.

This does not seem like the "correct" way for things to work, that each time I change an input in the widget I need to re-edit the input file to add back the redeclare. It loses this definition each time I make a change in the widget. This seems strange.

Am I missing something, is there an easier way to do this, or it this a bug?



  • Index
  • » Users
  • » johnmannisto@gmail.com
  • » Profile
You are here: