-
Notifications
You must be signed in to change notification settings - Fork 1
DymolaMode
This instance provides the possibility to apply automatically Dymolas checkModel()
to a Modelica library (some of its subpackages) and break down the results up to chosen level.
This will only work with Dymola 2016 and newer as the Dymola fuction getLastError
does not provide necesary information in older versions.
-
modelica_lib_path
(string):
Path to a Modelica library -
dymola_path
(string):
Path to the Dymola installation, e.g. dymola.exe
-
dymola_pedantic
(bool, default=False
):
If true,checkModel()
is executed in pedantic mode -
modelica_lib_firstlevel
(string, default=''
):
A subpackage of the library.checkModel()
is applied to this package (and all packages/models in this one). Note, that if your chosen Top-Level package is e.g. a third-level package,modelica_lib_firstlevel
must include the complete path in the library.
Example:
Given structure: lib > A > B. Then:
modelica_lib_path = '...\lib'
andmodelica_lib_firstlevel = 'A\B'
-
modelica_lib_depth
(int, default=1
):
How many levels should be listet in the report, e.g. level 1 will list all top-level packages/models, level 2 additionally all second-level packages/models and so on.
Note1:
Level of displayed packageshas no influence on how many levels are actually checked -checkModel()
is always applied to all packages/models inmodelica_lib_firstlevel
.
Note2:
Settingmodelica_lib_depth
to '-1' will show all packages/models in the report. -
report_path
(string, default=[chosen first level]
):
path attribute of aReport
instance -
report_name
(string, default='report'
):
name attribute of aReport
instance -
report_mode
(string, default='full'
):
mode attribute of aReport
instance -
report_disp
(list of dictionaries, default=[{'Key':'Checked Library', 'Val':[chosen first level in Modelica syntax]}, {'Key':'Pedantic Mode', 'Val': self.dymola_pedantic}, {'Key':'Level of Detail', 'Val': self.modelica_lib_depth}])): {'Key':Branch', 'Val': [Either name of branch or 'no git']}
disp attribute of aReport
instance -
report_colors
(dictionary, default={'cTrue':'white','cFalse':'red','cNF':'yellow','cErr':'red', 'cWrn':'yellow'}
):
colors attribute of aReport
instance
For more detailled informations regardings the Report
attributes, take a look a the documentation of the Report
class.
-
execute_check()
:
Applies DymolascheckModel()
on given library (modelica_lib_path
) or respectively chosen top level package (modelica_lib_firstlevel
). -
get_report()
:
Returns the currentReport
instance.