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

RE: [EnergyPlus_Support] Re: Parametric run threading

Hi Sebastian and Xiaosong,
Have you tried jeplus? It is a ready E+ parametric tool that handles the things you've been discussing. It is completely free, including the source code; so I am not trying to sell anything here ;-)
Dr Yi Zhang
IESD, De Montfort University, United Kingdom

From: EnergyPlus_Support@xxxxxxxxxxxxxxx on behalf of dvwilkhjflksadhflk
Sent: Tue 29/03/2011 01:49
To: EnergyPlus_Support@xxxxxxxxxxxxxxx
Subject: [EnergyPlus_Support] Re: Parametric run threading


yeah, the GenOpt code is somekind of dense... but in case you want to run it on windows the .bat file that comes with GenOpt can save you some time.

multiple energy plus simulations can be executed at the same time in the mac version ( I assume that also applies to the unix version). Just make sure that you copy your batch.idf file for each thread that you start in a unique folder to avoid that different threads access the same simulation, or overwrite any files from another simulation. (the great risk of multi threading). You will be responsible in your java code to make sure that not more simulations are started than cores available. In the pseudocode I gave you previously (and in my code) I implemented it the greedy way. There are several thread pools for java available, that might be more appropriate to run it on a cluster than my home made suggestion :-).

You might wanna do a test on your cluster, if you gain anything from starting more threads than cores.

This is the java function how I start a simulation if energy plus is installed on the system locally.

private void startSimulation_mac(String uniqueFolder){

Process proc;

String cmd[]=new String[3];

cmd[0] = "runenergyplus";
cmd[1] = "resources/temp/"+uniqueFolder+"/batch.idf";
cmd[2] = sim.getWeatherFile();


System.out.println("simulation started");

Runtime rt = Runtime.getRuntime();
proc = rt.exec(cmd);

BufferedReader std = new BufferedReader(new InputStreamReader(proc.getInputStream()));

String s=null;

while ((s=std.readLine())!=null){
System.out.println(s); // prints out what you usually see in the command line.

try {
} catch (Exception e){
System.err.println("problem with process");
error = true;

} catch(IOException e){
error = true;


have fun, and don't get a thread "knot"...



Primary EnergyPlus support is found at:
http://energyplus.helpserve.com or send a message to energyplus-support@xxxxxxxx

The primary EnergyPlus web site is found at:

The group web site is:

Attachments are currently allowed but be mindful that not everyone has a high speed connection.  Limit attachments to small files.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe


Email scanned by PC Tools - No viruses or spyware found.
(Email Guard:, Virus/Spyware Database: 6.17200)