Table of Contents

Table of Contents

Chapter 7 Utilities

Version 2.2, © 2024 Energy Simulation Solutions Ltd



7.1 Python Runner

jEPlus simplifies the organization of parametric projects. However, its post-processing functions are quite limited. This is where scripting using languages such as Python comes handy. jEPlus v2.1 provides flexible support for scripting languages. Any language that can run a script file through a command-line can potentially be used with jEPlus.

One important issue that needs to be addressed is how to pass the project information from the jEPlus to the script. Normally this must be done by passing arguments through the command-line. In Python, for example, the command-line would look like:

python myscript.py arg1 arg2 arg3 ...

The main purpose of the Python Runner utility is for testing scripts before including them in the jEPlus project. On this tab, you can select the arguments to be passed to the script to mimic the scenarios defined in the RVX (see Chapter 5). When called from the RVX result collection process, four or five arguments are passed to the script, depending on the onEachJob option. If the onEachJob option is set to true, the list of arguments is as below: (Note that sys.argv[0] returns the name of the script.)

  1. sys.argv[1] – the full paths of the location of the project itself
  2. sys.argv[2] – the full path of the output folder of the simulation case
  3. sys.argv[3] – the expected output table name, as defined by tableName. In the script, .csv should be appended to the table name before written to the file
  4. sys.argv[4] – Other arguments as specified in the scripts object in the RVX object

Otherwise, if the onEachJob option is false, the arguments passed are as below:

  1. sys.argv[1] – the full paths of the location of the project itself
  2. sys.argv[2] – the full path of the output folder of the project where the individual job folders are located
  3. sys.argv[3] – the list of the job IDs of the simulations that have been executed
  4. sys.argv[4] – the expected output table name, as defined by tableName. In the script, .csv should be appended to the table name before written to the file
  5. sys.argv[5] – Other arguments as specified in the scripts object in the RVX object

On the Python Runner tab, you can enable/disable arguments and select the corresponding paths to reproduce the scenarios for data collection using RVX.


Figure 7.1: The Python script runner


7.2 E+ Version Converter

The EnergyPlus version converter utility is provided to help upgrade E+ files in jEPlus projects to the latest E+ versions. The util is an interface to the E+ version updater programs. The main benefit it offers, compared to the E+'s own version converter GUI, is the ability to discover model files by either reading the jEPlus project, or sweeping the folder. A tutorial demonstrating its use is available here.

This utility requires the E+ multiple version updater package, which is available to download from the EnergyPlus Help Desk.


Figure 7.2: The E+ Version Updater shell


7.3 ReadVars Runner

If you have kept the EnergyPlus output files after the simulations, you can extra a different set of data tables with the ‘Post process’ tab, without re-runing the simulations. Here, you can specify an alternative RVI/MVI file, and run ReadVarsESO. There are options to store data tables separately for each job, compile a combined table like jEPlus does by default, and perform simple statistics on the results.

Figure 7.3: The ReadVars runner