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

Revision history [back]

If you make a new measure, and then change everything within and including the initial and final condition to this you can clean it up. Optionally you can clean up unnecessary measure arguments, but it shouldn’t break anything if you leave them three.

# report initial condition of model
runner.registerInitialCondition("The building started with #{model.getZoneMixings.size} Zone Mixing Objects.")  

# remove the objects
model.getZoneMixings.size.each do |zone_mixing|
  zone_mixing.remove
end

# report final condition of model
runner.registerFinalCondition("The building finished with #{model.getZoneMixings.size} Zone Mixing Objects.")

If you make a new measure, and then change everything within and including the initial and final condition to this you can clean it up. Optionally you can clean up unnecessary measure arguments, but it shouldn’t break anything if you leave them three.

# report initial condition of model
runner.registerInitialCondition("The building started with #{model.getZoneMixings.size} Zone Mixing Objects.")  

# remove the objects
model.getZoneMixings.size.each model.getZoneMixings.each do |zone_mixing|
  zone_mixing.remove
end

# report final condition of model
runner.registerFinalCondition("The building finished with #{model.getZoneMixings.size} Zone Mixing Objects.")