diff --git a/lib/measures/merge_floorspace_js_with_model/measure.rb b/lib/measures/merge_floorspace_js_with_model/measure.rb
index 2b7d90c6..0861821c 100644
--- a/lib/measures/merge_floorspace_js_with_model/measure.rb
+++ b/lib/measures/merge_floorspace_js_with_model/measure.rb
@@ -227,7 +227,7 @@ def run(model, runner, user_arguments)
space_type.spaces.each do |space|
unless space.thermalZone.is_initialized
thermal_zone = OpenStudio::Model::ThermalZone.new(model)
- thermal_zone.setName(space.name.to_s)
+ thermal_zone.setName("zone #{space.name.to_s}")
space.setThermalZone(thermal_zone)
end
end
diff --git a/lib/measures/merge_floorspace_js_with_model/measure.xml b/lib/measures/merge_floorspace_js_with_model/measure.xml
index a505d92c..11d22327 100644
--- a/lib/measures/merge_floorspace_js_with_model/measure.xml
+++ b/lib/measures/merge_floorspace_js_with_model/measure.xml
@@ -3,8 +3,8 @@
3.1
merge_floorspace_js_with_model
16ef6369-6420-4f17-894c-a767895bcaa4
- 08fb938b-1331-47e4-bcaa-07fae4abc783
- 2025-08-01T14:58:34Z
+ c3c232cf-cb02-4ce8-ad73-3caace5dfb60
+ 2026-06-17T22:04:59Z
0AD1E2E2
MergeFloorspaceJsWithModel
Merge FloorspaceJs with Model
@@ -80,7 +80,7 @@
measure.rb
rb
script
- 23601781
+ 410E985D
SDDC Office template.osm
diff --git a/lib/measures/merge_floorspace_js_with_model/tests/merge_floorspace_js_with_model_test.rb b/lib/measures/merge_floorspace_js_with_model/tests/merge_floorspace_js_with_model_test.rb
index 3f131acf..4c8bf78e 100644
--- a/lib/measures/merge_floorspace_js_with_model/tests/merge_floorspace_js_with_model_test.rb
+++ b/lib/measures/merge_floorspace_js_with_model/tests/merge_floorspace_js_with_model_test.rb
@@ -35,6 +35,9 @@ def test_good_argument_values
# store the number of spaces in the seed model
num_spaces_seed = model.getSpaces.size
+ # capture existing zone names before running the measure
+ existing_zone_names = model.getThermalZones.map { |z| z.name.to_s }
+
# get arguments
arguments = measure.arguments(model)
argument_map = OpenStudio::Measure.convertOSArgumentVectorToMap(arguments)
@@ -69,6 +72,20 @@ def test_good_argument_values
# check that there is now 1 space
# assert_equal(1, model.getSpaces.size - num_spaces_seed)
+ # verify that newly created thermal zones are prefixed with "zone "
+ # and that zone names do not exactly match the corresponding space name (Issue #170)
+ model.getSpaces.each do |space|
+ next unless space.thermalZone.is_initialized
+ zone_name = space.thermalZone.get.name.to_s
+ next if existing_zone_names.include?(zone_name)
+
+ space_name = space.name.to_s
+ assert(zone_name.start_with?('zone '),
+ "Expected newly created zone '#{zone_name}' to start with 'zone ' for space '#{space_name}'")
+ refute_equal(space_name, zone_name,
+ "Thermal zone name '#{zone_name}' must not equal space name '#{space_name}'")
+ end
+
# save the model to test output directory
output_file_path = "#{File.dirname(__FILE__)}//output/test_output.osm"
model.save(output_file_path, true)