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

Yi Zhang's profile - activity

2019-05-26 10:47:23 -0500 answered a question How to extract comfortable data from jeplus+EA

The SQL statement you have shown is to get Cat 2 for the space F3:Corridor. Change the zone name in the RowName field fo

2019-05-26 10:26:46 -0500 edited answer JE Plus not working with Energy Plus v9.0+?

Hi Adam, Thanks for raising this question! From E+ v8.9, the output frequency "Annual" and "RunPeriod" have been given

2019-05-26 10:25:56 -0500 answered a question JE Plus not working with Energy Plus v9.0+?

Hi Adam, Thanks for raising this question! From E+ v8.9, the output frequency "Annual" and "RunPeriod" have been given

2017-11-30 17:06:32 -0500 commented question How to include weather related objects in my parametric E+ model?

:-) that's exactly what I was to suggest!

2017-11-29 11:24:59 -0500 commented question How to include weather related objects in my parametric E+ model?

For 3-5 climates, you can probably run them as separate projects :-) Does the climate-dependent group of objects themsel

2017-11-29 08:30:08 -0500 commented question How to include weather related objects in my parametric E+ model?

Hmm, it is a tough one! If running each weather file as a separate project is not an option for you, the only workaround

2017-05-22 12:14:26 -0500 commented answer Producing cost estimate for a VRF System in EnergyPlus for use in jEplus

Uh, I am not completely sure about what jEPlus will do in case of an expected field in the eplustbl.csv is missing. But

2017-05-22 11:00:26 -0500 commented answer Producing cost estimate for a VRF System in EnergyPlus for use in jEplus

What will happen if the model has no VRF and the expected part of the sizing report is void? If jEPlus return value '0',

2017-05-22 03:43:30 -0500 answered a question Producing cost estimate for a VRF System in EnergyPlus for use in jEplus

Hi Jonathan, I guess the VRF cost is linked to the auto sizing outcome. If this is the case, what you really need is to

2016-08-03 12:09:17 -0500 answered a question Using Eppy to extract fenestration from IDF and replace with WWR-derived formulas

Hi Andrea,

We have added Python support in the model preparation stage in jEPlus. Ivan has also made an example script using Eppy to apply WWR to each and every window in the external walls. Below is the script.

You can find further details on how to use Python pre-processing in jEPlus, and download the new version, here:

# python script for pre-processing: This script takes WWR value from the argument list and modifies all the windows in the IDF model
# This script is designed to work with jEPlus v1.6.4 and later, with the @python? syntax
# @author: Dr Ivan Korolija []
# Arguments:
#   sys.argv[1]  -  project's base folder where the project files are located
#   sys.argv[2]  -  folder of the current case where in.idf is located
#   sys.argv[3]  -  Other arguments specified in the parameter definition. They are passed in as a ',' delimited string
#   sys.argv[4]  -  folder of the binary files of the simulation program, e.g. the location of Energy+.idd

import os
from eppy.modeleditor import IDF
import sys
import math

# function for calculating wall width and height
def wall_width_height(coordinates):
    ulc = coordinates[0]  # upper left corner coordinates
    blc = coordinates[1]  # bottom left corner coordinates
    brc = coordinates[2]  # bottom right corner coordinates

    # calculate wall width and height by using the Euclidean distance
    w = math.sqrt(math.pow(
        (brc[0] - blc[0]), 2) + math.pow((brc[1] - blc[1]), 2) +
        math.pow((brc[2] - blc[2]), 2))
    h = math.sqrt(math.pow(
        (ulc[0] - blc[0]), 2) + math.pow((ulc[1] - blc[1]), 2) +
        math.pow((ulc[2] - blc[2]), 2))
    return w, h  # return wall width and height
# End 

# path to E+ idd file (required by eppy)
iddfile = os.path.join(sys.argv[4], 'Energy+.idd')

# path to energyplus input file within each simulated folder
idf = os.path.join(sys.argv[2], 'in.idf')

# glazing ratio convert to integer
gr = int(sys.argv[3])

idf = IDF(idf)  # read idf file to eppy
# extract window and wall objects
window_objects = idf.idfobjects['Window'.upper()]
wall_object = idf.idfobjects['BuildingSurface:Detailed'.upper()]

# loop through window objects
for window in window_objects:
    # find the base surface for the window
    win_base_surface = window.Building_Surface_Name

    # loop through the wall objects
    for wall in wall_object:
        # when wall name equals to the window base surface name extract coords
        if wall.Name == win_base_surface:
            coord = wall.coords
            # calculate wall width and height
            w, h = wall_width_height(coord)
            # calculate wall length and height as a function of glazing ratio
            wl = w * math.sqrt(gr / 100)  # window length
            wh = h * math.sqrt(gr / 100)  # window height
            # starting X/Z coordinates relative to the wall bottom left corner
            x = (w - wl) / 2
            z = (h - wh) / 2

    # coords and window H/L converted into strings and applied to window object
    window.Starting_X_Coordinate = '%.2f' % x
    window.Starting_Z_Coordinate = '%.2f' % z
    window.Length = '%.2f' % wl
    window.Height = '%.2f' % wh

# save the updated idf file

# Done
2016-08-03 11:47:19 -0500 commented answer Using Eppy to extract fenestration from IDF and replace with WWR-derived formulas

Hi Jamie, excellent demonstration of Eppy/Python and how they can work with EP-Macro and jEPlus! Inspiring!

2016-07-29 10:23:05 -0500 commented answer JEPlus WWR displaces window from surface help

Yes, I think so. Cheers.

2016-07-29 05:18:38 -0500 commented answer JEPlus WWR displaces window from surface help

Hi Dan, I think the issue is with the jEPlus example. It was given for Surface:Detailed objects where full coordinates are used. It did start with calculating the coordinates of the lower left corner. For simple surfaces whose starting corner defaults to the upper left, the calculation needs to be adjusted, apparently.

2016-07-14 06:12:56 -0500 answered a question JEPlus WWR displaces window from surface help

Yes, it is quite easy to make mistakes when editing the geometry of the window... You can post the section of the IDF file that you are editing, including the wall surface, here to have it checked.


2016-06-13 18:19:07 -0500 commented answer Using EPMacro with JEplus

Ah, I see what you mean, now... "!- " is a comment line. You can put as many as you wish in the IDF and the file should remain valid. Did your second code example give you errors?

2016-06-13 18:16:20 -0500 commented answer Using EPMacro with JEplus

Andrea, I don't quite get your question. Could you explain further what do you mean by "division of CONSTRUCTION from one class to a few"? Anyway you can use ##include, of course. Just put the relevant segments in separate IDFs and then include the required pieces... I am just saying that you don't need to do this with constructions as all different types can exist happily in the same IDF, as long as you give them different names.

2016-06-13 12:16:00 -0500 answered a question Using EPMacro with JEplus

Hi Andrea, you don't even need Macro (##include) to deal with construction/material or insulation thickness. All construction and material definitions can be put in the IDF model, as long as you name them differently. In the model, you assign a construction to a surface by referencing its name; so these assignments can be controlled with jEPlus parameters.

By the way, ##include within an included file will not work. However, you can put jEPlus parameters in the included files, and jEPlus will see them.



2016-06-07 08:19:42 -0500 commented answer JEplus - painful transition from rvi to rvx

Ah, are you using the "csvs" object? It is for reading results from the eplustbl.csv file. If not, just delete the whole "csvs" part and the preceding comma.

2016-06-07 06:20:24 -0500 commented answer JEplus - painful transition from rvi to rvx

There are probably syntax error in your RVX file. It is quite easy to miss a comma here or there. Copy and paste the contents of the RVX to here:, it will tell you what's wrong.

2016-06-07 02:57:45 -0500 commented answer jeplus - maximum number of jobs - memory usage

This is not a job for parametrics. You can set up the project in jEPlus and then run it with jEPlus+EA. Suggest you read about the strategies for optimum control to see how to formulate the problem.

2016-06-06 14:43:01 -0500 answered a question JEplus - painful transition from rvi to rvx

Hi Andrea,

Sorry about the pain :-) RVI still works in v1.6 if you are collecting only annual results. For other report frequencies, you need to specify it in the RVX:

    "notes" : "First RVX test",

    "rvis" : [ 
            "fileName" : "A0_v4.rvi",
            "tableName" : "BottiRVXResults",
            "frequency" : "Hourly",
            "usedInCalc" : true
    "csvs" : [

If you need the output table to be named "SimResults.csv", just set "tableName" to "SimResults". The case naming convention of jEPlus switches from parameter indexes to serial numbers if the project has 7 or more parameters. This is for preventing long path names, which can cause problems for large projects.



2016-06-06 14:19:38 -0500 received badge  Commentator
2016-06-06 14:19:38 -0500 commented answer jeplus - maximum number of jobs - memory usage

Can you post a screenshot of the simulation monitor screen to show the memory usage situation? If too little is allocated to Java, it can be extended with a command-line option. There are also a few things you can do to reduce the memory load of jEPlus. The most effective one would be cutting back model output as much as you can. Your idea of filtering the results for the minimum value will certainly work, too. You can write a Python script for jEPlus to call. In the script you can loop through the cases and search for the minimum value. Or maybe consider optimisation as Jamie has hinted :-)

2016-06-06 02:43:55 -0500 answered a question jeplus - maximum number of jobs - memory usage

There isn't a limit in jEPlus itself, but it is limited by the computing resources as you can run out of storage space or memory if there are too many jobs. It is normally a good idea to run a random sample of a large project, in order to estimate the amount of resources and time required for the whole project.

2016-06-04 04:13:10 -0500 answered a question Error in reading sql output

The eplustbl.sql file is a SQLite database. It is not a SQL command file. So you should open it in DB browser and then do queries using your own SQL command.

2016-06-04 04:07:51 -0500 answered a question What is the correct *.idf file to use in jeplus?

You should use in.idf, as it is the one that enerpyplus executable uses by default. The "out.idf" is probably an intermediate file generated by EP-Macro.

2016-06-04 03:54:38 -0500 answered a question How to mix a *.rvi file with a *rvx file?

Hi Wilson,

Yes, of course. You just need to add a RVI section in the RVX file to reference to RVI file you want to use, like here:

    "rvis" : [ 
            "fileName" : "your.rvi",
            "tableName" : "ElecDemand",
            "frequency" : "Annual",
            "usedInCalc" : true
    "csvs" : [

Full details on how to use the RVX file is here:



2016-06-01 05:21:42 -0500 answered a question Building Energy Optimization Research Ideas

Hi Jonny,

As Michael and others have pointed out, simply comparing the optimisation tools such as GenOpt, LB+HB+(optimisation) and jEPlus+EA using one design problem may not give you any meaningful results. This is because they are actually designed for solving different types of problems, so you may end up comparing apples to oranges. However, bearing this in mind, there are in fact two valid research questions worth investigating: (1) a comparison on how they can be used in the design process, including the types of problems they are good at solving; and (2) a comparison of the performance of the implemented algorithms in the tools, using a set of well-defined problems whose global optima are known.

From a developer's perspective, I would love to see research addressing either of the questions, although the latter is rather harder. The Wetter/Wright paper remains so far the definitive comparison on algorithms in building optimisation. It can do with an update to include new developments in both problems and algorithms, I think.



2016-06-01 04:36:30 -0500 answered a question *.rvx file - obtaining results from eplustbl.csv

Unfortunately each "csv" object (for extracting from eplustbl.csv) will generate a separate output table. However, since you have set "usedInCalc" to true, the contents of these tables will be aggregated into the "AllCombinedResults.csv", along with the parameter values of each case and so on. If you really need them to be in the same table but cannot use AllCombinedResults.csv, using a "sql" object with some clever SQL query commands may be an option.

2015-08-20 12:16:01 -0500 commented answer Scaling in objective definition in JEPLUS+EA

Thanks @Jamie Bull for your answer.

"As to why the 'Electricity [kWh]' objective is scaled and the 'Construction Cost [$/m2]' objective is not in the example file," there isn't any rationale really, because with NSGA2 scaling has absolutely no effect. :-P

This was a legacy option for single objective algorithms.

2015-08-20 12:08:55 -0500 commented question JEPLUS+EA project stops after first generation

Hmm, it is not easy to say without testing the whole project. I ran your new riv/rvx files (on jEPlus forum) with the previous project you sent earlier and found the output columns are unmatched. Could you try to see what's in the .err file in the jEPlus+EA folder?

2015-08-20 11:40:57 -0500 commented answer Definition of constraints in jEPlus+EA

For your example: 1. set min and lb to 0, ub to 80, and max to some large number, say 500; 2. Yes, as lb and ub are only applied when scaling is enabled. 3. No. RVX overrides the objective definitions in RVI.

2015-08-16 10:18:04 -0500 answered a question Definition of constraints in jEPlus+EA

Ivan's still enjoying sun and sea on a Greek island, I believe :-D

Constraint functions are used to test whether a solution is 'feasible' or not. You may consider them as a special type of objectives, whose values must fall within a range, [lb, ub], defined by the user. Normally you would need to enable 'scaling' in the constraint definition, unless your feasible range is <=0. The use of the five scaling parameters (lb, ub, min, max, and weight) is best illustrated in the diagram below. The algorithm considers 0 and below as feasible, and anything above 0 as unfeasible. It works to minimize the sum of the constraint values if more than on constraint are defined.

image description

2015-08-16 09:53:32 -0500 commented answer Jeplus+EA does not find objective function in RVI files

Good job, @Xandrika! I have to admit that the various jEPlus+EA versions are a bit confusing and not sufficiently documented... And my late response due to the holidays.

2015-08-11 19:35:07 -0500 answered a question Jeplus+EA does not find objective function in RVI files

Hi @Xandrika, two commas after ' } ' are missing in the sqls and the userVars lists, respectively. JSON is a strict format and unfortunately jEPlus does not provide any feedback on the validity of the RVX files. You can use this website to check your RVX file:

2015-07-20 04:43:35 -0500 commented answer I want to get [eplusout.csv] file in jEPlus

Replace the line under "===ALL OBJECT IN CLASS: OUTPUT:METER===" with the line I've given, and also change the first line of the RVI from eplusout.eso to

2015-07-18 05:47:54 -0500 answered a question I want to get [eplusout.csv] file in jEPlus

If you only need Electricity:HVAC, you can put it in the meter file with this line:


In the RVI file, make sure each parts are on separate lines, like this: 

Output:SQLite and Output:Diagnostics may not be necessary in the parametric run.

2015-06-25 16:41:28 -0500 commented answer How to fix warmup convergence failing during sizing?

Hi Xandrika, check the update in my answer... hope that will solve your problem. :-)

2015-06-25 13:34:39 -0500 received badge  Editor (source)
2015-06-25 07:08:46 -0500 commented answer How to fix warmup convergence failing during sizing?

Interesting problem! Could you find one of the 8 stubborn models and upload it here? I am wondering if even longer warn-up period would help in your case. Did you see the max heat load error narrowing when you increased the max warmup days from 25 to 365?

By the way, you can upload and run your model on (login: public/test), and then tell me the job_id. In this way I (and others) can see the simulation output, too.

2015-06-24 08:05:12 -0500 answered a question How to fix warmup convergence failing during sizing?

Hi @Xandrika, have you tried increasing the "Maximum Number of Warmup Days" in the Building object to see if it converges?

== Update ==

After experimenting with the IDF model @Xandrika has uploaded on the development server, it seems that the convergence problem was caused by the internal thermal mass construction. The original model uses the same construction of internal partition wall (NP_Partition) for addition thermal mass. The simulation result showing convergence failure can be seen here:

If the thermal construction is slightly modified for the west zone, i.e. using 2cm cement sand render as the outer layer instead of 1.3cm cement plaster sand aggregate (see NP_ThermalMass), the convergence problem disappears. This result can be seen here: Note that the east zone still has the same internal mass construction, therefore it is not the 1.3cm render layer itself causing troubles.

I thought the E+'s solver might not like symmetrical (identical) thermal mass in the east and west zones; but this is not the case. The model converges fine if both zones has 2cm cement sand render as the outside layer: So the cause of the convergence issues remains a mystery...

2015-06-24 07:54:51 -0500 answered a question Probabilistic distribution function in jEPlus

Defining parameters in jEPlus is covered in Chapter 4 of the User's Manual. How to define probabilistic distribution of the parameter values is described in 4.3 in particular:

2015-02-24 07:32:53 -0500 answered a question Linux: Running EP indepently from OpenStudio 1.6.0 ?

If you don't "have to" run E+ simulations in a terminal (e.g. for scripting reasons), you can run the jobs on the free web server: After logging on (u/p= public/test), just drag and drop the files and download full results when it finishes.

2014-12-14 09:50:04 -0500 received badge  Teacher (source)