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

Revision history [back]

click to hide/show revision 1
initial version

energyConsumptionsByMonth in OpenStudio returns nothing?

Hi there-

I am using C# bindings via IronPython to leverage OpenStudio version 1.4.x. Everything is working really well. Today, when I tried to get SQL data using OpenStudio::SqlFile, I was having a lot of success, until I tried to call energyConsumptionByMonth(endUseFuelType,endUseCategoryType,Month). It just returns nothing.

I'm pretty sure that the enums for endUseFuelType, endUseCategoryType, and Month are all working, and I'm sure that the fuelType, CategoryType, and Month should have a in the SQL file, but as I said, it returns nothing.

In the SDK documentation, it states that this function only works if the Building Energy Performance table is enabled (like BEPS, I guess), but I have no real way of knowing what this means precisely. The only SQLite options I am aware of is Simple, and SimpleAndTabular, the second of which I would guess turns on the Building Energy Performance table.

Alas, no luck and I'm not quite sure how to diagnose the problem.

Here is my pseudocode in Python (which I use to bind to the C# dlls)

sqlFile = ops.SqlFile(ops.Path(sqlPath)) eucatty = ops.EndUseCategoryType("Heating") eufty = ops.EndUseFuelType("Gas") month = ops.MonthOfYear("Jan") print month.value() print month.value(),eufty.value(),eucatty.value() val = sqlFile.energyConsumptionByMonth(eufty,eucatty,month) print val

val returns nothing

energyConsumptionsByMonth in OpenStudio returns nothing?

Hi there-

I am using C# bindings via IronPython to leverage OpenStudio version 1.4.x. Everything is working really well. Today, when I tried to get SQL data using OpenStudio::SqlFile, I was having a lot of success, until I tried to call energyConsumptionByMonth(endUseFuelType,endUseCategoryType,Month). It just returns nothing.

I'm pretty sure that the enums for endUseFuelType, endUseCategoryType, and Month are all working, and I'm sure that the fuelType, CategoryType, and Month should have a in the SQL file, but as I said, it returns nothing.

In the SDK documentation, it states that this function only works if the Building Energy Performance table is enabled (like BEPS, I guess), but I have no real way of knowing what this means precisely. The only SQLite options I am aware of is Simple, and SimpleAndTabular, the second of which I would guess turns on the Building Energy Performance table.

Alas, no luck and I'm not quite sure how to diagnose the problem.

Here is my pseudocode in Python (which I use to bind to the C# dlls)

sqlFile = ops.SqlFile(ops.Path(sqlPath)) eucatty = ops.EndUseCategoryType("Heating") eufty = ops.EndUseFuelType("Gas") month = ops.MonthOfYear("Jan") print month.value() print month.value(),eufty.value(),eucatty.value() val = sqlFile.energyConsumptionByMonth(eufty,eucatty,month) print val

val returns nothing