[Bldg-sim] Coupling GenOpt, Energyplus and Daysim

Yi Zhang YiZhang at dmu.ac.uk
Tue Mar 18 12:08:41 PDT 2014


%1 and %2 represents the two arguments passed to IntegrateDaysim_Master.bat. For E+ simulation they are the idf the epw file names. I've tried a wrapper batch file by modifying one of GenOpt's examples; and it worked fine. Here are my modifications:

== wraprun.bat in C:\GenOptV3-1-0\example\energyplus\7_2_0\GPSHookeJeeves\ ==
call C:/EnergyPlusV7-2-0-64/RunEPlus.bat %1 %2

== EnergyPlus-7-2-0-Win7.cfg in C:\GenOptV3-1-0\cfg\ ==
...
SimulationStart
{
                // The command line below calls RunEPlus.bat.
                Command = "cmd /C \"C:/GenOptV3-1-0/example/energyplus/7_2_0/GPSHookeJeeves/wraprun.bat %Simulation.Files.Input.File1% %Simulation.CallParameter.Suffix%\"";
                WriteInputFileExtension = false;
}

== optWin7.ini in C:\GenOptV3-1-0\example\energyplus\7_2_0\GPSHookeJeeves\ ==
...
    Configuration {
      File1 = "..\\..\\..\\..\\cfg\\EnergyPlus-7-2-0-Win7.cfg";
}
...


Your problem may now come from moving RunEPlus.bat out of the E+ folder...

Yi

From: Tavis Wells [mailto:rangitokomo at hotmail.com]
Sent: 18 March 2014 13:28
To: Yi Zhang; bldg-sim at lists.onebuilding.org
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim

Yi,

No luck, the same error came up.
I'm pretty new at this scripting business but as I understand it, the %1 and %2 are variables that the 'IntegrateDaysim_Master.bat' will substitute- the %1 for the model specified in the .cfg file (ChMod3.idf), and the %2 for the weather file specified in the .cfg. Is this correct?

Regards,
Tavis.

________________________________
From: YiZhang at dmu.ac.uk<mailto:YiZhang at dmu.ac.uk>
To: rangitokomo at hotmail.com<mailto:rangitokomo at hotmail.com>; bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim
Date: Tue, 18 Mar 2014 11:53:02 +0000
The problem is from wrapping the EPlusRun.bat in another batch file. Try use the third command-line in "IntegrateDaysim_EnergyPlus-7-2-0-Win7.cfg", i.e.

Command = "cmd /C \"\"D:\\MBSc500\\GenOpt\\IntegrateDaysim\\IntegrateDaysim_Master.bat\" \"%Simulation.Files.Input.File1%\" \"%Simulation.CallParameter.Suffix%\"\"";

And then change the call line in IntegrateDaysim_Master.bat to:

call "D:\MBSc500\GenOpt\IntegrateDaysim\RunEPlus.bat" %1 %2

And see if it works.

Cheers,

Yi

From: Tavis Wells [mailto:rangitokomo at hotmail.com]
Sent: 18 March 2014 02:10
To: Yi Zhang; bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim

Hi Yi,

Very mysterious! Yip I've attached the two .cfg file I've tried (one based on the Eplus.cfg example file; the other based on the batchSimulation.cfg file), and the Master.bat file with the various command lines I've tried (as a word doc- email wouldn't allow to send .bat).
And the .ini and command.txt if that helps.

Thank you for your interest and help!

Best regards,
Tavis.
________________________________
From: YiZhang at dmu.ac.uk<mailto:YiZhang at dmu.ac.uk>
To: rangitokomo at hotmail.com<mailto:rangitokomo at hotmail.com>; bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim
Date: Mon, 17 Mar 2014 22:30:25 +0000
Hi Tavis,

Hmm, that's mysterious. Do you share your batch file(s) with the group? I cannot see any problems from Java's (GenOpt's language) point of view...

Cheers,

Yi

From: Tavis Wells [mailto:rangitokomo at hotmail.com]
Sent: 17 March 2014 11:52
To: Yi Zhang; bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim

Hi, Thank you for your replies!

Alstan,
Yes, Khaled's tutorial for GenOpt + Radiance has been very helpful. I think the same input file structure could be used, plus the Daysim Header file.

Mike,
This RunDirMulti.bat looks like it would be used to simulate a batch of pre-made EnergyPlus models in parallel, is this right? Or does it enable 1 model to run subsequent iterations? I need one iteration to finish before the next starts, so GenOpt can make its systematic changes to the model.

Yi,
I've tried copy pasting the Daysim batch file command lines in at the start of the RunEplus.bat so that it runs and completes before the Eplus model. This appears to work when run from the command shell, but, again, not when attempted through GenOpt. I think it comes back to Eplus and GenOpt- not creating temporary directories properly when called through a batch file (even following the command lines from GenOpts example files)?


Best regards,
Tavis.
________________________________
From: YiZhang at dmu.ac.uk<mailto:YiZhang at dmu.ac.uk>
To: rangitokomo at hotmail.com<mailto:rangitokomo at hotmail.com>; bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim
Date: Fri, 14 Mar 2014 19:53:27 +0000
Hi Tavis,

The lines below are from the "EnergyPlusWinXP.cfg" file that comes with GenOpt. Apparently GenOpt does use a batch file (customized RunEPlus.bat) to run E+. I think your best approach would be to modify the RunEPlus.bat file (or the RunEPlusParallel.bat file in GenOpt), and insert the part that runs DaySim in the same way that the other E+ preparatory steps are done...

**
/*  Specifying how to start the simulation program.
    In "Command", only those words in %xx% are
    replaced (possibly with empty Strings).
*/
SimulationStart
{
    // The command line below calls a custom version of RunEPlus.bat.
    // This is needed to run multiple EnergyPlus simulations in parallel,
    // because the standard version writes files to the EnergyPlus program
    // directory, and hence multiple simulations would access the same files.
    Command = "cmd /x /c \"start /D\"%Simulation.Files.Input.Path1%\" /WAIT /MIN call \".\\RunEPlusParallel.bat\" %Simulation.Files.Input.File1% %Simulation.CallParameter.Suffix%\"";
    WriteInputFileExtension = false;
}
**

Cheers,

Yi

From: bldg-sim-bounces at lists.onebuilding.org<mailto:bldg-sim-bounces at lists.onebuilding.org> [mailto:bldg-sim-bounces at lists.onebuilding.org] On Behalf Of Tavis Wells
Sent: 14 March 2014 10:49
To: bldg-sim at lists.onebuilding.org<mailto:bldg-sim at lists.onebuilding.org>
Subject: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim

Greetings all!

I am attempting to optimize the passive design of a building using GenOpt as the optimizer, EnergyPlus as the primary energy model platform, and daylight reports from Daysim (an identical model to the Eplus model) which feed into the Eplus model.
Each iteration dictated by GenOpt would need to simulate in Daysim and finish before simulating in Eplus.
I am using a 'Master' batch file, referenced by GenOpt, to call Daysim and then Eplus.
This process works when run straight from the batch file, but when run through GenOpt it does not create the temporary working directory correctly (.expidf and .err files missing), and so it crashes during the first iteration, saying ".err file does not exist".
Simplifying the task to just optimize Eplus, but through a batch file, has the same result.
The command line I've been working with consists of 3 parts:
Call <RunEplus.bat> <model> <weatherfile>
I've tried countless different variations of this command line but cant figure it out!

Has anyone optimized an EnergyPlus model through GenOpt using a batch file before? Or know what the command line might look like to do that?

Any ideas welcome!

Thanks,
Tavis.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/bldg-sim-onebuilding.org/attachments/20140318/931346c7/attachment-0002.htm>


More information about the Bldg-sim mailing list