Skip to content

Add PercentType and Allow Negative Bias Errors - #567

Open
JieXiong9119 wants to merge 6 commits into
develop-v2from
feat/add-percenttype
Open

JieXiong9119 wants to merge 6 commits into
develop-v2from
feat/add-percenttype

Conversation

@JieXiong9119

Copy link
Copy Markdown
Contributor

Any background context you want to provide?

What does this PR do?

See proposal.

How should this be manually tested?

What are the relevant tickets?

Closes #297

Screenshots (if appropriate)

@JieXiong9119 JieXiong9119 self-assigned this Oct 28, 2026
@JieXiong9119 JieXiong9119 added Schema: General General update to BuildingSync Non-breaking Change feature Adding new functionality to BuildingSync labels Oct 28, 2026
@JieXiong9119

Copy link
Copy Markdown
Contributor Author

Note that this PR only adds the Type and applies it to one existing .../DerivedModelPerformance/CVRMSE element that has originally the inline 0-100 restriction. Other identified fields that should/could migrate to PercentType are listed below. It requires first resolving fraction-vs-percent values in examples and producer data (e.g. Audit Template) and is deferred to a major version as introducing breaking changes.

Candidate share-of-whole elements for a future (breaking) migration. Each is documented as a percentage of a bounded whole (area, floor area, length, time, consumption, savings), so values outside 0-100 are not meaningful. Example statistics are from all valid examples/*.xml; "Fractions" counts values strictly between 0 and 1.

Element Current type Target type Uses in examples Example range Fractions Fraction-to-percent fix needed?
PartialOperationPercentage decimal + Source PercentWithSourceAttribute 714 0 to 1 484 Yes: all values are fractions
PercentPremisesServed decimal + Source PercentWithSourceAttribute 38 0.05 to 1 6 Yes
PercentSkylightArea decimal + Source PercentWithSourceAttribute 50 0 to 0.0375 2 Yes
PercentResource decimal PercentType 13 1 0 Ambiguous: 1 probably means 100%
PercentEndUse decimal PercentType 13 1 0 Ambiguous: 1 probably means 100%
PipeLocation decimal + Source PercentWithSourceAttribute 4 1 0 Ambiguous
PercentOccupiedByOwner decimal + Source PercentWithSourceAttribute 6 20 to 78 0 No
PercentLeasedByOwner decimal + Source PercentWithSourceAttribute 6 15 to 80 0 No
SpatialUnitOccupiedPercentage decimal PercentType 1 90 0 No
PercentOfWindowAreaShaded decimal + Source PercentWithSourceAttribute 200 0 0 No
FloorAreaPercentage float [0, 100] PercentType 88 0 to 100 0 No; already bounded, change is float to decimal
PercentageOfCommonSpace decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
BoilerPercentCondensateReturn decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
DuctPressureTestLeakagePercentage decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
SupplyDuctPercentConditionedSpace decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
ReturnDuctPercentConditionedSpace decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
DutyCycle decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
PumpDutyCycle decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
MinimumOutsideAirPercentage decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
HumidityControlMinimum decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
HumidityControlMaximum decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
PercentGuaranteedSavings decimal + Source PercentWithSourceAttribute 0 - - Not used in examples
FederalSustainabilityChecklistCompletionPercentage decimal + Source PercentWithSourceAttribute 0 - - Not used in examples

Rates and ratios that can be negative or exceed 100 (EscalationRate and the price escalation rates, InflationRate, DiscountRate, DiscountFactor, InternalRateOfReturn, ProjectMarkup, DemandRatchetPercentage) are excluded.

No element names, paths, or enumerations change, so downstream repos (use-cases, BOSS, asset-extractor) are unaffected; bsyncpy gains two new types on regeneration.

@JieXiong9119
JieXiong9119 requested a review from kflemin October 28, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adding new functionality to BuildingSync Non-breaking Change Schema: General General update to BuildingSync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PercentType or Equivalent

1 participant