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

Revision history [back]

There is a variable name mismatch in the measure in lines 225, 230, 236, and 238. The variable for the .each loop is 'plantloop' (lower case l) and the variables in lines 230 and 238 are 'plantLoop' (upper case L):

# remove plant loops
plantLoops.each do |plantloop|
  # get the demand components and see if water use connection, then save it
  # notify user with info statement if supply side of plant loop had heat exchanger for refrigeration
  usedForSHWorRefrigeration = false
  plantLoop.demandComponents.each do |comp| # AP code to check your comments above
    if comp.to_WaterUseConnections.is_initialized || comp.to_CoilWaterHeatingDesuperheater.is_initialized
      usedForSHWorRefrigeration = true
    end
  end
  if usedForSHWorRefrigeration == false
    plantloop.remove
  else
    runner.registerWarning("#{plantLoop.name} is used for SHW or refrigeration heat reclaim.  Loop will not be deleted")
  end
end

@david-goldwasser or I will push a fix to the measure on BCL and comment here once it is updated. You can also manually change the variable names to be consistent for a short term fix.

There is a variable name mismatch in the measure in lines 225, 230, 236, and 238. The variable for the .each loop is 'plantloop' (lower case l) and the variables in lines 230 and 238 are 'plantLoop' (upper case L):

# remove plant loops
plantLoops.each do |plantloop|
  # get the demand components and see if water use connection, then save it
  # notify user with info statement if supply side of plant loop had heat exchanger for refrigeration
  usedForSHWorRefrigeration = false
  plantLoop.demandComponents.each do |comp| # AP code to check your comments above
    if comp.to_WaterUseConnections.is_initialized || comp.to_CoilWaterHeatingDesuperheater.is_initialized
      usedForSHWorRefrigeration = true
    end
  end
  if usedForSHWorRefrigeration == false
    plantloop.remove
  else
    runner.registerWarning("#{plantLoop.name} is used for SHW or refrigeration heat reclaim.  Loop will not be deleted")
  end
end

@david-goldwasser or I will push a fix to the measure on BCL and comment here once it is updated. You can also manually change the variable names to be consistent for a short term fix.

EDIT: measure is updated on BCL

There is a variable name mismatch in the measure in lines 225, 230, 236, and 238. The variable for the .each loop is 'plantloop' (lower case l) and the variables in lines 230 and 238 are 'plantLoop' (upper case L):

# remove plant loops
plantLoops.each do |plantloop|
  # get the demand components and see if water use connection, then save it
  # notify user with info statement if supply side of plant loop had heat exchanger for refrigeration
  usedForSHWorRefrigeration = false
  plantLoop.demandComponents.each do |comp| # AP code to check your comments above
    if comp.to_WaterUseConnections.is_initialized || comp.to_CoilWaterHeatingDesuperheater.is_initialized
      usedForSHWorRefrigeration = true
    end
  end
  if usedForSHWorRefrigeration == false
    plantloop.remove
  else
    runner.registerWarning("#{plantLoop.name} is used for SHW or refrigeration heat reclaim.  Loop will not be deleted")
  end
end

@david-goldwasser or I will push a fix to the measure on BCL and comment here once it is updated. You can also manually change the variable names to be consistent for a short term fix.

EDIT: measure is updated on BCL