[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] ddl or api for trnsys.exe



Maurice,

  As soon as you call the TRNExe64.exe, it calls the TRNDll64.dll so I don't think that the communication is going to get any faster since Trnsys is already a dll. The *.exe part of TRNSYS is mostly occupied with the online plotter so if you get rid of all the Type65s in your simulation it will run a bit faster. However, if you have already used the /h switch then that is about as fast as it is going to get.

kind regards,

 David



On 07/03/2020 11:20, Maurice Charbit - OZE-ENERGIES wrote:
David

What you advise is what I did:    
    arg1                   = directory where TRNSYS.exe is
    arg2                   = name of the DCK file
    arg3                   = "/h" (to avoid that window open the interface)
    exe_trnsys        = subprocess.call([arg1,arg2,arg3])

but it is very slow. A better way will be to have a .dll

best regards


De : David BRADLEY <d.bradley@tess-inc.com>
Envoyé : vendredi 3 juillet 2020 17:39
À : TRNSYS users mailing list at OneBuilding.org <trnsys-users@lists.onebuilding.org>
Cc : Maurice Charbit - OZE-ENERGIES <mch@oze-energies.com>
Objet : Re: [TRNSYS-users] ddl or api for trnsys.exe
 

Maurice,

 I have not used Python, however, TRNSYS can be called from the command line so I assume it would be able to be called from Python as well. The command line to run one of the TRNSYS examples is:

 

c:\Trnsys18\Exe\TRNExe64.exe "c:\Trnsys18\Examples\Calling_Contam\CombinedThermalAirflow_AHU.dck"


if you add a /n at the end of the line then there will be no need to click "ok" when the run completes.

if you add a /h at the end of the line then TRNSYS will run entirely in the background.


kind regards,

 David



On 07/03/2020 09:45, Maurice Charbit - OZE-ENERGIES via TRNSYS-users wrote:
Hi,

I am using TRNSYS for industrial development.  For this purposes  I develop a program in Python language which calsl TRNSYS.exe via subprocess function. It takes a lot of time because it means running via Windows.

Does it exist  a code (something like an API or a DLL)  which can be called directly from Python ?

Best regards


Maurice

tel: +33 (0)6 52 30 11 71


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@lists.onebuilding.org
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com
-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com