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

Jeplus+EA does not find objective function in RVI files

asked 9 years ago

Xandrika's avatar

updated 9 years ago

Hi all,

I was running successfully Jeplus+EA project with rvi-files. However, I wanted to get uservars defined and plotted. So I am trying to use the RVX files. But it gives me some strange error although rvi has defined the objective function:

image description

my rvi file:

eplusout.eso
eplusout.csv
Heating:Electricity
Cooling:Electricity
0
!-sqlite
! Output file name; Column headers; SQL command
HVAC_Electricity;HVAC Electricity Intensity [kWh/m2];SELECT Value FROM TabularDataWithStrings WHERE (TableName='Utility Use Per Conditioned Floor Area' AND RowName='HVAC' AND ColumnName='Electricity Intensity')
!-end sqlite
!-objectives
! Name of the objective; unit; formula (c0,c1, c2... are columns in the result table generated from the statements above)
Heating Electriciy; kWh; c0
Cooling Electriciy; kWh; c1
!-end objectives

my RVX file:

{
    "notes": "Some notes about this RVX",
    "rvis": [
        {
            "fileName": "my_LCCA.rvi",
            "tableName": "SimResults"
        }
    ],
    "sqls": [
        {
            "tableName": "Heating_Electricity",
            "columnHeaders": "Heating Electricity [kWh]",
            "sqlcommand": "SELECT Value FROM TabularDataWithStrings WHERE (TableName='End Uses' AND RowName='Heating' AND ColumnName='Electricity')"
        },
        {
            "tableName": "Cooling_Electricity",
            "columnHeaders": "Cooling Electricity [kWh]",
            "sqlcommand": "SELECT Value FROM TabularDataWithStrings WHERE (TableName='End Uses' AND RowName='Cooling' AND ColumnName='Electricity')"
        },
        {
            "tableName": "HVAC_Electricity_Intensity",
            "columnHeaders": "HVAC Electricity Intensity [kWh/m2]",
            "sqlcommand": "SELECT Value FROM TabularDataWithStrings WHERE (TableName='Utility Use Per Conditioned Floor Area' AND RowName='HVAC' AND ColumnName='Electricity Intensity')"
        }
    ],
    "scripts": [
        {}
    ],
    "userVars": [
        {
            "identifier": "v0",
            "formula": "c0",
            "caption": "Heating Electricity [kWh]",
            "report": true
        },
        {
            "identifier": "v1",
            "formula": "c1",
            "caption": "Cooling_Electricity [kWh]",
            "report": true
        },
        {
            "identifier": "v2",
            "formula": "c2",
            "caption": "HVAC Electricity Intensity [kWh/m2]",
            "report": true
        }
    ],
    "constraints": [
        {}
    ],
    "objectives": [
        {
            "identifier": "t1",
            "formula": "v1",
            "caption": "Heating Electricity [kWh]",
            "scaling": true,
            "min": 0,
            "max": 10000,
            "weight": 1
        },
        {
            "identifier": "t2",
            "formula": "v2",
            "caption": "Cooling Electricity [kWh]",
            "scaling": false,
            "min": 0,
            "max": 10000,
            "weight": 1
        }
    ]
}
Preview: (hide)

Comments

@Ivan Korolija: could you please have a look on my coding and try to find out why my RVX/RVI files are not working. Thanks a lot.

Xandrika's avatar Xandrika  ( 9 years ago )

1 Answer

Sort by » oldest newest most voted
6

answered 9 years ago

Yi Zhang's avatar

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: http://jsonlint.com/

Preview: (hide)
link

Comments

Thanks for the anwser and the link, @Yi Zhang. I corrected the commas and i also found an typing error in the RVI file. However, it is still not working. Even the example file that you provided is not running on my computer. Might it be possible that there are some compatibility errors. I am using Energyplus V8.2 Update1. I updated the code in the question and simplefied it. Would be great if you could have a second look! Thanks a lot.

Xandrika's avatar Xandrika  ( 9 years ago )

@Yi Zhang. Uff, I found the problem. Firstly, I was using jEPlus+EA_v1.4_beta_11 that does not support RVX, right? Actually, I tried using v1.5 but it was not opening any of my projects that were working fine with v1.4, Finally, I found your thread about more stringent rules for parameter value type definition here. and now it is working fine:-)

Xandrika's avatar Xandrika  ( 9 years ago )

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.

Yi Zhang's avatar Yi Zhang  ( 9 years ago )

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 9 years ago

Seen: 759 times

Last updated: Nov 13 '15