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

Revision history [back]

The ElectricEquipment End-Use Subcategory field is not exposed in the OpenStudio app. However, it can be set using the API. Here's an example using elevators.

# get model objects
objs = model.getElectricEquipments

# do stuff
objs.each do |obj|

    eed = obj.electricEquipmentDefinition
    if eed.name.to_s.include?('Elevators')

        puts eed
        obj.setEndUseSubcategory('Elevators')
        puts obj

    end

end

The ElectricEquipment I would create a separate Electric Equipment Definition and a schedule for each one from the OpenStudio Loads tab. If you want to sub-meter these use the End-Use Subcategory field field, which is not exposed in the OpenStudio app. However, it app but can be set using the API. Here's an example using elevators.

# get model objects
objs = model.getElectricEquipments

# do stuff
objs.each do |obj|

    eed = obj.electricEquipmentDefinition
    if eed.name.to_s.include?('Elevators')

        puts eed
        obj.setEndUseSubcategory('Elevators')
        puts obj

    end

end

I would create a separate Electric Equipment Definition and a schedule for each one from the OpenStudio Loads tab. If you want to sub-meter these use the End-Use Subcategory field, which is not exposed in the OpenStudio app but can be set using the API. These will show up in the End Uses By Subcategory table in the EnergyPlus HTML results file. Here's an example using elevators.

# get model objects
objs = model.getElectricEquipments

# do stuff
objs.each do |obj|

    eed = obj.electricEquipmentDefinition
    if eed.name.to_s.include?('Elevators')

        puts eed
        obj.setEndUseSubcategory('Elevators')
        puts obj

    end

end

I would create a separate Electric Equipment Definition and a schedule for each one from the OpenStudio Loads tab. If you want to sub-meter these use the End-Use Subcategory field, which is not exposed in the OpenStudio app but can be set using the API. These will show up in the End Uses By Subcategory table in the EnergyPlus HTML results file. Here's an example using elevators.

# get model objects
objs = model.getElectricEquipments

# do stuff
objs.each do |obj|

    eed = obj.electricEquipmentDefinition
     if eed.name.to_s.include?('Elevators')

        puts eed
        obj.setEndUseSubcategory('Elevators')
        puts obj

    end

end