I don't think it occurs on "any measure". This is a logic error, clearly, as indicated by the Optional not initialized
.
In this specific example, it's happening here: https://github.com/NREL/openstudio-ex...
Meaning your Space
does not have a ThermalZone
attached to it...
And you're hitting it on any measure that does use that os_lib_hvac.rb
's createPrimaryAirLoops
function.
Unfortunately, the function is wrong (openstudio-extension-gem 0.7.0 and 0.7.1 are affected at least, but that function was removed for the forthcoming release...):
if space.thermalZone
thermal_zone = space.thermalZone.get
Should actually be
if space.thermalZone.is_initialized # alternative: !space.thermalZone.empty?
thermal_zone = space.thermalZone.get
Anyways: to work around your issue, please assign a ThermalZone to all of your Spaces. A Space must have a thermal zone in order to be simulated by E+.