[TRNSYS-users] Co-simulation Between Python And TRNSYS Using CFFI

Jihyeon Cho jihyeoncho at korea.ac.kr
Thu Jun 27 20:16:55 PDT 2024


Hello, I am interested in co-simulation between Python and TRNSYS.

I am trying to use CFFI for co-simulation.

However, I have a problem with running an example (Simple Polynomial).

This is what I installed: 
MS Visual Studio 2019 Community
Python 3.10.7
TRNSYS 18
CFFI 1.6.0
CallingPython 0.6.0
Windows 11

I also added the paths of TRNSYS and Python.
But I am still suffering unexpected error. (I am not using Miniconda)

Also, I added pythoninterface.dll at "C:\TRNSYS18\Exe", Type3157.ddl at "C:\TRNSYS18\UserLib\DebugDLLS" and Type3157.ddl at "C:\TRNSYS18\UserLib\ReleaseDLLS".

The remaining files are located at "C:\TRNSYS18\TRNLib".
(TRNLib is a new directory.)

If you let me solve this problem, I would much appreciate you. 
As far as I searched, I cannot find out the solution for this kind of errors.


*** Notice at time        :         0.000000
    Generated by Unit     : Not applicable or not available
    Generated by Type     : Not applicable or not available
    TRNSYS Message    199 : TRNSYS found at least one user DLL in the UserLib directory. (Note: Only DLL's including Types that are used in the simulation are loaded)
    Reported information  : 0 user DLLs were loaded after searching in "C:\TRNSYS18\UserLib\ReleaseDLLs"
 
 
*** Fatal Error at time   :         0.000000
    Generated by Unit     : Not applicable or not available
    Generated by Type     :  3157
    TRNSYS Message    105 : A TYPE was called in the TRNSYS input file but was either not linked into trndll.dll or was not found in an external dll. A dummy subroutine was called in its place. Please link the TYPE or remove it from the input file
    Reported information  :  Type3157 could not be located in either the TRNdll64.dll or in an external dll. Please relink theTRNDll64.dll including this Type or make sure that an external DLL in the \UserLib\DebugDLLs and \UserLib\ReleaseDLLs folders contain the Type.


Regards
J. Cho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20240628/4dfc0b6c/attachment.htm>


More information about the TRNSYS-users mailing list