Skip to content

Commit 2003c9d

Browse files
committed
documentation on the usage of variableFilter and xmlFileName
1 parent ddcf90e commit 2003c9d

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

OMPython/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,19 @@ def __init__(self, fileName=None, modelName=None, lmodel=[], useCorba=False, com
792792
"""
793793
"constructor"
794794
It initializes to load file and build a model, generating object, exe, xml, mat, and json files. etc. It can be called :
795-
•without any arguments: In this case it neither loads a file nor build a model. This is useful when a FMU needed to convert to Modelica model
796-
•with two arguments as file name with ".mo" extension and the model name respectively
797-
•with three arguments, the first and second are file name and model name respectively and the third arguments is Modelica standard library to load a model, which is common in such models where the model is based on the standard library. For example, here is a model named "dcmotor.mo" below table 4-2, which is located in the directory of OpenModelica at "C:\\OpenModelica1.9.4-dev.beta2\\share\\doc\\omc\\testmodels".
795+
- without any arguments: In this case it neither loads a file nor build a model.
796+
This is useful when a FMU needed to convert to Modelica model
797+
- with two arguments as file name with ".mo" extension and the model name respectively
798+
- with three arguments, the first and second are file name and model name respectively and the third arguments
799+
is Modelica standard library to load a model, which is common in such models where the model is based on
800+
the standard library. For example, here is a model named "dcmotor.mo" below table 4-2, which is located in the
801+
directory of OpenModelica at "C:\\OpenModelica1.9.4-dev.beta2\\share\\doc\\omc\\testmodels".
802+
- with two or three arguments and varableFilter to pick the list of variables that will be written by default when
803+
calling simulate() as csv-string.
804+
Another option to achieve the same, is using the overrideaux when calling simulate()
805+
- with two or three arguments and xmlFileName to instantiate the model only and skip buildModel.
806+
xmlFileName points to modelname_init.xml of a model that has been already built, e.g. by instantiating ModelicaSystem
807+
without xmlFilename or .mos file.
798808
Note: If the model file is not in the current working directory, then the path where file is located must be included together with file name. Besides, if the Modelica model contains several different models within the same package, then in order to build the specific model, in second argument, user must put the package name with dot(.) followed by specific model name.
799809
ex: myModel = ModelicaSystem("ModelicaModel.mo", "modelName")
800810
"""

0 commit comments

Comments
 (0)