<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>


<div dir="ltr">


<div dir="ltr">

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi, Thank you for your replies!<br><br>Alstan,<br>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.<br><br>Mike, <br>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.<br><br>Yi,<br>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)?</div><div dir="ltr"><br><br>Best regards,<br>Tavis.<br><div><hr id="stopSpelling">From: YiZhang@dmu.ac.uk<br>To: rangitokomo@hotmail.com; bldg-sim@lists.onebuilding.org<br>Subject: RE: [Bldg-sim] Coupling GenOpt, Energyplus and Daysim<br>Date: Fri, 14 Mar 2014 19:53:27 +0000<br><br>



<style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}

.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}

.ExternalClass p {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass span.ecxEmailStyle18 {
font-family:"Calibri","sans-serif";
color:#1F497D;
}

.ExternalClass .ecxMsoChpDefault {
font-size:10.0pt;
}

.ExternalClass div.ecxWordSection1 {
}

--></style>


<div class="ecxWordSection1">
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Hi Tavis,</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">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…
</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">**</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">/*  Specifying how to start the simulation program.</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    In "Command", only those words in %xx% are
</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    replaced (possibly with empty Strings).</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">*/</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">SimulationStart</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">{</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    // The command line below calls a custom version of RunEPlus.bat.</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    // This is needed to run multiple EnergyPlus simulations in parallel,</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    // because the standard version writes files to the EnergyPlus program</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    // directory, and hence multiple simulations would access the same files.</span></p>
<p class="ecxMsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    Command = "cmd /x /c \"start /D\"%Simulation.Files.Input.Path1%\" /WAIT /MIN call \".\\RunEPlusParallel.bat\" %Simulation.Files.Input.File1% %Simulation.CallParameter.Suffix%\"";</span></b></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">    WriteInputFileExtension = false;</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">}</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">**</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Cheers,</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Yi</span></p>
<p class="ecxMsoNormal"><a name="_MailEndCompose" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></a></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<p class="ecxMsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";" lang="EN-US"> bldg-sim-bounces@lists.onebuilding.org [mailto:bldg-sim-bounces@lists.onebuilding.org]
<b>On Behalf Of </b>Tavis Wells<br>
<b>Sent:</b> 14 March 2014 10:49<br>
<b>To:</b> bldg-sim@lists.onebuilding.org<br>
<b>Subject:</b> [Bldg-sim] Coupling GenOpt, Energyplus and Daysim</span></p>
</div>
</div>
<p class="ecxMsoNormal"> </p>
<div>
<div>
<div>
<p class="ecxMsoNormal">Greetings all!</p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
<div>
<p class="ecxMsoNormal">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.</p>
</div>
<div>
<p class="ecxMsoNormal">Each iteration dictated by GenOpt would need to simulate in Daysim and finish before simulating in Eplus.</p>
</div>
<div>
<p class="ecxMsoNormal">I am using a 'Master' batch file, referenced by GenOpt, to call Daysim and then Eplus.</p>
</div>
<div>
<p class="ecxMsoNormal">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".</p>
</div>
<div>
<p class="ecxMsoNormal">Simplifying the task to just optimize Eplus, but through a batch file, has the same result.</p>
</div>
<div>
<p class="ecxMsoNormal">The command line I've been working with consists of 3 parts: </p>
</div>
<div>
<p class="ecxMsoNormal">Call <RunEplus.bat> <model> <weatherfile></p>
</div>
<div>
<p class="ecxMsoNormal">I've tried countless different variations of this command line but cant figure it out!</p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
<div>
<p class="ecxMsoNormal">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?</p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
<div>
<p class="ecxMsoNormal">Any ideas welcome!</p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
<div>
<p class="ecxMsoNormal">Thanks,</p>
</div>
<div>
<p class="ecxMsoNormal">Tavis.</p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
<div>
<p class="ecxMsoNormal"> </p>
</div>
</div>
</div>
</div></div></div>
</div>
</div>
                                          </div></body>
</html>