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

Translation issues

My goal is to load .osm files and run energy plus simulations, all using the Python bindings. I've found it quite hard due to the lack of Python documentation, the divergence from typical python open source standards etc, but I think there's good potential here. I was able to locally install the openstudio and pyenergyplus packages for Mac Arm64. As far as I can see, the only way to run an energyplus simulation is to use a .idf file - if there's another way with a Workspace object or something, please let me know.

While trying to translate an object from openstudio to energyplus, I am running into issues. `

p1 = 'models_nrel/bldg0000007-up18.osm'
p2 = 'models_eplus/bldg0000007-up18.idf'
building = os.model.Model.load(p1).get()
v = translator.translateModel(os.osversion.VersionTranslator().loadModel(os.path(p1)).get())

` This gives an error like:

[utilities.idf.WorkspaceObject] <0> Object of type 'Schedule:Constant' and named 'Always On Continuous', points to an object named Fractional 1 from field 1, but that object cannot be located.

This doesn't break the script though. A file is created at path p2, so I tried api.runtime.run_energyplus(state, [ '-w', weather, '-d', 'out', p2, ] ) Then I run into a breaking error:

**FATAL:Errors occurred on processing input file. Preceding condition(s) cause termination.

I tried to look through the building schedules like this: `

schedules = building.getSchedules()
[(i, s.name().get()) for i, s in enumerate(schedules)]

`

Doing this, I don't even see a schedule with the name "Always On Continuous". I have no idea how to fix this in order to run the simulation, or even if the schedule issue is the reason the energy plus run fails. Any help would be greatly appreciated.

Translation issues

My goal is to load .osm files and run energy plus simulations, all using the Python bindings. I've found it quite hard due to the lack of Python documentation, the divergence from typical python open source standards etc, but I think there's good potential here. I was able to locally install the openstudio and pyenergyplus packages for Mac Arm64. As far as I can see, the only way to run an energyplus simulation is to use a .idf file - if there's another way with a Workspace object or something, please let me know.

While trying to translate an object from openstudio to energyplus, I am running into issues. `

p1 = 'models_nrel/bldg0000007-up18.osm'
p2 = 'models_eplus/bldg0000007-up18.idf'
building = os.model.Model.load(p1).get()
v = translator.translateModel(os.osversion.VersionTranslator().loadModel(os.path(p1)).get())

` This gives an error like:

[utilities.idf.WorkspaceObject] <0> Object of type 'Schedule:Constant' and named 'Always On Continuous', points to an object named Fractional 1 from field 1, but that object cannot be located.

This doesn't break the script though. A file is created at path p2, so I tried api.runtime.run_energyplus(state, [ '-w', weather, '-d', 'out', p2, ] ) Then I run into a breaking error:

**FATAL:Errors occurred on processing input file. Preceding condition(s) cause termination.

I tried to look through the building schedules like this: `

schedules = building.getSchedules()
[(i, s.name().get()) for i, s in enumerate(schedules)]

`

Doing this, I don't even see a schedule with the name "Always On Continuous". I have no idea how to fix this in order to run the simulation, or even if the schedule issue is the reason the energy plus run fails. Any help would be greatly appreciated.