- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Interactive Simulation
Interactive Simulation
Interactive Simulation
Hi
I have created a simulation of an industrial process which varies according to the characteristics of the input. Is there any way I can pause the simulation and change some of the process parameters and then resume? Basically I want to create a training simulator that involves user input. So the workflow would be something like:
Start simulation with assumed parameters
Visualize results at say 25% of run time
Modify parameters
Visualize results at 50% of run time
Modify Parameters, etc
Any help or links would be gratefully appreciated.
Peter
Re: Interactive Simulation
It is possible to initialize a simulation based on previous simulation results. Would that be helpful?
- lochel
- 45 Posts
Re: Interactive Simulation
There are two flags for the simulation executable: iif and iit (see here for more information https://www.openmodelica.org/doc/OpenMo … mflag-iif)
Additionally, you have to disable the ordinary initialization with –iim=none.
Code:
// run simulation from time=0 until time=0.25 and save results to xxx_res.mat
simulate(foo, stopTime=0.25, fileNamePrefix="xxx"); getErrorString();
// run simulation from time=0.25 until time=1.0 and use previous results as initial solution
simulate(foo, startTime=0.25, simflags="-iim=none -iif=xxx_res.mat -iit=0.25"); getErrorString();
- lochel
- 45 Posts
Re: Interactive Simulation
Re: Interactive Simulation
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Interactive Simulation