Buildings.Obsolete.Utilities.IO.Python27.Functions.Examples
Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in Buildings.Utilities.IO.Python27.Functions.
The examples demonstrate how to call Python functions from Modelica.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
Exchange | Test model for exchange function |
ExchangeWithPassPythonObject | Test model for exchange function with memory |
Buildings.Obsolete.Utilities.IO.Python27.Functions.Examples.Exchange
Test model for exchange function
Information
This example calls various functions in the Python module testFunctions27.py
.
It tests whether arguments and return values are passed correctly.
The functions in testFunctions27.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.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | passPythonObject | false | Set to true if the Python function returns and receives an object, see User's Guide |
Modelica definition
Buildings.Obsolete.Utilities.IO.Python27.Functions.Examples.ExchangeWithPassPythonObject
Test model for exchange function with memory
Information
This example calls various functions in the Python module testFunctions27.py
.
It tests whether arguments and return values are passed correctly.
The functions in testFunctions27.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.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | passPythonObject | true | Set to true if the Python function returns and receives an object, see User's Guide |
Modelica definition
Buildings.Obsolete.Utilities.IO.Python27.Functions.Examples.Exchange.M
Class that contains the Python object