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.
EnergyPlus 1.1.1.012 for Windows
The file C:\EnergyPlus\RunEPlus.bat that is part of
EnergyPlus 1.1.1.012 for Windows has errors.
If you use EnergyPlus 1.1.1.012 for Windows, download the new file RunEPlus.bat and
copy it to the directory C:\EnergyPlus.
EnergyPlus output format
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 specifing 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.
EnergyPlus for Linux
In EnergyPlus 1.1.0 and 1.1.1, the simulation kernel, i.e.,
the file epSimKernel, does in some cases not return
after the simulation is completed.
We recommend the following work-around:
-
Go to the directory where the EnergyPlus script is
(i.e., the directory
$ENERGYPLUS_DIR/bin).
-
In the file
energyplus, replace the line
$ENERGYPLUS_DIR/bin/$PRG_N
with
$ENERGYPLUS_DIR/bin/$PRG_N > /dev/null
TRNSYS for Windows
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)
Simulation with 16-bit program under Microsoft Windows NT 4.0
GenOpt has been tested under Microsoft Windows NT 4.0 Workstation, Service Pack 4, with a 16-bit version of the thermal building simulation program DOE-2.1e.
It turned out that the MS-DOS 16-bit subsystem under NT crashes sometimes with an unhandled exception at NTVDM CPU. The crash occurred at different stages of the optimization when DOEBDL or DOESIM started. Crashing at the same stage cannot be reproduced. Without running GenOpt, the 16-bit version of DOE-2.1e also crashed.
The 32-bit version of DOE-2.1e did never crash over a test run of about 3 days CPU-time. Therefore, we think that the bug is in the MS-DOS 16-bit emulator of Microsoft Windows NT 4.0.
No further investigations of this point are planned.
|