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

Identifying un-used constructions

I want to identify un-used constructions in my model, I shamelessly ripped code from this measure : https://bcl.nrel.gov/node/82267 the code makes sense except for this section for constructions:

  model.getConstructions.sort.each do |resource|
    if resource.directUseCount == 1 # still don't understand why this is 1 not 0
      unused_flag_counter += 1
      resource.remove
  end

Why is resource.directUseCount == 1 when a construction is un-used? Is this code really correct? For all other resources the directUseCount == zero when a resource is un-used.

Identifying un-used constructions

I want to identify un-used constructions in my model, I shamelessly ripped code from this measure : https://bcl.nrel.gov/node/82267 the code makes sense except for this section for constructions:

  model.getConstructions.sort.each do |resource|
    if resource.directUseCount == 1 # still don't understand why this is 1 not 0
      unused_flag_counter += 1
      resource.remove
  end

Why is resource.directUseCount == 1 when a construction is un-used? Is this code really correct? For all other resources the directUseCount == zero 0 when a resource is un-used.

Identifying un-used constructions

I want to identify un-used constructions in my model, I shamelessly ripped code from this measure : https://bcl.nrel.gov/node/82267 the code makes sense except for this section for constructions:

  model.getConstructions.sort.each do |resource|
    if resource.directUseCount == 1 # still don't understand why this is 1 not 0
      unused_flag_counter += 1
      resource.remove
  end

Why is resource.directUseCount == 1 when a construction is un-used? Is this code really correct? For all other resources the directUseCount == 0 when a resource is un-used.