{
	"id": "profile-ca-ab-aer-directive-038",
	"name": "AER Directive 038: Noise Control, regulator profile",
	"description": "The rules of Alberta Energy Regulator Directive 038 (April 2024) as an ODS regulator profile. The Alberta Energy Regulator did not write this profile and has not endorsed it. The directive is the authority.",
	"odsVersion": "1.0.0-rc.2",
	"sharing": "open",
	"risk": {
		"frameworks": [
			{
				"id": "framework-d038",
				"name": "Directive 038: Noise Control",
				"description": "The noise control requirements for the operations and facilities that the Alberta Energy Regulator regulates.",
				"issuer": "stakeholder-aer",
				"jurisdiction": "jurisdiction-ca-ab",
				"edition": "April 2024",
				"effective": {
					"start": "2024-04-02T00:00:00-06:00"
				},
				"citation": {
					"title": "Directive 038: Noise Control",
					"text": "Alberta Energy Regulator (2024). Directive 038: Noise Control. Released and effective April 2, 2024.",
					"url": "https://static.aer.ca/prd/documents/directives/Directive038.pdf",
					"edition": "April 2024"
				},
				"policies": [
					{
						"id": "policy-noise-at-dwellings",
						"name": "Noise at dwellings",
						"description": "Outdoor noise from energy facilities at dwellings, so that indoor levels do not disturb normal sleep.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.4 and 1.5"
						},
						"type": "objective",
						"criteria": [
							{
								"id": "criterion-psl-night",
								"name": "Nighttime permissible sound level",
								"description": "The sound level judged at the dwelling for the nighttime is at most the nighttime permissible sound level. For an assessment before construction it is the cumulative level of the energy facilities plus the assumed ambient sound level. For a complaint it is the facility's isolated contribution, with the low frequency noise penalty when it applies.",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "2.1, 3.3, 3.4, 4.4 and 5.1, requirements 9, 13, 14, 18, 48"
								},
								"metric": "a_weighted_sound_pressure_level",
								"statistic": {
									"type": "energy_mean"
								},
								"averaging": "PT9H",
								"period": "period-night",
								"comparison": "less_or_equal",
								"limit": {
									"variable": "psl_night"
								},
								"appliesTo": {
									"receptorClasses": [
										"dwelling"
									]
								},
								"mode": "mandatory"
							},
							{
								"id": "criterion-psl-day",
								"name": "Daytime permissible sound level",
								"description": "The sound level judged at the dwelling for the daytime is at most the daytime permissible sound level. It is judged when day and night operations differ, or when a complaint is about the daytime.",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "2.1, 2.1.1.2 and 3.6, requirement 26"
								},
								"metric": "a_weighted_sound_pressure_level",
								"statistic": {
									"type": "energy_mean"
								},
								"averaging": "PT15H",
								"period": "period-day",
								"comparison": "less_or_equal",
								"limit": {
									"variable": "psl_day"
								},
								"appliesTo": {
									"receptorClasses": [
										"dwelling"
									]
								},
								"when": {
									"operation": "equal",
									"arguments": [
										{
											"variable": "day_required"
										},
										true
									]
								},
								"mode": "mandatory"
							},
							{
								"id": "criterion-remote-night",
								"name": "Nighttime level with no dwelling within 1.5 km",
								"description": "With no dwelling within 1.5 km of the facility fence line, the nighttime level 1.5 km from the fence line is at most 40 dB(A).",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "1.5 and 2.1, requirement 3"
								},
								"metric": "a_weighted_sound_pressure_level",
								"statistic": {
									"type": "energy_mean"
								},
								"averaging": "PT9H",
								"period": "period-night",
								"comparison": "less_or_equal",
								"limit": {
									"variable": "variable-remote-psl"
								},
								"when": {
									"operation": "equal",
									"arguments": [
										{
											"variable": "dwellings_within_remote_distance"
										},
										0
									]
								},
								"mode": "mandatory"
							},
							{
								"id": "criterion-no-net-increase",
								"name": "No net increase at a deferred facility",
								"description": "When a deferred facility is changed or expanded, and its existing noise level is above the calculated permissible sound level, the predicted cumulative level with the ambient sound level is over the permissible sound level by no more than 0.4 dB. This criterion then replaces the nighttime permissible sound level criterion. It does not apply where the regulator set the level.",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "2.2, 3.1 and appendix 1, no net increase, requirements 10, 14"
								},
								"metric": "a_weighted_sound_pressure_level",
								"statistic": {
									"type": "energy_mean"
								},
								"period": "period-night",
								"comparison": "less_or_equal",
								"limit": {
									"operation": "add",
									"arguments": [
										{
											"variable": "psl_night"
										},
										{
											"variable": "variable-net-increase-tolerance"
										}
									]
								},
								"appliesTo": {
									"receptorClasses": [
										"dwelling"
									]
								},
								"when": {
									"operation": "equal",
									"arguments": [
										{
											"variable": "deferred_facility"
										},
										true
									]
								},
								"mode": "mandatory"
							}
						]
					},
					{
						"id": "policy-valid-surveys",
						"name": "Valid surveys",
						"description": "A comprehensive sound level survey must hold enough acceptable data to be judged.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1"
						},
						"type": "objective",
						"criteria": [
							{
								"id": "criterion-valid-data-night",
								"name": "Acceptable nighttime data",
								"description": "The survey holds at least 3 hours of acceptable data for the nighttime, after isolation analysis.",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "4.1 and 4.3.2, requirements 34, 47"
								},
								"period": "period-night",
								"comparison": "greater_or_equal",
								"limit": {
									"variable": "variable-valid-hours"
								},
								"mode": "mandatory"
							},
							{
								"id": "criterion-valid-data-day",
								"name": "Acceptable daytime data",
								"description": "When the daytime is judged, the survey holds at least 3 hours of acceptable data for the daytime, after isolation analysis.",
								"citation": {
									"title": "Directive 038: Noise Control",
									"section": "4.1 and 4.3.2, requirements 34, 47"
								},
								"period": "period-day",
								"comparison": "greater_or_equal",
								"limit": {
									"variable": "variable-valid-hours"
								},
								"when": {
									"operation": "equal",
									"arguments": [
										{
											"variable": "day_required"
										},
										true
									]
								},
								"mode": "mandatory"
							}
						]
					}
				],
				"controls": [
					{
						"id": "control-complainant-communication",
						"name": "Communication during corrective action",
						"description": "The licensee is in communication with the complainant through all phases of corrective action.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.1, requirement 1"
						},
						"type": "oversight"
					},
					{
						"id": "control-dwelling-developers",
						"name": "Noise levels given to people who plan dwellings",
						"description": "The licensee tells landowners, residents and developers who propose a dwelling near a facility the existing noise levels, and keeps a record of what it told them.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.2, requirement 2"
						},
						"type": "audit"
					},
					{
						"id": "control-technical-verification",
						"name": "Technical verification of adjustments",
						"description": "Technical verification supports each adjustment to the basic sound level.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 4"
						},
						"type": "precondition"
					},
					{
						"id": "control-seasonal-approval",
						"name": "Approval of the seasonal adjustment",
						"description": "The seasonal adjustment (A1) is used only in the complaint process, with prior approval from the regulator. It is never used for design.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 5"
						},
						"type": "precondition"
					},
					{
						"id": "control-ambient-approval",
						"name": "Approval of the ambient monitoring adjustment",
						"description": "The regulator approves the use of an ambient monitoring adjustment (A2) before it is used. It applies only to a pristine area or an area with industry that is not energy-related.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 6"
						},
						"type": "precondition"
					},
					{
						"id": "control-ambient-survey",
						"name": "Ambient sound survey",
						"description": "The ambient sound level is measured with no energy-related industrial component, in a continuous survey 15 m from the dwelling under representative conditions.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 7"
						},
						"type": "precondition",
						"parameters": {
							"distance": {
								"amount": 15,
								"unit": "m"
							}
						}
					},
					{
						"id": "control-residents-informed",
						"name": "Residents informed of a temporary activity",
						"description": "Before a Class B adjustment is used, the licensee fully informs the residents who may be affected of the duration and the character of the noise.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, requirement 8"
						},
						"type": "precondition"
					},
					{
						"id": "control-nia-required",
						"name": "Noise impact assessment required",
						"description": "A noise impact assessment is done before the application for a new facility, and for a change to a facility that can be expected to change its noise sources.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.1 and 3.2, requirements 11, 15"
						},
						"type": "flow_governance"
					},
					{
						"id": "control-operating-conditions",
						"name": "Modelled under operating conditions",
						"description": "The facility is modelled under its operating conditions, such as doors and windows closed, and it then operates under them.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.1, requirement 12"
						},
						"type": "precondition"
					},
					{
						"id": "control-nia-kept",
						"name": "Assessment kept for audit",
						"description": "The applicant keeps the assessment for audit. When it shows noncompliance, the applicant considers further attenuation; when that is not practical, the assessment goes with the application, with the reasons.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.2, requirements 16, 17"
						},
						"type": "audit"
					},
					{
						"id": "control-engineering-practice",
						"name": "Acoustical engineering practice",
						"description": "Measurement and modelling follow appropriate acoustical engineering practice, and all documents are available for audit.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5, requirement 19"
						},
						"type": "audit"
					},
					{
						"id": "control-model-parameters",
						"name": "Effects the model includes",
						"description": "The model includes geometric spreading, barrier effects, atmospheric absorption, ground attenuation, and a specific wind speed and direction.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 20"
						},
						"type": "precondition",
						"parameters": {
							"effects": [
								"geometric spreading",
								"barrier effects",
								"atmospheric absorption",
								"ground attenuation",
								"specific wind speed and direction"
							]
						}
					},
					{
						"id": "control-model-conditions",
						"name": "Summertime conditions for the model",
						"description": "The model uses summertime conditions: a wind of 5.0 to 7.5 km/h from the facility to the receptor, a temperature of 0 to 25 degrees Celsius, a relative humidity of 70 to 90 per cent, and the topography and ground cover of the site.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 21"
						},
						"type": "precondition",
						"parameters": {
							"windSpeed": {
								"minimum": {
									"amount": 5,
									"unit": "km/h"
								},
								"maximum": {
									"amount": 7.5,
									"unit": "km/h"
								}
							},
							"windDirection": "From the facility to the receptor.",
							"airTemperature": {
								"minimum": {
									"amount": 0,
									"unit": "degC"
								},
								"maximum": {
									"amount": 25,
									"unit": "degC"
								}
							},
							"relativeHumidity": {
								"minimum": {
									"amount": 70,
									"unit": "%"
								},
								"maximum": {
									"amount": 90,
									"unit": "%"
								}
							}
						}
					},
					{
						"id": "control-model-standard",
						"name": "International standard for the model",
						"description": "The model uses an international standard: CONCAWE or ISO 9613.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 22"
						},
						"type": "flow_governance",
						"parameters": {
							"standards": [
								"CONCAWE",
								"ISO 9613"
							]
						}
					},
					{
						"id": "control-model-representative",
						"name": "Representative conditions for the model",
						"description": "The concerns of local residents set the conditions that are modelled. The model is field-calibrated when practical, predicts by frequency, and states the operating conditions as numbers.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 23"
						},
						"type": "precondition"
					},
					{
						"id": "control-nia-contents",
						"name": "Contents of the assessment",
						"description": "The assessment shows that the facility meets the directive. It holds the permissible sound level and how it was worked out, the sources and their sound levels, the operating conditions, the parameters of the model, the predicted cumulative level and the verdict, the attenuation measures, and the analyst.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6, requirements 24, 25"
						},
						"type": "audit"
					},
					{
						"id": "control-simplified-estimate",
						"name": "Conditions for the simplified estimate",
						"description": "A level from the estimate of 6 dB for each doubling of distance is used only under the conditions of appendix 2, and the assessment shows that they hold: one small stationary source, no other industry, flat ground and one near dwelling, or no dwelling within 1.5 km; and both distances at least five times the size of the source, or 50 m.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6 and appendix 2, requirement 26"
						},
						"type": "precondition",
						"parameters": {
							"minimumDistance": {
								"amount": 50,
								"unit": "m"
							}
						}
					},
					{
						"id": "control-complaint-resolution",
						"name": "Complaint resolution",
						"description": "The licensee makes every reasonable attempt to resolve a complaint in a timely manner. It first makes direct contact with the complainant, explains the directive, and sets out the process and the timelines it will follow.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4 and 4.1, requirements 27, 29"
						},
						"type": "oversight"
					},
					{
						"id": "control-drilling-complaint",
						"name": "Complaint about drilling or servicing",
						"description": "A complaint about a drilling or servicing activity is resolved before the activity ends.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4, requirement 28"
						},
						"type": "regulatory"
					},
					{
						"id": "control-investigation-form",
						"name": "Noise Complaint Investigation form",
						"description": "Before a survey, the licensee completes the Noise Complaint Investigation form to set the representative conditions. The complainant gets a copy and the survey report holds one. When the form or its event log is missing, the report says why and how the representative conditions were chosen.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirements 30, 32, 33"
						},
						"type": "precondition"
					},
					{
						"id": "control-survey-representative",
						"name": "Representative survey",
						"description": "The survey is continuous and covers a representative part of the time of day or night on days when the noise typically occurs.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1 and 4.4, requirements 31, 49"
						},
						"type": "precondition"
					},
					{
						"id": "control-measurement-position",
						"name": "Measurement position",
						"description": "The measurements are made 15 m from the complainant's dwelling in the direction of the source, unless that is physically impossible or acoustically illogical.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 35"
						},
						"type": "precondition",
						"parameters": {
							"distance": {
								"amount": 15,
								"unit": "m"
							}
						}
					},
					{
						"id": "control-deferred-survey-conditions",
						"name": "Survey conditions for a deferred facility",
						"description": "When the permissible sound level of a deferred facility came from a model, the survey is made under seasonal and meteorological conditions like those the model used.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 36"
						},
						"type": "precondition"
					},
					{
						"id": "control-lfn-measurement",
						"name": "Measurements for low frequency noise",
						"description": "When low frequency noise is possible, the C-weighted and A-weighted levels are measured at the same time, and the local wind is measured through the whole assessment period.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirements 37, 39"
						},
						"type": "precondition"
					},
					{
						"id": "control-weather",
						"name": "Weather during the survey",
						"description": "The survey data are taken in the conditions of table 4, applied with judgement. Gusts shorter than five minutes of up to 20 km/h may be acceptable.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.2, table 4, requirement 41"
						},
						"type": "precondition",
						"parameters": {
							"groundCover": "No snow, water or ice.",
							"precipitation": "No steady precipitation.",
							"windSpeedLimits": [
								{
									"distance": "Less than 500 m from the source",
									"upwind": {
										"amount": 10,
										"unit": "km/h"
									},
									"crosswind": {
										"amount": 15,
										"unit": "km/h"
									},
									"downwind": {
										"amount": 15,
										"unit": "km/h"
									}
								},
								{
									"distance": "500 m to 1000 m from the source",
									"upwind": {
										"amount": 5,
										"unit": "km/h"
									},
									"crosswind": {
										"amount": 10,
										"unit": "km/h"
									},
									"downwind": {
										"amount": 10,
										"unit": "km/h"
									}
								},
								{
									"distance": "More than 1000 m from the source",
									"upwind": {
										"amount": 5,
										"unit": "km/h"
									},
									"crosswind": {
										"amount": 10,
										"unit": "km/h"
									},
									"downwind": {
										"amount": 10,
										"unit": "km/h"
									}
								}
							],
							"gust": {
								"amount": 20,
								"unit": "km/h"
							},
							"gustDuration": "PT5M",
							"windHeight": {
								"minimum": {
									"amount": 1.2,
									"unit": "m"
								},
								"maximum": {
									"amount": 10,
									"unit": "m"
								}
							},
							"downwind": {
								"amount": 3,
								"unit": "h"
							}
						}
					},
					{
						"id": "control-winter-complaint",
						"name": "Wintertime complaint",
						"description": "For a wintertime complaint, the representative conditions are determined and the survey is made under those conditions or similar ones.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.2, requirement 42"
						},
						"type": "precondition"
					},
					{
						"id": "control-multiple-sources",
						"name": "Multiple noise sources",
						"description": "The investigation report states the method used to assess several sources or to isolate one, and explains the relative contribution of each source.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.3.1, requirements 43, 44"
						},
						"type": "audit"
					},
					{
						"id": "control-isolation",
						"name": "Isolation analysis",
						"description": "When the survey result is over the permissible sound level and the facility may not be the cause, an isolation analysis separates the facility's contribution. A recording, an operating log or an event log supports each removal of data.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.3.2, requirements 45, 46"
						},
						"type": "flow_governance"
					},
					{
						"id": "control-survey-report",
						"name": "Contents of the survey report",
						"description": "The survey report holds the completed form, the distance and direction of the dwelling, the calibration results, the weather and its source, the operating conditions, graphs of the levels and the isolation analysis, a summary table, and the low frequency noise analysis when it was done.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.4, requirement 50"
						},
						"type": "audit"
					},
					{
						"id": "control-instruments",
						"name": "Instruments",
						"description": "Sound level meters measure the energy equivalent sound level and meet Class 1 of IEC 61672. Filters for one-third octave bands meet Class 1 of IEC 61260 or ANSI S1.11. Each instrument works within its maker's specifications.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.5.1 and 4.5.2, requirements 51, 52, 56"
						},
						"type": "precondition",
						"parameters": {
							"class": "1",
							"standards": [
								"IEC 61672",
								"IEC 61260",
								"ANSI S1.11",
								"ANSI S1.4"
							]
						}
					},
					{
						"id": "control-calibration",
						"name": "Calibration",
						"description": "The calibrator is recertified each year. The meter is calibrated by a laboratory within the two years before the measurement, and in the field just before and just after it with the same calibrator. A meter that reads more than 1 dB off in a field check is reviewed, and corrupt data are not used.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.5.1.1 and 4.5.1.2, requirements 53, 54, 55"
						},
						"type": "precondition",
						"parameters": {
							"calibratorInterval": "P1Y",
							"meterInterval": "P2Y",
							"tolerance": {
								"amount": 1,
								"unit": "dB"
							}
						}
					},
					{
						"id": "control-noise-management-plan",
						"name": "Noise management plan",
						"description": "A noise management plan names the noise sources, assesses the mitigation in place, states how well the noise controls perform and how noise is measured, and has best practice and continuous improvement programs. Everyone affected is consulted and their input is in the plan.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.2, requirements 57, 58"
						},
						"type": "oversight"
					}
				],
				"periods": [
					{
						"id": "period-night",
						"name": "Nighttime",
						"description": "The hours from 10:00 p.m. to 7:00 a.m.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "appendix 1, nighttime"
						},
						"timeZone": "America/Edmonton",
						"windows": [
							{
								"start": "22:00",
								"end": "07:00"
							}
						]
					},
					{
						"id": "period-day",
						"name": "Daytime",
						"description": "The hours from 7:00 a.m. to 10:00 p.m.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "appendix 1, daytime"
						},
						"timeZone": "America/Edmonton",
						"windows": [
							{
								"start": "07:00",
								"end": "22:00"
							}
						]
					}
				],
				"variables": [
					{
						"id": "variable-average-rural-ambient",
						"name": "Average rural ambient sound level at night",
						"description": "The average ambient sound level at night in rural Alberta.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1"
						},
						"value": {
							"amount": 35,
							"unit": "dB"
						}
					},
					{
						"id": "variable-ambient-allowance",
						"name": "Allowance above the ambient sound level",
						"description": "The basic sound level is this much above the ambient sound level.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1 and 3.3"
						},
						"value": {
							"amount": 5,
							"unit": "dB"
						}
					},
					{
						"id": "variable-base-bsl",
						"name": "Basic sound level for nighttime, category 1, 1 to 8 dwellings",
						"description": "The lowest basic sound level: the average rural ambient sound level plus the allowance.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"value": {
							"amount": 40,
							"unit": "dB"
						}
					},
					{
						"id": "variable-density-9-160",
						"name": "Density adjustment, 9 to 160 dwellings",
						"description": "Added to the basic sound level for 9 to 160 dwellings in the quarter section.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"value": {
							"amount": 3,
							"unit": "dB"
						}
					},
					{
						"id": "variable-density-over-160",
						"name": "Density adjustment, more than 160 dwellings",
						"description": "Added to the basic sound level for more than 160 dwellings in the quarter section.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"value": {
							"amount": 6,
							"unit": "dB"
						}
					},
					{
						"id": "variable-transport-category-2",
						"name": "Transportation adjustment, category 2",
						"description": "Added to the basic sound level for a dwelling in category 2.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"value": {
							"amount": 5,
							"unit": "dB"
						}
					},
					{
						"id": "variable-transport-category-3",
						"name": "Transportation adjustment, category 3",
						"description": "Added to the basic sound level for a dwelling in category 3.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"value": {
							"amount": 10,
							"unit": "dB"
						}
					},
					{
						"id": "variable-category-3-distance",
						"name": "Category 3 distance",
						"description": "A dwelling closer than this to a heavily travelled road or a rail line is in category 3.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1 notes"
						},
						"value": {
							"amount": 30,
							"unit": "m"
						}
					},
					{
						"id": "variable-category-2-distance",
						"name": "Category 2 distance",
						"description": "A dwelling closer than this to a heavily travelled road or a rail line, and not in category 3, is in category 2.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1 notes"
						},
						"value": {
							"amount": 500,
							"unit": "m"
						}
					},
					{
						"id": "variable-density-radius",
						"name": "Radius of the quarter section",
						"description": "The dwellings are counted in a quarter section with the dwelling at its centre: a circle of this radius.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1 notes"
						},
						"value": {
							"amount": 451,
							"unit": "m"
						}
					},
					{
						"id": "variable-daytime-adjustment",
						"name": "Daytime adjustment",
						"description": "The daytime basic sound level is this much above the nighttime one.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.2 and appendix 4, problem 1, step 9"
						},
						"value": {
							"amount": 10,
							"unit": "dB"
						}
					},
					{
						"id": "variable-seasonal-maximum",
						"name": "Largest seasonal adjustment (A1)",
						"description": "The seasonal adjustment is from 0 to this amount.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2"
						},
						"value": {
							"amount": 5,
							"unit": "dB"
						}
					},
					{
						"id": "variable-ambient-adjustment-maximum",
						"name": "Largest ambient monitoring adjustment (A2)",
						"description": "The ambient monitoring adjustment is from minus this amount to plus this amount.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2 and figure 1"
						},
						"value": {
							"amount": 10,
							"unit": "dB"
						}
					},
					{
						"id": "variable-class-a-maximum",
						"name": "Largest Class A adjustment",
						"description": "The sum of A1 and A2 is at most this amount.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2 note"
						},
						"value": {
							"amount": 10,
							"unit": "dB"
						}
					},
					{
						"id": "variable-class-b1",
						"name": "Class B1 adjustment",
						"description": "For an activity that lasts 1 day.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, table 3"
						},
						"value": {
							"amount": 15,
							"unit": "dB"
						}
					},
					{
						"id": "variable-class-b2",
						"name": "Class B2 adjustment",
						"description": "For an activity that lasts 7 days.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, table 3"
						},
						"value": {
							"amount": 10,
							"unit": "dB"
						}
					},
					{
						"id": "variable-class-b3",
						"name": "Class B3 adjustment",
						"description": "For an activity that lasts 60 days or less.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, table 3"
						},
						"value": {
							"amount": 5,
							"unit": "dB"
						}
					},
					{
						"id": "variable-temporary-duration",
						"name": "Longest temporary activity",
						"description": "An activity that lasts longer than this is not temporary and has no Class B adjustment.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, table 3"
						},
						"value": {
							"amount": 60,
							"unit": "d"
						}
					},
					{
						"id": "variable-remote-psl",
						"name": "Permissible sound level with no dwelling within 1.5 km",
						"description": "The nighttime level a facility must meet at the remote distance from its fence line when no dwelling is closer.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"value": {
							"amount": 40,
							"unit": "dB"
						}
					},
					{
						"id": "variable-remote-distance",
						"name": "Remote distance",
						"description": "With no dwelling within this distance of the facility fence line, the level is judged at this distance.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"value": {
							"amount": 1.5,
							"unit": "km"
						}
					},
					{
						"id": "variable-net-increase-tolerance",
						"name": "No net increase tolerance",
						"description": "A predicted sum that is over the permissible sound level by no more than this amount is no net increase.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "appendix 1, no net increase"
						},
						"value": {
							"amount": 0.4,
							"unit": "dB"
						}
					},
					{
						"id": "variable-lfn-difference",
						"name": "Low frequency noise difference",
						"description": "A C-weighted level this much above the A-weighted level, with a tone, is low frequency noise.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1"
						},
						"value": {
							"amount": 20,
							"unit": "dB"
						}
					},
					{
						"id": "variable-lfn-frequency",
						"name": "Low frequency noise tone limit",
						"description": "The tone is in a one-third octave band at or below this frequency.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1.1"
						},
						"value": {
							"amount": 250,
							"unit": "Hz"
						}
					},
					{
						"id": "variable-lfn-penalty",
						"name": "Low frequency noise penalty",
						"description": "Added to the comprehensive sound level when low frequency noise is confirmed.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirement 38"
						},
						"value": {
							"amount": 5,
							"unit": "dB"
						}
					},
					{
						"id": "variable-valid-hours",
						"name": "Least acceptable survey data",
						"description": "The least time of acceptable data, after isolation analysis, for each period of a survey.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 34"
						},
						"value": {
							"amount": 3,
							"unit": "h"
						}
					},
					{
						"id": "variable-measurement-distance",
						"name": "Measurement distance from the dwelling",
						"description": "Sound levels are measured, and the permissible sound level applies, this far from the dwelling towards the source.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 35"
						},
						"value": {
							"amount": 15,
							"unit": "m"
						}
					}
				]
			}
		],
		"profiles": [
			{
				"id": "profile-d038",
				"name": "AER Directive 038: Noise Control",
				"description": "How to work out the permissible sound level of Directive 038 and judge a facility against it, before construction and after a complaint.",
				"identifiers": [
					{
						"scheme": "ods.profile",
						"value": "ca.ab.aer.directive_038"
					}
				],
				"version": "0.1.0",
				"status": "draft",
				"publisher": "stakeholder-ods",
				"framework": "framework-d038",
				"flows": [
					"flow-d038-nia",
					"flow-d038-complaint"
				],
				"scope": "Noise from facilities that the Alberta Energy Regulator regulates, judged at one dwelling for each run, or 1.5 km from the fence line when no dwelling is closer. The profile works out the permissible sound level (section 2), judges a noise impact assessment (section 3) and judges a complaint from a comprehensive sound level survey (sections 4 and 5). It states each numbered requirement of the directive as a criterion, a control or a step. For a special case or a special area it uses the level that the regulator set, when the run gives one. It leaves out wintertime conditions set with the regulator, construction noise, heavy truck traffic and vibration, and it does not judge a noise management plan. The sound levels it judges come from outside the profile: a model or a survey that meets its controls.",
				"assumptions": [
					"assumption-category-boundaries",
					"assumption-class-b-durations",
					"assumption-existing-level",
					"assumption-remote-day",
					"assumption-compare-one-decimal",
					"assumption-net-increase",
					"assumption-lfn-difference",
					"assumption-tone-levels",
					"assumption-valid-hours",
					"assumption-set-level"
				]
			}
		]
	},
	"context": {
		"stakeholders": [
			{
				"id": "stakeholder-aer",
				"name": "Alberta Energy Regulator",
				"type": "organization"
			},
			{
				"id": "stakeholder-ods",
				"name": "Open Development Standards",
				"type": "organization"
			}
		],
		"jurisdictions": [
			{
				"id": "jurisdiction-ca",
				"name": "Canada",
				"type": "country",
				"identifiers": [
					{
						"scheme": "iso_3166_1",
						"value": "CA"
					}
				]
			},
			{
				"id": "jurisdiction-ca-ab",
				"name": "Alberta",
				"type": "province",
				"parent": "jurisdiction-ca",
				"identifiers": [
					{
						"scheme": "iso_3166_2",
						"value": "CA-AB"
					}
				]
			}
		]
	},
	"methodology": {
		"algorithms": [
			{
				"id": "algorithm-d038-tone",
				"name": "Directive 038 low frequency tonal test",
				"description": "A one-third octave band at or below 250 Hz holds a tone when its level is 10 dB or more above a band within two bands on one side, drops by 5 dB or more within two bands on the other side, and is a pronounced peak in the spectrum.",
				"type": "calculation",
				"publisher": "stakeholder-aer",
				"standard": {
					"title": "Directive 038: Noise Control",
					"section": "4.1.1.1 and appendix 3",
					"edition": "April 2024"
				}
			}
		],
		"flows": [
			{
				"id": "flow-d038-nia",
				"name": "Noise impact assessment",
				"description": "Judges the predicted noise of a proposed facility, or of a change to a facility, at one dwelling before construction. Run it once for the nearest dwelling and once for each dwelling that may be more affected.",
				"version": "0.1.0",
				"frameworks": [
					"framework-d038"
				],
				"steps": [
					{
						"id": "nia-start",
						"type": "entrypoint"
					},
					{
						"id": "nia-purpose",
						"name": "Not a complaint",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.1, requirement 11"
						},
						"type": "calculation",
						"expression": false,
						"outputs": [
							{
								"name": "complaint",
								"description": "True when the run investigates a complaint.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-operating-conditions",
						"name": "Modelled under operating conditions",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.1, requirement 12"
						},
						"type": "control",
						"control": "control-operating-conditions",
						"outputs": [
							{
								"name": "operating_conditions_modelled",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-model-parameters",
						"name": "Effects the model includes",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 20"
						},
						"type": "control",
						"control": "control-model-parameters",
						"outputs": [
							{
								"name": "model_parameters_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-model-conditions",
						"name": "Summertime conditions for the model",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 21"
						},
						"type": "control",
						"control": "control-model-conditions",
						"outputs": [
							{
								"name": "model_conditions_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-model-standard",
						"name": "International standard for the model",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 22"
						},
						"type": "control",
						"control": "control-model-standard",
						"outputs": [
							{
								"name": "model_standard_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-model-representative",
						"name": "Representative conditions for the model",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5.1, requirement 23"
						},
						"type": "control",
						"control": "control-model-representative",
						"outputs": [
							{
								"name": "model_representative_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-psl",
						"name": "Permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "flow",
						"flow": "flow-d038-psl",
						"outputs": [
							{
								"name": "psl_outcome",
								"description": "The outcome of the permissible sound level flow.",
								"valueType": "string"
							}
						]
					},
					{
						"id": "nia-psl-check",
						"name": "Does a level apply?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "decision"
					},
					{
						"id": "nia-levels-night",
						"name": "Predicted nighttime levels",
						"description": "The levels come from a model that meets the controls of section 3.5.1, or from the estimate of appendix 2 under its conditions.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3, 3.4 and 3.6, requirement 18"
						},
						"type": "context",
						"outputs": [
							{
								"name": "facility_level_night",
								"description": "The predicted nighttime level of the facility at the dwelling, or 1.5 km from the fence line when no dwelling is closer.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "other_facility_levels_night",
								"description": "The nighttime level at the same place of each other energy facility, existing or approved. An empty list when there is none.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "list"
							}
						]
					},
					{
						"id": "nia-cumulative-night",
						"name": "Cumulative nighttime level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.4 and appendix 1, cumulative noise level, requirement 18"
						},
						"type": "calculation",
						"expression": {
							"operation": "energy_sum",
							"arguments": [
								{
									"variable": "facility_level_night"
								},
								{
									"variable": "other_facility_levels_night"
								}
							]
						},
						"outputs": [
							{
								"name": "cumulative_level_night",
								"description": "The nighttime level of all energy facilities together.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-ambient-night",
						"name": "Assumed nighttime ambient sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3"
						},
						"type": "calculation",
						"expression": {
							"operation": "subtract",
							"arguments": [
								{
									"variable": "bsl_night"
								},
								{
									"variable": "variable-ambient-allowance"
								}
							]
						},
						"outputs": [
							{
								"name": "assumed_ambient_night",
								"description": "The average rural ambient sound level for the dwelling's basic sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-assessed-night",
						"name": "Nighttime level to judge",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3 and appendix 4, problem 2"
						},
						"type": "calculation",
						"expression": {
							"operation": "round",
							"arguments": [
								{
									"operation": "energy_sum",
									"arguments": [
										{
											"variable": "cumulative_level_night"
										},
										{
											"variable": "assumed_ambient_night"
										}
									]
								},
								1
							]
						},
						"outputs": [
							{
								"name": "assessed_level_night",
								"description": "The cumulative level plus the assumed ambient sound level, to one decimal.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-judge-night",
						"name": "Compare with the nighttime permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3 and 3.4, requirement 18"
						},
						"type": "decision",
						"criterion": "criterion-psl-night",
						"inputs": [
							{
								"name": "assessed_level_night",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_night",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-judge-remote",
						"name": "Compare with the level at 1.5 km",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"type": "decision",
						"criterion": "criterion-remote-night",
						"inputs": [
							{
								"name": "assessed_level_night",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_night",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-judge-net-increase",
						"name": "No net increase",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.2 and 3.1, requirements 10, 14"
						},
						"type": "decision",
						"criterion": "criterion-no-net-increase",
						"inputs": [
							{
								"name": "assessed_level_night",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_night",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-compliant-night",
						"name": "Result so far",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3"
						},
						"type": "calculation",
						"expression": {
							"variable": "meets_psl_night"
						},
						"outputs": [
							{
								"name": "compliant",
								"description": "True while every criterion judged is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-day-check",
						"name": "Daytime judged",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6, requirement 26"
						},
						"type": "question",
						"label": "Do the day and night operations differ?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "day_required",
								"valueType": "boolean"
							}
						],
						"description": "Normally only the nighttime level is needed. When day and night operations differ, both are worked out."
					},
					{
						"id": "nia-levels-day",
						"name": "Predicted daytime levels",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6, requirement 26"
						},
						"type": "context",
						"outputs": [
							{
								"name": "facility_level_day",
								"description": "The predicted daytime level of the facility at the dwelling.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "other_facility_levels_day",
								"description": "The daytime level at the dwelling of each other energy facility, existing or approved. An empty list when there is none.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "list"
							}
						]
					},
					{
						"id": "nia-cumulative-day",
						"name": "Cumulative daytime level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.4, requirement 18"
						},
						"type": "calculation",
						"expression": {
							"operation": "energy_sum",
							"arguments": [
								{
									"variable": "facility_level_day"
								},
								{
									"variable": "other_facility_levels_day"
								}
							]
						},
						"outputs": [
							{
								"name": "cumulative_level_day",
								"description": "The daytime level of all energy facilities together.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-ambient-day",
						"name": "Assumed daytime ambient sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3 and 2.1.1.2"
						},
						"type": "calculation",
						"expression": {
							"operation": "subtract",
							"arguments": [
								{
									"variable": "bsl_day"
								},
								{
									"variable": "variable-ambient-allowance"
								}
							]
						},
						"outputs": [
							{
								"name": "assumed_ambient_day",
								"description": "The assumed daytime ambient sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-assessed-day",
						"name": "Daytime level to judge",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3"
						},
						"type": "calculation",
						"expression": {
							"operation": "round",
							"arguments": [
								{
									"operation": "energy_sum",
									"arguments": [
										{
											"variable": "cumulative_level_day"
										},
										{
											"variable": "assumed_ambient_day"
										}
									]
								},
								1
							]
						},
						"outputs": [
							{
								"name": "assessed_level_day",
								"description": "The cumulative level plus the assumed ambient sound level, to one decimal.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "nia-judge-day",
						"name": "Compare with the daytime permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.3 and 3.6, requirement 26"
						},
						"type": "decision",
						"criterion": "criterion-psl-day",
						"inputs": [
							{
								"name": "assessed_level_day",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_day",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-compliant-day",
						"name": "Result so far",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6, requirement 26"
						},
						"type": "calculation",
						"expression": {
							"operation": "and",
							"arguments": [
								{
									"variable": "compliant"
								},
								{
									"variable": "meets_psl_day"
								}
							]
						},
						"outputs": [
							{
								"name": "compliant",
								"description": "True while every criterion judged is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "nia-result",
						"name": "Is every criterion met?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6, requirement 26"
						},
						"type": "decision"
					},
					{
						"id": "nia-compliant",
						"name": "The assessment indicates compliance",
						"description": "The applicant keeps the assessment for audit.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.2, requirement 16"
						},
						"type": "outcome"
					},
					{
						"id": "nia-noncompliant",
						"name": "The assessment indicates noncompliance",
						"description": "The applicant considers further attenuation. When that is not practical, the assessment goes with the application, with the reasons.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.2, requirement 17"
						},
						"type": "outcome"
					},
					{
						"id": "nia-not-judged",
						"name": "Not judged",
						"description": "No permissible sound level applies, or the regulator reviews it, so this profile does not judge the facility.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1 and 2.1.3"
						},
						"type": "outcome"
					}
				],
				"edges": [
					{
						"id": "edge-nia-start",
						"from": "nia-start",
						"to": "nia-purpose"
					},
					{
						"id": "edge-nia-purpose",
						"from": "nia-purpose",
						"to": "nia-operating-conditions"
					},
					{
						"id": "edge-nia-operating-conditions",
						"from": "nia-operating-conditions",
						"to": "nia-model-parameters"
					},
					{
						"id": "edge-nia-model-parameters",
						"from": "nia-model-parameters",
						"to": "nia-model-conditions"
					},
					{
						"id": "edge-nia-model-conditions",
						"from": "nia-model-conditions",
						"to": "nia-model-standard"
					},
					{
						"id": "edge-nia-model-standard",
						"from": "nia-model-standard",
						"to": "nia-model-representative"
					},
					{
						"id": "edge-nia-model-representative",
						"from": "nia-model-representative",
						"to": "nia-psl"
					},
					{
						"id": "edge-nia-psl",
						"from": "nia-psl",
						"to": "nia-psl-check"
					},
					{
						"id": "edge-nia-psl-check-1",
						"from": "nia-psl-check",
						"to": "nia-levels-night",
						"when": {
							"operation": "or",
							"arguments": [
								{
									"operation": "equal",
									"arguments": [
										{
											"variable": "psl_outcome"
										},
										"psl-determined"
									]
								},
								{
									"operation": "equal",
									"arguments": [
										{
											"variable": "psl_outcome"
										},
										"psl-remote-determined"
									]
								}
							]
						},
						"label": "A level applies"
					},
					{
						"id": "edge-nia-psl-check-2",
						"from": "nia-psl-check",
						"to": "nia-not-judged"
					},
					{
						"id": "edge-nia-levels-night",
						"from": "nia-levels-night",
						"to": "nia-cumulative-night"
					},
					{
						"id": "edge-nia-cumulative-night",
						"from": "nia-cumulative-night",
						"to": "nia-ambient-night"
					},
					{
						"id": "edge-nia-ambient-night",
						"from": "nia-ambient-night",
						"to": "nia-assessed-night"
					},
					{
						"id": "edge-nia-assessed-night-1",
						"from": "nia-assessed-night",
						"to": "nia-judge-remote",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "psl_outcome"
								},
								"psl-remote-determined"
							]
						},
						"label": "No dwelling within 1.5 km"
					},
					{
						"id": "edge-nia-assessed-night-2",
						"from": "nia-assessed-night",
						"to": "nia-judge-net-increase",
						"when": {
							"operation": "and",
							"arguments": [
								{
									"operation": "equal",
									"arguments": [
										{
											"variable": "deferred_facility"
										},
										true
									]
								},
								{
									"operation": "not_equal",
									"arguments": [
										{
											"variable": "existing_level_night"
										},
										null
									]
								},
								{
									"operation": "greater",
									"arguments": [
										{
											"variable": "existing_level_night"
										},
										{
											"variable": "calculated_psl_night"
										}
									]
								},
								{
									"operation": "not",
									"arguments": [
										{
											"operation": "and",
											"arguments": [
												{
													"operation": "equal",
													"arguments": [
														{
															"variable": "special_area"
														},
														true
													]
												},
												{
													"operation": "not_equal",
													"arguments": [
														{
															"variable": "reviewed_level_night"
														},
														null
													]
												}
											]
										}
									]
								}
							]
						},
						"label": "Deferred facility above the calculated level"
					},
					{
						"id": "edge-nia-assessed-night-3",
						"from": "nia-assessed-night",
						"to": "nia-judge-night"
					},
					{
						"id": "edge-nia-judge-night",
						"from": "nia-judge-night",
						"to": "nia-compliant-night"
					},
					{
						"id": "edge-nia-judge-remote",
						"from": "nia-judge-remote",
						"to": "nia-compliant-night"
					},
					{
						"id": "edge-nia-judge-net-increase",
						"from": "nia-judge-net-increase",
						"to": "nia-compliant-night"
					},
					{
						"id": "edge-nia-compliant-night-1",
						"from": "nia-compliant-night",
						"to": "nia-result",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "psl_outcome"
								},
								"psl-remote-determined"
							]
						},
						"label": "No dwelling within 1.5 km"
					},
					{
						"id": "edge-nia-compliant-night-2",
						"from": "nia-compliant-night",
						"to": "nia-day-check"
					},
					{
						"id": "edge-nia-day-check-1",
						"from": "nia-day-check",
						"to": "nia-levels-day",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "day_required"
								},
								true
							]
						},
						"label": "They differ"
					},
					{
						"id": "edge-nia-day-check-2",
						"from": "nia-day-check",
						"to": "nia-result"
					},
					{
						"id": "edge-nia-levels-day",
						"from": "nia-levels-day",
						"to": "nia-cumulative-day"
					},
					{
						"id": "edge-nia-cumulative-day",
						"from": "nia-cumulative-day",
						"to": "nia-ambient-day"
					},
					{
						"id": "edge-nia-ambient-day",
						"from": "nia-ambient-day",
						"to": "nia-assessed-day"
					},
					{
						"id": "edge-nia-assessed-day",
						"from": "nia-assessed-day",
						"to": "nia-judge-day"
					},
					{
						"id": "edge-nia-judge-day",
						"from": "nia-judge-day",
						"to": "nia-compliant-day"
					},
					{
						"id": "edge-nia-compliant-day",
						"from": "nia-compliant-day",
						"to": "nia-result"
					},
					{
						"id": "edge-nia-result-1",
						"from": "nia-result",
						"to": "nia-compliant",
						"when": {
							"variable": "compliant"
						},
						"label": "Compliant"
					},
					{
						"id": "edge-nia-result-2",
						"from": "nia-result",
						"to": "nia-noncompliant",
						"label": "Not compliant"
					}
				]
			},
			{
				"id": "flow-d038-complaint",
				"name": "Noise complaint investigation",
				"description": "Judges a facility against a valid noise complaint at one dwelling, from a comprehensive sound level survey.",
				"version": "0.1.0",
				"frameworks": [
					"framework-d038"
				],
				"steps": [
					{
						"id": "complaint-start",
						"type": "entrypoint"
					},
					{
						"id": "complaint-purpose",
						"name": "A complaint",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4"
						},
						"type": "calculation",
						"expression": true,
						"outputs": [
							{
								"name": "complaint",
								"description": "True when the run investigates a complaint.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-plan",
						"name": "Noise management plan approved",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1"
						},
						"type": "question",
						"label": "Has the regulator agreed that a survey is not practical and approved a noise management plan?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "plan_approved",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-resolution",
						"name": "Complaint resolution",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4 and 4.1, requirements 27, 29"
						},
						"type": "control",
						"control": "control-complaint-resolution",
						"outputs": [
							{
								"name": "complainant_contacted",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-form",
						"name": "Noise Complaint Investigation form",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirements 30, 32, 33"
						},
						"type": "control",
						"control": "control-investigation-form",
						"outputs": [
							{
								"name": "form_completed",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-representative",
						"name": "Representative survey",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1 and 4.4, requirements 31, 49"
						},
						"type": "control",
						"control": "control-survey-representative",
						"outputs": [
							{
								"name": "survey_representative",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-position",
						"name": "Measurement position",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 35"
						},
						"type": "control",
						"control": "control-measurement-position",
						"outputs": [
							{
								"name": "position_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-instruments",
						"name": "Instruments",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.5.1 and 4.5.2, requirements 51, 52, 56"
						},
						"type": "control",
						"control": "control-instruments",
						"outputs": [
							{
								"name": "instruments_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-calibration",
						"name": "Calibration",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.5.1.1 and 4.5.1.2, requirements 53, 54, 55"
						},
						"type": "control",
						"control": "control-calibration",
						"outputs": [
							{
								"name": "calibration_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-weather",
						"name": "Weather during the survey",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.2, table 4, requirement 41"
						},
						"type": "control",
						"control": "control-weather",
						"outputs": [
							{
								"name": "weather_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-psl",
						"name": "Permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "flow",
						"flow": "flow-d038-psl",
						"outputs": [
							{
								"name": "psl_outcome",
								"description": "The outcome of the permissible sound level flow.",
								"valueType": "string"
							}
						]
					},
					{
						"id": "complaint-psl-check",
						"name": "Does a level apply at the dwelling?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "decision"
					},
					{
						"id": "complaint-hours-night",
						"name": "Acceptable nighttime data",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 34"
						},
						"type": "context",
						"outputs": [
							{
								"name": "valid_hours_night",
								"description": "The acceptable nighttime data after isolation analysis.",
								"unit": "h",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-judge-hours-night",
						"name": "Is there enough nighttime data?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1 and 4.3.2, requirements 34, 47"
						},
						"type": "decision",
						"criterion": "criterion-valid-data-night",
						"inputs": [
							{
								"name": "valid_hours_night",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "valid_night",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-levels-night",
						"name": "Isolated nighttime levels",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.2 and 4.4, requirement 48"
						},
						"type": "context",
						"outputs": [
							{
								"name": "isolated_levels_night",
								"description": "The facility's isolated nighttime contribution for each day of the survey that is representative.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "list"
							}
						]
					},
					{
						"id": "complaint-csl-night",
						"name": "Nighttime comprehensive sound level",
						"description": "When several days are representative, the worst case is judged.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.2, requirement 40"
						},
						"type": "calculation",
						"expression": {
							"operation": "maximum",
							"arguments": [
								{
									"variable": "isolated_levels_night"
								}
							]
						},
						"outputs": [
							{
								"name": "csl_night",
								"description": "The highest representative nighttime level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-lfn",
						"name": "Low frequency noise possible",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1"
						},
						"type": "question",
						"label": "Is low frequency noise possible?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "lfn_potential",
								"valueType": "boolean"
							}
						],
						"description": "The Noise Complaint Investigation form helps to show whether low frequency noise is possible."
					},
					{
						"id": "complaint-lfn-data-night",
						"name": "C-weighted less A-weighted level, nighttime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirement 37"
						},
						"type": "context",
						"outputs": [
							{
								"name": "c_minus_a_night",
								"description": "The isolated time-weighted average C-weighted level less the A-weighted level for the nighttime.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-tone-night",
						"name": "Low frequency tonal component, nighttime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1.1 and appendix 3"
						},
						"type": "algorithm",
						"algorithm": "algorithm-d038-tone",
						"inputs": [
							{
								"name": "spectrum_night",
								"description": "The one-third octave band levels from 20 Hz to 250 Hz and the two bands above.",
								"unit": "dB",
								"valueType": "list"
							}
						],
						"outputs": [
							{
								"name": "tonal_component_night",
								"description": "True when a band at or below 250 Hz holds a tone.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-lfn-penalty-night",
						"name": "Low frequency noise penalty, nighttime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirement 38"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "greater_or_equal",
											"arguments": [
												{
													"variable": "c_minus_a_night"
												},
												{
													"variable": "variable-lfn-difference"
												}
											]
										},
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "tonal_component_night"
												},
												true
											]
										}
									]
								},
								{
									"variable": "variable-lfn-penalty"
								},
								0
							]
						},
						"outputs": [
							{
								"name": "lfn_penalty_night",
								"description": "The penalty added to the comprehensive sound level.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-no-lfn-night",
						"name": "No low frequency noise penalty, nighttime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1"
						},
						"type": "calculation",
						"expression": 0,
						"outputs": [
							{
								"name": "lfn_penalty_night",
								"description": "The penalty added to the comprehensive sound level.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-assessed-night",
						"name": "Nighttime level to judge",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1 and 5.1, requirement 38"
						},
						"type": "calculation",
						"expression": {
							"operation": "round",
							"arguments": [
								{
									"operation": "add",
									"arguments": [
										{
											"variable": "csl_night"
										},
										{
											"variable": "lfn_penalty_night"
										}
									]
								},
								1
							]
						},
						"outputs": [
							{
								"name": "assessed_level_night",
								"description": "The comprehensive sound level plus the penalty, to one decimal.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-judge-night",
						"name": "Compare with the nighttime permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.4 and 5.1, requirement 48"
						},
						"type": "decision",
						"criterion": "criterion-psl-night",
						"inputs": [
							{
								"name": "assessed_level_night",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_night",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-compliant-night",
						"name": "Result so far",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1"
						},
						"type": "calculation",
						"expression": {
							"variable": "meets_psl_night"
						},
						"outputs": [
							{
								"name": "compliant",
								"description": "True while every criterion judged is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-day-check",
						"name": "Daytime judged",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 34"
						},
						"type": "question",
						"label": "Is the daytime part of the complaint?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "day_required",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-hours-day",
						"name": "Acceptable daytime data",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1, requirement 34"
						},
						"type": "context",
						"outputs": [
							{
								"name": "valid_hours_day",
								"description": "The acceptable daytime data after isolation analysis.",
								"unit": "h",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-judge-hours-day",
						"name": "Is there enough daytime data?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1 and 4.3.2, requirements 34, 47"
						},
						"type": "decision",
						"criterion": "criterion-valid-data-day",
						"inputs": [
							{
								"name": "valid_hours_day",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "valid_day",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-levels-day",
						"name": "Isolated daytime levels",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.2 and 4.4, requirement 48"
						},
						"type": "context",
						"outputs": [
							{
								"name": "isolated_levels_day",
								"description": "The facility's isolated daytime contribution for each day of the survey that is representative.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "list"
							}
						]
					},
					{
						"id": "complaint-csl-day",
						"name": "Daytime comprehensive sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.2, requirement 40"
						},
						"type": "calculation",
						"expression": {
							"operation": "maximum",
							"arguments": [
								{
									"variable": "isolated_levels_day"
								}
							]
						},
						"outputs": [
							{
								"name": "csl_day",
								"description": "The highest representative daytime level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-lfn-data-day",
						"name": "C-weighted less A-weighted level, daytime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirement 37"
						},
						"type": "context",
						"outputs": [
							{
								"name": "c_minus_a_day",
								"description": "The isolated time-weighted average C-weighted level less the A-weighted level for the daytime.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-tone-day",
						"name": "Low frequency tonal component, daytime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1.1 and appendix 3"
						},
						"type": "algorithm",
						"algorithm": "algorithm-d038-tone",
						"inputs": [
							{
								"name": "spectrum_day",
								"description": "The one-third octave band levels from 20 Hz to 250 Hz and the two bands above.",
								"unit": "dB",
								"valueType": "list"
							}
						],
						"outputs": [
							{
								"name": "tonal_component_day",
								"description": "True when a band at or below 250 Hz holds a tone.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-lfn-penalty-day",
						"name": "Low frequency noise penalty, daytime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1, requirement 38"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "greater_or_equal",
											"arguments": [
												{
													"variable": "c_minus_a_day"
												},
												{
													"variable": "variable-lfn-difference"
												}
											]
										},
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "tonal_component_day"
												},
												true
											]
										}
									]
								},
								{
									"variable": "variable-lfn-penalty"
								},
								0
							]
						},
						"outputs": [
							{
								"name": "lfn_penalty_day",
								"description": "The penalty added to the comprehensive sound level.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-no-lfn-day",
						"name": "No low frequency noise penalty, daytime",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1"
						},
						"type": "calculation",
						"expression": 0,
						"outputs": [
							{
								"name": "lfn_penalty_day",
								"description": "The penalty added to the comprehensive sound level.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-assessed-day",
						"name": "Daytime level to judge",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1.1 and 5.1, requirement 38"
						},
						"type": "calculation",
						"expression": {
							"operation": "round",
							"arguments": [
								{
									"operation": "add",
									"arguments": [
										{
											"variable": "csl_day"
										},
										{
											"variable": "lfn_penalty_day"
										}
									]
								},
								1
							]
						},
						"outputs": [
							{
								"name": "assessed_level_day",
								"description": "The comprehensive sound level plus the penalty, to one decimal.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "complaint-judge-day",
						"name": "Compare with the daytime permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.4 and 5.1, requirement 48"
						},
						"type": "decision",
						"criterion": "criterion-psl-day",
						"inputs": [
							{
								"name": "assessed_level_day",
								"valueType": "number"
							}
						],
						"outputs": [
							{
								"name": "meets_psl_day",
								"description": "True when the criterion is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-compliant-day",
						"name": "Result so far",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1"
						},
						"type": "calculation",
						"expression": {
							"operation": "and",
							"arguments": [
								{
									"variable": "compliant"
								},
								{
									"variable": "meets_psl_day"
								}
							]
						},
						"outputs": [
							{
								"name": "compliant",
								"description": "True while every criterion judged is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "complaint-result",
						"name": "Is every criterion met?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1"
						},
						"type": "decision"
					},
					{
						"id": "complaint-compliant",
						"name": "The facility is in compliance",
						"description": "The survey result, with any low frequency noise penalty, is at or below the permissible sound level.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1"
						},
						"type": "outcome"
					},
					{
						"id": "complaint-noncompliant",
						"name": "The facility is not in compliance",
						"description": "The licensee takes corrective action in the time the regulator gives. When low frequency noise is confirmed, it names the likely source and sets out an action plan.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.1 and 4.1.1, requirement 38"
						},
						"type": "outcome"
					},
					{
						"id": "complaint-invalid",
						"name": "The survey is not valid",
						"description": "A period has less than 3 hours of acceptable data. The survey goes on, over more days when needed.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "4.1 and 4.1.2, requirement 34"
						},
						"type": "outcome"
					},
					{
						"id": "complaint-plan-approved",
						"name": "A noise management plan applies",
						"description": "The regulator agreed that a survey is not practical and approved a noise management plan. This profile does not judge the plan.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "5.1 and 5.2"
						},
						"type": "outcome"
					},
					{
						"id": "complaint-not-judged",
						"name": "Not judged",
						"description": "No permissible sound level applies at a dwelling, or the regulator reviews it, so this profile does not judge the complaint.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1 and 2.1.3"
						},
						"type": "outcome"
					}
				],
				"edges": [
					{
						"id": "edge-complaint-start",
						"from": "complaint-start",
						"to": "complaint-purpose"
					},
					{
						"id": "edge-complaint-purpose",
						"from": "complaint-purpose",
						"to": "complaint-plan"
					},
					{
						"id": "edge-complaint-plan-1",
						"from": "complaint-plan",
						"to": "complaint-plan-approved",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "plan_approved"
								},
								true
							]
						},
						"label": "Plan approved"
					},
					{
						"id": "edge-complaint-plan-2",
						"from": "complaint-plan",
						"to": "complaint-resolution"
					},
					{
						"id": "edge-complaint-resolution",
						"from": "complaint-resolution",
						"to": "complaint-form"
					},
					{
						"id": "edge-complaint-form",
						"from": "complaint-form",
						"to": "complaint-representative"
					},
					{
						"id": "edge-complaint-representative",
						"from": "complaint-representative",
						"to": "complaint-position"
					},
					{
						"id": "edge-complaint-position",
						"from": "complaint-position",
						"to": "complaint-instruments"
					},
					{
						"id": "edge-complaint-instruments",
						"from": "complaint-instruments",
						"to": "complaint-calibration"
					},
					{
						"id": "edge-complaint-calibration",
						"from": "complaint-calibration",
						"to": "complaint-weather"
					},
					{
						"id": "edge-complaint-weather",
						"from": "complaint-weather",
						"to": "complaint-psl"
					},
					{
						"id": "edge-complaint-psl",
						"from": "complaint-psl",
						"to": "complaint-psl-check"
					},
					{
						"id": "edge-complaint-psl-check-1",
						"from": "complaint-psl-check",
						"to": "complaint-hours-night",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "psl_outcome"
								},
								"psl-determined"
							]
						},
						"label": "A level applies"
					},
					{
						"id": "edge-complaint-psl-check-2",
						"from": "complaint-psl-check",
						"to": "complaint-not-judged"
					},
					{
						"id": "edge-complaint-hours-night",
						"from": "complaint-hours-night",
						"to": "complaint-judge-hours-night"
					},
					{
						"id": "edge-complaint-judge-hours-night-1",
						"from": "complaint-judge-hours-night",
						"to": "complaint-levels-night",
						"when": {
							"variable": "valid_night"
						},
						"label": "Enough data"
					},
					{
						"id": "edge-complaint-judge-hours-night-2",
						"from": "complaint-judge-hours-night",
						"to": "complaint-invalid",
						"label": "Not enough data"
					},
					{
						"id": "edge-complaint-levels-night",
						"from": "complaint-levels-night",
						"to": "complaint-csl-night"
					},
					{
						"id": "edge-complaint-csl-night",
						"from": "complaint-csl-night",
						"to": "complaint-lfn"
					},
					{
						"id": "edge-complaint-lfn-1",
						"from": "complaint-lfn",
						"to": "complaint-lfn-data-night",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "lfn_potential"
								},
								true
							]
						},
						"label": "Possible"
					},
					{
						"id": "edge-complaint-lfn-2",
						"from": "complaint-lfn",
						"to": "complaint-no-lfn-night"
					},
					{
						"id": "edge-complaint-lfn-data-night",
						"from": "complaint-lfn-data-night",
						"to": "complaint-tone-night"
					},
					{
						"id": "edge-complaint-tone-night",
						"from": "complaint-tone-night",
						"to": "complaint-lfn-penalty-night"
					},
					{
						"id": "edge-complaint-lfn-penalty-night",
						"from": "complaint-lfn-penalty-night",
						"to": "complaint-assessed-night"
					},
					{
						"id": "edge-complaint-no-lfn-night",
						"from": "complaint-no-lfn-night",
						"to": "complaint-assessed-night"
					},
					{
						"id": "edge-complaint-assessed-night",
						"from": "complaint-assessed-night",
						"to": "complaint-judge-night"
					},
					{
						"id": "edge-complaint-judge-night",
						"from": "complaint-judge-night",
						"to": "complaint-compliant-night"
					},
					{
						"id": "edge-complaint-compliant-night",
						"from": "complaint-compliant-night",
						"to": "complaint-day-check"
					},
					{
						"id": "edge-complaint-day-check-1",
						"from": "complaint-day-check",
						"to": "complaint-hours-day",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "day_required"
								},
								true
							]
						},
						"label": "Daytime judged"
					},
					{
						"id": "edge-complaint-day-check-2",
						"from": "complaint-day-check",
						"to": "complaint-result"
					},
					{
						"id": "edge-complaint-hours-day",
						"from": "complaint-hours-day",
						"to": "complaint-judge-hours-day"
					},
					{
						"id": "edge-complaint-judge-hours-day-1",
						"from": "complaint-judge-hours-day",
						"to": "complaint-levels-day",
						"when": {
							"variable": "valid_day"
						},
						"label": "Enough data"
					},
					{
						"id": "edge-complaint-judge-hours-day-2",
						"from": "complaint-judge-hours-day",
						"to": "complaint-invalid",
						"label": "Not enough data"
					},
					{
						"id": "edge-complaint-levels-day",
						"from": "complaint-levels-day",
						"to": "complaint-csl-day"
					},
					{
						"id": "edge-complaint-csl-day-1",
						"from": "complaint-csl-day",
						"to": "complaint-lfn-data-day",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "lfn_potential"
								},
								true
							]
						},
						"label": "Low frequency noise possible"
					},
					{
						"id": "edge-complaint-csl-day-2",
						"from": "complaint-csl-day",
						"to": "complaint-no-lfn-day"
					},
					{
						"id": "edge-complaint-lfn-data-day",
						"from": "complaint-lfn-data-day",
						"to": "complaint-tone-day"
					},
					{
						"id": "edge-complaint-tone-day",
						"from": "complaint-tone-day",
						"to": "complaint-lfn-penalty-day"
					},
					{
						"id": "edge-complaint-lfn-penalty-day",
						"from": "complaint-lfn-penalty-day",
						"to": "complaint-assessed-day"
					},
					{
						"id": "edge-complaint-no-lfn-day",
						"from": "complaint-no-lfn-day",
						"to": "complaint-assessed-day"
					},
					{
						"id": "edge-complaint-assessed-day",
						"from": "complaint-assessed-day",
						"to": "complaint-judge-day"
					},
					{
						"id": "edge-complaint-judge-day",
						"from": "complaint-judge-day",
						"to": "complaint-compliant-day"
					},
					{
						"id": "edge-complaint-compliant-day",
						"from": "complaint-compliant-day",
						"to": "complaint-result"
					},
					{
						"id": "edge-complaint-result-1",
						"from": "complaint-result",
						"to": "complaint-compliant",
						"when": {
							"variable": "compliant"
						},
						"label": "Compliant"
					},
					{
						"id": "edge-complaint-result-2",
						"from": "complaint-result",
						"to": "complaint-noncompliant",
						"label": "Not compliant"
					}
				]
			},
			{
				"id": "flow-d038-psl",
				"name": "Permissible sound level",
				"description": "Works out the nighttime and daytime permissible sound levels for one dwelling, or the level at 1.5 km when no dwelling is closer. It runs as a step of the other flows.",
				"version": "0.1.0",
				"frameworks": [
					"framework-d038"
				],
				"steps": [
					{
						"id": "psl-start",
						"type": "entrypoint"
					},
					{
						"id": "psl-emergency",
						"name": "Emergency",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "question",
						"label": "Is the noise from an emergency?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "emergency",
								"valueType": "boolean"
							}
						],
						"description": "An emergency is a present or imminent event outside normal operations that needs prompt coordination of resources to protect people, property or the environment. Planned maintenance is not an emergency."
					},
					{
						"id": "psl-special-area",
						"name": "Special area",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.3 and 2.1.3.1"
						},
						"type": "question",
						"label": "Does the regulator review the level for this site as a special case or a special area?",
						"question": {
							"answerType": "boolean",
							"required": true
						},
						"outputs": [
							{
								"name": "special_area",
								"valueType": "boolean"
							}
						],
						"description": "The regulator reviews situations that do not fit the categories of the directive on a site-specific basis, and can designate a special area, such as Alberta's Industrial Heartland, where a higher or lower level is appropriate."
					},
					{
						"id": "psl-dwellings",
						"name": "Dwellings within 1.5 km",
						"description": "A dwelling is a residence that is occupied permanently or seasonally, but not a workers' residence inside an industrial plant boundary.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"type": "context",
						"outputs": [
							{
								"name": "dwellings_within_remote_distance",
								"description": "The number of dwellings within 1.5 km of the facility fence line.",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-remote-check",
						"name": "Is a dwelling within 1.5 km?",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"type": "decision"
					},
					{
						"id": "psl-remote-bsl",
						"name": "Basic sound level at 1.5 km",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1"
						},
						"type": "calculation",
						"expression": {
							"variable": "variable-base-bsl"
						},
						"outputs": [
							{
								"name": "bsl_night",
								"description": "The nighttime basic sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-remote",
						"name": "Permissible sound level at 1.5 km",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"type": "calculation",
						"expression": {
							"variable": "variable-remote-psl"
						},
						"outputs": [
							{
								"name": "psl_night",
								"description": "The nighttime permissible sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-density",
						"name": "Dwellings in the quarter section",
						"description": "For a quarter section with mixed land uses or densities, use the average density of the area.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1 notes"
						},
						"type": "context",
						"outputs": [
							{
								"name": "dwelling_count",
								"description": "The number of dwellings in the quarter section with the dwelling at its centre (a radius of 451 m), the dwelling itself included.",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-density-adjustment",
						"name": "Adjustment for dwelling density",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "greater",
									"arguments": [
										{
											"variable": "dwelling_count"
										},
										160
									]
								},
								{
									"variable": "variable-density-over-160"
								},
								{
									"operation": "if",
									"arguments": [
										{
											"operation": "greater_or_equal",
											"arguments": [
												{
													"variable": "dwelling_count"
												},
												9
											]
										},
										{
											"variable": "variable-density-9-160"
										},
										0
									]
								}
							]
						},
						"outputs": [
							{
								"name": "density_adjustment",
								"description": "The amount table 1 adds for the dwelling density.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-transport",
						"name": "Proximity to transportation",
						"description": "A heavily travelled road has at least 10 vehicles an hour on average over the nighttime. A rail line has at least one train of 25 cars each nighttime. Aircraft flyovers are frequent inside a noise exposure forecast contour of 25 or more, or within 5 km of an airport with at least nine takeoffs or landings over the nighttime.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1 notes and appendix 1"
						},
						"type": "context",
						"outputs": [
							{
								"name": "distance_to_transport",
								"description": "The distance from the dwelling to the nearest heavily travelled road or rail line. Leave it out when none is near.",
								"unit": "m",
								"valueType": "number"
							},
							{
								"name": "aircraft_flyovers",
								"description": "True when the dwelling is subject to frequent aircraft flyovers.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-transport-adjustment",
						"name": "Adjustment for proximity to transportation",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "or",
									"arguments": [
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "aircraft_flyovers"
												},
												true
											]
										},
										{
											"operation": "and",
											"arguments": [
												{
													"operation": "not_equal",
													"arguments": [
														{
															"variable": "distance_to_transport"
														},
														null
													]
												},
												{
													"operation": "less",
													"arguments": [
														{
															"variable": "distance_to_transport"
														},
														{
															"variable": "variable-category-3-distance"
														}
													]
												}
											]
										}
									]
								},
								{
									"variable": "variable-transport-category-3"
								},
								{
									"operation": "if",
									"arguments": [
										{
											"operation": "and",
											"arguments": [
												{
													"operation": "not_equal",
													"arguments": [
														{
															"variable": "distance_to_transport"
														},
														null
													]
												},
												{
													"operation": "less",
													"arguments": [
														{
															"variable": "distance_to_transport"
														},
														{
															"variable": "variable-category-2-distance"
														}
													]
												}
											]
										},
										{
											"variable": "variable-transport-category-2"
										},
										0
									]
								}
							]
						},
						"outputs": [
							{
								"name": "transport_adjustment",
								"description": "The amount table 1 adds for the transportation category.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-bsl-night",
						"name": "Nighttime basic sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.1, table 1"
						},
						"type": "calculation",
						"expression": {
							"operation": "add",
							"arguments": [
								{
									"variable": "variable-base-bsl"
								},
								{
									"variable": "density_adjustment"
								},
								{
									"variable": "transport_adjustment"
								}
							]
						},
						"outputs": [
							{
								"name": "bsl_night",
								"description": "The nighttime basic sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-bsl-day",
						"name": "Daytime basic sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.1.2"
						},
						"type": "calculation",
						"expression": {
							"operation": "add",
							"arguments": [
								{
									"variable": "bsl_night"
								},
								{
									"variable": "variable-daytime-adjustment"
								}
							]
						},
						"outputs": [
							{
								"name": "bsl_day",
								"description": "The daytime basic sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-technical-verification",
						"name": "Technical verification of adjustments",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 4"
						},
						"type": "control",
						"control": "control-technical-verification",
						"outputs": [
							{
								"name": "technical_verification_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-seasonal-approval",
						"name": "Approval of the seasonal adjustment",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 5"
						},
						"type": "control",
						"control": "control-seasonal-approval",
						"outputs": [
							{
								"name": "seasonal_approval",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-seasonal-claim",
						"name": "Seasonal adjustment claimed",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2"
						},
						"type": "context",
						"outputs": [
							{
								"name": "seasonal_adjustment",
								"description": "The seasonal adjustment the regulator approved for a wintertime complaint. Leave it out when none is claimed.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-seasonal",
						"name": "Seasonal adjustment (A1)",
						"description": "0 for design. In the complaint process, the approved amount from 0 to 5 dB.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2, requirement 5"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"variable": "complaint"
										},
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "seasonal_approval"
												},
												true
											]
										},
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "seasonal_adjustment"
												},
												null
											]
										}
									]
								},
								{
									"operation": "minimum",
									"arguments": [
										{
											"variable": "variable-seasonal-maximum"
										},
										{
											"operation": "maximum",
											"arguments": [
												0,
												{
													"variable": "seasonal_adjustment"
												}
											]
										}
									]
								},
								0
							]
						},
						"outputs": [
							{
								"name": "class_a1",
								"description": "The seasonal adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-ambient-approval",
						"name": "Approval of the ambient monitoring adjustment",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 6"
						},
						"type": "control",
						"control": "control-ambient-approval",
						"outputs": [
							{
								"name": "ambient_approval",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-ambient",
						"name": "Measured ambient sound levels",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, requirement 7"
						},
						"type": "context",
						"outputs": [
							{
								"name": "ambient_night",
								"description": "The measured nighttime ambient sound level. Leave it out when it was not measured.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "ambient_day",
								"description": "The measured daytime ambient sound level. Leave it out when it was not measured.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-ambient-night",
						"name": "Nighttime ambient monitoring adjustment (A2)",
						"description": "Figure 1: 5 dB less the difference between the basic sound level and the measured ambient sound level to the nearest whole number, kept between -10 dB and +10 dB.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, figure 1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "ambient_approval"
												},
												true
											]
										},
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "ambient_night"
												},
												null
											]
										}
									]
								},
								{
									"operation": "maximum",
									"arguments": [
										{
											"operation": "negate",
											"arguments": [
												{
													"variable": "variable-ambient-adjustment-maximum"
												}
											]
										},
										{
											"operation": "minimum",
											"arguments": [
												{
													"variable": "variable-ambient-adjustment-maximum"
												},
												{
													"operation": "subtract",
													"arguments": [
														{
															"variable": "variable-ambient-allowance"
														},
														{
															"operation": "subtract",
															"arguments": [
																{
																	"variable": "bsl_night"
																},
																{
																	"operation": "round",
																	"arguments": [
																		{
																			"variable": "ambient_night"
																		}
																	]
																}
															]
														}
													]
												}
											]
										}
									]
								},
								0
							]
						},
						"outputs": [
							{
								"name": "class_a2_night",
								"description": "The nighttime ambient monitoring adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-ambient-day",
						"name": "Daytime ambient monitoring adjustment (A2)",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, figure 1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "ambient_approval"
												},
												true
											]
										},
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "ambient_day"
												},
												null
											]
										}
									]
								},
								{
									"operation": "maximum",
									"arguments": [
										{
											"operation": "negate",
											"arguments": [
												{
													"variable": "variable-ambient-adjustment-maximum"
												}
											]
										},
										{
											"operation": "minimum",
											"arguments": [
												{
													"variable": "variable-ambient-adjustment-maximum"
												},
												{
													"operation": "subtract",
													"arguments": [
														{
															"variable": "variable-ambient-allowance"
														},
														{
															"operation": "subtract",
															"arguments": [
																{
																	"variable": "bsl_day"
																},
																{
																	"operation": "round",
																	"arguments": [
																		{
																			"variable": "ambient_day"
																		}
																	]
																}
															]
														}
													]
												}
											]
										}
									]
								},
								0
							]
						},
						"outputs": [
							{
								"name": "class_a2_day",
								"description": "The daytime ambient monitoring adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-class-a-night",
						"name": "Nighttime Class A adjustment",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2 note"
						},
						"type": "calculation",
						"expression": {
							"operation": "minimum",
							"arguments": [
								{
									"variable": "variable-class-a-maximum"
								},
								{
									"operation": "add",
									"arguments": [
										{
											"variable": "class_a1"
										},
										{
											"variable": "class_a2_night"
										}
									]
								}
							]
						},
						"outputs": [
							{
								"name": "class_a_night",
								"description": "The nighttime Class A adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-class-a-day",
						"name": "Daytime Class A adjustment",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.1, table 2 note"
						},
						"type": "calculation",
						"expression": {
							"operation": "minimum",
							"arguments": [
								{
									"variable": "variable-class-a-maximum"
								},
								{
									"operation": "add",
									"arguments": [
										{
											"variable": "class_a1"
										},
										{
											"variable": "class_a2_day"
										}
									]
								}
							]
						},
						"outputs": [
							{
								"name": "class_a_day",
								"description": "The daytime Class A adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-activity",
						"name": "Temporary activity",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2"
						},
						"type": "context",
						"outputs": [
							{
								"name": "activity_duration",
								"description": "How long the noisy activity lasts. Leave it out for a permanent facility.",
								"unit": "d",
								"valueType": "number"
							},
							{
								"name": "once_in_12_months",
								"description": "True when the activity happens no more than once every 12 months.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-residents-informed",
						"name": "Residents informed of a temporary activity",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, requirement 8"
						},
						"type": "control",
						"control": "control-residents-informed",
						"outputs": [
							{
								"name": "residents_informed",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "psl-class-b",
						"name": "Class B adjustment",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.2.2, table 3, requirement 8"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "activity_duration"
												},
												null
											]
										},
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "once_in_12_months"
												},
												true
											]
										},
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "residents_informed"
												},
												true
											]
										},
										{
											"operation": "less_or_equal",
											"arguments": [
												{
													"variable": "activity_duration"
												},
												{
													"variable": "variable-temporary-duration"
												}
											]
										}
									]
								},
								{
									"operation": "if",
									"arguments": [
										{
											"operation": "less_or_equal",
											"arguments": [
												{
													"variable": "activity_duration"
												},
												1
											]
										},
										{
											"variable": "variable-class-b1"
										},
										{
											"operation": "if",
											"arguments": [
												{
													"operation": "less_or_equal",
													"arguments": [
														{
															"variable": "activity_duration"
														},
														7
													]
												},
												{
													"variable": "variable-class-b2"
												},
												{
													"variable": "variable-class-b3"
												}
											]
										}
									]
								},
								0
							]
						},
						"outputs": [
							{
								"name": "class_b",
								"description": "The Class B adjustment.",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-sum-night",
						"name": "Nighttime sum",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "calculation",
						"expression": {
							"operation": "add",
							"arguments": [
								{
									"variable": "bsl_night"
								},
								{
									"variable": "class_a_night"
								},
								{
									"variable": "class_b"
								}
							]
						},
						"outputs": [
							{
								"name": "calculated_psl_night",
								"description": "The nighttime basic sound level plus the adjustments.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-sum-day",
						"name": "Daytime sum",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "calculation",
						"expression": {
							"operation": "add",
							"arguments": [
								{
									"variable": "bsl_day"
								},
								{
									"variable": "class_a_day"
								},
								{
									"variable": "class_b"
								}
							]
						},
						"outputs": [
							{
								"name": "calculated_psl_day",
								"description": "The daytime basic sound level plus the adjustments.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-existing",
						"name": "Existing noise level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.2 and 2.2"
						},
						"type": "context",
						"outputs": [
							{
								"name": "deferred_facility",
								"description": "True when the facility was built and in operation before October 1988, and equipment from before then is its main noise source.",
								"valueType": "boolean"
							},
							{
								"name": "dwelling_after_facility",
								"description": "True when the dwelling was built near the facility after it began to operate.",
								"valueType": "boolean"
							},
							{
								"name": "existing_level_night",
								"description": "The existing nighttime noise level from the facility at the dwelling. Leave it out when not known.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "existing_level_day",
								"description": "The existing daytime noise level from the facility at the dwelling. Leave it out when not known.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-night",
						"name": "Nighttime permissible sound level",
						"description": "The sum, or the existing noise level when that is higher and either the facility is deferred with no complaint or the dwelling was built after the facility. A level that the regulator set for the nighttime replaces it.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.2, 2.1 and 2.2, requirement 9, 2.1.3 and 2.1.3.1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "special_area"
												},
												true
											]
										},
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "reviewed_level_night"
												},
												null
											]
										}
									]
								},
								{
									"variable": "reviewed_level_night"
								},
								{
									"operation": "if",
									"arguments": [
										{
											"operation": "and",
											"arguments": [
												{
													"operation": "or",
													"arguments": [
														{
															"operation": "and",
															"arguments": [
																{
																	"operation": "equal",
																	"arguments": [
																		{
																			"variable": "deferred_facility"
																		},
																		true
																	]
																},
																{
																	"operation": "not",
																	"arguments": [
																		{
																			"variable": "complaint"
																		}
																	]
																}
															]
														},
														{
															"operation": "equal",
															"arguments": [
																{
																	"variable": "dwelling_after_facility"
																},
																true
															]
														}
													]
												},
												{
													"operation": "not_equal",
													"arguments": [
														{
															"variable": "existing_level_night"
														},
														null
													]
												}
											]
										},
										{
											"operation": "maximum",
											"arguments": [
												{
													"variable": "calculated_psl_night"
												},
												{
													"variable": "existing_level_night"
												}
											]
										},
										{
											"variable": "calculated_psl_night"
										}
									]
								}
							]
						},
						"outputs": [
							{
								"name": "psl_night",
								"description": "The nighttime permissible sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "psl-day",
						"name": "Daytime permissible sound level",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "1.8.2, 2.1 and 2.2, requirement 9, 2.1.3 and 2.1.3.1"
						},
						"type": "calculation",
						"expression": {
							"operation": "if",
							"arguments": [
								{
									"operation": "and",
									"arguments": [
										{
											"operation": "equal",
											"arguments": [
												{
													"variable": "special_area"
												},
												true
											]
										},
										{
											"operation": "not_equal",
											"arguments": [
												{
													"variable": "reviewed_level_day"
												},
												null
											]
										}
									]
								},
								{
									"variable": "reviewed_level_day"
								},
								{
									"operation": "if",
									"arguments": [
										{
											"operation": "and",
											"arguments": [
												{
													"operation": "or",
													"arguments": [
														{
															"operation": "and",
															"arguments": [
																{
																	"operation": "equal",
																	"arguments": [
																		{
																			"variable": "deferred_facility"
																		},
																		true
																	]
																},
																{
																	"operation": "not",
																	"arguments": [
																		{
																			"variable": "complaint"
																		}
																	]
																}
															]
														},
														{
															"operation": "equal",
															"arguments": [
																{
																	"variable": "dwelling_after_facility"
																},
																true
															]
														}
													]
												},
												{
													"operation": "not_equal",
													"arguments": [
														{
															"variable": "existing_level_day"
														},
														null
													]
												}
											]
										},
										{
											"operation": "maximum",
											"arguments": [
												{
													"variable": "calculated_psl_day"
												},
												{
													"variable": "existing_level_day"
												}
											]
										},
										{
											"variable": "calculated_psl_day"
										}
									]
								}
							]
						},
						"outputs": [
							{
								"name": "psl_day",
								"description": "The daytime permissible sound level.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						],
						"description": "The daytime permissible sound level. A level that the regulator set for the daytime replaces it."
					},
					{
						"id": "psl-determined",
						"name": "Levels for the dwelling",
						"description": "The nighttime and daytime permissible sound levels apply 15 m from the dwelling.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1 and appendix 1, permissible sound level"
						},
						"type": "outcome"
					},
					{
						"id": "psl-remote-determined",
						"name": "Level at 1.5 km",
						"description": "The nighttime permissible sound level applies 1.5 km from the facility fence line.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1, requirement 3"
						},
						"type": "outcome"
					},
					{
						"id": "psl-not-applicable",
						"name": "No level applies",
						"description": "The permissible sound levels do not apply in an emergency.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1"
						},
						"type": "outcome"
					},
					{
						"id": "psl-site-specific",
						"name": "The regulator reviews the level",
						"description": "The regulator reviews the level for a special case or a special area, and the run gives no level that the regulator set. This profile does not work it out.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.3"
						},
						"type": "outcome"
					},
					{
						"id": "psl-set-levels",
						"name": "Levels that the regulator set",
						"description": "The permissible sound levels that the regulator set for the dwelling. A period with no level keeps the calculated level.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "2.1.3 and 2.1.3.1"
						},
						"type": "context",
						"outputs": [
							{
								"name": "reviewed_level_night",
								"description": "The nighttime permissible sound level that the regulator set. Leave it out when there is none.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "reviewed_level_day",
								"description": "The daytime permissible sound level that the regulator set. Leave it out when there is none.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					}
				],
				"edges": [
					{
						"id": "edge-psl-start",
						"from": "psl-start",
						"to": "psl-emergency"
					},
					{
						"id": "edge-psl-emergency-1",
						"from": "psl-emergency",
						"to": "psl-not-applicable",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "emergency"
								},
								true
							]
						},
						"label": "Emergency"
					},
					{
						"id": "edge-psl-emergency-2",
						"from": "psl-emergency",
						"to": "psl-special-area"
					},
					{
						"id": "edge-psl-special-area-1",
						"from": "psl-special-area",
						"to": "psl-set-levels",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "special_area"
								},
								true
							]
						},
						"label": "Special area"
					},
					{
						"id": "edge-psl-special-area-2",
						"from": "psl-special-area",
						"to": "psl-dwellings"
					},
					{
						"id": "edge-psl-dwellings",
						"from": "psl-dwellings",
						"to": "psl-remote-check"
					},
					{
						"id": "edge-psl-remote-check-1",
						"from": "psl-remote-check",
						"to": "psl-remote-bsl",
						"when": {
							"operation": "equal",
							"arguments": [
								{
									"variable": "dwellings_within_remote_distance"
								},
								0
							]
						},
						"label": "No dwelling"
					},
					{
						"id": "edge-psl-remote-check-2",
						"from": "psl-remote-check",
						"to": "psl-density"
					},
					{
						"id": "edge-psl-remote-bsl",
						"from": "psl-remote-bsl",
						"to": "psl-remote"
					},
					{
						"id": "edge-psl-remote",
						"from": "psl-remote",
						"to": "psl-remote-determined"
					},
					{
						"id": "edge-psl-density",
						"from": "psl-density",
						"to": "psl-density-adjustment"
					},
					{
						"id": "edge-psl-density-adjustment",
						"from": "psl-density-adjustment",
						"to": "psl-transport"
					},
					{
						"id": "edge-psl-transport",
						"from": "psl-transport",
						"to": "psl-transport-adjustment"
					},
					{
						"id": "edge-psl-transport-adjustment",
						"from": "psl-transport-adjustment",
						"to": "psl-bsl-night"
					},
					{
						"id": "edge-psl-bsl-night",
						"from": "psl-bsl-night",
						"to": "psl-bsl-day"
					},
					{
						"id": "edge-psl-bsl-day",
						"from": "psl-bsl-day",
						"to": "psl-technical-verification"
					},
					{
						"id": "edge-psl-technical-verification",
						"from": "psl-technical-verification",
						"to": "psl-seasonal-approval"
					},
					{
						"id": "edge-psl-seasonal-approval",
						"from": "psl-seasonal-approval",
						"to": "psl-seasonal-claim"
					},
					{
						"id": "edge-psl-seasonal-claim",
						"from": "psl-seasonal-claim",
						"to": "psl-seasonal"
					},
					{
						"id": "edge-psl-seasonal",
						"from": "psl-seasonal",
						"to": "psl-ambient-approval"
					},
					{
						"id": "edge-psl-ambient-approval",
						"from": "psl-ambient-approval",
						"to": "psl-ambient"
					},
					{
						"id": "edge-psl-ambient",
						"from": "psl-ambient",
						"to": "psl-ambient-night"
					},
					{
						"id": "edge-psl-ambient-night",
						"from": "psl-ambient-night",
						"to": "psl-ambient-day"
					},
					{
						"id": "edge-psl-ambient-day",
						"from": "psl-ambient-day",
						"to": "psl-class-a-night"
					},
					{
						"id": "edge-psl-class-a-night",
						"from": "psl-class-a-night",
						"to": "psl-class-a-day"
					},
					{
						"id": "edge-psl-class-a-day",
						"from": "psl-class-a-day",
						"to": "psl-activity"
					},
					{
						"id": "edge-psl-activity",
						"from": "psl-activity",
						"to": "psl-residents-informed"
					},
					{
						"id": "edge-psl-residents-informed",
						"from": "psl-residents-informed",
						"to": "psl-class-b"
					},
					{
						"id": "edge-psl-class-b",
						"from": "psl-class-b",
						"to": "psl-sum-night"
					},
					{
						"id": "edge-psl-sum-night",
						"from": "psl-sum-night",
						"to": "psl-sum-day"
					},
					{
						"id": "edge-psl-sum-day",
						"from": "psl-sum-day",
						"to": "psl-existing"
					},
					{
						"id": "edge-psl-existing",
						"from": "psl-existing",
						"to": "psl-night"
					},
					{
						"id": "edge-psl-night",
						"from": "psl-night",
						"to": "psl-day"
					},
					{
						"id": "edge-psl-day",
						"from": "psl-day",
						"to": "psl-determined"
					},
					{
						"id": "edge-psl-set-levels-1",
						"from": "psl-set-levels",
						"to": "psl-site-specific",
						"when": {
							"operation": "and",
							"arguments": [
								{
									"operation": "equal",
									"arguments": [
										{
											"variable": "reviewed_level_night"
										},
										null
									]
								},
								{
									"operation": "equal",
									"arguments": [
										{
											"variable": "reviewed_level_day"
										},
										null
									]
								}
							]
						},
						"label": "No level given"
					},
					{
						"id": "edge-psl-set-levels-2",
						"from": "psl-set-levels",
						"to": "psl-dwellings"
					}
				],
				"embedded": true
			},
			{
				"id": "flow-d038-estimate",
				"name": "Simplified estimate of a level at another distance",
				"description": "Estimates the level of a point source at a second distance from its level at a first distance: 6 dB less for each doubling of distance. It is allowed only under the conditions of appendix 2.",
				"version": "0.1.0",
				"frameworks": [
					"framework-d038"
				],
				"steps": [
					{
						"id": "estimate-start",
						"type": "entrypoint"
					},
					{
						"id": "estimate-conditions",
						"name": "Conditions for the simplified estimate",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.6 and appendix 2, requirement 26"
						},
						"type": "control",
						"control": "control-simplified-estimate",
						"outputs": [
							{
								"name": "estimate_conditions_met",
								"description": "True when the control is met.",
								"valueType": "boolean"
							}
						]
					},
					{
						"id": "estimate-inputs",
						"name": "Known level and distances",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "appendix 2, estimate of sound pressure levels for different distances"
						},
						"type": "context",
						"outputs": [
							{
								"name": "reference_level",
								"description": "The level at the first distance.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							},
							{
								"name": "reference_distance",
								"description": "The first distance from the source.",
								"unit": "m",
								"valueType": "number"
							},
							{
								"name": "receptor_distance",
								"description": "The second distance from the source.",
								"unit": "m",
								"valueType": "number"
							}
						]
					},
					{
						"id": "estimate-level",
						"name": "Level at the second distance",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "appendix 2, estimate of sound pressure levels for different distances"
						},
						"type": "calculation",
						"expression": {
							"operation": "round",
							"arguments": [
								{
									"operation": "subtract",
									"arguments": [
										{
											"variable": "reference_level"
										},
										{
											"operation": "multiply",
											"arguments": [
												20,
												{
													"operation": "log10",
													"arguments": [
														{
															"operation": "divide",
															"arguments": [
																{
																	"variable": "receptor_distance"
																},
																{
																	"variable": "reference_distance"
																}
															]
														}
													]
												}
											]
										}
									]
								},
								1
							]
						},
						"outputs": [
							{
								"name": "facility_level_night",
								"description": "The estimated level at the second distance, to one decimal.",
								"quantity": "a_weighted_sound_pressure_level",
								"unit": "dB",
								"valueType": "number"
							}
						]
					},
					{
						"id": "estimate-done",
						"name": "Level estimated",
						"description": "The level can be used as the predicted level of the facility.",
						"citation": {
							"title": "Directive 038: Noise Control",
							"section": "3.5 and appendix 2"
						},
						"type": "outcome"
					}
				],
				"edges": [
					{
						"id": "edge-estimate-start",
						"from": "estimate-start",
						"to": "estimate-conditions"
					},
					{
						"id": "edge-estimate-conditions",
						"from": "estimate-conditions",
						"to": "estimate-inputs"
					},
					{
						"id": "edge-estimate-inputs",
						"from": "estimate-inputs",
						"to": "estimate-level"
					},
					{
						"id": "edge-estimate-level",
						"from": "estimate-level",
						"to": "estimate-done"
					}
				],
				"embedded": true
			}
		],
		"assumptions": [
			{
				"id": "assumption-category-boundaries",
				"name": "Dwellings exactly 30 m or 500 m from transportation",
				"subject": "psl-transport-adjustment",
				"basis": "The directive puts a dwelling less than 30 m away in category 3, more than 30 m and less than 500 m in category 2, and more than 500 m in category 1. It does not place a dwelling at exactly 30 m or 500 m. This profile gives such a dwelling the lower basic sound level.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "2.1.1.1, table 1 notes"
				}
			},
			{
				"id": "assumption-class-b-durations",
				"name": "Class B durations between the rows of table 3",
				"subject": "psl-class-b",
				"basis": "Table 3 lists 1 day, 7 days, 60 days or less, and more than 60 days. This profile reads the rows as upper bounds: up to 1 day is B1, more than 1 and up to 7 days is B2, and more than 7 and up to 60 days is B3.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "2.1.2.2, table 3"
				}
			},
			{
				"id": "assumption-existing-level",
				"name": "Existing noise level as the permissible sound level",
				"subject": "psl-night",
				"basis": "For a deferred facility with no complaint, the existing level is the permissible sound level when it is above the calculated one. The directive says that the existing level is the permissible sound level for a dwelling built near a facility. This profile uses the higher of the two levels in both cases, so that a later dwelling never lowers the level below the calculated one.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "1.8.2 and 2.2"
				}
			},
			{
				"id": "assumption-remote-day",
				"name": "No daytime level at 1.5 km",
				"subject": "psl-remote",
				"basis": "Requirement 3 states a nighttime level only. This profile sets no daytime level when no dwelling is within 1.5 km.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "2.1, requirement 3"
				}
			},
			{
				"id": "assumption-compare-one-decimal",
				"name": "Levels are compared to one decimal",
				"subject": "nia-assessed-night",
				"basis": "The directive's example finds a combined level of 40.0 dB(A) from 10 log(10080) and says it meets a permissible sound level of 40 dB(A). This profile rounds the level to judge to one decimal before it compares, in assessments and in complaint investigations.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "appendix 4, problem 2"
				}
			},
			{
				"id": "assumption-net-increase",
				"name": "What no net increase compares",
				"subject": "nia-judge-net-increase",
				"basis": "The glossary defines no net increase as a sum that is over the permissible sound level by no more than 0.4 dB(A). For a deferred facility whose existing noise level is its permissible sound level, this profile compares the predicted cumulative level of the facilities plus the assumed ambient sound level, to one decimal, with the permissible sound level plus 0.4 dB. The existing noise level is a measured level, which holds the ambient sound level. A predicted level of the facilities does not, so this profile adds the ambient sound level to compare like with like.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "2.2 and appendix 1, no net increase"
				}
			},
			{
				"id": "assumption-lfn-difference",
				"name": "Low frequency noise at exactly 20 dB",
				"subject": "complaint-lfn-penalty-night",
				"basis": "Section 4.1.1 says the difference is equal to or greater than 20 dB. Section 4.1.1.1 and the glossary say it exceeds 20 dB. This profile uses equal to or greater than 20 dB.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "4.1.1, 4.1.1.1 and appendix 1"
				}
			},
			{
				"id": "assumption-tone-levels",
				"name": "Levels for the tonal test",
				"subject": "algorithm-d038-tone",
				"basis": "Section 4.1.1.1 tests the linear level of each band, and table 6 lists levels in dB. The glossary names A-weighted bands. This profile follows section 4.1.1.1.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "4.1.1.1, appendix 1 and appendix 3"
				}
			},
			{
				"id": "assumption-valid-hours",
				"name": "Least survey data",
				"subject": "complaint-judge-hours-night",
				"basis": "Requirement 34 asks for at least 3 hours of acceptable data in each period after isolation analysis. The glossary says a survey runs over at least 6 hours. This profile judges the 3 hours; the length of the survey is part of the representative survey control.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "4.1, requirement 34 and appendix 1, sound monitoring survey"
				}
			},
			{
				"id": "assumption-set-level",
				"name": "A level that the regulator set",
				"subject": "psl-set-levels",
				"basis": "Section 2.1.3 says that the regulator reviews special cases on a site-specific basis, and section 2.1.3.1 that a higher or lower level can be appropriate in a special area. The directive does not say how such a level joins the calculated one. This profile takes a level that the regulator set as the permissible sound level for the period it is set for, higher or lower, and keeps the calculated level for a period with none. A level that the regulator set is not an existing noise level, so no net increase does not apply to it. The level is for a dwelling; the point at 1.5 km keeps its level.",
				"citation": {
					"title": "Directive 038: Noise Control",
					"section": "2.1.3 and 2.1.3.1"
				}
			}
		]
	}
}
