Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Error trying to run GenOpt

asked 2015-12-02 11:01:33 -0500

samks123's avatar

updated 2016-01-11 06:35:30 -0500

I am actually facing an issue with GenOpt.

The error that I am obtaining when I try to run the first tutorial (GenOpt\example\energyplus\7_0_0\GPSHookeJeeves) is as follows:

Assigning 4 threads for simulations.

Exception in executing the simulation program

Simulation working directory : 'C:\Users\SambuKS\Documents\GenOpt\example\energyplus\7_0_0\GPSHookeJeeves\tmp-genopt-run-1'
Command string               : 'cmd /C ""C:\Program Files (x86)\EnergyPlusV7-0-0\RunEPlus.bat" "singleZonePurchAir" "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3""'
Exception message: 

Error in executing the simulation program
Exit value of the simulation program: 1
Working directory                   : 'C:\Users\SambuKS\Documents\GenOpt\example\energyplus\7_0_0\GPSHookeJeeves\tmp-genopt-run-1'.
Current command String              : 'cmd /C ""C:\Program Files (x86)\EnergyPlusV7-0-0\RunEPlus.bat" "singleZonePurchAir" "USA_IL_Chicago-OHare.Intl.AP.725300_TMY3""'.
Error stream of simulation program  : The system cannot find the path specified.

GenOpt terminated with error.
See logfile for further information.

Looks like it is looking for Eplus.bat Version 7.....

  • I have updated the E+ version by using the IDFVersionUpdater. From v7 to v8.3 .

  • In addition, as there is no 'RuenEplusPaarallel.bat' file at the 'energyplus7_0_0' folder I copied one from 'energyplus5_0_0' folder.

  • I have also considered to change the weather file versions to the latest ones from E+ v8.3.3.

Any suggestions?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-02 12:57:08 -0500

updated 2015-12-04 03:58:08 -0500

The same answer I gave here probably applies to you too.

Open RunEplus.bat in a text editor and modify the path to your current version of E+ (8.3 apparently, though v8.4 is the current one). Make sure all of your E+ files are in your current E+ version too.

Update: Tutorial with E+ v8.4

Note: I've made the following tutorial available on my github repository which includes the resulting configuration files.

1. Install GenOpt.

Download GenOpt, currently version 3.1.0 from the GenOpt website.

Install to your local drive. If you are on Windows and you get an error saying "Cannot write to path" with the default path of C:\Program Files (x86)\genopt, open an elevated command prompt (type in "cmd" in the search bar and run as administrator). Then cd to the folder where you have the genopt-install-3-1-0.jar and type in java -jar genopt-install-3-1-0.jar and it'll do the trick.

2. Find an example to run

We're going to take in the example GPSHookeJeeves of 7.0.0.

GenOpt comes with examples up to E v7.0.0. Go to your genopt installation folder, and find the GSPHookeJeeves example for energyplus. The full path for me is C:\Program Files (x86)\genopt\example\energyplus\7_0_0\GPSHookeJeeves

Copy all the content of the folder and go put it somewhere else, like in your Documents folder or whatever.

3. Update IDF files to latest version.

Using the IDFVersionUpdater, update the TWO idf files in there to E v8.4.0.

By default any install of E+ comes with a version updater that handles the last transition (v8.3 to 8.4 for example). The IDFVersionUpdater is a preprocessor, so you'll find it in C:\EnergyPlusV8-4-0\PreProcess\IDFVersionUpdater\IDFVersionUpdater.exe

You'll need more than that to go from v7.0.0 to v8.4.0. Download the MultipleIDFVersionTranslater from the helpdesk. Either take only the files you need or just extract it in full and run the IDFVersionUpdater.exe. If oyu only want some of these files, you can copy them and paste them in your E+ IDFVersionUpdater folder (default path is above) so that you end up with these files:

List of files needed for IDFVersionUpdater

Do the conversion.

4. Configure!

If you try to run GenOpt directly, chances are you'll get an error message such as:

 Cannot find optimization configuration file: 'C:\Users\cfg\EnergyPlus-7-0-0-Win7.cfg'.

The path will be different in your case, depending on where you have created your test folder (it's a relative path, we'll see that).

So we need a .cfg file apparently. To run a GenOpt project, you need to supply an *.ini file, in your case optWin7.ini.

This has the path to the two *.idf files, the path to the configuration file *.cfg, and the optimization file command.txt. There's also an optional call parameter for the weather file that defaults to the Chigaco OHare file.

  CallParameter { // optional section
    // The weather file without ...
edit flag offensive delete link more


@Julien, THANKS VERY MUCH!!! It finally works with no errors at all.


samks123's avatar samks123  ( 2015-12-04 06:23:44 -0500 )edit

Mark the answer as accepted please, so we can mark the thread as resolved.

Julien Marrec's avatar Julien Marrec  ( 2015-12-04 07:01:32 -0500 )edit

answered 2015-12-02 16:54:25 -0500

samks123's avatar

updated 2015-12-04 11:53:14 -0500

@ Julien, thanks for your reply. I have modified the RunEplusParallel.bat file to mathc my latest E+version, however, it does not work. See below...

: Currently, there is no environment variable that points to the E+ directory. : We hard-code it here.
set program_path=C:\Program Files\EnergyPlusV8-3-3\

I addition, I have added all files on my current E+plus folder: (C:\Users\SambuKS\Documents\GenOpt\example\energyplus\7_0_0\GPSHookeJeeves). See image attached below : image description

Thanks again!

edit flag offensive delete link more


This isn't an answer, rather a comment and an update to your original question. Anyways, I'll update my answer to provide a tutorial

Julien Marrec's avatar Julien Marrec  ( 2015-12-04 02:59:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops


Question Tools

1 follower


Asked: 2015-12-02 11:01:33 -0500

Seen: 828 times

Last updated: Jan 11 '16