Found the bug, I'll add update to this as soon as I test and post. It was a type when I copied and pasted code for electrical equipment to lighting. " instance.designLevel.get > 0" should be " instance.lightingLevel.get > 0"
instances = spaceType.lights
instances.each do |instance|
def_display = instance.definition.name
if instance.lightingLevel.is_initialized and instance.designLevel.get > 0
def_value = instance.designLevel.get
def_value_neat = OpenStudio::toNeatString(def_value,0,true)
def_units = "W"
elsif instance.powerPerFloorArea.is_initialized and instance.powerPerFloorArea.get > 0
def_value = instance.powerPerFloorArea.get / OpenStudio::convert(1,"m^2","ft^2").get
def_value_neat = OpenStudio::toNeatString(def_value,4,true)
def_units = "W/ft^2"
elsif instance.powerPerPerson .is_initialized and instance.powerPerPerson .get > 0
def_value = OpenStudio::convert(instance.powerPerPerson .get,"m^2","ft^2").get
def_value_neat = OpenStudio::toNeatString(def_value,0,true)
def_units = "W/person"
end
count = instance.multiplier
@output_data_space_type_details[:data] << [def_display,def_value_neat,def_units,count]
end
Update: Updated Measure is online
For reference on how to trace these down. The screenshot below shows how to find the errors in the tree, and then where the error is in the stderr file. In "Apply Measures Now" and in PAT measure warnings and errors are much easier to see.
This is likley a bug in the measure. If you send the model to OpenStudio@NREL.gov I can test and fix the issue, and post an updated measure to BCL. If you don't have the annual end use breakdown in the workflow do you see the typical OpenStudio reports or do those not show up. I may be making a query into a section that doesn't exist in some models, for example if they don't have water use equipment. If that is the case it should be easy for me to fix.