Name |
Description |
CheckSettingsResult |
|
Internal |
|
checkSettings |
Display some diagnostics. |
loadFile |
load file (*.mo) and merge it with the loaded AST. |
loadFiles |
load files (*.mo) and merges them with the loaded AST. |
parseEncryptedPackage |
|
loadEncryptedPackage |
|
reloadClass |
reloads the file associated with the given (loaded class) |
loadString |
Parses the data and merges the resulting AST with ithe loaded
AST. If a filename is given, it is used to provide error-messages
as if the string was read in binary format from a file with the
same name. The file is converted to UTF-8 from the given character
set. When merge is true the classes cNew in the file will be merged
with the already loaded classes cOld in the following way: 1. get
all the inner class definitions from cOld that were loaded from a
different file than itself 2. append all elements from step 1 to
class cNew public list NOTE: Encoding is deprecated as *ALL*
strings are now UTF-8 encoded. |
parseString |
|
parseFile |
|
loadFileInteractiveQualified |
|
loadFileInteractive |
|
system |
Similar to system(3). Executes the given command in the system
shell. |
system_parallel |
Similar to system(3). Executes the given commands in the system
shell, in parallel if omc was compiled using OpenMP. |
saveAll |
save the entire loaded AST to file. |
help |
display the OpenModelica help text. |
clear |
Clears everything: symboltable and variables. |
clearProgram |
Clears loaded . |
clearVariables |
Clear all user defined variables. |
generateHeader |
|
generateJuliaHeader |
|
generateSeparateCode |
|
generateSeparateCodeDependencies |
|
generateSeparateCodeDependenciesMakefile |
|
getLinker |
|
setLinker |
|
getLinkerFlags |
|
setLinkerFlags |
|
getCompiler |
CC |
setCompiler |
CC |
setCFlags |
CFLAGS |
getCFlags |
CFLAGS |
getCXXCompiler |
CXX |
setCXXCompiler |
CXX |
verifyCompiler |
|
setCompilerPath |
|
getCompileCommand |
|
setCompileCommand |
|
setPlotCommand |
|
getSettings |
|
setTempDirectoryPath |
|
getTempDirectoryPath |
Returns the current user temporary directory location. |
getEnvironmentVar |
Returns the value of the environment variable. |
setEnvironmentVar |
|
appendEnvironmentVar |
Appends a variable to the environment variables list. |
setInstallationDirectoryPath |
Sets the OPENMODELICAHOME environment variable. Use this method
instead of setEnvironmentVar. |
getInstallationDirectoryPath |
This returns OPENMODELICAHOME if it is set; on some platforms
the default path is returned if it is not set. |
setModelicaPath |
The Modelica Library Path - MODELICAPATH in the language
specification; OPENMODELICALIBRARY in OpenModelica. |
getModelicaPath |
Get the Modelica Library Path. |
getHomeDirectoryPath |
This returns the path to user HOME directory. |
setCompilerFlags |
|
enableNewInstantiation |
|
disableNewInstantiation |
|
setDebugFlags |
example input: failtrace,-noevalfunc |
clearDebugFlags |
Resets all debug flags to their default values. |
setPreOptModules |
example input:
removeFinalParameters,removeSimpleEquations,expandDerOperator |
setCheapMatchingAlgorithm |
example input: 3 |
getMatchingAlgorithm |
|
getAvailableMatchingAlgorithms |
|
setMatchingAlgorithm |
example input: omc |
getIndexReductionMethod |
|
getAvailableIndexReductionMethods |
|
setIndexReductionMethod |
example input: dynamicStateSelection |
setPostOptModules |
example input:
lateInline,inlineArrayEqn,removeSimpleEquations. |
getTearingMethod |
|
getAvailableTearingMethods |
|
setTearingMethod |
example input: omcTearing |
setCommandLineOptions |
The input is a regular command-line flag given to OMC, e.g.
-d=failtrace or -g=MetaModelica |
getCommandLineOptions |
Returns all command line options who have non-default values as
a list of strings. The format of the strings is '--flag=value
--flag2=value2'. |
getConfigFlagValidOptions |
Returns the list of valid options for a string config flag, and
the description strings for these options if available |
clearCommandLineOptions |
Resets all command-line flags to their default values. |
getVersion |
Returns the version of the Modelica compiler. |
regularFileExists |
|
directoryExists |
|
stat |
|
readFile |
The contents of the given file are returned. Note that if the
function fails, the error message is returned as a string instead
of multiple output or similar. |
writeFile |
Write the data to file. Returns true on success. |
compareFilesAndMove |
|
compareFiles |
|
alarm |
|
regex |
Sets the error buffer and returns -1 if the regex does not
compile. The returned result is the same as POSIX regex(): The
first value is the complete matched string The rest are the
substrings that you wanted. For example: regex(lorem,"
\([A-Za-z]*\) \([A-Za-z]*\) ",maxMatches=3) => {" ipsum dolor
","ipsum","dolor"} This means if you have n groups, you want
maxMatches=n+1 |
regexBool |
Returns true if the string matches the regular expression. |
testsuiteFriendlyName |
|
readFileNoNumeric |
Returns the contents of the file, with anything resembling a
(real) number stripped out, and at the end adding: Filter count
from number domain: n. This should probably be changed to multiple
outputs; the filtered string and an integer. Does anyone use this
API call? |
getErrorString |
Returns the current error message. [file.mo:n:n-n:n:b] Error:
message |
getMessagesString |
see getErrorString() |
SourceInfo |
|
ErrorKind |
|
ErrorLevel |
|
ErrorMessage |
|
getMessagesStringInternal |
{{[file.mo:n:n-n:n:b] Error: message, TRANSLATION, Error,
code}} if unique = true (the default) only unique messages will be
shown |
countMessages |
|
clearMessages |
Clears the error buffer. |
runScript |
Runs the mos-script specified by the filename. |
echo |
echo(false) disables Interactive output, echo(true) enables it
again. |
getClassesInModelicaPath |
MathCore-specific or not? Who knows! |
getAnnotationVersion |
Returns the current annotation version. |
setAnnotationVersion |
Sets the annotation version. |
getNoSimplify |
Returns true if noSimplify flag is set. |
setNoSimplify |
Sets the noSimplify flag. |
getVectorizationLimit |
|
setVectorizationLimit |
|
getDefaultOpenCLDevice |
Returns the id for the default OpenCL device to be used. |
setDefaultOpenCLDevice |
Sets the default OpenCL device to be used. |
setShowAnnotations |
|
getShowAnnotations |
|
setOrderConnections |
Sets the orderConnection flag. |
getOrderConnections |
Returns true if orderConnections flag is set. |
setLanguageStandard |
Sets the Modelica Language Standard. |
getLanguageStandard |
Returns the current Modelica Language Standard in use. |
getAstAsCorbaString |
Print the whole AST on the CORBA format for records, e.g.
record Absyn.PROGRAM classes = ..., within_ = ..., globalBuildTimes
= ... end Absyn.PROGRAM; |
cd |
change directory to the given path (which may be either
relative or absolute) returns the new working directory on success
or a message on failure if the given path is the empty string, the
function simply returns the current working directory. |
mkdir |
create directory of given path (which may be either relative or
absolute) returns true if directory was created or already
exists. |
copy |
copies the source file to the destination file. Returns true if
the file has been copied. |
remove |
removes a file or directory of given path (which may be either
relative or absolute). |
checkModel |
Checks a model and returns number of variables and
equations. |
checkAllModelsRecursive |
Checks all models recursively and returns number of variables
and equations. |
typeOf |
|
instantiateModel |
Instantiates the class and returns the flat Modelica code. |
generateCode |
The input is a function name for which C-code is generated and
compiled into a dll/so |
loadModel |
Loads the Modelica Standard Library. |
deleteFile |
Deletes a file with the given name. |
saveModel |
|
saveTotalModel |
Save the className model in a single file, together with all
the other classes that it depends upon, directly and indirectly.
This file can be later reloaded with the loadFile() API function,
which loads className and all the other needed classes into memory.
This is useful to allow third parties to run a certain model (e.g.
for debugging) without worrying about all the library dependencies.
Please note that SaveTotal file is not a valid Modelica .mo file
according to the specification, and cannot be loaded in OMEdit - it
can only be loaded with loadFile(). |
saveTotalModelDebug |
Saves the className model in a single file, together with all
other classes that it depends on. This function uses a naive
heuristic based on which identifiers are used and might save things
which are not actually used, and is meant to be used in cases where
the normal saveTotalModel fails. |
save |
|
saveTotalSCode |
|
translateGraphics |
|
codeToString |
|
dumpXMLDAE |
Outputs the DAE system corresponding to a specific model. |
convertUnits |
|
getDerivedUnits |
|
listVariables |
Lists the names of the active variables in the scripting
environment. |
strtok |
Splits the strings at the places given by the token, for
example: strtok("abcbdef","b") => {"a","c","def"}
strtok("abcbdef","cd") => {"ab","ef"} |
stringSplit |
Splits the string at the places given by the character |
stringReplace |
|
escapeXML |
|
ExportKind |
|
list |
Lists the contents of the given class, or all loaded
classes. |
listFile |
Lists the contents of the file given by the class. |
DiffFormat |
|
diffModelicaFileListings |
Creates diffs of two strings corresponding to Modelica
files |
exportToFigaro |
|
inferBindings |
|
generateVerificationScenarios |
|
rewriteBlockCall |
Function for property modeling, transforms block calls into
instantiations for a loaded model |
realpath |
Get full path name of file or directory name |
uriToFilename |
|
getLoadedLibraries |
|
solveLinearSystem |
Solve A*X = B using dgesv. Returns for solver dgesv: info>0:
Singular for element i. info<0: Bad input. |
StandardStream |
|
reopenStandardStream |
|
importFMU |
Imports the Functional Mockup Unit Example command:
importFMU("A.fmu"); |
importFMUModelDescription |
Imports modelDescription.xml Example command:
importFMUModelDescription("A.xml"); |
translateModelFMU |
translates a modelica model into a Functional Mockup Unit. The
only required argument is the className, while all others have some
default values. Example command: translateModelFMU(className,
version="2.0"); |
buildModelFMU |
translates a modelica model into a Functional Mockup Unit. The
only required argument is the className, while all others have some
default values. Example command: buildModelFMU(className,
version="2.0"); |
buildEncryptedPackage |
|
simulate |
simulates a modelica model by generating c code, build it and
run the simulation executable. The only required argument is the
className, while all others have some default values.
simulate(className, [startTime], [stopTime], [numberOfIntervals],
[tolerance], [method], [fileNamePrefix], [options], [outputFormat],
[variableFilter], [cflags], [simflags]) Example command:
simulate(A); |
buildModel |
builds a modelica model by generating c code and build it. It
does not run the code! The only required argument is the className,
while all others have some default values. simulate(className,
[startTime], [stopTime], [numberOfIntervals], [tolerance],
[method], [fileNamePrefix], [options], [outputFormat],
[variableFilter], [cflags], [simflags]) Example command:
simulate(A); |
buildLabel |
builds Label. |
reduceTerms |
reduce terms. |
moveClass |
Moves a class up or down depending on the given offset, where a
positive offset moves the class down and a negative offset up. The
offset is truncated if the resulting index is outside the class
list. It retains the visibility of the class by adding
public/protected sections when needed, and merges sections of the
same type if the class is moved from a section it was alone in.
Returns true if the move was successful, otherwise false. |
moveClassToTop |
Moves a class to the top of its enclosing class. Returns true
if the move was successful, otherwise false. |
moveClassToBottom |
Moves a class to the bottom of its enclosing class. Returns
true if the move was successful, otherwise false. |
copyClass |
Copies a class within the same level |
linearize |
creates a model with symbolic linearization matrixes |
optimize |
optimize a modelica/optimica model by generating c code, build
it and run the optimization executable. The only required argument
is the className, while all others have some default values.
simulate(className, [startTime], [stopTime], [numberOfIntervals],
[stepSize], [tolerance], [fileNamePrefix], [options],
[outputFormat], [variableFilter], [cflags], [simflags]) Example
command: simulate(A); |
getSourceFile |
Returns the filename of the class. |
setSourceFile |
|
isShortDefinition |
returns true if the definition is a short class definition |
setClassComment |
Sets the class comment. |
getClassNames |
Returns the list of class names defined in the class. |
getUsedClassNames |
Returns the list of class names used in the total program
defined by the class. |
getPackages |
Returns the list of packages defined in the class. |
getAllSubtypeOf |
Returns the list of all classes that extend from className
given a parentClass where the lookup for className should
start |
basePlotFunction |
Extending this does not seem to work at the moment. A real
shame; functions below are copy-paste and all need to be updated if
the interface changes. |
plot |
Launches a plot window using OMPlot. |
plotAll |
Works in the same way as plot(), but does not accept any
variable names as input. Instead, all variables are part of the
plot window. Example command sequences: simulate(A);plotAll();
simulate(A);plotAll(externalWindow=true);
simulate(A,fileNamePrefix="B");simulate(C);plotAll(x,fileName="B.mat"); |
plotParametric |
Launches a plotParametric window using OMPlot. Returns true on
success. Example command sequences:
simulate(A);plotParametric(x,y); simulate(A);plotParametric(x,y,
externalWindow=true); |
readSimulationResult |
Reads a result file, returning a matrix corresponding to the
variables and size given. |
readSimulationResultSize |
The number of intervals that are present in the output
file. |
readSimulationResultVars |
Returns the variables in the simulation file; you can use val()
and plot() commands using these names. |
filterSimulationResults |
|
compareSimulationResults |
compares simulation results. |
deltaSimulationResults |
calculates the sum of absolute errors. |
diffSimulationResults |
compares simulation results. |
diffSimulationResultsHtml |
|
checkTaskGraph |
Checks if the given taskgraph has the same structure as the
reference taskgraph and if all attributes are set correctly. |
checkCodeGraph |
Checks if the given taskgraph has the same structure as the
graph described in the codefile. |
val |
Return the value of a variable at a given time in the
simulation results |
closeSimulationResultFile |
Closes the current simulation result file. Only needed by
Windows. Windows cannot handle reading and writing to the same file
from different processes. To allow OMEdit to make successful
simulation again on the same file we must close the file after
reading the Simulation Result Variables. Even OMEdit only use this
API for Windows. |
addClassAnnotation |
|
getParameterNames |
|
getParameterValue |
|
getComponentModifierNames |
|
getComponentModifierValue |
|
getComponentModifierValues |
|
removeComponentModifiers |
|
getElementModifierNames |
|
getElementModifierValue |
|
getElementModifierValues |
|
removeElementModifiers |
|
getInstantiatedParametersAndValues |
|
removeExtendsModifiers |
|
updateConnection |
|
updateConnectionAnnotation |
|
updateConnectionNames |
|
getConnectionCount |
Counts the number of connect equation in a class. |
getNthConnection |
Returns the Nth connection. Example command:
getNthConnection(A) => {"from", "to", "comment"} |
getAlgorithmCount |
Counts the number of Algorithm sections in a class. |
getNthAlgorithm |
Returns the Nth Algorithm section. |
getInitialAlgorithmCount |
Counts the number of Initial Algorithm sections in a
class. |
getNthInitialAlgorithm |
Returns the Nth Initial Algorithm section. |
getAlgorithmItemsCount |
Counts the number of Algorithm items in a class. |
getNthAlgorithmItem |
Returns the Nth Algorithm Item. |
getInitialAlgorithmItemsCount |
Counts the number of Initial Algorithm items in a class. |
getNthInitialAlgorithmItem |
Returns the Nth Initial Algorithm Item. |
getEquationCount |
Counts the number of Equation sections in a class. |
getNthEquation |
Returns the Nth Equation section. |
getInitialEquationCount |
Counts the number of Initial Equation sections in a class. |
getNthInitialEquation |
Returns the Nth Initial Equation section. |
getEquationItemsCount |
Counts the number of Equation items in a class. |
getNthEquationItem |
Returns the Nth Equation Item. |
getInitialEquationItemsCount |
Counts the number of Initial Equation items in a class. |
getNthInitialEquationItem |
Returns the Nth Initial Equation Item. |
getAnnotationCount |
Counts the number of Annotation sections in a class. |
getNthAnnotationString |
Returns the Nth Annotation section as string. |
getImportCount |
Counts the number of Import sections in a class. |
getMMfileTotalDependencies |
|
getImportedNames |
Returns the prefix paths of all imports in a class. |
getNthImport |
Returns the Nth Import as string. |
iconv |
The iconv() function converts one multibyte characters from one
character set to another. See man (3) iconv for more
information. |
getDocumentationAnnotation |
Returns the documentaiton annotation defined in the class. |
setDocumentationAnnotation |
|
getTimeStamp |
|
stringTypeName |
|
stringVariableName |
|
typeNameString |
|
typeNameStrings |
|
getClassComment |
Returns the class comment. |
dirname |
|
basename |
|
getClassRestriction |
|
isType |
|
isPackage |
|
isClass |
|
isRecord |
|
isBlock |
|
isFunction |
|
isPartial |
|
isModel |
|
isConnector |
|
isOptimization |
|
isEnumeration |
|
isOperator |
|
isOperatorRecord |
|
isOperatorFunction |
|
isProtectedClass |
|
getBuiltinType |
|
setInitXmlStartValue |
|
ngspicetoModelica |
Converts ngspice netlist to Modelica code. Modelica file is
created in the same directory as netlist file. |
getInheritedClasses |
|
getComponentsTest |
returns an array of records with information about the
components of the given class |
isExperiment |
|
getSimulationOptions |
|
getAnnotationNamedModifiers |
|
getAnnotationModifierValue |
|
classAnnotationExists |
Check if annotation exists |
getBooleanClassAnnotation |
Check if annotation exists and returns its value |
extendsFrom |
returns true if the given class extends from the given base
class |
loadModelica3D |
|
searchClassNames |
Searches for the class name in the all the loaded classes.
Example command: searchClassNames("ground");
searchClassNames("ground", true); |
getAvailableLibraries |
|
getAvailableLibraryVersions |
|
installPackage |
|
updatePackageIndex |
|
upgradeInstalledPackages |
|
getAvailablePackageVersions |
|
getAvailablePackageConversionsTo |
|
getAvailablePackageConversionsFrom |
|
getUses |
|
getConversionsFromVersions |
|
getDerivedClassModifierNames |
Returns the derived class modifier names. Example command: type
Resistance = Real(final quantity="Resistance",final unit="Ohm");
getDerivedClassModifierNames(Resistance) =>
{"quantity","unit"} |
getDerivedClassModifierValue |
Returns the derived class modifier value. Example command: type
Resistance = Real(final quantity="Resistance",final unit="Ohm");
getDerivedClassModifierValue(Resistance, unit); => " = "Ohm""
getDerivedClassModifierValue(Resistance, quantity); => " =
"Resistance"" |
generateEntryPoint |
|
numProcessors |
|
runScriptParallel |
|
exit |
|
threadWorkFailed |
|
getMemorySize |
|
GC_gcollect_and_unmap |
|
GC_expand_hp |
|
GC_set_max_heap_size |
|
GC_PROFSTATS |
|
GC_get_prof_stats |
|
checkInterfaceOfPackages |
|
sortStrings |
|
getClassInformation |
|
getTransitions |
|
addTransition |
|
deleteTransition |
|
updateTransition |
|
getInitialStates |
|
addInitialState |
|
deleteInitialState |
|
updateInitialState |
|
generateScriptingAPI |
|
runConversionScript |
|
convertPackageToLibrary |
|
getModelInstance |
Dumps a model instance as a JSON string. |
getModelInstanceIcon |
Dumps only the Icon and IconMap annotations of a model, using
the same JSON format as getModelInstance. |
storeAST |
|
restoreAST |
|
oms_system |
|
oms_causality |
|
oms_signal_type |
|
oms_solver |
|
oms_tlm_domain |
|
oms_tlm_interpolation |
|
oms_fault_type |
|
loadOMSimulator |
loads the OMSimulator DLL from default path |
unloadOMSimulator |
free the OMSimulator instances |
oms_addBus |
|
oms_addConnection |
|
oms_addConnector |
|
oms_addConnectorToBus |
|
oms_addConnectorToTLMBus |
|
oms_addDynamicValueIndicator |
|
oms_addEventIndicator |
|
oms_addExternalModel |
|
oms_addSignalsToResults |
|
oms_addStaticValueIndicator |
|
oms_addSubModel |
|
oms_addSystem |
|
oms_addTimeIndicator |
|
oms_addTLMBus |
|
oms_addTLMConnection |
|
oms_compareSimulationResults |
|
oms_copySystem |
|
oms_delete |
|
oms_deleteConnection |
|
oms_deleteConnectorFromBus |
|
oms_deleteConnectorFromTLMBus |
|
oms_export |
|
oms_exportDependencyGraphs |
|
oms_exportSnapshot |
|
oms_extractFMIKind |
|
oms_getBoolean |
|
oms_getFixedStepSize |
|
oms_getInteger |
|
oms_getModelState |
|
oms_getReal |
|
oms_getSolver |
|
oms_getStartTime |
|
oms_getStopTime |
|
oms_getSubModelPath |
|
oms_getSystemType |
|
oms_getTolerance |
|
oms_getVariableStepSize |
|
oms_faultInjection |
|
oms_importFile |
|
oms_importSnapshot |
|
oms_initialize |
|
oms_instantiate |
|
oms_list |
|
oms_listUnconnectedConnectors |
|
oms_loadSnapshot |
|
oms_newModel |
|
oms_removeSignalsFromResults |
|
oms_rename |
|
oms_reset |
|
oms_RunFile |
|
oms_setBoolean |
|
oms_setCommandLineOption |
|
oms_setFixedStepSize |
|
oms_setInteger |
|
oms_setLogFile |
|
oms_setLoggingInterval |
|
oms_setLoggingLevel |
|
oms_setReal |
|
oms_setRealInputDerivative |
|
oms_setResultFile |
|
oms_setSignalFilter |
|
oms_setSolver |
|
oms_setStartTime |
|
oms_setStopTime |
|
oms_setTempDirectory |
|
oms_setTLMPositionAndOrientation |
|
oms_setTLMSocketData |
|
oms_setTolerance |
|
oms_setVariableStepSize |
|
oms_setWorkingDirectory |
|
oms_simulate |
|
oms_stepUntil |
|
oms_terminate |
|
oms_getVersion |
Returns the version of the OMSimulator. |
Experimental |
|