- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » how to create a .mos script ?
how to create a .mos script ?
Re: how to create a .mos script ?
Do you want to create script file that execute a simulation?
If so you can read here
OMShell and OMNotebook introduction and exercises
Page.3
And I write down small overview.
1.
Simulation execution script is written by some text editor and save as .mos file.
Code example is following
Code:
loadModel(Modelica);
cd("directory address);
loadFile("File name");
simulate(model name,startTime=0,stopTime=1 ... );
2.
Go to the directory of .mos file using cd() command in OMSell.
3.
Code:
runScript("mos file")
Then the script start.
If you want to control parameter value according to a result, I don't know how to creat.
Regards,
- Ueda
- 15 Posts
Re: how to create a .mos script ?
You are welcome Nasrou.
Maybe for loop can not be used.
Beause there is no loop command in this list
https://build.openmodelica.org/Document … pting.html
If you want to make many similar commands,
you have to make another program by another language.
If you find how to use for loop,
please teach me.
Add to
I will fix the above reply.
I found for loop example from your forum.
https://openmodelica.org/doc/OpenModeli … eter-sweep
Good luck
Ueda
- Ueda
- 15 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » how to create a .mos script ?