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

Problem with loading TwoTanks model

Problem with loading TwoTanks model

Hi everybody! I am new to OpenModelica and am currently testing out the interactive simulation as explained in Chap. 5 of the users documentation.

I tried loading the TwoTanks model with loadModel(TwoTanks); however I got the following error message:

false
Error: Failed to load package TwoTanks (default) using MODELICAPATH /usr/lib/omlibrary:/home/cosima/.openmodelica/libraries/


I could not find any file named "TwoTanks" in the installation folder and therefore, I supposed that the model is missing in my library. The .zip file of the model was downloaded and manually added to the library folder but nothing works either.

I have to admit that I haven't read every page carefully in the documentation and I am still trying to look for clues in it. However, it would be helpful if I could get a hint as to where to look first or what to do.

Thank you very much!

Re: Problem with loading TwoTanks model

You are using rather old OpenModelica. Interactive simulation has been removed now.

Download the latest version https://build.openmodelica.org/omc/buil … ly-builds/
OR
Download the old version perhaps 1.8.0 where interactive simulation was funtional.

Adeel.

Re: Problem with loading TwoTanks model

If interactive simulation is removed now in the latest OpenModelica version, how can one work on changing the model parameters during simulation running? Does that mean that with the latest OpenModelica, one can only have static and predefined parameters for the model used?

The users documentation that I am using in from 2014-10-24 for OpenModelica 1.9.1.

Re: Problem with loading TwoTanks model

Yes, parameters in the Modelica spec are not supposed to be possible to change. The only things you should be able to change are tuneable parameters (at initialization), and top-level inputs (I think only via input files for now).

Re: Problem with loading TwoTanks model

So Chap.5 of the latest user documentation is no longer true?

Edited by: bull - Jan-26-15 12:49:08

Re: Problem with loading TwoTanks model

No. It was supposed to have been removed already. But probably was re-introduced during some 3-way merge of Word documents (hard to detect when we do not use LaTeX)

Re: Problem with loading TwoTanks model

Thank you for pointing that out.

Do you know if there is another workaround for my problem? I would love to change some parameters of my model during simulation. Is the function available with Dymola?

Re: Problem with loading TwoTanks model

No idea if they have this in Dymola.

You could make a bigger model in which your model is a component and then use when equations to change values of
variables at different times during the simulation. The only problem with this is that it doesn't work for parameters, just
variables.

Re: Problem with loading TwoTanks model

Thank you. I will try out as advised.  current/wink

There are 0 guests and 0 other users also viewing this topic
You are here: