Skip to content

feat!: BuEM v6-draft parameter inputs - #124

Draft
jravani wants to merge 3 commits into
mainfrom
feat/v6-draft-inputs
Draft

jravani wants to merge 3 commits into
mainfrom
feat/v6-draft-inputs

Conversation

@jravani

@jravani jravani commented Oct 5, 2026

Copy link
Copy Markdown
Member

Brings the configurator's BuEM payload and building editor in line with the v6-draft request schema, so a user can set everything BuEM reads.

Breaking for hosts

  • BuemBuildingRunRequest gains outputs. A transport must forward it as properties.buem.outputs; one that drops it gets annual summaries only, with no hourly profile to chart.
  • toBuem returns { building, outputs, solver }.
  • Both need a buem-gateway that accepts the v6-draft schema with the outputs block.
  • A stored building no longer carries n_storeys or neighbour_status. Reopened, it keeps its total floor area and shows the default storey count.

What changes

  • Payload (6c7c6b8): building types are the four residential codes plus BuEM's eight service types (Retail is gone). MFH and AB send residential_units and the serialiser throws without it; a run reports this instead of sending. Residential buildings send occupancy and appliance overrides; service buildings send capacity and no household inputs. outputs is sent, defaulting to hourly for every profile; with heating and cooling off the building carries no envelope. Walls with bTransmission send b_transmission. TABULA n_Apartment prefills the dwelling count. The response mapping accepts a result with no heating, cooling or electricity profile.
  • Editor (9c5b576): Occupancy and Results to compute sections, and an Appliances section in expert mode for residential buildings.
  • Party walls (b5cd904): a "Shared with a neighbouring building" checkbox on walls replaces the attached-neighbours picker.

Checks

  • npm test 107/107. The new and changed tests in buemAdapter.household.test.ts and buemRun.test.ts fail on main (11 failures) and pass here.
  • npm run typecheck clean, npm run build:lib succeeds.
  • Serialised SFH, MFH (every household input), office, and AB (heating and cooling off) payloads validate against the v6-draft request schema with outputs. On main the MFH, AB and office payloads fail it.
  • Checked in the browser: the new sections, the TABULA prefill, the TV count, an office building, and the party-wall checkbox.

Not run: a live BuEM simulation.

Closes #121

BuEM's v6-draft request schema requires building_type, country and
A_ref on every building, residential_units for MFH and AB, and rejects
household inputs on service buildings. The serialiser met none of
that: an MFH or AB run (the default building type) was rejected for
the missing dwelling count, and the Office, School, Retail and Hotel
labels were sent as-is instead of BuEM's lowercase codes.

- The building types are the four residential codes and BuEM's eight
  service types. Retail, which BuEM has no type for, is gone.
- Residential buildings send residential_units, num_persons,
  archetype, region_code, cooking_carrier, include_dhw and the
  equipment overrides. The serialiser throws when an MFH or AB has no
  dwelling count, and a run reports it instead of sending.
- Service buildings send capacity and none of the household inputs,
  and request no hot water or cooking profile.
- setback_profile is sent for every building.
- properties.buem.outputs selects each load profile as none, summary
  or series. The default is series for all five, since BuEM returns
  only an annual summary for an omitted profile and the overview
  charts need the hourly values. With heating and cooling both none
  the building carries no envelope.
- A wall element with bTransmission set sends b_transmission, which
  BuEM reads as a party wall at 0.
- neighbour_status and n_storeys are no longer sent; v6-draft marks
  both deprecated and BuEM ignores them. The attached-neighbours
  picker is removed. A reopened stored building keeps its total floor
  area but shows the default storey count.
- The response mapping accepts a result with no heating, cooling or
  electricity profile.
- TABULA's n_Apartment prefills residential_units when a building
  loads without one, and on every hand-edited classification.

Breaking for hosts: BuemBuildingRunRequest gains outputs, which the
transport must forward as properties.buem.outputs, and toBuem returns
{ building, outputs, solver }. Both need a buem-gateway that accepts
the v6-draft schema.

Payloads for an SFH, an MFH with every household input, an office and
an AB with no thermal outputs validate against that schema; the
previous serialiser's MFH, AB and office payloads did not.
The building editor gains three sections for the inputs the v6-draft
serialiser now sends.

- Occupancy: dwellings (required for MFH and AB, prefilled from
  TABULA), occupants per dwelling, household type, Dutch region code,
  cooking carrier, whether hot water is reported, and heating setback.
  A service building shows capacity and setback only.
- Results to compute: each of the five load profiles off, annual or
  hourly. Service buildings do not offer hot water or cooking gas.
  With heating and cooling off the section says surfaces and weather
  go unused.
- Appliances (expert mode, residential only): each of BuEM's appliances
  set to default, yes or no, and a TV count of 0 to 3 mapped onto
  tv_1 to tv_3. For MFH and AB it says every dwelling gets the same
  appliances.

A section the building type hides closes when the type changes.
BuEM treats a wall with b_transmission 0 as a party wall, with no heat
loss through it and no synthesised windows. The surface editor gains a
checkbox on walls that sets bTransmission to 0, which the serialiser
sends as b_transmission. It replaces the attached-neighbours picker,
whose neighbour_status field BuEM ignores.
@jravani jravani added this to the v0.7.0 milestone Oct 5, 2026

This branch has not been deployed

No deployments
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.

Align BuEM parameter inputs with the v6-draft request schema

1 participant