[TRNSYS-users] Integrate Python with TRNSYS ?

Amirreza Heidari amirrezaheidarysbu at gmail.com
Tue Dec 13 05:46:12 PST 2022


Hello,
I have programmed a controller in Python and I need to link it to TRNSYS to
control other components. Type 169 does not work at all. So I am trying to
use type 163. But the problem is that when I import external libraries in
my Python code, the type 163 does not update the py_outputs.dat anymore!
How I can use a Python script that include external libraries in type 163?
For example the following code works when the pandas and numpy libraries
are not included, but with the two first lines it does not work anymore...

[image: image.png]

I also tried to install the type 3157 that is new and apparently allows the
use of external libraries, but when I run the example I get the following
error.

[image: image.png]

Anyway to do it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20221213/3da4834c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 58449 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20221213/3da4834c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 25288 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20221213/3da4834c/attachment-0003.png>


More information about the TRNSYS-users mailing list