Frequently Asked Questions
This page contains frequently asked questions and information that is not in the manual.
If you have problems with GenOpt,
please check this page before submitting your report to MWetter@lbl.gov.
How can I get EnergyPlus 3.0, 3.1 and 4.0 for Windows to work for parallel function evaluations?
The file RunEPlus.bat that is part of
EnergyPlus 3.0, 3.1 and 4.0 for Windows does not allow running each
simulation in a separate directory.
Therefore, it cannot be used with GenOpt 3.0.
Instead, the file RunEPlusParallel.bat
should be used. This file is distributed with GenOpt.
It assumes that EnergyPlus is installed in the directory
C:\Program Files\EnergyPlusVx-y-z\, where
x-y-z is 3-0-0, 3-1-0 or
4-0-0.
If this is not the case, you have to change in this file the line
set program_path=C:\Program Files\EnergyPlusV4-0-0\
EnergyPlus 3.0, 3.1 and 4.0 for Linux and for Mac OS X do not exhibit this problem.
When using EnergyPlus, why are the results reported by GenOpt for very few simulations not realistic?
EnergyPlus writes for some output variables the variable
value, followed by the minimum value, the time when the minimum occurred, the maximum value,
and the time when the maximum occurred.
For example, the line
Report Meter, Electricity:HVAC, environment;
in the EnergyPlus idf file causes EnergyPlus to write an output of the form
1314,151247256.3591314,787746.1268714761, 1, 1, 7,01:15,787746.1268714764, 1, 1, 1,01:15
to the EnergyPlus eso file.
To cause GenOpt to read the function value of the output number 1314,,
a user may specify in the GenOpt initialization file the section
ObjectiveFunctionLocation{
Name1 = "f(x)";
Delimiter1 = "1314,";
}
However, in the output shown above,
the last digits of the value of the variable 1314, happen
to be equal to 1314, and these digits are followed by a comma.
Thus, the end of the function value is identical to the objective function delimiter.
Consequently, GenOpt reads
787746.1268714761
rather than 151247256.3591314
as the objective function value.
There are different ways to prevent this problem:
-
Do not write any EnergyPlus output that lists the minimum and maximum value.
Then, the output in the EnergyPlus eso file has the syntax
1314,151247256.3591314
and can be parsed by specifying 1314, as the objective function delimiter.
For example, the output request
Report Meter, Electricity:HVAC, environment;
in the EnergyPlus idf file causes EnergyPlus to
report the accumulated value, the minimum and the maximum for the HVAC electricity consumption,
whereas the output request
Report Variable, *, Fan Electric Consumption, RunPeriod;
may give the same output (depending on the idf file),
but without the minimum and maximum value.
-
If the above work-around does not work in your case, and the EnergyPlus eso file looks like
1314,151247256.3591314,787746.1268714761, 1, 1, 7,01:15,787746.1268714764, 1, 1, 1,01:15
and you need to retrieve the value of the variable 1314,,
then run the ReadVarsESO program (which is part of EnergyPlus) to
extract the value of the variable 1314,.
To do so, pass as an argument to ReadVarsESO the name of a file that contains the lines
eplusout.eso
1314.csv
1314
0
where we assume that eplusout.eso is the name of the EnergyPlus eso file.
Then, ReadVarsESO will produce the file 1314.csv with lines
Date/Time,Electricity:HVAC [J](RunPeriod)
simdays=002, 151247256.3591314,
and the objective function value can be retrieved by specifying
simdays=002, as the objective function delimiter.
-
You could use the sed stream editor to convert the EnergyPlus eso file
to a format that can be read without problems.
sed is usually installed on any Linux or Unix system.
For Windows, you may obtain sed from
http://unxutils.sourceforge.net
or from
http://www.cornerstonemag.com/sed/.
Run after EnergyPlus finished the command
sed '1,$s/\,/;/' eplusout.eso > eplusout.tmp && mv eplusout.tmp eplusout.eso
where we assume that eplusout.eso is the name of the EnergyPlus eso file.
This converts the first comma on each line to a semi-colon. For example, the line
1314,151247256.3591314,787746.1268714761, 1, 1, 7,01:15,787746.1268714764, 1, 1, 1,01:15
gets converted to
1314;151247256.3591314,787746.1268714761, 1, 1, 7,01:15,787746.1268714764, 1, 1, 1,01:15
Now, the unique string 1314;
can be used as the objective function delimiter.
How can I prevent TRNSYS for Windows from hanging after each simulation?
TRNSYS 14.2 for Windows requires to click on a "Continue"
button after the simulation is finished.
To prevent this,
you can start TRNSYS for Windows with the command
trnsys32.exe input-file /n
The switch /n causes TRNSYS to finish without requiring
the user to press the "Continue" button.
Therefore, a typical entry for the section SimulationStart of the
GenOpt configuration file looks like
SimulationStart{
Command = "cmd /x /c \"start /D%Simulation.Files.Input.Path1% /WAIT /MIN trnsys32.exe %Simulation.Files.Input.File1% /n\"";
WriteInputFileExtension = true;
}
where the variables have the value:
Simulation.Files.Input.File1 = Soldemo.dck; (i.e., the input file name)
Simulation.Files.Input.Path1 = C:\trnwin; (i.e., the path to trnsys32.exe)
|