- <Text><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Times New Roman; font-size:12pt; color:#000000;"><span style=" font-family:Courier New;">Exit OMShell by pressing Ctrl-d<br /><br />up-arrow<br /> Get previously given command.<br /> <br />down-arrow<br /> Get next command.<br /><br />tab<br /> Command completion of these builtin commands.<br /> Circulate through the commands by only using tab key.<br /><br />cd()<br /> Return the current directory<br /><br />cd(dir)<br /> Change directory to the directory given as a string.<br /> Ex: cd("myModels/myLibrary")<br /><br />clear()<br /> Clear everything.<br /><br />clearVariables()<br /> Clear the variables.<br /><br />help()<br /> Print this helptext (returned as a string).<br /><br />instantiateModel(modelname)<br /> Instantiates a model/class and returns a string <br /> containing the flat class definition.<br /> Ex: instantiateModel(dcmotor)<br /><br />list()<br /> Return a string containing all class definitions.<br /><br />list(modelname)<br /> Return a string containing the class definition of<br /> the named class.<br /> Ex: list(dcmotor)<br /><br />listVariables()<br /> Return a vector of the currently defined variable <br /> names.<br /><br />loadFile(strFile)<br /> Load modelica file given as string argument.<br /> Ex: loadFile("../myLibrary/myModels.mo")<br /><br />loadModel(name)<br /> Load model, function, or package relative to $MODELICAPATH.<br /> Ex: loadModel(Modelica.Electrical)<br /> Note: if e.g. loadModel(Modelica) fails, you may have<br /> MODELICAPATH pointing at the wrong location.<br /><br />plot(var)<br /> Plot a variable from the most recently simulated model.<br /> Ex: plot(x)<br /><br />plot(vars)<br /> Plot variables from the most recently simulated model<br /> given as a vector.<br /> Ex: plot({x,y})<br /></span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"> plotParametric(var1, var2)</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"> Plot var2 relative to var1 from the most recently simulated </p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"> model.</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"> Ex: plotParametric(x,y)</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Courier New; font-size:12pt; color:#000000;"><br />readFile(str)<br /> Load file given as string and return a string of the<br /> file content.<br /> Ex: readFile("myModel/myModelr.mo")<br /><br />readSimulationResultSize(strFile)<br /> Return the size of the record resulting from a simulation<br /> The size is read from the result file, given as a string<br /> Ex: readSimulationResultSize("dcmotor_res.plt");<br /><br />readSimulationResult(strFile, variables, size)<br /> Read the results of a simulation from a file named by<br /> the string argument strFile. <br /> Here size is the size of the resulting record and<br /> variables is a vector of the variables to investigate.<br /> Ex: readSimulationResult("dcmotor_res.plt", {R1.i,L1.v}, 10)<br /><br />runScript(strFile)<br /> Exectute script file (.mos) given as string argument.<br /> Ex: runScript("simulation.mos")<br /><br />saveModel(strFile,modelname)<br /> Save the model/class with name modelname in the file given <br /> by the strFile string argument.<br /><br />simulate(modelname[,startTime=][,stopTime=][,numberOfIntervals=])<br /> Translates a model and simulates it.<br /> Ex: simulate(dcmotor)<br /> Ex: simulate(dcmotor,startTime=0, stopTime=10, numberOfIntervals=1000)<br /><br />system(str)<br /> Execute str as a system(shell) command, return integer<br /> success value.<br /> Ex: system("touch myFile")<br /><br />timing(expr)<br /> Evaluates expression and returns the number of seconds <br /> the evaluation took.<br /> Ex: timing(x*4711+5)<br /><br />typeOf(variable)<br /> Returns the type of the variable as a string.<br /> Ex: typeOf(R1.v)<br /><br />quit()<br /> Leave OpenModelica and kill the process.<br /></p></body></html></Text>
0 commit comments