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

Changing the values of parameters during simulation runtime:

Changing the values of parameters during simulation runtime:

As we know some parameters need to be initialized before running the simulation. In each execution of the simulation we can change them to get different simulation results. Some others have derived or calculated value that generated in during of the simulation runtime. My question is that how we should deal with these values?
Where they stored? In the RAM? Or in the *_init.txt file? If they are stored in the  *_init.txt file, is it possible to change them manually during the simulation runtime?
After all is it necessary to worry about them?

I am very thankful for any help.

Re: Changing the values of parameters during simulation runtime:

Parameters are stored in RAM. It is only possible to change them if you make an interactive simulation.

Re: Changing the values of parameters during simulation runtime:

@sjoelund.se:

If I fully understand you mean I can change the values of parameters stored in the *_init.txt file during the interactive simulation.
You mean once the simulation started, we can change the *_init.txt file and save it for the rest of the simulation.

Is it right?

Thank you very much

Re: Changing the values of parameters during simulation runtime:

No, the interactive simulation is a socket-based client that communicates with the simulation.
Basically sending:

Code:

doStep()

doStep()
doStep()
changeParameter(i,100)

I'm not that familiar with it, but it should be in the documentation and sample code in https://openmodelica.org/svn/OpenModeli … teractive/

Re: Changing the values of parameters during simulation runtime:

Hi, could you please tell more about interactive simulation. If it is possible for you give me a simple sample or a resource to find about it.

Thank you very much

Re: Changing the values of parameters during simulation runtime:

Our test case, using a really stupid client: https://openmodelica.org/svn/OpenModeli … imulation/
Chapter 5 of the manual: https://openmodelica.org/svn/OpenModeli … sGuide.pdf
The sample client provided by the original developer: https://openmodelica.org/svn/OpenModeli … pleClient/

User: anonymous
Password: none (4 letters)

Re: Changing the values of parameters during simulation runtime:

@sjoelund.se : thank you very much

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