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

Re: [TRNSYS-users] Close TRNSYS Automation



Hi Andrea,

I've made similar efforts in Python. I posted a bit online;

http://www.optimalenergetics.com/Blog/parallel-execution-of-a-batch-of-simulation-runs/

As already mentioned by David, I used the /h switch to run in the background. Furthermore, I track the process ID in python and loop until it closes, then spin up the next simulation. I also the current CPU percentage so you always run at 80% for example, to use all the cores on your machine in parallel.

Good luck and let me know if you run into anything else,

Marcus
--
Marcus Jones,  M.Sc., LEED®AP BD+C
Freelance energy consultant
Vienna, Austria

On Mon, Sep 17, 2012 at 5:05 PM, David BRADLEY <d.bradley@tess-inc.com> wrote:
Andrea,
  adding the /n switch at the end of the command line to call the TRNSYS simulation will supress the need to click the "finish" button at the end of the simulation. Adding a /h switch to the command line will cause TRNSYS to run completely hidden in the background.

"c:\Trnsys17\Exe\TRNExe.exe" "c:\Trnsys17\Path\To\DckFile.dck" /n

best,
 David



On 9/17/2012 08:04, Andrea Sauer wrote:
Dear all,

I am currently working on a parameter variation.
A Python script is the base for this.
This Python script set the variables in the input file for TRNSYS.
The Python script also start the simulation of TRNSYS (For this purpose the command in Python = subprocess).

Problem: The Python script can not detect when TRNSYS finished the simulation. The Python script can only detected when TRNSYS is closed.

Question: Is there a way TRNSYS automatically close after the simulation has been run?
Or is there a way to close the OnlinePlotter automatically after the simulation has been run?

Alternatively: Does anyone know of a way to do this through Python?

Thank you!

Kind regards,

Andrea  Sauer


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users

-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
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

_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@cae.wisc.edu
https://mailman.cae.wisc.edu/listinfo/trnsys-users