Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added trunk/Makefile.common, and restructured Makefile and Makefile…
….omdev.mingw - Fixed lots of weird install targets for files - Moved commands.xml, etc files from bin to share/omnotebook, share/omshell. - Moved ptplot.jar from bin to share/omc/java. - Moved ptplot_license.txt from bin to share/ - Moved omc_helptext.txt from bin to share/doc/omc - Added antlr_license.txt - Moved OPENMODELICA/include to OPENMODELICAHOME/omc/include - This way we won't override system libs/includes if we install to /usr - Did the same for /lib - Left to do: Move scripts from bin to usr/share/omc/scripts - Updated OMNotebook and OMShell to reflect new paths of xml files. - Updated doPlot commands to reflect the new location of ptplot.jar git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk/doc@5368 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
1 changed file
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
OpenModelica Builtin Commands | ||
----------------------------- | ||
Exit OMShell by pressing Ctrl-d | ||
|
||
up-arrow | ||
Get previously given command. | ||
down-arrow | ||
Get next command. | ||
|
||
<tab> | ||
Command completion of these builtin commands. | ||
Circulate through the commands by only using <tab>. | ||
|
||
cd() | ||
Return the current directory | ||
|
||
cd(dir) | ||
Change directory to the directory given as a string. | ||
Ex: cd("myModels/myLibrary") | ||
|
||
clear() | ||
Clear everything. | ||
|
||
clearVariables() | ||
Clear the variables. | ||
|
||
help() | ||
Print this helptext (returned as a string). | ||
|
||
instantiateModel(modelname) | ||
Instantiates a model/class and returns a string | ||
containing the flat class definition. | ||
Ex: instantiateModel(dcmotor) | ||
list() | ||
Return a string containing all class definitions. | ||
|
||
list(modelname) | ||
Return a string containing the class definition of | ||
the named class. Ex: list(dcmotor) | ||
|
||
listVariables() | ||
Return a vector of the currently defined variable names. | ||
|
||
loadFile(strFile) | ||
Load modelica file given as string argument. | ||
Ex: loadFile("../myLibrary/myModels.mo") | ||
|
||
loadModel(name) | ||
Load model, function, or package relative to $OPENMODELICALIBRARY. | ||
Ex: loadModel(Modelica.Electrical) | ||
Note: if e.g. loadModel(Modelica) fails, you may have | ||
OPENMODELICALIBRARY pointing at the wrong location. | ||
|
||
plot(var) | ||
Plot a variable relative to time from the most recently | ||
simulated model. Ex: plot(x) | ||
|
||
plot(vars) | ||
Plot variables given as a vector relative to time from | ||
the most recently simulated model. | ||
Plotting parameters, array elements or record variables not | ||
currently supported. | ||
Ex: plot({x,y}) | ||
|
||
plotParametric(var1, var2) | ||
Plot var2 relative to var1 from the most recently | ||
simulated model. | ||
Ex: plotParametric(x,y) | ||
|
||
readFile(str) | ||
Load file given as string and return a string of the file content. | ||
Ex: readFile("myModel/myModelr.mo") | ||
|
||
readSimulationResultSize(strFile) | ||
Return the size of the record resulting from a simulation. The size | ||
is read from the result file, given as a string | ||
Ex: readSimulationResultSize("dcmotor_res.plt"); | ||
|
||
readSimulationResult(strFile, variables, size) | ||
Read the results of a simulation from a file named by the string | ||
argument strFile. Here size is the size of the resulting record and | ||
variables is a vector of the variables to investigate. | ||
Ex: readSimulationResult("dcmotor_res.plt", {R1.i,L1.v}, 10) | ||
|
||
runScript(strFile) | ||
Exectute script file (.mos) given as string argument. | ||
Ex: runScript("simulation.mos") | ||
|
||
saveModel(strFile,modelname) | ||
Save the model/class with name modelname in the file given by the | ||
strFile string argument. | ||
|
||
simulate(modelname[,startTime=<Real>] | ||
[,stopTime=<Real>][,numberOfIntervals=<Integer>]) | ||
Translates a model and simulates it. | ||
Ex: simulate(dcmotor) | ||
Ex: simulate(dcmotor,startTime=0, stopTime=10, numberOfIntervals=1000) | ||
|
||
system(str) | ||
Execute str as a system(shell) command, return integer success value. | ||
Ex: system("touch myFile") | ||
|
||
timing(expr) | ||
Evaluates expression and returns the number of seconds the evaluation | ||
took. Ex: timing(x*4711+5) | ||
|
||
typeOf(variable) | ||
Returns the type of the variable as a string. Ex: typeOf(R1.v) | ||
|
||
val(variableName,stime) | ||
The val(variableName,time) scription function retrieves the interpolated | ||
value of a simulation result variable at time=stime of the | ||
simulated time. | ||
Using val on parameters, array elements, or record variables not | ||
currently supported. | ||
|
||
quit() | ||
Leave OpenModelica and kill the process. |