- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Changing the values of parameters...
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.
- sjoelund.se
- 1700 Posts
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/
- sjoelund.se
- 1700 Posts
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)
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Changing the values of parameters...