OMJulia.API.buildModelFMU
— MethodbuildModelFMU(omc, className;
+ simflags = "")
Build Modelica model by generating C code and compiling it into an executable simulation. It does not run the simulation!
diff --git a/dev/api/index.html b/dev/api/index.html index c504738..e677121 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -10,34 +10,36 @@ outputFormat = "mat", variableFilter = ".*", cflags = "", - simflags = "")
Build Modelica model by generating C code and compiling it into an executable simulation. It does not run the simulation!
See OpenModelica scripting API buildModel
.
OMJulia.API.buildModelFMU
— MethodbuildModelFMU(omc, className;
+ simflags = "")
Build Modelica model by generating C code and compiling it into an executable simulation. It does not run the simulation!
OMJulia.API.buildModelFMU
— MethodbuildModelFMU(omc, className;
version = "2.0",
fmuType = "me",
fileNamePrefix=className,
platforms=["static"],
- includeResources = false)
Translates a modelica model into a Functional Mockup Unit. The only required argument is the className, while all others have some default values.
OMJulia.API.cd
— Functioncd(omc, newWorkingDirectory="")
Change directory to the given path newWorkingDirectory
(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.
OMJulia.API.closeSimulationResultFile
— Method closeSimulationResultFile(omc)
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.
OMJulia.API.diffSimulationResults
— MethoddiffSimulationResults(omc, actualFile, expectedFile, diffPrefix;
+ includeResources = false)
Translates a modelica model into a Functional Mockup Unit. The only required argument is the className, while all others have some default values.
OMJulia.API.cd
— Functioncd(omc, newWorkingDirectory="")
Change directory to the given path newWorkingDirectory
(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.
OMJulia.API.closeSimulationResultFile
— Method closeSimulationResultFile(omc)
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.
OMJulia.API.diffSimulationResults
— MethoddiffSimulationResults(omc, actualFile, expectedFile, diffPrefix;
relTol = 1e-3,
relTolDiffMinMax = 1e-4,
rangeDelta = 0.002,
vars = String[],
- keepEqualResults = false)
Compares simulation results.
OMJulia.API.getClassNames
— MethodgetClassNames(omc;
+ keepEqualResults = false)
Compares simulation results.
OMJulia.API.getAvailablePackageVersions
— MethodgetAvailablePackageVersions(omc, pkg; version="")
Get available package versions of pkg
. Lists all available versions of the Buildings library on the OSMC server, starting from the most recent one, in descending order of priority. Note that pre-release versions have lower priority than all other versions.
See OpenModelica scripting API getAvailablePackageVersions
or Package Management.
OMJulia.API.getClassNames
— MethodgetClassNames(omc;
class_ = "",
recursive = false,
qualified = false,
sort = false,
builtin = false,
showProtected = false,
- includeConstants = false)
Returns the list of class names defined in the class.
OMJulia.API.getErrorString
— MethodgetErrorString(omc, warningsAsErrors = false)
Returns the current error message.
OMJulia.API.getInstallationDirectoryPath
— MethodgetInstallationDirectoryPath(omc)
This returns OPENMODELICAHOME
if it is set; on some platforms the default path is returned if it is not set.
See OpenModelica scripting API getInstallationDirectoryPath
.
OMJulia.API.getVersion
— MethodgetVersion(omc)
Returns the version of the Modelica compiler.
OMJulia.API.instantiateModel
— MethodinstantiateModel(omc, className)
Instantiates the class and returns the flat Modelica code.
OMJulia.API.linearize
— MethodCreates a model with symbolic linearization matrices.
OMJulia.API.loadFile
— MethodloadFile(omc, fileName;
+ includeConstants = false)
Returns the list of class names defined in the class.
OMJulia.API.getErrorString
— MethodgetErrorString(omc, warningsAsErrors = false)
Returns the current error message.
OMJulia.API.getInstallationDirectoryPath
— MethodgetInstallationDirectoryPath(omc)
This returns OPENMODELICAHOME
if it is set; on some platforms the default path is returned if it is not set.
See OpenModelica scripting API getInstallationDirectoryPath
.
OMJulia.API.getVersion
— MethodgetVersion(omc)
Returns the version of the Modelica compiler.
OMJulia.API.installPackage
— MethodinstallPackage(omc, pkg;
+ version="",
+ exactMatch=false)
Install package pkg
with given version
. If version=""
try to install most recent version of package. If exactMatch
is true install exact version, even if there are more recent backwards.compatible versions available.
See OpenModelica scripting API installPackage
or Package Management.
OMJulia.API.instantiateModel
— MethodinstantiateModel(omc, className)
Instantiates the class and returns the flat Modelica code.
OMJulia.API.linearize
— MethodCreates a model with symbolic linearization matrices.
OMJulia.API.loadFile
— MethodloadFile(omc, fileName;
encoding = "",
uses = true,
notify = true,
- requireExactVersion = false)
Load file fileName
(*.mo) and merge it with the loaded AST. See OpenModelica scripting API loadFile
.
OMJulia.API.loadModel
— MethodloadModel(omc, className;
+ requireExactVersion = false)
Load file fileName
(*.mo) and merge it with the loaded AST. See OpenModelica scripting API loadFile
.
OMJulia.API.loadModel
— MethodloadModel(omc, className;
priorityVersion = String[],
notify = false,
languageStandard = "",
- requireExactVersion = false)
Loads a Modelica library.
OMJulia.API.makeVectorString
— MethodmakeVectorString(vec)
Add quotes around each string element.
OMJulia.API.readSimulationResult
— FunctionreadSimulationResult(omc, filename,
+ requireExactVersion = false)
Loads a Modelica library.
OMJulia.API.makeVectorString
— MethodmakeVectorString(vec)
Add quotes around each string element.
OMJulia.API.readSimulationResult
— FunctionreadSimulationResult(omc, filename,
variables = String[],
- size = 0)
Reads a result file, returning a matrix corresponding to the variables and size given.
OMJulia.API.readSimulationResultSize
— MethodreadSimulationResultSize(omc, fileName)
The number of intervals that are present in the output file.
OMJulia.API.readSimulationResultVars
— MethodreadSimulationResultVars(omc, fileName; readParameters = true, openmodelicaStyle = false)
Returns the variables in the simulation file; you can use val() and plot() commands using these names.
OMJulia.API.setCommandLineOptions
— MethodsetCommandLineOptions(omc, option)
The input is a regular command-line flag given to OMC, e.g. -d=failtrace or -g=MetaModelica.
OMJulia.API.simulate
— Methodsimulate(omc, className;
+ size = 0)
Reads a result file, returning a matrix corresponding to the variables and size given.
OMJulia.API.readSimulationResultSize
— MethodreadSimulationResultSize(omc, fileName)
The number of intervals that are present in the output file.
OMJulia.API.readSimulationResultVars
— MethodreadSimulationResultVars(omc, fileName; readParameters = true, openmodelicaStyle = false)
Returns the variables in the simulation file; you can use val() and plot() commands using these names.
OMJulia.API.setCommandLineOptions
— MethodsetCommandLineOptions(omc, option)
The input is a regular command-line flag given to OMC, e.g. -d=failtrace or -g=MetaModelica.
OMJulia.API.simulate
— Methodsimulate(omc, className;
startTime = 0.0,
stopTime = nothing,
numberOfIntervals = 500,
@@ -48,4 +50,4 @@
outputFormat = "mat",
variableFilter = ".*",
cflags = "",
- simflags = "")
Simulates a modelica model by generating C code, build it and run the simulation executable.
OMJulia.API.ScriptingError
— TypeScriptingError <: Exception
OpenModelica scripting error with message msg
and additional error string
from getErrroString
.
Settings
This document was generated with Documenter.jl version 0.27.25 on Monday 27 May 2024. Using Julia version 1.10.3.