Skip to content

Scenario workflow: 6. Basic Scenario Measure Mapper - #13

Merged
JieXiong9119 merged 1 commit into
scenario-workflowfrom
scenario-workflow-6-basic-measure-mapper
Oct 27, 2026
Merged

JieXiong9119 merged 1 commit into
scenario-workflowfrom
scenario-workflow-6-basic-measure-mapper

Conversation

@JieXiong9119

@JieXiong9119 JieXiong9119 commented Oct 24, 2026 •

Copy link
Copy Markdown

The scenario measure mapper

At this stage, the measure mapping is only hardcoded in scenario_measure_map.json:

BuildingSync measure OpenStudio measure Arguments Source
Air Distribution: Add or repair economizer EnableEconomizerControl economizer_type FixedDryBulb openstudio-ee 0.12.5
Air Distribution: Install demand control ventilation EnableDemandControlledVentilation dcv_type EnableDCV openstudio-ee
Ceiling: Increase ceiling insulation IncreaseInsulationRValueForRoofsByPercentage r_value 20 openstudio-ee
General Controls: Upgrade operating protocols AdjustThermostatSetpointsByDegrees cooling +1, heating -1 openstudio-common-measures 0.12.3
Lighting: Add occupancy sensors ReduceLightingLoadsByPercentage 5 percent openstudio-ee
Lighting: Retrofit with LED SetLightingLoadsByLPD lpd 0.6 openstudio-common-measures
Plug Load: Install plug load controls ReduceElectricEquipmentLoadsByPercentage 20 percent openstudio-ee
Refrigeration: Replace with high efficiency units ReduceElectricEquipmentLoadsByPercentage 5 percent openstudio-ee
Roof: Increase roof insulation modify_envelope_insulation roof_target_rvalue 5.28 buildingsync-measures-gem
Wall: Air seal envelope ReduceSpaceInfiltrationByPercentage 30 percent openstudio-ee
Wall: Increase wall insulation modify_envelope_insulation wall_target_rvalue 4.4 buildingsync-measures-gem
Wall: Insulate thermal bypasses IncreaseInsulationRValueForExteriorWallsByPercenta

A user-facing mapping table belongs in PR 16, the user documentation step. Until then, this prints the list straight from the JSON:

C:\Ruby32-x64\bin\ruby.exe -rjson -e "JSON.parse(File.read('lib/BOSS/scenario_measure_map.json'))['mappings'].each { |m| m['steps'].each { |s| puts [m['system_category_affected'], m['measure_name'], s['measure_dir_name'], s['arguments'].reject { |k, _| k == '__SKIP__' }].join(' | ') } }"

@JieXiong9119

Copy link
Copy Markdown
Author

Making buildingsync-measures-gem measures loadable.

The simplest route is the external measure manifest that BOSS already has. Most of the plumbing exists:

  • The baseline writer already appends installed external measure folders to every OSW's measure paths.
  • CI already runs the install task before tests.
  • The gem's measures need nothing outside their own folders, so cloning only the measure folder works.

What's missing is one manifest entry and an install step:

  1. Add the repo to external_measure_repos.yml:
  - name: buildingsync-measures-gem
    url: https://github.com/BuildingSync/buildingsync-measures-gem.git
    ref: <commit SHA on develop>
    measure_roots:
      - lib/measures

Pin a commit SHA rather than develop. The plan's rule is to map only to merged measures, and a moving branch can change measure arguments without warning.

  1. Install locally with bundle exec rake measures:install_external. Nothing is installed under the vendor folder on your machine yet.

  2. Add a test that every mapped measure name resolves from the written OSW's measure paths. PR 12 already lists that as its acceptance gate.

  3. Watch for name clashes. Gem measures take precedence over external repos, and ComStock is also in the manifest. If ComStock has a measure with the same folder name, the earlier one wins. I couldn't check this because ComStock isn't installed here.

Installing it as a Ruby gem is the other route, but the gem is not published on RubyGems: the lookup returned 404, so the gem's own README install instructions don't work yet.

@JieXiong9119
JieXiong9119 merged commit 6a0bf58 into scenario-workflow Oct 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant