This example calls various functions in the Python module testFunctions.py
.
It tests whether arguments and return values are passed correctly.
The functions in testFunctions.py
are very simple in order to test
whether they compute correctly, and whether the data conversion between Modelica and
Python is implemented correctly.
Each call to Python is followed by an assert
statement which terminates
the simulation if the return value is different from the expected value.
-
January 10, 2022, by Michael Wetter:
Updated to Python 3.8.
-
December 11, 2021, by Michael Wetter:
Changed implementation to assigning parameters as opposed to variables because the
assignment is made through impure function calls.
This is for MSL 4.0.0.
-
December 10, 2021, by Michael Wetter:
Removed call to impure function removeFile
.
This removal is required for MSL 4.0.0.
-
April 10, 2020, by Jianjun Hu and Michael Wetter:
Updated to Python 3.6.
-
February 2, 2016, by Michael Wetter:
Changed constant arguments of exchange function from int
to double
.
This is required for OpenModelica.
-
January 31, 2013, by Michael Wetter:
First implementation.
Generated at 2025-01-08T19:40:16Z
by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos