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

How to use Command line

asked 2017-09-14 01:50:32 -0600

Elaheh gravatar image

updated 2017-09-14 03:28:19 -0600

I got some issues with running E+ from CMD. Lets say I wanna to run 5ZoneAirCooled.idf (as example file) . I tried different scripts but the process is always terminated!

Here is my script;

c:\>EnergyPlusV8-7-0\Epl-run c:\EnergyyPlusV8-7-0\Energy+.idd c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled idf "C:\EnergyPlusV8-7-0\WeatherData\USA_VA_Sterling-Washington.Dulles.Intl.AP.724030_TMY3.epw" EP N nolimit N N 0 Y

and what I got after running the script:

c:\>IF "FALSE" == "FALSE" DEL Energy+.idd
Could Not Find c:\Energy+.idd

c:\>IF "FALSE" == "FALSE" DEL Energy+.ini
Could Not Find c:\Energy+.ini

c:\>goto :done

c:\>if EP == Y pause
edit retag flag offensive close merge delete


Please use existing (and relevant) tags. "how to use command line" isn't a good tag. Thanks!

Julien Marrec gravatar image Julien Marrec  ( 2017-09-14 02:47:09 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-09-14 03:00:24 -0600

updated 2019-10-13 05:18:41 -0600

I don't have a windows machine, so I'm not 100% sure the CLI is available on Windows or not, but I don't see any reason it wouldn't it's coded in C++ like the rest of E+ (

First, prior to v8.4 EnergyPlus uses to be run in command line using a batch file (the one you're using). This is no longer the case, and EnergyPlus now has a proper Command Line Interface (or 'cli'), which documentation can be found here.

If the energyplus isn't in your PATH, you'll need to use the full path (on mac that's /Applications/EnergyPlus-8-7-0/energyplus) or set your path correctly.

Display the help:

energyplus --help

Run a model test.idf in the current directory, with a weather file called weather.epw in the current directory as well, and output to a directory named out-test:

energyplus -w weather.epw -d out-test/ test.idf

By default it picks up the Energy+.idd from the same folder as where the energyplus executable is (so /Applications/EnergyPlus-8-7-0/Energy+.idd in my case). If you need to supply another one, use -i path_to_Energy+.idd (or --idd)

Obviously, all paths above can be made absolute if there aren't in current directory, or can be made relative. Here's a mixed example:

energyplus \
   --idd ~Software/Others/EnergyPlus-build/Products/Energy+.idd \ # Absolute path
   -w ../Weather/weather.epw \   # Relative path (one folder up, then inside Weather/)
   -d out-test/ \   # Current directory (relative path too)
   test.idf   # Current directory

If you really want to run Epl-run.bat, see the parameters its documentation here. If I decompose your query, I think the problem is that you're passing the idd as the first argument, when the first argument should be the input file without extension. The batch should will look for the .ini and .idd in the current directory.

c:\>EnergyPlusV8-7-0\Epl-run = Program to run
c:\EnergyyPlusV8-7-0\Energy+.idd = **Don't pass this!**
c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled = contains the file with full path and no extensions for input files
c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled = contains the file with full path and no extensions for output files
idf = extension of the input file
"C:\EnergyPlusV8-7-0\WeatherData\USA_VA_Sterling-Washington.Dulles.Intl.AP.724030_TMY3.epw" = contains the file with full path and extension for the weather file

EP = a weather file is used
N = no pause
nolimit = no 250 columns limit in readVarsESO
N = Don't call convertESOMTR
N = Don't call csvProc
0 = ??
Y = ??
edit flag offensive delete link more


Confirmed that it's present on windows too (src/EnergyPlus/CMakeLists.txt#L613)

Julien Marrec gravatar image Julien Marrec  ( 2017-09-14 03:22:58 -0600 )edit

the command energyplus -w weather.epw -o out-test/ test.idf has a small typo. It should be: energyplus -w weather.epw -d out-test/ test.idf

Alex Vlachokostas gravatar image Alex Vlachokostas  ( 2019-10-12 15:57:04 -0600 )edit

Done thank you!

Julien Marrec gravatar image Julien Marrec  ( 2019-10-13 05:20:35 -0600 )edit

If you are interested in using a batch file instead of the normal EnergyPlus command line, the batch file intended to be used is RunEPlus.bat. Using the RunEPlus.bat file is documented in the AuxiliaryPrograms.pdf under the section titled "Technical Details for Running EnergyPlus." The EPL-run.bat file is made to be used with EP-Launch.

JasonGlazer gravatar image JasonGlazer  ( 2019-10-15 12:36:59 -0600 )edit

answered 2019-10-15 13:46:55 -0600

Modelkit has an energyplus-run function that simplifies command line executions. Check out this video demonstrating modelkit commands, and the following video showing how to use a rakefile to automate these commands.

edit flag offensive delete link more

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: 2017-09-14 01:50:32 -0600

Seen: 1,188 times

Last updated: Oct 15 '19