{
  "$schema": "http://json-schema.org/draft-07/schema",
  "build_version": "v10.06.005",
  "title": "NEAT Input",
  "description": "National Energy Audit Tool audit data input",
  "type": "object",
  "additionalProperties": true,

  "required": [
    "audit",
    "walls",
    "hvac",
    "ducts_and_infiltration",
    "weather_station",

    "fuel_costs",
    "measure_active_flags",
    "measure_costs",
    "neat_insulation_types",
    "key_parameters"
  ],

  "allOf": [{

    "oneOf": [
      {"required": ["fuel_escalation_rates_by_reference"]},
      {"required": ["fuel_escalation_rates"]}
    ]

  }],

  "properties": {

    "audit": {
      "$ref": "#/definitions/audit"
    }, 

    "weather_station": {
      "$ref": "#/definitions/weather_station"
    },

    "walls": {
      "$ref": "#/definitions/walls"
    },
    "windows": {
      "$ref": "#/definitions/windows"
    },
    "doors": {
      "$ref": "#/definitions/doors"
    },
    "unfinished_attics": {
      "$ref": "#/definitions/unfinished_attics"
    },
    "finished_attics": {
      "$ref": "#/definitions/finished_attics"
    },
    "foundations": {
      "$ref": "#/definitions/foundations"
    },
    "hvac": {
      "$ref": "#/definitions/hvac"
    },
    "duct": {
      "$ref": "#/definitions/duct"
    },
    "ducts_and_infiltration": {
      "$ref": "#/definitions/ducts_and_infiltration"
    },
    "water_heating": {
      "$ref": "#/definitions/water_heating"
    },
    "refrigerators": {
      "$ref": "#/definitions/refrigerators"
    },
    "lighting": {
      "$ref": "#/definitions/lighting"
    },
    "itemized_costs": {
      "$ref": "#/definitions/itemized_costs"
    },
    "utility_bills_pre_retrofit_heating": {
      "$ref": "#/definitions/utility_bills_pre_retrofit_heating"
    },
    "utility_bills_pre_retrofit_heating_data": {
      "$ref": "#/definitions/utility_bills_pre_retrofit_heating_data"
    },
    "utility_bills_pre_retrofit_cooling": {
      "$ref": "#/definitions/utility_bills_pre_retrofit_cooling"
    },
    "utility_bills_pre_retrofit_cooling_data": {
      "$ref": "#/definitions/utility_bills_pre_retrofit_cooling_data"
    },


    "fuel_costs": {
      "$ref": "#/definitions/fuel_costs"
    },
    "fuel_escalation_rates_by_reference": {
      "$ref": "#/definitions/fuel_escalation_rates_by_reference"
    },
    "fuel_escalation_rates": {
      "$ref": "#/definitions/fuel_escalation_rates"
    },
    "measure_active_flags": {
      "$ref": "#/definitions/measure_active_flags"
    },
    "measure_costs": {
      "$ref": "#/definitions/measure_costs"
    },
    "neat_insulation_types": {
      "$ref": "#/definitions/neat_insulation_types"
    },
    "key_parameters": {
      "$ref": "#/definitions/key_parameters"
    }
  },

  "if": {
    "properties": {
      "ducts_and_infiltration": {
        "properties": {
         "evaluate_duct_sealing":
         {"const": true}
        }
      }
    }
  },
  "then": {
      "required": [
        "duct"
      ]
  },

  "definitions": 
  {

    "audit": {
      "type": "object",
      "title": "Audit Information",
      "description": "General top level audit information.",
      "additionalProperties": true,
      "$comment": "The additionalProperties setting should limit any personally identifying information (PII) from the API",
      "properties": {
        "audit_type": {
          "type": "string",
          "title": "The audit type",
          "description": "Should say NEAT",
          "examples": ["NEAT"],
          "pattern": "^NEAT$"
        },
        "audit_id": {
          "type": "integer",
          "minimum": 1,
          "title": "Audit ID",
          "description": "Required integer numeric identifier for the audit, mirrored in output, but otherwise unused in analysis",
          "examples": [2344561]
        },
        "audit_number": {
          "type": "integer",
          "minimum": 1,
          "title": "Audit Number",
          "description": "An optional supplemental integer numeric identifier requried for the audit record, also mirrored in output but otherwise not used in analysis",
          "examples": [123456789]
        },
        "audit_date": {
          "type": "string",
          "title": "Audit Date",
          "description": "The audit date in ISO 6801 javascript Date.toJSON output",
          "examples": ["2012-04-23T18:25:43.511Z"]
        },
        "do_billing_adjust": {
          "type": "boolean",
          "title": "Billing Adjustment",
          "description": "Should run include utility billing adjustment",
          "examples": [true, false]
        },
        "screens_removed_for_winter": {
          "type": "boolean",
          "title": "Window Sreens Removed for Winter",
          "description": "Does the occupant normally remove screens and/or open louvers for winter (default = NO)",
          "examples": [true, false]
        },
        "no_cond_stories": {
          "type": "number",
          "minimum": 1,
          "maximum": 4,
          "title": "Conditioned Stories",
          "description": "Number of conditioned stories",
          "examples": [1, 1.5, 2]
        },
        "floor_area": {
          "type": "number",
          "minimum": 300,
          "maximum": 24000,
          "title": "Floor Area (sq ft)",
          "description": "Living space floor area",
          "default": 0,
          "examples": [2078]
        },
        "wsf": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 1.4,
          "title": "Wind Shielding Factor",
          "description": "The factor (weather/wind) used for ASHRAE 62.2 calculations (1/hr)",
          "examples": [0.55]
        },
        "avg_no_occupants": {
          "type": "integer",
          "minimum": 1,
          "maximum": 15,
          "title": "The average number of occupants",
          "description": "The average number of occupants in the dwelling",
          "examples": [3]
        },
        "zipcode": {
          "type": "string",
          "title": "Zip code",
          "description": "Zip code",
          "pattern": "^[0-9]{5}-[0-9]{4}$"
        },
        "infiltration_height":{
          "type": "number",
          "minimum": 4,
          "maximum": 50,
          "title": "Inflitration Height (ft)",
          "description": "Inflitration Height (ft)"
        },
        "num_bedrooms":{
          "type": "integer",
          "minimum": 1,
          "maximum": 10,
          "title": "Number of bedrooms",
          "description": "The  number of bedrooms in the dwelling",
          "examples": [3]
        }
      },
      "required": [
        "audit_type",
        "audit_id",
        "audit_date",
        "no_cond_stories",
        "floor_area",
        "avg_no_occupants",
        "zipcode"
      ]
    },

    "weather_station": {
      "type": "object",
      "title": "Weather Station Selection",
      "description": "Information on the weather station file to use.  This is the selection from the 1011 stations available for v10 weather",
      "properties": {
        "state": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "title": "State Code",
          "description": "The two letter code for the state"
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "title": "City",
          "description": "The name of the city"
        },
        "station_id": {
          "type": "integer",
          "description": "The WMO station identifier, 6 digit"
        },
        "file": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "title": "File Name",
          "description": "Name of the weather file with .JSON extension.  MUST exist in the sys/weather/v10 folder (case sensitive)",
          "examples": ["AK_Adak_AP_704540_WA.JSON"]
        },
        "wsf": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 1.4,
          "title": "Wind Shielding Factor",
          "description": "The factor (weather/wind) used for ASHRAE 62.2 calculations (1/hr)",
          "examples": [0.55]
        }
      },
      "required": [
        "state",
        "city",
        "station_id",
        "file"
      ]
    },

    "walls": {
      "type": "array",
      "title": "Walls",
      "description": "The list of walls in the building shell",
      "minItems": 1,
      "maxItems": 18,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Wall Code",
            "description": "The short code for this Wall (must be unique for this job), no comma characters",
            "examples": ["WL1"],
            "pattern": "^[^,]+$"
          },
          "wall_type": {
            "$id": "#/walls/wall_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Balloon Frame",
              2, "Platform Frame",
              3, "Masonry or Stone",
              4, "Concrete Block",
              5, "Adobe",
              6, "Other"
            ],
            "title": "Wall Type",
            "description": "Wall construction type"
          },
          "stud_size": {
            "type": ["integer", "string"],
            "enum": [
              1, "2x2",
              2, "2x3",
              3, "2x4",
              4, "2x6",
              5, "2x8"
            ],
            "title": "Stud Size",
            "description": "The size of the studs used in the Wall construction"
          },
          "ext_type": {
            "$id": "#/walls/ext_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Wood",
              2, "Metal or Vinyl",
              3, "Stucco",
              4, "Brick or Stone",
              5, "None",
              6, "Other"
            ],
            "title": "Exterior Type",
            "description": "The type of Wall exterior material"
          },
          "exposure": {
            "$id": "#/walls/exposure",
            "type": ["integer", "string"],
            "enum": [
              1, "Outside (Ambient)",
              2, "Buffered Space"
            ],
            "title": "Exposed To",
            "description": "The type of Wall exposure"
          },
          "orient": {
            "$id": "#/walls/orient",
            "type": ["integer", "string"],
            "enum": [
              1, "North",
              2, "South",
              3, "East",
              4, "West"
            ],
            "title": "Orientation",
            "description": "The orientation of the line perpendicular to the wall"
          },
          "area": {
            "type": "number",
            "minimum": 20,
            "maximum": 2000,
            "title": "Gross Area (sq ft)",
            "description": "Gross area of the Wall including doors and windows (sq ft)"
          },
          "measure_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "title": "Measure #",
            "description": "Select the measure number to use"
          },
          "exist_insulation": {
            "$id": "#/walls/exist_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, "Blown Fiberglass",
              4, "Rockwool",
              5, "Fiberglass Batts",
              6, "Polystyrene Board",
              7, "Other"
            ],
            "title": "Existing Insulation Type",
            "description": "Type of existing Insulation in wall"
          },
          "exist_r": {
            "type": "number",
            "minimum": 1,
            "maximum": 30,
            "title": "Existing Insulation R Value",
            "description": "The R value of the existing Insulation"
          },
          "added_insulation": {
            "$id": "#/walls/added_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, 4, 5, 6, 7
            ],
            "title": "Added Insulation Type",
            "description": "Type of Insulation to be added to wall",
            "$comment": "Note that items 3 - 7 are for user defined insulation types"
          },
          "add_cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Added Insulation Added Cost ($)",
            "description": "Additional cost of adding Insulation"
          }
        },
        "required": [
          "code",
          "wall_type",
          "ext_type",
          "exposure",
          "orient",
          "area",
          "measure_number",
          "exist_insulation",
          "added_insulation"
        ],

        "allOf": [{

          "if": {
            "anyOf": [
              {"properties": {"wall_type": {"const": 1 }}},
              {"properties": {"wall_type": {"const": "Balloon Frame" }}},
              {"properties": {"wall_type": {"const": 2 }}},
              {"properties": {"wall_type": {"const": "Platform Frame" }}},
              {"properties": {"wall_type": {"const": 6 }}},
              {"properties": {"wall_type": {"const": "Other" }}}
            ]
          },
          "then": {
            "required": ["stud_size"]
          }

        },{

          "if": {
            "not": {
              "anyOf": [
                {"properties": {"exist_insulation": {"const": 1 }}},
                {"properties": {"exist_insulation": {"const": "None" }}}
              ]
            }
          },
          "then": {
            "required": ["exist_r"] 
          }

        }]

      }
    },

    "windows": {
      "type": "array",
      "title": "Windows",
      "description": "The list of windows in the building shell",
      "minItems": 0,
      "maxItems": 18,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Window Code",
            "description": "The short code for this window (must be unique for windows on each wall), no commas",
            "examples": ["WD1"],
            "pattern": "^[^,]+$",
            "$comment": "The maxLength should match CODE_LEN"
          },
          "window_type": {
            "$id": "#/windows/window_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Jalousie",
              2, "Awning",
              3, "Slider",
              4, "Fixed",
              5, "Door Window",
              6, "Sliding Glass Door",
              7, "Skylight"
            ],
            "title": "Window Type",
            "description": "The window type"
          },
          "frame_type": {
            "$id": "#/windows/frame_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Wood",
              2, "Metal",
              3, "Improved Metal",
              4, "Vinyl",
              5, "Fiberglass"
            ],
            "title": "Frame Type",
            "description": "The window frame type",
            "$comment": "Item 1 was (Wood, Vinyl, or Fiberglass) changed to just Wood at v10.04.001 for E+ disambiguation"
          },
          "glazing_type": {
            "$id": "#/windows/glazing_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Single Pane",
              2, "Double Pane",
              3, "Double Pane Low-e"
            ],
            "title": "Glazing Type",
            "description": "The window glazing type,  Storm window info now separate as of v10.04.01",
            "$comment": "Modified at v10.04.001 replacing the old glazing_type etable values. NOT a positive delta!"
          },
          "storm_type": {
            "$id": "#/windows/storm_type",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Clear",
              3, "Low-e"
            ],
            "title": "Storm Window Type",
            "description": "The existing storm window type"
          },
          "int_shading": {
            "$id": "#/windows/int_shading",
            "type": ["integer", "string"],
            "enum": [
              1, "Drapes",
              2, "Blinds or Shades",
              3, "Drapes with Blinds or Shades",
              4, "None"
            ],
            "title": "Interior Shading",
            "description": "The type of interior shading for the window"
          },

          "ext_shading": {
            "$id": "#/windows/ext_shading",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Overhang or Awning",
              3, "Carport or Porch",
              4, "Low-e Film",
              5, "Sun Screen Fabric",
              6, "Sun Screen Louvered"
            ],
            "title": "Exterior Shading",
            "description": "The type of exterior shading for the window. Added v10.04.001. The variable (shade) has been removed."
          },
          "overhang_projection": {
            "type": "number",
            "minimum": 0,
            "maximum": 50,
            "title": "Overhang projection (in)",
            "description": "Existing overhang horizontal projection. Added v10.04.001. Only for ext_shading = Overhang or Awning"
          },
          "overhang_offset": {
            "type": "number",
            "minimum": 0,
            "maximum": 50,
            "title": "Overhang offset (in)",
            "description": "Vertical distance from window lintel (top) to bottom of overhang. Horizontal overhang assumed. Added v10.04.001. Only for ext_shading = Overhang or Awning"
          },
          "leak": {
            "$id": "#/windows/leak",
            "type": ["integer", "string"],
            "enum": [
              1, "Very Tight",
              2, "Tight",
              3, "Medium",
              4, "Loose",
              5, "Very Loose"
            ],
            "title": "Leakiness",
            "description": "General window and frame leakiness estimate"
          },
          "width": {
            "type": "number",
            "minimum": 4,
            "maximum": 150,
            "title": "Width (in)",
            "description": "Width in inches"
          },
          "height": {
            "type": "number",
            "minimum": 4,
            "maximum": 150,
            "title": "Height (in)",
            "description": "Height in inches"
          },

          "number": {
            "type": "number",
            "minimum": 1,
            "maximum": 9,
            "title": "Number",
            "description": "Number of identical windows on this wall or roof"
          },
          "wall_code": {
            "type": "string",
            "title": "Wall Code",
            "minLength": 1,
            "maxLength": 20,
            "description": "Select the Wall where this window is located",
            "examples": ["WL2"]
          },
          "roof_code": {
            "type": "string",
            "title": "Roof Code",
            "minLength": 1,
            "maxLength": 20,
            "description": "Select the Roof where this skylight is located",
            "examples": ["A2"]
          },
          "roof_type": {
            "$id": "#/windows/roof_type",
            "type": ["integer", "string"],
            "enum": [
              3, "Unfinished",
              4, "Finished"
            ],
            "title": "Roof Type for code",
            "description": "The type of roof where skylight is located"
          },

          "weatherize_evaluate": {
            "type": "boolean",
            "title": "Evaluate Weatherize Window",
            "description": "Consider window weatherizaton and sort in package by SIR"
          },
          "weatherize_required": {
            "type": "boolean",
            "title": "Weatherize Window Required",
            "description": "Require the window weatherization as H&S or Repair regardless of SIR"
          },
          "weatherize_inc_sir": {
            "type": "boolean",
            "title": "Weatherize Window Required Include in SIR",
            "description": "The required window weatherization SIR should be included in the package SIR"
          },
          "weatherize_additional_cost": {
            "type": "number",
            "minimum": -200,
            "maximum": 200,
            "title": "Weatherization added cost ($/window)",
            "description": "Additional per window cost to seal/weatherize"
          },

          "replace_evaluate": {
            "type": "boolean",
            "title": "Evaluate Window Replacement",
            "description": "Consider window replacement and sort in package by SIR"
          },
          "replace_required": {
            "type": "boolean",
            "title": "Window Replacement Required",
            "description": "Require the window replacement as H&S or Repair regardless of SIR"
          },
          "replace_inc_sir": {
            "type": "boolean",
            "title": "The Window Required Replacement Include in SIR",
            "description": "The required window replacement SIR should be included in the package SIR"
          },
          "replace_additional_cost": {
            "type": "number",
            "minimum": -200,
            "maximum": 2000,
            "title": "Replacement added cost ($/window)",
            "description": "Additional per window cost to replace"
          },
          "replace_glaze_type": {
            "$id": "#/windows/replace_glaze_type",
            "type": ["integer", "string"],
            "enum": [
              2, "Double Pane",
              3, "Double Pane Low-e"
            ],
            "title": "Replacement Glazing Type",
            "description": "The replacment window glazing type"
          },
          "replace_u_value": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 20,
            "title": "Replacement window U-Value",
            "description": "The nominal U-Value for the replacement window"
          },
          "replace_shgc": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1.0,
            "title": "Replacement window Solar Heat Gain Coefficient (SHGC)",
            "description": "The nominal SHGC for the replacement window"
          },

          "add_storm_evaluate": {
            "type": "boolean",
            "title": "Evaluate Adding Storm Window",
            "description": "Consider adding storm and sort in package by SIR"
          },
          "add_storm_required": {
            "type": "boolean",
            "title": "Adding Storm Required",
            "description": "Require the addition of storm windows as H&S or Repair regardless of SIR"
          },
          "add_storm_inc_sir": {
            "type": "boolean",
            "title": "The Window Required Replacement Include in SIR",
            "description": "The required window replacement SIR should be included in the package SIR"
          },
          "add_storm_additional_cost": {
            "type": "number",
            "minimum": -200,
            "maximum": 200,
            "title": "Replacement added cost ($/window)",
            "description": "Additional per window cost to replace"
          },
          "add_storm_type": {
            "$id": "#/windows/add_storm_type",
            "type": ["integer", "string"],
            "enum": [
              2, "Clear",
              3, "Low-e"
            ],
            "title": "Retrofit Storm Window Type",
            "description": "The existing storm window type"
          },

          "add_awning_evaluate": {
            "type": "boolean",
            "title": "Evaluate Adding Awning",
            "description": "Consider adding awning and sort in package by SIR"
          },
          "add_awning_additional_cost": {
            "type": "number",
            "minimum": -200,
            "maximum": 200,
            "title": "Replacement added cost ($/window)",
            "description": "Additional per window cost to replace"
          },
          "add_awning_overhang_projection": {
            "type": "number",
            "minimum": 0,
            "maximum": 50,
            "title": "Horizontal Projection (inches)",
            "description": "Distance from wall to end of overhang (horizontal inches)"
          },
          "add_awning_overhang_offset": {
            "type": "number",
            "minimum": 0,
            "maximum": 50,
            "title": "Distance from Lintel(inches)",
            "description": "Distance from lintel (top) to bottom of overhang (vertial inches)"
          },

          "add_ext_shading_evaluate": {
            "type": "boolean",
            "title": "Evaluate Adding Exterior Shading",
            "description": "Should addtion of external shading device be evaluated for inclusion by SIR"
          },
          "add_ext_shading_additional_cost": {
            "type": "number",
            "minimum": -200,
            "maximum": 200,
            "title": "External Shading Added Cost ($/window)",
            "description": "Additional per window cost for external shading"
          },
          "add_ext_shading_type": {
            "$id": "#/windows/add_ext_shading_type",
            "type": ["integer", "string"],
            "enum": [
              4, "Low-e Film",
              5, "Sun Screen Fabric",
              6, "Sun Screen Louvered"
            ],
            "title": "Added Exterior Shading",
            "description": "The type of exterior shading to add to the window."
          }

        },

        "required": [
          "code",
          "window_type",
          "frame_type",
          "glazing_type",
          "storm_type",
          "int_shading",
          "ext_shading",
          "leak",
          "width",
          "height",
          "number",
          "weatherize_evaluate",
          "replace_evaluate",
          "add_storm_evaluate",
          "add_awning_evaluate",
          "add_ext_shading_evaluate"
        ],

        "allOf": [{

          "if": {
            "anyOf": [
              {"properties": {"ext_shading": {"const": 2 }}},
              {"properties": {"ext_shading": {"const": "Overhang or Awning" }}}
            ]
          },
            "then": {
              "required": ["overhang_projection", "overhang_offset"]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"window_type": {"const": 7 }}},
              {"properties": {"window_type": {"const": "Skylight" }}}
            ]
          },
            "then": {
              "required": ["roof_code", "roof_type"]
          },
          "else": {
            "required": ["wall_code"]
          }

        },{

          "if": {
            "properties": {"weatherize_evaluate": {"const": true }}
          },
          "then": {
            "required": ["weatherize_required", "weatherize_additional_cost"],
            "if": {
              "properties": {"weatherize_required": {"const": true }}
            },
              "then": {
                "required": ["weatherize_inc_sir"]
            }
          }

        },{

          "if": {
            "properties": {"replace_evaluate": {"const": true }}
          },
          "then": {
            "required": [
              "replace_required", 
              "replace_additional_cost", 
              "replace_glaze_type", 
              "replace_u_value", 
              "replace_shgc"],
            "if": {
              "properties": {"replace_required": {"const": true }}
            },
              "then": {
                "required": ["replace_inc_sir"]
            }
          }

        },{

          "if": {
            "properties": {"add_storm_evaluate": {"const": true }}
          },
          "then": {
            "required": [
              "add_storm_required", 
              "add_storm_additional_cost", 
              "add_storm_type"],
            "if": {
              "properties": {"add_storm_required": {"const": true }}
            },
              "then": {
                "required": ["add_storm_inc_sir"]
            }
          }

        },{

          "if": {
            "properties": {"add_awning_evaluate": {"const": true }}
          },
          "then": {
            "required": [
              "add_awning_additional_cost", 
              "add_awning_overhang_projection", 
              "add_awning_overhang_offset"]
          }

        },{

          "if": {
            "properties": {"add_ext_shading_evaluate": {"const": true }}
          },
          "then": {
            "required": ["add_ext_shading_additional_cost", "add_ext_shading_type"]
          }
        }]

      }
    },

    "doors": {
      "type": "array",
      "title": "Doors",
      "description": "The list of doors in the building shell",
      "minItems": 0,
      "maxItems": 10,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Door Code",
            "description": "The short code for this door (must be unique for doors on each wall), no commas",
            "examples": ["DR1"],
            "pattern": "^[^,]+$"
          },
          "door_type": {
            "$id": "#/doors/door_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Hollow Core Wood",
              2, "Solid Core Wood",
              3, "Insulated Steel"
            ],
            "title": "Door Type",
            "description": "Type of door"
          },
          "area": {
            "type": "number",
            "minimum": 4,
            "maximum": 60,
            "title": "Area (sq ft)",
            "description": "Door area in sq ft"
          },
          "condition": {
            "$id": "#/doors/condition",
            "type": ["integer", "string"],
            "enum": [
              1, "Adequate",
              2, "Deteriorated",
              3, "None"
            ],
            "title": "Storm Door Condition",
            "description": "Type of storm door present"
          },
          "leakiness": {
            "$id": "#/doors/leakiness",
            "type": ["integer", "string"],
            "enum": [
              1, "Tight",
              2, "Medium",
              3, "Loose"
            ],
            "title": "Leakiness",
            "description": "Leakiness of door"
          },
          "wall": {
            "type": "string",
            "title": "Wall Code",
            "description": "Select the Wall where this door is located",
            "examples": ["WL2"]
          },
          "number": {
            "type": "number",
            "minimum": 1,
            "maximum": 9,
            "title": "Number",
            "description": "Number of identical doors on this wall"
          },
          "replace": {
            "type": "boolean",
            "title": "Replacement Door Required",
            "description": "Require replacement door measure",
            "examples": [true, false]
          },
          "inc_sir": {
            "type": "boolean",
            "title": "Include in SIR",
            "description": "Include this door replacement in overall SIR",
            "examples": [true, false]
          },
          "cost": {
            "type": "number",
            "minimum": -500,
            "maximum": 1000,
            "title": "Additional Cost ($/door)",
            "description": "Additional per door cost"
          }
        },
        "required": [
          "code",
          "door_type",
          "area",
          "condition",
          "leakiness",
          "wall",
          "number"
        ]
      }
    },

    "unfinished_attics": {
      "type": "array",
      "title": "Unfinished Attics",
      "description": "The list of unfinished attic spaces in the building shell",
      "minItems": 0,
      "maxItems": 7,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Attic Code",
            "description": "The short code for this unfinished attic space (must be unique for this audit), no commas",
            "examples": ["A1"],
            "pattern": "^[^,]+$"
          },
          "attic_type": {
            "$id": "#/unfinished_attics/attic_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Unfloored",
              2, "Floored",
              3, "Cathedral or Flat"
            ],
            "title": "Attic Type",
            "description": "Attic type"
          },
          "joist_sp": {
            "type": "number",
            "minimum": 12,
            "maximum": 30,
            "title": "Joist Spacing (in)",
            "description": "Inches between joist"
          },
          "area": {
            "type": "number",
            "minimum": 2,
            "maximum": 24000,
            "title": "Area (sq feet)",
            "description": "Area of unfinished attic space in sq ft"
          },
          "roof_color": {
            "$id": "#/unfinished_attics/roof_color",
            "type": ["integer", "string"],
            "enum": [
              1, "White, Reflective, or Shaded",
              2, "Normal or Weathered"
            ],
            "title": "Roof Color",
            "description": "Roof color"
          },
          "exist_insulation": {
            "$id": "#/unfinished_attics/exist_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, "Blown Fiberglass",
              4, "Rockwool",
              5, "Fiberglass Batts",
              6, "Other"
            ],
            "title": "Existing Insulation Type",
            "description": "Type of existing Insulation in attic"
          },
          "ins_depth": {
            "type": "number",
            "minimum": 1,
            "maximum": 16,
            "title": "Existing Insulation Depth (in)",
            "description": "Depth of the existing Insulation in inches"
          },
          "added_insulation": {
            "$id": "#/unfinished_attics/added_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, "Blown Fiberglass",
              4, 5, 6, 7
            ],
            "title": "Added Insulation Type",
            "description": "Type of Insulation to be added to attic",
            "$comment": "Note that items 4 - 7 are for user defined insulation types"
          },
          "measure_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "title": "Measure #",
            "description": "Select the measure number to use"
          },
          "cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Additional Cost ($)",
            "description": "Additional cost of added Insulation"
          },
          "max_depth": {
            "type": "number",
            "minimum": 1,
            "maximum": 16,
            "title": "Max. Depth (in)",
            "description": "Maximum possible Insulation depth in inches"
          },
          "added_R": {
            "type": "number",
            "minimum": 3,
            "maximum": 50,
            "title": "Added R Value",
            "description": "A specific R value of Insulation to be added"
          }
        },
        "required": [
          "code",
          "attic_type",
          "area",
          "roof_color",
          "exist_insulation",
          "added_insulation"
        ],

        "allOf": [{

          "if": {
            "not": {
              "anyOf": [
                {"properties": {"exist_insulation": {"const": 1 }}},
                {"properties": {"exist_insulation": {"const": "None" }}}
              ]
            }
          },
          "then": {
            "required": ["ins_depth"]
          }

        },{

          "if": {
            "not": {
              "anyOf": [
                {"properties": {"added_insulation": {"const": 1 }}},
                {"properties": {"added_insulation": {"const": "None" }}}
              ]
            }
          },
          "then": {
            "required": ["measure_number"]
          }

        },{

          "not": {"required": ["max_depth", "added_R"]}

        }]

      }
    },

    "finished_attics": {
      "type": "array",
      "title": "Finished Attics",
      "description": "The list of finished attic spaces in the building shell",
      "minItems": 0,
      "maxItems": 16,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Attic Code",
            "description": "The short code for this finished attic space(must be unique for this audit), no commas",
            "examples": ["FA1"],
            "pattern": "^[^,]+$"
          },
          "acode": {
            "$id": "#/finished_attics/acode",
            "type": ["integer", "string"],
            "enum": [
              1, "Outer Ceiling Joist",
              2, "Collar Beam",
              3, "Kneewall",
              4, "Roof Rafter"
            ],
            "title": "Attic Area Type",
            "description": "Type of finished area"
          },
          "floor_type": {
            "$id": "#/finished_attics/floor_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Unfloored",
              2, "Floored"
            ],
            "title": "Attic Floor Type",
            "description": "Floor type of finished attic area"
          },
          "area": {
            "type": "number",
            "minimum": 2,
            "maximum": 24000,
            "title": "Area (sq feet)",
            "description": "Area of finished attic space in sq ft"
          },
          "roof_color": {
            "$id": "#/finished_attics/roof_color",
            "type": ["integer", "string"],
            "enum": [
              1, "White, Reflective, or Shaded",
              2, "Normal or Weathered"
            ],
            "title": "Roof Color",
            "description": "Roof color"
          },
          "exist_insulation": {
            "$id": "#/finished_attics/exist_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, "Blown Fiberglass",
              4, "Rockwool",
              5, "Fiberglass Batts",
              6, "Other"
            ],
            "title": "Existing Insulation Type",
            "description": "Type of existing Insulation in finished attic"
          },
          "ins_depth": {
            "type": "number",
            "minimum": 1,
            "maximum": 16,
            "title": "Existing Insulation Depth (in)",
            "description": "Depth of the existing Insulation in inches"
          },
          "measure_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "title": "Measure #",
            "description": "Select the measure number to use"
          },
          "added_insulation": {
            "$id": "#/finished_attics/added_insulation",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Blown Cellulose",
              3, "Blown Fiberglass",
              4, 5, 6, 7
            ],
            "title": "Added Insulation Type",
            "description": "Type of Insulation to be added to attic spaces other than kneewall",
            "$comment": "Note that items 4 - 7 are for user defined insulation types"
          },
          "added_kneewall": {
            "$id": "#/finished_attics/added_kneewall",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Fiberglass Batts",
              3, 4, 5, 6, 7
            ],
            "title": "Added Kneewall Insulation Type",
            "description": "Type of Insulation to be added to attic kneewall",
            "$comment": "Note that items 3 - 7 are for user defined insulation types"
          },
          "cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Additional Cost ($)",
            "description": "Additional cost of added Insulation"
          },
          "max_depth": {
            "type": "number",
            "minimum": 1,
            "maximum": 16,
            "title": "Max. Depth (in)",
            "description": "Maximum possible Insulation depth in inches"
          },
          "added_R": {
            "type": "number",
            "minimum": 3,
            "maximum": 50,
            "title": "Added R Value",
            "description": "A specific R value of Insulation to be added"
          }
        },
        "required": [
          "code",
          "acode",
          "area",
          "exist_insulation"
        ],

        "allOf": [{

          "if": {
            "not": {
              "anyOf": [
                {"properties": {"exist_insulation": {"const": 1 }}},
                {"properties": {"exist_insulation": {"const": "None" }}}
              ]
            }
          },
          "then": {
            "required": ["ins_depth"]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"acode": {"const": 1 }}},
              {"properties": {"acode": {"const": "Outer Ceiling Joist" }}},
              {"properties": {"acode": {"const": 2 }}},
              {"properties": {"acode": {"const": "Collar Beam" }}}
            ]
          },
          "then": {
            "required": ["floor_type" , "roof_color", "exist_insulation", "added_insulation"]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"acode": {"const": 3 }}},
              {"properties": {"acode": {"const": "Kneewall" }}}
            ]
          },
          "then": {
            "required": ["added_kneewall"]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"acode": {"const": 4 }}},
              {"properties": {"acode": {"const": "Roof Rafter" }}}
            ]
          },
          "then": {
            "required": ["roof_color", "exist_insulation", "added_insulation"]
          }

        },{

          "if": {
            "not": {
              "anyOf": [
                {"properties": {"added_insulation": {"const": 1 }}},
                {"properties": {"added_insulation": {"const": "None" }}}
              ]
            }
          },
          "then": {
            "required": ["measure_number"]
          }

        },{

          "not": {"required": ["max_depth", "added_R"]}

        }]

      }
    },

   "foundations": {
      "type": "array",
      "title": "Foundations",
      "description": "The list of foundations for the building shell",
      "minItems": 0,
      "maxItems": 5,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Foundation Code",
            "description": "The short code for this foundation (must be unique for this audit), no commas",
            "examples": ["F1"],
            "pattern": "^[^,]+$"
          },
          "space_type": {
            "$id": "#/foundations/space_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Conditioned",
              2, "Non Conditioned",
              3, "Vented Non Conditioned",
              4, "Unintentionally Conditioned",
              5, "Uninsulated Slab",
              6, "Insulated Slab",
              7, "Exposed Floor Sheathed",
              8, "Exposed Floor Unsheathed"
            ],
            "title": "Foundation Type",
            "description": "Type of foundation"
          },
          "area": {
            "type": "number",
            "minimum": 1,
            "maximum": 24000,
            "title": "Area (sq feet)",
            "description": "Area of attic space in sq ft"
          },
          "flr_ins_r": {
            "type": "number",
            "minimum": 0,
            "maximum": 40,
            "title": "Floor Existing Insulation R Value",
            "description": "R value of existing foundation ceiling (floor) Insulation"
          },
          "floor_cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Floor Additional Cost ($)",
            "description": "Additional floor Insulation cost"
          },
          "joist_height": {
            "type": "number",
            "minimum": 3,
            "maximum": 19,
            "title": "Sill Floor Joist Height (in)",
            "description": "Height of floor joists (in)"
          },
          "added_sill": {
            "$id": "#/foundations/added_sill",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Fiberglass Batts",
              3, 4, 5, 6, 7
            ],
            "title": "Sill Added Insulation Type",
            "description": "Type of sill Insulation to add",
            "$comment": "Note that items 4 - 7 are for user defined insulation types"
          },
          "sill_perimeter": {
            "type": "number",
            "minimum": 0,
            "maximum": 500,
            "title": "Sill Perimeter to insulate (ft)",
            "description": "Total perimeter of the sill"
          },
          "sill_r": {
            "type": "number",
            "minimum": 0,
            "maximum": 40,
            "title": "Sill Existing Insulation R Value",
            "description": "R value of existing foundation sill insulation"
          },
          "sill_cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Sill Additional Cost ($)",
            "description": "Additional sill Insulation cost"
          },
          "wall_height": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "title": "Foundation Wall Height (ft)",
            "description": "Foundation wall height to be insulated"
          },
          "perim_length": {
            "type": "number",
            "minimum": 1,
            "maximum": 500,
            "title": "Perimeter (ft)",
            "description": "Length of foundation wall space perimeter (ft)"
          },
          "added_found": {
            "$id": "#/foundations/added_found",
            "type": ["integer", "string"],
            "enum": [
              1, "None",
              2, "Rigid Foam Board",
              3, 4, 5, 6, 7
            ],
            "title": "Foundation Wall Added Insulation Type",
            "description": "Type of foundation Wall Insulation to add",
            "$comment": "Note that items 4 - 7 are for user defined insulation types"
          },
          "wall_exp": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "title": "Foundation Wall Height Exposed (%)",
            "description": "Percent of foundation Wall height exposed to outdoors"
          },
          "wall_ins_r": {
            "type": "number",
            "minimum": 0,
            "maximum": 25,
            "title": "Foundation Wall Existing Insulation R Value",
            "description": "Existing foundation Wall R value"
          },
          "wall_cost": {
            "type": "number",
            "minimum": -2000,
            "maximum": 5000,
            "title": "Foundation Wall Additional Cost ($)",
            "description": "Additional foundation Wall Insulation cost"
          }
        },
        "required": [
          "code",
          "space_type",
          "area"
        ],

        "allOf": [{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 1 }}},
              {"properties": {"space_type": {"const": "Conditioned"}}}
            ]
          },
          "then": {
            "required":[
              "joist_height",
              "sill_perimeter",
              "sill_r",
              "added_sill",
              "wall_height",
              "wall_exp",
              "perim_length",
              "wall_ins_r",
              "added_found"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 2 }}},
              {"properties": {"space_type": {"const": "Non Conditioned"}}}
            ]
          },
          "then": {
            "added_floor": {
              "type": ["integer", "string"],
              "enum": [
                1, "None",
                2, "Fiberglass Batts",
                5, 6, 7
              ],
              "title": "Floor Added Insulation Type",
              "description": "Type of floor Insulation to add",
              "$comment": "Note that items 5 - 7 are for user defined insulation types"
            },
            "required":[
              "flr_ins_r",
              "added_floor",
              "joist_height",
              "sill_perimeter",
              "sill_r",
              "added_sill",
              "wall_height",
              "wall_exp",
              "perim_length",
              "wall_ins_r",
              "added_found"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 3 }}},
              {"properties": {"space_type": {"const": "Vented Non Conditioned"}}}
            ]
          },
          "then": {
            "added_floor": {
              "type": ["integer", "string"],
              "enum": [
                1, "None",
                2, "Fiberglass Batts",
                5, 6, 7
              ],
              "title": "Floor Added Insulation Type",
              "description": "Type of floor Insulation to add",
              "$comment": "Note that items 5 - 7 are for user defined insulation types"
            },
            "required":[
              "flr_ins_r",
              "added_floor",
              "joist_height",
              "wall_height",
              "wall_exp",
              "perim_length",
              "wall_ins_r"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 4 }}},
              {"properties": {"space_type": {"const": "Unintentionally Conditioned"}}}
            ]
          },
          "then": {
            "added_floor": {
              "type": ["integer", "string"],
              "enum": [
                1, "None",
                2, "Fiberglass Batts",
                5, 6, 7
              ],
              "title": "Floor Added Insulation Type",
              "description": "Type of floor Insulation to add",
              "$comment": "Note that items 5 - 7 are for user defined insulation types"
            },
            "required":[
              "flr_ins_r",
              "added_floor",
              "joist_height",
              "sill_perimeter",
              "sill_r",
              "added_sill",
              "wall_height",
              "wall_exp",
              "perim_length",
              "wall_ins_r",
              "added_found"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 5 }}},
              {"properties": {"space_type": {"const": "Uninsulated Slab"}}},
              {"properties": {"space_type": {"const": 6 }}},
              {"properties": {"space_type": {"const": "Insulated Slab"}}}
            ]
          },
          "then": {
            "required":[
              "perim_length"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 7 }}},
              {"properties": {"space_type": {"const": "Exposed Floor UnSheathed"}}}
            ]
          },
          "then": {
            "added_floor": {
              "type": ["integer", "string"],
              "enum": [
                1, "None",
                2, "Fiberglass Batts",
                5, 6, 7
              ],
              "title": "Floor Added Insulation Type",
              "description": "Type of floor Insulation to add",
              "$comment": "Note that items 5 - 7 are for user defined insulation types"
            },
            "required":[
              "flr_ins_r",
              "added_floor",
              "joist_height"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"space_type": {"const": 8 }}},
              {"properties": {"space_type": {"const": "Exposed Floor Sheathed"}}}
            ]
          },
          "then": {
            "added_floor": {
              "type": ["integer", "string"],
              "enum": [
                1, "None",
                3, "Blown Cellulose",
                4, "Blown Fiberglass",
                5, 6, 7
              ],
              "title": "Floor Added Insulation Type",
              "description": "Type of floor Insulation to add",
              "$comment": "Note that items 5 - 7 are for user defined insulation types"
            },
            "required":[
              "flr_ins_r",
              "added_floor",
              "joist_height"
            ]
          }

        }]
      }
    },

    "hvac": {
      "type": "array",
      "title": "HVAC Systems",
      "description": "The list of heating and cooling systems",
      "minItems": 1,
      "maxItems": 10,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "HVAC System Code",
            "description": "The short code for this HVAC system (must be unique for this audit), no commas",
            "examples": ["HV1"],
            "pattern": "^[^,]+$"
          },
          "id": {
            "type": "number",
            "minimum": 1,
            "maximum": 2147483647,
            "title": "Primary Key",
            "description": "Normalize incrementing primary key of HVAC system"
          }, 
          "system_type": {
            "$id": "#/hvac/system_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Furnace - Forced Air",
              2, "Furnace - Gravity",
              3, "Boiler - Hot Water",
              4, "Boiler - Steam",
              5, "Space Heater",
              6, "Heat Pump - Central",
              7, "Heat Pump - Room/Window",
              13, "Heat Pump - PTHP",
              8, "Heat Pump - Ductless Mini-Split",
              9, "Air Conditioner - Central",
              10, "Air Conditioner - Room",
              14, "Air Conditioner - PTAC",
              11, "Air Conditioner - Mini-Split",
              12, "Evaporative Cooler"
            ],
            "title": "Equipment Type",
            "description": "Type of heating or cooling system"
          },
          "location": {
            "$id": "#/hvac/location",
            "type": ["integer", "string"],
            "enum": [
              1, "Conditioned Space",
              2, "Unconditioned Attic/Ceiling",
              3, "Unconditioned Garage",
              4, "Unconditioned Basement",
              5, "Unconditioned Crawlspace/Belly"
            ],
            "title": "Location",
            "description": "Location of the HVAC system"
          },
          "fuel": {
            "$id": "#/hvac/fuel",
            "type": ["integer", "string"],
            "enum": [
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane/LPG",
              5, "Wood",
              6, "Coal",
              7, "Kerosene",
              8, "Other"
            ],
            "title": "Primary Fuel",
            "description": "Type of primary fuel for the HVAC system"
          },
          "heat_pump_backup_fuel": {
            "$id": "#/hvac/heat_pump_backup_fuel",
            "type": ["integer", "string"],
            "enum": [
              0, "None",
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane/LPG",
              7, "Kerosene",
              13, "Also None"
            ],
            "title": "Backup Fuel",
            "description": "Type of backup fuel if the system type is heat pump"
          },
          "efficiency_method": {
            "$id": "#/hvac/efficiency_method",
            "type": ["integer", "string"],
            "enum": [
              1, "Year Manufactured",
              2, "Name Plate Efficiency",
              3, "Site Measured"
            ],
            "title": "Efficiency Input Method",
            "description": "How is the efficiency of the equipment enterted.  Available choiced based on system type and fuel"
          },
          "year_manufactured": {
            "type": "number",
            "minimum": 1969,
            "maximum": 2050,
            "title": "Year Manufactured",
            "description": "If efficiency_method = Year Manufactured. < today and <= year_installed"
          },

          "heat_efficiency": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Heating Efficiency",
            "description": "The heating efficiecny expressed in heat_efficiency_units"
          },          
          "heat_efficiency_units": {
            "$id": "#/hvac/heat_efficiency_units",
            "type": ["integer", "string"],
            "enum": [
              1, "AFUE",
              2, "COP",
              3, "%",
              4, "HSPF"
            ],
            "title": "Heating Efficiency Units",
            "description": "The units for the heat_efficiency numeric input"
          },
          "heat_output_capacity": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000,
            "title": "Output Capacity",
            "description": "Output capacity in the units specified for heat_output_capacity_units",
            "$comment": "The min/max range is expanded for all the different heat_output_capacity_units"
          },
          "heat_output_capacity_units": {
            "$id": "#/heating/heat_output_capacity_units",
            "type": ["integer", "string"],
            "enum": [
              1, "kBtu/hr",
              2, "Btu/hr",
              3, "kW",
              4, "gal/hr",
              5, "Tons"
            ],
            "title": "Output Capacity Units",
            "description": "The units for the heat_output_capacity value. Note expanded range to handle Btu/hr"
          },
          "heat_fraction": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1.02,
            "title": "Fraction of Load Served",
            "description": "What fraction of the heating load is served. Sum of all HVAC records < 1.0"
          },

          "cool_efficiency": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Cooling Efficiency",
            "description": "The cooling efficiecny expressed in cool_efficiency_units"
          },          
          "cool_efficiency_units": {
            "$id": "#/hvac/cool_efficiency_units",
            "type": ["integer", "string"],
            "enum": [
              1, "SEER",
              2, "EER",
              3, "COP",
              4, "CEER",
              5, "CEER2"              
            ],
            "title": "Cooling Efficiency Units",
            "description": "The units for the cool_efficiency numeric input"
          },
          "cool_output_capacity": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000,
            "title": "Output Capacity",
            "description": "Output capacity in the units specified for cool_output_capacity_units",
            "$comment": "The min/max range is expanded for all the different cool_output_capacity_units"
          },
          "cool_output_capacity_units": {
            "$id": "#/heating/cool_output_capacity_units",
            "type": ["integer", "string"],
            "enum": [
              1, "kBtu/hr",
              2, "Tons",
              3, "Btu/hr"
            ],
            "title": "Output Capacity Units",
            "description": "The units for the cool_output_capacity value. Note expanded range to handle Btu/hr"
          },
          "cool_fraction": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1.02,
            "title": "Fraction of Load Served",
            "description": "What fraction of the cooling load is served. Sum of all HVAC records < 1.0"
          },

          "atmospheric_combustion": {
            "type": "boolean",
            "title": "Atmoshperic Burner",
            "description": "Is there a burner running at atmospheric pressure"
          },
          "vent_damper": {
            "type": "boolean",
            "title": "Automatic Vent Damper",
            "description": "Is a vent damper present (if combustion fuel and not sealed/condensing)"
          },
          "iid": {
            "type": "boolean",
            "title": "IID",
            "description": "Is there an intermittent ignition device rather than pilot light"
          },
          "pilot_light": {
            "type": "boolean",
            "title": "Pilot Light",
            "description": "Is there a pilot light rather than intermittent ignition device"
          },
          "pilot_light_summer": {
            "type": "boolean",
            "title": "Pilot Light On in Summer",
            "description": "if pilot_light is true, is the pilot light on during the summer months"
          },

          "year_installed": {
            "type": "number",
            "minimum": 1969,
            "maximum": 2050,
            "title": "Year Installed",
            "description": "The year the equipment was installed. Should be >= year_manufactured"
          },
          "equip_maintenance": {
            "$id": "#/heating/equip_maintenance",
            "type": ["integer", "string"],
            "enum": [
              1, "Annual Professional Maintenance",
              2, "Seldom or Never Maintained",
              3, "Not Working"
            ],
            "title": "Maintenance Status",
            "description": "How is the system maintained"
          },
          "heat_setback_used": {
            "type": "boolean",
            "title": "Heating Setback Used",
            "description": "The existing system uses a night setback strategy"
          },

          "smart_thermostat_evaluate": {
            "type": "boolean",
            "title": "Install Smart Thermostat",
            "description": "Add a smart thermostat. Applies to only one/primary heating system"
          },
          "smart_thermostat_required": {
            "type": "boolean",
            "title": "Install Smart Thermostat Required",
            "description": "Adding a smart thermostat is required"
          },
          "smart_thermostat_inc_sir": {
            "type": "boolean",
            "title": "Install Smart Thermostat Include in SIR",
            "description": "Adding a smart thermostat is required AND should be included in the package SIR"
          },
          "smart_thermostat_setback": {
            "type": "number",
            "minimum": 1,
            "maximum": 10,
            "title": "Heating Nighttime Setback (F)",
            "description": "The setback amount in (F) to subtract from the heating setpoint (in key parameters)"
          },
          "smart_thermostat_setback_hours_per_day": {
            "type": "number",
            "minimum": 1,
            "maximum": 12,
            "title": "Daily Setbak Hours",
            "description": "How many hours per night to apply the set back (hr)"
          },
          "smart_thermostat_additional_cost": {
            "type": "number",
            "minimum": -500,
            "maximum": 500,
            "title": "Additional Cost ($)",
            "description": "How much cost to add/discount for the smart thermostat in addition to the material and labor cost from the library"
          },

          "tuneup_evaluate": {
            "type": "boolean",
            "title": "Tune Up",
            "description": "Evaluate a system tune-up to improve efficiecny of existing system"
          },
          "tuneup_required": {
            "type": "boolean",
            "title": "Install Smart Thermostat Required",
            "description": "Tun Up is required"
          },
          "tuneup_inc_sir": {
            "type": "boolean",
            "title": "Install Smart Thermostat Include in SIR",
            "description": "Tun Up is required AND should be included in the package SIR"
          },
          "tuneup_heating_percent_improvement": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 25,
            "title": "Efficiency Improvements (%) heating",
            "description": "The improvement in heating thermal efficiency in delta percent of afue from tune up"
          },
          "tuneup_cooling_percent_improvement": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 25,
            "title": "Efficiency Improvements (%) cooling",
            "description": "The improvement in cooling thermal efficiency in delta percent of seer from tune up"
          },
          "tuneup_additional_cost": {
            "type": "number",
            "minimum": -500,
            "maximum": 500,
            "title": "Additional Cost ($)",
            "description": "How much cost to add/discount for the tune-up in addition to the material and labor cost from the library"
          },

          "replace_evaluate": {
            "type": "boolean",
            "title": "Replace the Equipment",
            "description": "Replace the HVAC system with a new system"
          },
          "replace_required": {
            "type": "boolean",
            "title": "Replace the Equipment Required",
            "description": "Replacement is required"
          },
          "replace_inc_sir": {
            "type": "boolean",
            "title": "Replace the Equipment Include in SIR",
            "description": "Replacing equipment is required AND should be included in the package SIR"
          },
          "replace_material_cost": {
            "type": "number",
            "minimum": 0,
            "maximum": 10000,
            "title": "Material Cost ($)",
            "description": "Replace equipment material costs in ($)"
          },
          "replace_labor_cost": {
            "type": "number",
            "minimum": 0,
            "maximum": 10000,
            "title": "Labor Cost ($)",
            "description": "Replace equipment labor costs in ($)"
          },
          "replace_other_cost": {
            "type": "number",
            "minimum": 0,
            "maximum": 10000,
            "title": "Other Cost ($)",
            "description": "Replace equipment other costs in ($)"
          },
          "replace_system_type": {
            "$id": "#/hvac/replace_system_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Furnace - Forced Air",
              2, "Furnace - Gravity",
              3, "Boiler - Hot Water",
              4, "Boiler - Steam",
              5, "Space Heater",
              6, "Heat Pump - Central",
              7, "Heat Pump - Room/Window",
              13, "Heat Pump - PTHP",
              8, "Heat Pump - Ductless Mini-Split",
              9, "Air Conditioner - Central",
              10, "Air Conditioner - Room",
              14, "Air Conditioner - PTAC",
              11, "Air Conditioner - Mini-Split",
              12, "Evaporative Cooler"
            ],
            "title": "Replacement Equipment Type",
            "description": "Type of heating or cooling system for replacment"
          },
          "replace_fuel": {
            "$id": "#/hvac/replace_fuel",
            "type": ["integer", "string"],
            "enum": [
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane/LPG",
              5, "Wood",
              6, "Coal",
              7, "Kerosene",
              8, "Other"
            ],
            "title": "Replacement Primary Fuel",
            "description": "Type of primary fuel for the HVAC replacement system"
          },
          "replace_heat_pump_backup_fuel": {
            "$id": "#/hvac/replace_heat_pump_backup_fuel",
            "type": ["integer", "string"],
            "enum": [
              0, "None",
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane/LPG",
              7, "Kerosene",
              13, "Also None"
            ],
            "title": "Replacement Backup Fuel",
            "description": "Type of backup fuel if the replacement system type is heat pump"
          },
          "replace_heat_efficiency": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Heating Efficiency",
            "description": "The heating efficiency expressed in heat_efficiency_units for replacement"
          },          
          "replace_heat_efficiency_units": {
            "$id": "#/hvac/replace_heat_efficiency_units",
            "type": ["integer", "string"],
            "enum": [
              1, "AFUE",
              2, "COP",
              3, "%",
              4, "HSPF",
              5, "HSPF2"              
            ],
            "title": "Heating Efficiency Units",
            "description": "The units for the heat_efficiency numeric input for replacement"
          },
          "replace_heat_output_capacity": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000,
            "title": "Output Capacity",
            "description": "Output capacity in the units specified for heat_output_capacity_units",
            "$comment": "The min/max range is expanded for all the different heat_output_capacity_units for replacement"
          },
          "replace_heat_output_capacity_units": {
            "$id": "#/heating/replace_heat_output_capacity_units",
            "type": ["integer", "string"],
            "enum": [
              1, "kBtu/hr",
              2, "Btu/hr",
              3, "kW",
              4, "gal/hr",
              5, "Tons"
            ],
            "title": "Output Capacity Units",
            "description": "The units for the heat_output_capacity value. Note expanded range to handle Btu/hr for replacement"
          },
          "replace_heat_fraction": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1.02,
            "title": "Fraction of Load Served",
            "description": "What fraction of the heating load is served. Sum of all HVAC records < 1.0 for replacement"
          },
          "replace_cool_efficiency": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Cooling Efficiency",
            "description": "The cooling efficiecny expressed in cool_efficiency_units for replacement"
          },          
          "replace_cool_efficiency_units": {
            "$id": "#/hvac/replace_cool_efficiency_units",
            "type": ["integer", "string"],
            "enum": [
              1, "SEER",
              2, "EER",
              3, "COP",
              4, "CEER",
              5, "CEER2"
            ],
            "title": "Cooling Efficiency Units",
            "description": "The units for the cool_efficiency numeric input for replacement"
          },
          "replace_cool_output_capacity": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1000000,
            "title": "Output Capacity",
            "description": "Output capacity in the units specified for cool_output_capacity_units",
            "$comment": "The min/max range is expanded for all the different cool_output_capacity_units for replacement"
          },
          "replace_cool_output_capacity_units": {
            "$id": "#/heating/replace_cool_output_capacity_units",
            "type": ["integer", "string"],
            "enum": [
              1, "kBtu/hr",
              2, "Tons",
              3, "Btu/hr"
            ],
            "title": "Output Capacity Units",
            "description": "The units for the cool_output_capacity value. Note expanded range to handle Btu/hr for replacement"
          },
          "replace_cool_fraction": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 1.02,
            "title": "Fraction of Load Served",
            "description": "What fraction of the cooling load is served. Sum of all HVAC records < 1.0 for replacement"
          },
          "replace_life": {
            "type": "number",
            "minimum": 1,
            "maximum": 30,
            "title": "Replacement Lifetime (yr)",
            "description": "Lifetime of the replacement hvac system (yr)"
          },
          "also_replaces_hvac_ids": {
            "type": "string",
            "minLength": 0,
            "maxLength": 150,
            "title": "Also Replaces",
            "description": "A comma separated list of HVAC.id values as strings for systems this replacement also replaces",
            "examples": ["12,13"]
          }
        },
        "required": [
          "code",        
          "id",          
          "system_type", 
          "fuel",
          "smart_thermostat_evaluate",
          "tuneup_evaluate",
          "replace_evaluate"       
        ]
      }
    },

    "duct": {
      "type": "array",
      "title": "Duct details associated with HVAC systems",
      "description": "Construction details for HVAC systems with ducts",
      "minItems": 1,
      "maxItems": 20,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Duct Code",
            "description": "The short code for this Duct (must be unique for this audit), no commas",
            "examples": ["DU1"],
            "pattern": "^[^,]+$"
          },
          "id": {
            "type": "number",
            "minimum": 1,
            "maximum": 2147483647,
            "title": "Primary Key",
            "description": "Normalize incrementing primary key of this Duct"
          }, 
          "duct_type": {
            "$id": "#/duct/duct_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Supply",
              2, "Return"
            ],
            "title": "Duct Type",
            "description": "Which type of duct, supply or return air"
          },
          "hvac_heating_id_served": {
            "type": "number",
            "minimum": 0,
            "maximum": 2147483647,
            "title": "Heating System Served",
            "description": "Reference to the PK of the HVAC heating system served by this duct. Zero means none served"
          },
          "hvac_cooling_id_served": {
            "type": "number",
            "minimum": 0,
            "maximum": 2147483647,
            "title": "Cooling System Served",
            "description": "Reference to the PK of the HVAC cooling system served by this duct.  Zero means none served"
          },
          "location": {
            "$id": "#/duct/location",
            "type": ["integer", "string"],
            "enum": [
              1, "Conditioned Space",
              2, "Unconditioned Attic/Ceiling",
              3, "Unconditioned Garage",
              4, "Unconditioned Basement",
              5, "Unconditioned Crawlspace/Belly"
            ],
            "title": "Location",
            "description": "Location of the ducts for the HVAC system"
          },
          "fill_in_defaults": {
            "type": "boolean",
            "title": "Use Defaults",
            "description": "The surface_area and r value fields were assigned using default values"
          },
          "surface_area": {
            "type": "number",
            "minimum": 1,
            "maximum": 1500,
            "title": "Duct surface area (sqft)",
            "description": "The duct surface area in sq ft."
          },
          "duct_r_value": {
            "type": "number",
            "minimum": 0,
            "maximum": 20,
            "title": "Insulation R-value",
            "description": "The insulation level of existing duct as R-value"
          },
          "number_of_registers": {
            "type": "number",
            "minimum": 1,
            "maximum": 20,
            "title": "Number of Return Registers",
            "description": "Only required for return duct_type"
          },
          "measure_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "title": "Measure #",
            "description": "Select the duct insulation measure number to use"
          },
          "add_duct_r_value": {
            "type": "number",
            "minimum": 0,
            "maximum": 20,
            "title": "Added R-value",
            "description": "The insulation level to be added to the duct as a conservation measure"
          },
          "insulation_add_cost": {
            "type": "number",
            "minimum": -500,
            "maximum": 500,
            "title": "Additional Cost ($)",
            "description": "How much cost to add/discount for the duct insulation measure"
          }
        },
        "required": [
          "code",        
          "id",          
          "duct_type", 
          "location",
          "surface_area"      
        ]
      }
    },

    "ducts_and_infiltration": {
      "type": "object",
      "title": "Air and Duct Leakage",
      "description": "Overall house leakage and duct leakage information",
      "additionalProperties": true,
      "properties": {
        "evaluate_duct_sealing": {
          "type": "boolean",
          "title": "Evaluate Duct Sealing",
          "description": "Use one of the three methods to evaluate the effects of duct sealing"
        },
        "duct_seal_method": {
          "$id": "#/ducts_and_infiltration/duct_seal_method",
          "type": ["integer", "string"],
          "enum": [
            0, 5, "None",
            1, "Whole House Blower Door Measurements",
            2, "Blower Door Subtraction Measurements",
            3, "Duct Blower Measurements"
          ],
          "title": "Duct Leakage Method",
          "description": "Infiltration/Duct Leakage Reduction Method"
        },
        "pre_inf_cfm": {
          "type": "number",
          "minimum": 300,
          "maximum": 15000,
          "title": "Existing Air Leakage Rate (cfm)",
          "description": "Air Leakage Rate (cfm) Before Weatherization (Existing)"
        },
        "pre_inf_pa": {
          "type": "number",
          "minimum": 20,
          "maximum": 70,
          "title": "Existing Air Leakage Pressure (pa)",
          "description": "at House Pressure Difference (Pa) Before Weatherization (Existing)"
        },
        "post_duct_seal_cfm": {
          "type": "number",
          "minimum": 300,
          "maximum": 15000,
          "title": "Existing, Post Duct Sealing Air Leakage Rate (cfm)",
          "description": "Air Leakage Rate (cfm) After Duct Sealing and Before Other Weatherization (Target or Actual)"
        },
        "post_duct_seal_pa": {
          "type": "number",
          "minimum": 20,
          "maximum": 70,
          "title": "Existing, Post Duct Sealing Air Leakage Pressure (pa)",
          "description": "at House Pressure Difference (Pa) After Duct Sealing and Before Other Weatherization (Target or Actual)"
        },
        "post_inf_cfm": {
          "type": "number",
          "minimum": 300,
          "maximum": 15000,
          "default": 2500,
          "title": "Post Reduction Air Leakage Rate (cfm)",
          "description": "Air Leakage Rate (cfm) After Weatherization (Target or Actual)"
        },
        "post_inf_pa": {
          "type": "number",
          "minimum": 20,
          "maximum": 70,
          "title": "Post Reduction Air Leakage Pressure (pa)",
          "description": "at House Pressure Difference (Pa) After Weatherization (Target or Actual)"
        },
        "pre_duct_seal_supply_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 90,
          "title": "Pre Duct Sealing Supply Duct Pressure (pa)",
          "description": "Supply (Pa) Before Duct Sealing"
        },
        "post_duct_seal_supply_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 90,
          "title": "Post Duct Sealing Supply Duct Pressure (pa)",
          "description": "Supply (Pa) After Duct Sealing"
        },
        "pre_duct_seal_return_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 90,
          "title": "Pre Duct Sealing Return Duct Pressure (pa)",
          "description": "Return (Pa) Before Duct Sealing (NEAT only)"
        },
        "post_duct_seal_return_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 90,
          "title": "Post Duct Sealing Return Duct Pressure (pa)",
          "description": "Return (Pa) After Duct Sealing (NEAT only)"
        },
        "pre_duct_seal_close_cfm": {
          "type": "number",
          "minimum": 300,
          "maximum": 15000,
          "title": "Existing, Grills Sealed, Pre Duct Sealing Air Leakage Rate (cfm)",
          "description": "Air Leakage Rate (cfm) With Registers/Grills Sealed Before Weatherization (Existing)"
        },
        "pre_duct_seal_close_pa": {
          "type": "number",
          "minimum": 20,
          "maximum": 70,
          "title": "Existing, Grills Sealed, Pre Duct Sealing Air Leakage Pressure (pa)",
          "description": "at House Pressure Difference (Pa) With Registers/Grills Sealed Before Weatherization (Existing)"
        },
        "pre_duct_seal_close_diff_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 70,
          "title": "Existing, Grills Sealed, Pre Duct Sealing Duct to House Differential Pressure (pa)",
          "description": "Duct to House Pressure Difference (Pa) With Registers/Grills Sealed Before Weatherization (Existing)"
        },
        "post_duct_seal_close_cfm": {
          "type": "number",
          "minimum": 300,
          "maximum": 15000,
          "title": "Existing, Grills Sealed, Post Duct Sealing Air Leakage Rate (cfm)",
          "description": "Air Leakage Rate (cfm) With Registers/Grills Sealed After Duct Sealing and Before Other Weatherization (Target or Actual)"
        },
        "post_duct_seal_close_pa": {
          "type": "number",
          "minimum": 20,
          "maximum": 70,
          "title": "Existing, Grills Sealed, Post Duct Sealing Air Leakage Pressure (pa)",
          "description": "at House Pressure Difference (Pa) With Registers/Grills Sealed After Duct Sealing and Before Other Weatherization (Target or Actual)"
        },
        "post_duct_seal_close_diff_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 70,
          "title": "Existing, Grills Sealed, Post Duct Sealing Duct to House Differential Pressure (pa)",
          "description": "Duct to House Pressure Difference (Pa) With Registers/Grills Sealed After Duct Sealing and Before Other Weatherization (Target or Actual)"
        },
        "pre_duct_seal_tot_cfm": {
          "type": "number",
          "minimum": 10,
          "maximum": 1000,
          "title": "Pre Duct Sealing Duct Blower Total Rate (cfm)",
          "description": "Fan Flow (cfm) Before Duct Sealing (Existing) Total"
        },
        "pre_duct_seal_tot_duct_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 60,
          "title": "Pre Duct Sealing Duct Blower Pressure (pa)",
          "description": "at Duct Pressure (Pa) Before Duct Sealing (Existing) Total"
        },
        "pre_duct_seal_out_cfm": {
          "type": "number",
          "minimum": 10,
          "maximum": 1000,
          "title": "Pre Duct Sealing Duct Blower Outside Rate (cfm)",
          "description": "Fan Flow (cfm) Before Duct Sealing (Existing) Outside *"
        },
        "pre_duct_seal_out_duct_pa": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 150,
          "title": "Pre Duct Sealing Duct Blower Outside Pressure (pa)",
          "description": "at Duct Pressure (Pa) Before Duct Sealing (Existing) Outside * / (MHEA) Sum of Pressure Pan Measurements (Pa)"
        },
        "post_duct_seal_tot_cfm": {
          "type": "number",
          "minimum": 10 ,
          "maximum": 1000,
          "title": "Post Duct Sealing Duct Blower Total Rate (cfm)",
          "description": "Fan Flow (cfm) After Duct Sealing (Target or Actual) Total"
        },
        "post_duct_seal_tot_duct_pa": {
          "type": "number",
          "minimum": 5,
          "maximum": 60,
          "title": "Post Duct Sealing Duct Blower Pressure (pa)",
          "description": "at Duct Pressure (Pa) After Duct Sealing (Target or Actual) Total"
        },
        "post_duct_seal_out_cfm": {
          "type": "number",
          "minimum": 10,
          "maximum": 1000,
          "title": "Post Duct Sealing Duct Blower Outside Rate (cfm)",
          "description": "Fan Flow (cfm) After Duct Sealing (Target or Actual) Outside *"
        },
        "post_duct_seal_out_duct_pa": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 150,
          "title": "Post Duct Sealing Duct Blower Outside Pressure (pa)",
          "description": "at Duct Pressure (Pa) After Duct Sealing (Target or Actual) Outside * / (MHEA) Sum of Pressure Pan Measurements (Pa)"
        },
        "air_leak_red_cost": {
          "type": "number",
          "minimum": 10,
          "maximum": 10000,
          "title": "Infiltration Reduction Cost ($)",
          "description": "Infiltration Reduction ($)"
        },
        "duct_seal_cost": {
          "type": "number",
          "minimum": 10,
          "maximum": 10000,
          "title": "Duct Sealing Cost ($)",
          "description": "Duct Sealing ($)"
        }

      },
      "required": [
        "evaluate_duct_sealing",
        "post_inf_cfm",
        "post_inf_pa"
      ],

      "if": {
        "properties": {"evaluate_duct_sealing": {"const": true }}
      },
      "then": {
        "required": ["duct_seal_method"],

        "allOf": [{

          "if": {
            "anyOf": [
              {"properties": {"duct_seal_method": {"const": 1 }}},
              {"properties": {"duct_seal_method": {"const": "Whole House Blower Door Measurements"}}}
            ]
          },
          "then": {
            "required": [
              "pre_inf_cfm",
              "pre_inf_pa",
              "post_duct_seal_cfm",
              "post_duct_seal_pa",
              "post_inf_cfm",
              "post_inf_pa",
              "pre_duct_seal_supply_pa",
              "post_duct_seal_supply_pa",
              "pre_duct_seal_return_pa",
              "post_duct_seal_return_pa",
              "air_leak_red_cost",
              "duct_seal_cost"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"duct_seal_method": {"const": 2 }}},
              {"properties": {"duct_seal_method": {"const": "Blower Door Subtraction Measurements"}}}
            ]
          },
          "then": {
            "required": [
              "pre_inf_cfm",
              "pre_inf_pa",
              "post_duct_seal_cfm",
              "post_duct_seal_pa",
              "post_inf_cfm",
              "post_inf_pa",
              "pre_duct_seal_supply_pa",
              "post_duct_seal_supply_pa",
              "pre_duct_seal_return_pa",
              "post_duct_seal_return_pa",
              "pre_duct_seal_close_cfm",
              "pre_duct_seal_close_pa",
              "pre_duct_seal_close_diff_pa",
              "post_duct_seal_close_cfm",
              "post_duct_seal_close_pa",
              "post_duct_seal_close_diff_pa",
              "air_leak_red_cost",
              "duct_seal_cost"
            ]
          }

        },{

          "if": {
            "anyOf": [
              {"properties": {"duct_seal_method": {"const": 3 }}},
              {"properties": {"duct_seal_method": {"const": "Duct Blower Measurements"}}}
            ]
          },
          "then": {
            "required": [
              "pre_inf_cfm",
              "pre_inf_pa",
              "post_inf_cfm",
              "post_inf_pa",
              "pre_duct_seal_supply_pa",
              "post_duct_seal_supply_pa",
              "pre_duct_seal_return_pa",
              "post_duct_seal_return_pa",
              "pre_duct_seal_close_pa",
              "post_duct_seal_close_pa",
              "pre_duct_seal_tot_cfm",
              "pre_duct_seal_tot_duct_pa",
              "pre_duct_seal_out_cfm",
              "pre_duct_seal_out_duct_pa",
              "post_duct_seal_tot_cfm",
              "post_duct_seal_tot_duct_pa",
              "post_duct_seal_out_cfm",
              "post_duct_seal_out_duct_pa",
              "air_leak_red_cost",
              "duct_seal_cost"
           ]
          }

        }]
      }
    },

    "water_heating": {
      "type": "object",
      "title": "Water Heating",
      "description": "Domestic water heating information",
      "additionalProperties": true,
      "properties": {
        "exist_fuel_type_id": {
          "$id": "#/water_heating/exist_fuel_type_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Natural Gas",
            2, "Fuel Oil",
            3, "Electricity",
            4, "Propane"
          ],
          "title": "Existing Water Heater Fuel Type",
          "description": "Type of fuel for the existing water heater"
        },
        "exist_tank_location_id": {
          "$id": "#/water_heating/exist_tank_location_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Heated Space",
            2, "Unconditioned Space",
            3, "Unintentionally Heated Space"
          ],
          "title": "Existing Water Heater Location",
          "description": "Location for the existing water heater"
        },
        "exist_type": {
          "$id": "#/water_heating/exist_type",
          "type": ["integer", "string"],
          "enum": [
            1, "Storage",
            2, "Heat Pump",
            3, "Tankless/Instantaneous"
          ],
          "title": "Existing Water Heater Type",
          "description": "What is the basic type of water heater"
        },
        "exist_gal": {
          "type": "number",
          "minimum": 20,
          "maximum": 100,
          "title": "Size (gal)",
          "description": "Capacity of existing water heater (gal)"
        },
        "exist_energy_factor": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 4,
          "title": "Energy Factor",
          "description": "Energy Factor (EF) of existing water heater"
        },
        "exist_uniform_energy_factor": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 5,
          "title": "Uniform Energy Factor",
          "description": "The Uniform Energy Factor (UEF) of existing water heater"
        },
        "exist_recovery_efficiency": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 4,
          "title": "Recovery Efficiency (%)",
          "description": "Recovery Efficiency (RE) of existing water heater (%)"
        },
        "exist_input_units_id": {
          "$id": "#/water_heating/exist_input_units_id",
          "type": ["integer", "string"],
          "enum": [
            1, "kBTU",
            2, "kW"
          ],
          "title": "Existing Water Heater Input Units",
          "description": "Input rating units for the existing water heater"
        },
        "exist_input": {
          "type": "number",
          "minimum": 1,
          "maximum": 150,
          "title": "Input Rating (kW or kBtu)",
          "description": "Input Rating of existing water heater (kW or kBtu)"
        },
        "exist_tank_wrap": {
          "type": "boolean",
          "title": "Water Heater Tank Wrap Present",
          "description": "Does the existing tank have an insulating wrap"
        },
        "exist_rvalue": {
          "type": "number",
          "minimum": 1,
          "maximum": 25,
          "title": "Existing Water Heater R-Value",
          "description": "The R-value of the existing water heater tank"
        },
        "exist_insul_thick": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 6,
          "title": "Existing Water Heater Insulation Thickness (in)",
          "description": "The thickness of the existing water heater tank Insulation (in)"
        },
        "exist_insul_type_id": {
          "$id": "#/water_heating/exist_insul_type_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Fiberglass",
            2, "Polyurethane"
          ],
          "title": "Existing Water Heater Insulation Type",
          "description": "Insulation type for the existing water heater"
        },
        "exist_pipe_insul": {
          "type": "boolean",
          "title": "Water Heater Pipe Wrap Present",
          "description": "Is the first 5' of hot water supply pipe insulated?"
        },
        "shower_heads": {
          "type": "number",
          "minimum": 1,
          "maximum": 5,
          "title": "Number of Shower Heads",
          "description": "The number of shower heads in the home"
        },
        "shower_usage_per_day": {
          "type": "number",
          "minimum": 1,
          "maximum": 90,
          "title": "Shower Usage (min/day)",
          "description": "Minutes of shower usage per day"
        },
        "shower_gpm": {
          "type": "number",
          "minimum": 1,
          "maximum": 9,
          "title": "Average Shower Head Flow (gpm per shower head)",
          "description": "The average flow for all shower heads (gpm per shower head)"
        },

        "replace": {
          "type": "boolean",
          "title": "Water Heater Replacement Required",
          "description": "Replacement of the existing water heater is required"
        },
        "inc_sir": {
          "type": "boolean",
          "title": "Include in SIR",
          "description": "The replacement should be included in the cumulative SIR"
        },
        "replace_manufacturer": {
          "type": "string",
          "minLength": 0,
          "maxLength": 60,
          "title": "Replacement Water Heater Manufacturer",
          "description": "The name of the water heater replacement manufacturer"
        },
        "replace_model": {
          "type": "string",
          "minLength": 0,
          "maxLength": 60,
          "title": "Replacement Water Heater Model",
          "description": "The model number of the water heater replacement"
        },
        "replace_fuel_type_id": {
          "$id": "#/water_heating/replace_fuel_type_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Natural Gas",
            3, "Electricity",
            4, "Propane"
          ],
          "title": "Replacement Water Heater Fuel Type",
          "description": "Type of fuel for the replacement water heater"
        },
        "replace_type": {
          "$id": "#/water_heating/replace_type",
          "type": ["integer", "string"],
          "enum": [
            0, "None",
            1, "Storage",
            2, "Heat Pump",
            3, "Tankless/Instantaneous"
          ],
          "title": "Replacement Water Heater Type",
          "description": "What is the basic type of water heater to use as a replacement"
        },
        "replace_gal": {
          "type": "number",
          "minimum": 20,
          "maximum": 100,
          "title": "Size (gal)",
          "description": "Capacity of replacement water heater (gal)"
        },
        "replace_energy_factor": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 4,
          "title": "Energy Factor",
          "description": "Energy Factor (EF) of replacement water heater"
        },
        "replace_uniform_energy_factor": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 5,
          "title": "Energy Factor",
          "description": "Uniform Energy Factor (UEF) of replacement water heater"
        },
        "replace_recovery_efficiency": {
          "type": "number",
          "minimum": 0.4,
          "maximum": 4,
          "title": "Recovery Efficiency (%)",
          "description": "Recovery Efficiency (RE) of replacement water heater (%)"
        },
        "replace_input_units_id": {
          "$id": "#/water_heating/replace_input_units_id",
          "type": ["integer", "string"],
          "enum": [
            1, "kBTU",
            2, "kW"
          ],
          "title": "Replacement Water Heater Input Units",
          "description": "Input rating units for the replacement water heater"
        },
        "replace_input": {
          "type": "number",
          "minimum": 1,
          "maximum": 150,
          "title": "Input Rating (kW or kBtu)",
          "description": "Input Rating of replacement water heater (kW or kBtu)"
        },
        "replace_life": {
          "type": "number",
          "minimum": 1,
          "maximum": 30,
          "title": "Replacement Lifetime (yr)",
          "description": "Lifetime of the replacement water heater (yr)"
        },
        "replace_install_cost": {
          "type": "number",
          "minimum": 1,
          "maximum": 100000,
          "title": "Replacement Installation Cost ($)",
          "description": "Cost of the replacement water heater (material only) ($)"
        },
        "replace_added_cost": {
          "type": "number",
          "minimum": -500,
          "maximum": 500,
          "title": "Replacement Additional Cost ($)",
          "description": "Labor, recycling, and other costs ($)"
        },
        "replace_first_hour_rating": {
          "type": "number",
          "minimum": 0,
          "maximum": 300,
          "title": "The amount of hot water the heater can supply (gal/hour)",
          "description": "The amount of hot water the heater can supply (gal/hour)"
        }
      },
      "required": [
        "exist_type",
        "exist_fuel_type_id",
        "exist_tank_location_id"
      ],

      "allOf": [{

        "if": {
          "not": {
            "anyOf": [
              {"properties": {"exist_type": {"const": 3 }}},
              {"properties": {"exist_type": {"const": "Tankless/Instantaneous"}}}
            ]
          }
        },
        "then": {
          "required": ["exist_tank_wrap"],
          "if": {
            "properties": {"exist_tank_wrap": {"const": false }}
          },
          "then": {
            "oneOf": [
              {"required": ["exist_rvalue"] },
              {"required": ["exist_insul_thick", "exist_insul_type_id"] }
            ]
          }
        }

      },{

        "if": {
          "not": {
            "anyOf": [
              {"properties": {"replace_type": {"const": 0 }}},
              {"properties": {"replace_type": {"const": 3 }}},
              {"properties": {"replace_type": {"const": "Tankless/Instantaneous"}}}
            ]
          }
        },
        "then": {
          "required": [ "replace_gal" ]
        }

      }]

    },

    "refrigerators": {
      "type": "object",
      "title": "Refrigeration",
      "description": "Refrigerator information",
      "additionalProperties": true,
      "properties": {
        "location_id": {
          "$id": "#/refrigerators/location_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Heated Space",
            2, "Unconditioned Space",
            3, "Unintentionally Heated Space"
          ],
          "title": "Location of the Refrigerator",
          "description": "Location of the refrigerator"
        },
        "label_kwh_per_year": {
          "type": "number",
          "minimum": 100,
          "maximum": 3000,
          "title": "Label Annual Consumption (kWh/yr)",
          "description": "The consumption of the existing refrigerator (kWh/yr)"
        },
        "label_year_id": {
          "$id": "#/refrigerators/label_year_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Less than 5 years",
            2, "5 to 9 years",
            3, "10 to 14 years",
            4, "15 or  more years"
          ],
          "title": "Age of Existing Refrigerator",
          "description": "Select the age range for the existing refrigerator"
        },
        "door_seal_condition_id": {
          "$id": "#/refrigerators/door_seal_condition_id",
          "type": ["integer", "string"],
          "enum": [
            1, "Good",
            2, "Fair - Some Wear",
            3, "Poor - Gaps Visible"
          ],
          "title": "Door Seal Condition",
          "description": "What is the condition of the Refrigerator Door Seal"
        },
        "meter_energy_reading": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 10,
          "title": "Metered Energy Consumption (kWh)",
          "description": "The energy consumed by the existing refrigerator over the metering interval (kWh)"
        },
        "meter_energy_interval": {
          "type": "number",
          "minimum": 30,
          "maximum": 1440,
          "title": "Metering Interval (min)",
          "description": "The number of minutes in the metering interval (min)"
        },
        "meter_temperature": {
          "type": "number",
          "minimum": 10,
          "maximum": 120,
          "title": "Metering Ambient Temperature (F)",
          "description": "The temperature near the refrigerator if located in unconditioned space (F)"
        },
        "meter_manual_defrost": {
          "type": "boolean",
          "title": "Meter Interval Includes Manual Defrost",
          "description": "Does the metering interval include a manual defrost cycle"
        },
        "meter_includes_defrost": {
          "type": "boolean",
          "title": "Meter Interval Includes Defrost",
          "description": "Does the metering interval include a defrost cycle.  Warning: metering accuracty is likely low if true"
        },
        "replace_manufacturer": {
          "type": "string",
          "minLength": 0,
          "maxLength": 60,
          "title": "Replacement Refrigerator Manufacturer",
          "description": "The name of the refrigerator replacement manufacturer"
        },
        "replace_model": {
          "type": "string",
          "minLength": 0,
          "maxLength": 60,
          "title": "Replacement Refrigerator Model",
          "description": "The model number of the refrigerator replacement"
        },
        "replace_kwh_per_year": {
          "type": "number",
          "minimum": 10,
          "maximum": 3000,
          "title": "Label Annual Consumption for Replacement (kWh/yr)",
          "description": "The consumption of the new refrigerator (kWh/yr)"
        },
        "replace_life": {
          "type": "number",
          "minimum": 1,
          "maximum": 30,
          "title": "Replacement Lifetime (yr)",
          "description": "Lifetime of the new refrigerator (yr)"
        },
        "replace_install_cost": {
          "type": "number",
          "minimum": 10,
          "maximum": 3000,
          "title": "Replacement Installation Cost ($)",
          "description": "Cost of the new refrigerator (material only) ($)"
        },
        "replace_added_cost": {
          "type": "number",
          "minimum": -500,
          "maximum": 500,
          "title": "Replacement Additional Cost ($)",
          "description": "Labor, recycling, and other costs ($)"
        }

      },
      "required": [
        "location_id",
        "replace_kwh_per_year",
        "replace_life",
        "replace_install_cost"
      ],

      "oneOf": [{
        "required": [
          "label_kwh_per_year",
          "label_year_id",
          "door_seal_condition_id"
        ]
      },{
        "required": [
          "meter_energy_reading",
          "meter_energy_interval",
          "meter_manual_defrost",
          "meter_includes_defrost"
        ],
        "if": {
          "not": {
            "anyOf": [
              {"properties": {"location_id": {"const": 1 }}},
              {"properties": {"location_id": {"const": "Heated Space"}}}
            ]
          }
        },
        "then": {
          "required": [ "meter_temperature" ]
        }
      }]
    },

    "lighting": {
      "type": "array",
      "title": "Lighting Systems",
      "description": "The list of lighting systems in the home",
      "minItems": 0,
      "maxItems": 20,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "title": "Lighting System Code",
            "description": "The short code for this lighting system (must be unique for this job), no commas",
            "examples": ["LT1"],
            "pattern": "^[^,]+$"
          },
          "exist_lamp_type": {
            "$id": "#/lighting/exist_lamp_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Incandescent",
              2, "Halogen",
              3, "Fluorescent",
              4, "CFL",
              5, "LED",
              100, "Other"
            ],
            "title": "Existing Lighting System Lamp Type",
            "description": "Type of existing lamps"
          },
          "exist_lamp_count": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Number of Existing Lamps",
            "description": "Number of existing lamps of this type in the home"
          },
          "exist_lamp_watts": {
            "type": "number",
            "minimum": 1,
            "maximum": 250,
            "title": "Size (watts)",
            "description": "Wattage of existing lamps (watts/lamp)"
          },  
          "exist_hours_per_day": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 24,
            "title": "Usage (hrs/day)",
            "description": "Number hours per day the existing lamp is in use"
          },
          "new_lamp_type": {
            "$id": "#/lighting/new_lamp_type",
            "type": ["integer", "string"],
            "enum": [
              1, "Incandescent",
              2, "Halogen",
              3, "Fluorescent",
              4, "CFL",
              5, "LED",
              100, "Other"
            ],
            "title": "Existing Lighting System Lamp Type",
            "description": "Type of new lamps"
          },
          "new_lamp_count": {
            "type": "number",
            "minimum": 1,
            "maximum": 100,
            "title": "Number of Existing Lamps",
            "description": "Number of new lamps of this type in the home"
          },
          "new_lamp_watts": {
            "type": "number",
            "minimum": 1,
            "maximum": 250,
            "title": "Size (watts)",
            "description": "Wattage of new lamps (watts/lamp)"
          },  
          "new_hours_per_day": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 24,
            "title": "Usage (hrs/day)",
            "description": "Number hours per day the new lamp is in use"
          },
          "new_lifetime_hrs": {
            "type": "number",
            "minimum": 500,
            "maximum": 100000,
            "title": "Lifetime (hrs)",
            "description": "The expected lifetime of the new lamp (hrs)"
          },
          "install_cost_per_lamp": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 200,
            "title": "Installation Cost ($/lamp)",
            "description": "Cost to install the new lamp ($/lamp)"
          },
          "added_cost_per_lamp": {
            "type": "number",
            "minimum": -100,
            "maximum": 100,
            "title": "Added Cost ($/lamp)",
            "description": "Added Cost to install the new lamp ($/lamp)"
          },
          "added_cost": {
            "type": "number",
            "minimum": -500,
            "maximum": 500,
            "title": "Added Cost ($)",
            "description": "Added Cost to install the new lamps ($)"
          }
        },
        "required": [
          "exist_lamp_type", 
          "exist_lamp_count",
          "exist_lamp_watts",
          "exist_hours_per_day",
          "new_lamp_type", 
          "new_lamp_count",
          "new_lamp_watts",
          "new_hours_per_day",
          "new_lifetime_hrs",
          "install_cost_per_lamp"
          ] 
      }
    },

    "itemized_costs": {
      "type": "array",
      "title": "Itemized Costs",
      "description": "The list of itemized costs for the retrofit",
      "minItems": 0,
      "maxItems": 60,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "measure": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "title": "The Itemized Cost Measure",
            "description": "The name of the itemized cost measure (must be unique for this job)"
          },
          "component_id": {
            "type": "number",
            "minimum": 1,
            "maximum": 2147483647,
            "title": "Itemized Cost Record ID",
            "description": "An optional identifier to reference for this itemized measure. Pass through. 32 bit integer"
          },  
          "cost": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 10000,
            "title": "Cost ($)",
            "description": "The cost of the itemized measure"
          },
          "inc_sir": {
            "type": "boolean",
            "title": "Include in SIR",
            "description": "Should this measure cost be included in the cumulative SIR" 
          },
          "material": {
            "type": "string",
            "minLength": 0,
            "maxLength": 80,
            "title": "The Itemized Measure Material",
            "description": "Additional description of materials and costs involved"
          },
          "units": {
            "$id": "#/itemized_costs/units",
            "type": ["integer", "string"],
            "enum": [
              3, "kWh",
              2, "MMBtu",
              1, "Therms"
            ],
            "title": "Energy Savings Units",
            "description": "The units for energy savings"
          },
          "savings": {
            "type": "number",
            "minimum": 0,
            "maximum": 10000,
            "title": "Annual Energy Savings in stated units",
            "description": "The annual energy savings in the units specified"
          },
          "fuel": {
            "$id": "#/itemized_costs/fuel",
            "type": ["integer", "string"],
            "enum": [
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane",
              5, "Wood",
              6, "Coal",
              7, "Kerosene",
              8, "Other",
              9, "Primary Heating Fuel",
              10, "Water Heating Fuel"
            ],
            "title": "Fuel Saved",
            "description": "Type of fuel saved in this itemized measure"
          },
          "life": {
            "type": "number",
            "minimum": 1,
            "maximum": 30,
            "title": "Lifetime (yr)",
            "description": "Lifetime of the itemized cost measure"
          }
        },

        "required": [
          "measure",
          "cost",
          "inc_sir",
          "savings"
        ],

        "if": {
          "not": {"properties": {"savings": {"const": 0}}}
        },
        "then": {
          "required": [
            "fuel",
            "life"
          ]
        }

      }
    },

    "utility_bills_pre_retrofit_heating": {
      "type": "object",
      "title": "Utility Bills for Heating",
      "description": "Pre-retrofit heating utility billing information",
      "additionalProperties": true,
      "properties": {
        "usage_units": {
          "$id": "#/utility_bills_pre_retrofit_heating/usage_units",
          "type": ["integer", "string"],
          "enum": [
            1, "Therms",
            2, "kWh"
          ],
          "title": "Units",
          "description": "The units for heating bills"
        },
        "period_days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "title": "Days in First Period",
          "description": "The number of days in the first billing period"
        },
        "base_temp": {
          "type": "number",
          "minimum": 55,
          "maximum": 75,
          "title": "Degree Days Base Temperature (F)",
          "description": "Degree day base temperature to use in calculations (F)"
        },
        "base_load": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000,
          "title": "Base Load",
          "description": "Base load in the selected units"
        }
      },
      "required": [
        "usage_units",
        "period_days",
        "base_temp",
        "base_load"
      ]
    },

    "utility_bills_pre_retrofit_heating_data": {
      "type": "array",
      "title": "Heating Bill Records",
      "description": "The list of pre-retrofit heating bills",
      "minItems": 0,
      "maxItems": 12,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1999,
            "maximum": 2030,
            "title": "Billing Year",
            "description": "The year for the heating bill"
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "title": "Billing Month",
            "description": "The month for the heating bill"
          },
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31,
            "title": "Billing Day",
            "description": "The day of the month for the heating bill"
          },
          "usage": {
            "type": "number",
            "minimum": 0,
            "maximum": 5000,
            "title": "Usage",
            "description": "The billing usage in selected units"
          },
          "degree_days": {
            "type": "number",
            "minimum": 0,
            "maximum": 15000,
            "title": "Degree Days",
            "description": "The degree days in the selected base temperature"
          }
        },
        "required": [
          "year",
          "month",
          "day",
          "usage"
        ]
      }
    },

    "utility_bills_pre_retrofit_cooling": {
      "type": "object",
      "title": "Utility Bills for Cooling",
      "description": "Pre-retrofit cooling utility billing information",
      "additionalProperties": true,
      "properties": {
        "period_days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "title": "Days in First Period",
          "description": "The number of days in the first billing period"
        },
        "base_temp": {
          "type": "number",
          "minimum": 55,
          "maximum": 75,
          "title": "Degree Days Base Temperature (F)",
          "description": "Degree day base temperature to use in calculations (F)"
        },
        "base_load": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000,
          "title": "Base Load",
          "description": "Base load in the selected units"
        }
      },
      "required": [
        "period_days",
        "base_temp",
        "base_load"
      ]
    },

    "utility_bills_pre_retrofit_cooling_data": {
      "type": "array",
      "title": "Cooling Bill Records",
      "description": "The list of pre-retrofit cooling bills",
      "minItems": 0,
      "maxItems": 12,
      "uniqueItems": true,
      "additionalProperties": true,
      "items": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1999,
            "maximum": 2030,
            "title": "Billing Year",
            "description": "The year for the heating bill"
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "title": "Billing Month",
            "description": "The month for the cooling bill"
          },
          "day": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31,
            "title": "Billing Day",
            "description": "The day of the month for the cooling bill"
          },
          "usage": {
            "type": "number",
            "minimum": 0,
            "maximum": 5000,
            "title": "Usage",
            "description": "The billing usage in kWh"
          },
          "degree_days": {
            "type": "number",
            "minimum": 0,
            "maximum": 15000,
            "title": "Degree Days",
            "description": "The degree days in the selected base temperature"
          }
        },
        "required": [
          "year",
          "month",
          "day",
          "usage"
        ]
      }
    },

    "fuel_costs": {
      "type": "object",
      "title": "Fuel Cost and Heat Content",
      "description": "Fuel costs and heat content of each fuel",
      "additionalItems": false,
      "properties": {
        "natural_gas": {
          "type": "number",
          "minimum": 5,
          "maximum": 30,
          "title": "Natural Gas ($/1000 cuft)",
          "description": "The cost of natural gas in dollars per 1000 cubic feet"
        },
        "oil": {
          "type": "number",
          "minimum": 0.50,
          "maximum": 10,
          "title": "Fuel Oil ($/gal)",
          "description": "The cost of fuel oil in dollars per gallon"
        },
        "electric": {
          "type": "number",
          "minimum": 0.02,
          "maximum": 2.0,
          "title": "Electricity ($/kWh)",
          "description": "The cost of electricty in dollars per kWn"
        },
        "propane": {
          "type": "number",
          "minimum": 0.50,
          "maximum": 8,
          "title": "Propane ($/gal)",
          "description": "The cost of propane in dollars per gallon"
        },
        "wood": {
          "type": "number",
          "minimum": 10,
          "maximum": 800,
          "title": "Cord Wood ($/chord)",
          "description": "The cost of wood in dollars per 4x4x8 chord"
        },
        "coal": {
          "type": "number",
          "minimum": 20,
          "maximum": 400,
          "title": "Coal ($/ton)",
          "description": "The cost of coal in dollars per ton"
        },
        "kerosene": {
          "type": "number",
          "minimum": 0.50,
          "maximum": 10,
          "title": "Kerosene ($/gal)",
          "description": "The cost of kerosene in dollars per gallon"
        },
        "other": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 50,
          "title": "Other ($/MMBtu)",
          "description": "The cost of other fuel in dollars per million Btu"
        },
        "natural_gas_heat": {
          "type": "number",
          "minimum": 0.8,
          "maximum": 1.5,
          "title": "Natural Gas Heat Content (MMBtu/1000 cuft)",
          "description": "The heat content of natural gas in MMBtu per 1000 cubic feet"
        },
        "oil_heat": {
          "type": "number",
          "minimum": 0.10,
          "maximum": 0.20,
          "title": "Fuel Oil Heat Content (MMBtu/gal)",
          "description": "The heat content of fuel oil in MMBtu per gallon"
        },
        "electric_heat": {
          "type": "number",
          "const": 0.003413,
          "title": "Electricity Heat Content (MMBtu/kWh)",
          "description": "The heat content of electricty in MMBtu per kWn (constant)"
        },
        "propane_heat": {
          "type": "number",
          "minimum": 0.05,
          "maximum": 0.15,
          "title": "Propane Heat Content (MMBtu/gal)",
          "description": "The heat content of propane in dollars per gallon"
        },
        "wood_heat": {
          "type": "number",
          "minimum": 10,
          "maximum": 50,
          "title": "Cord Wood Heat Content (MMBtu/chord)",
          "description": "The heat content of wood in MMBtu per 4x4x8 chord"
        },
        "coal_heat": {
          "type": "number",
          "minimum": 10,
          "maximum": 50,
          "title": "Coal Heat Content (MMBtu/ton)",
          "description": "The heat content of coal in MMBtu per ton"
        },
        "kerosene_heat": {
          "type": "number",
          "minimum": 0.10,
          "maximum": 0.20,
          "title": "Kerosene Heat Content (MMBtu/gal)",
          "description": "The heat content of kerosene in MMBtu per gallon"
        },
        "other_heat": {
          "type": "number",
          "minimum": 0.99,
          "maximum": 1.01,
          "title": "Other Heat Content (MMBtu/MMBtu)",
          "description": "The heat content of other fuel in MMBtu per million Btu (constant)"
        }
      },
      "required": [
        "electric",
        "electric_heat"
      ]
    },

    "fuel_escalation_rates_by_reference": {
      "type": "object",
      "title": "Fuel Escalation Rates by Reference",
      "description": "Reference the EIA fuel escalation rates by referens, alternately enter fer section",
      "properties": {
        "year": {
          "type": "integer",
          "minimum": 2011,
          "maximum": 2022,
          "title": "The EIA Year to Reference",
          "description": "This is the four digit year of the EIA escalation rates to reference"
        },
        "state": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "title": "State Code",
          "description": "The two letter code for the state, or US for United States average"
        },
        "region": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5,
          "title": "The EIA Region to Reference",
          "description": "This is the region for the given year, region 5 = United States average"
        }
      },
      "anyOf": [
        {"required": ["year", "region"]},
        {"required": ["year", "state"]}
      ]
    },

    "fuel_escalation_rates": {
      "type": "array",
      "title": "Fuel Escalation Costs",
      "description": "The complete set of fuel escalation factors, alternately enter the rer section",
      "minItems": 8,
      "maxItems": 8,
      "uniqueItems": true,
      "additionalItems": false,
      "items": {
        "type": "object",
        "properties": {
          "fuel_type_id": {
            "type": ["integer", "string"],
            "enum": [
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane",
              5, "Wood",
              6, "Coal",
              7, "Kerosene",
              8, "Other"
            ],
            "title": "Fuel Type ID",
            "description": "MUST appear first in the field list. Use ONLY the ID numbers, the strings are in the enum just for reference"
          },
          "fuel_name": {
            "type": ["integer", "string"],
            "enum": [
              1, "Natural Gas",
              2, "Fuel Oil",
              3, "Electricity",
              4, "Propane",
              5, "Wood",
              6, "Coal",
              7, "Kerosene",
              8, "Other"
            ],
            "title": "Fuel Name",
            "description": "Use ONLY the fuel name string, the IDs are in the enum just for reference"
          },
          "rate": {
            "type": "array",
            "minItems": 31,
            "maxItems": 31,
            "items": {
              "type": "number",
              "minimum": 0.5,
              "maximum": 10.0
            }
          }
        },
        "required": [
          "fuel_type_id",
          "fuel_name",
          "rate"
        ]
      }
    },

    "measure_active_flags": {
      "type": "array",
      "title": "Measure Enable/Disable Flags",
      "description": "The list of true/false flags for each possible considered measure",
      "uniqueItems": true,
      "minItems": 35,
      "maxItems": 35,
      "items": [{
          "properties": {
            "num": {"type": "integer", "description": "Optional counter for the array of objects just to assist in finding JSON schema errors"},
            "engine_num": {"const": 0, "description": "MUST appear before other fields. The identifier used by the analsysis engine"},
            "measure_name": {"const": "Attic Insulation R11"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 1},
            "measure_name": {"const": "Attic Insulation R19"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 2},
            "measure_name": {"const": "Attic Insulation R30"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 3},
            "measure_name": {"const": "Attic Insulation R38"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 4},
            "measure_name": {"const": "Fill Ceiling Cavity"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 5},
            "measure_name": {"const": "Sillbox Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 6},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 7},
            "measure_name": {"const": "Floor Insulation R11"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 8},
            "measure_name": {"const": "Floor Insulation R19"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 9},
            "measure_name": {"const": "Floor Insulation R30"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 10},
            "measure_name": {"const": "Wall Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 11},
            "measure_name": {"const": "Kneewall Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 12},
            "measure_name": {"const": "Duct Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{        
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 13},
            "measure_name": {"const": "Weatherize Window"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 14},
            "measure_name": {"const": "Add Storm Window"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 15},
            "measure_name": {"const": "Replace Window"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 17},
            "measure_name": {"const": "Add Awning"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 18},
            "measure_name": {"const": "Add Exterior Shading"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 30},
            "measure_name": {"const": "Install Smart Thermostat"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 35},
            "measure_name": {"const": "Lighting Retrofits"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 36},
            "measure_name": {"const": "Refrigerator Replacement"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 37},
            "measure_name": {"const": "Water Heater Tank Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 38},
            "measure_name": {"const": "Water Heater Pipe Insulation"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 39},
            "measure_name": {"const": "Low Flow Showerheads"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 40},
            "measure_name": {"const": "Water Heater Replacement"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 41},
            "measure_name": {"const": "Attic Insulation R49"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 42},
            "measure_name": {"const": "Floor Insulation R38"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 43},
            "measure_name": {"const": "Door Replacement"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 44},
            "measure_name": {"const": "White Roof Coating"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 45},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "engine_num": {"const": 46},
            "measure_name": {"const": "Tune Up Cooling System"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "engine_num": {"const": 47},
            "measure_name": {"const": "Tune Up Heating System"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "engine_num": {"const": 48},
            "measure_name": {"const": "Replace HVAC System"},
            "active": {"type": "boolean"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "engine_num": {"const": 49},
            "measure_name": {"const": "Duct Sealing"},
            "active": {"type": "boolean",
            "$comment": "Evaluated only if active = true AND ducts_and_infiltration.evaluate_duct_sealing = true AND ducts_and_infiltration.duct_seal_cost > 0"}
          },
          "required": ["engine_num", "active", "measure_name"]
        },{
          "properties": {
            "engine_num": {"const": 50},
            "measure_name": {"const": "General Air Sealing"},
            "active": {"type": "boolean",
            "$comment": "Evaluated only if active = true AND ducts_and_infiltration.air_leak_red_cost > 0"}
          },
          "required": ["engine_num", "active", "measure_name"]
        }
      ]
    },

    "measure_costs": {
      "type": "array",
      "title": "Measure Cost Details",
      "description": "The detailed costing information for each setup library measure",
      "uniqueItems": true,
      "minItems": 96,
      "maxItems": 96,
      "items": [{
          "properties": {
            "num": {"type": "integer", "description": "Optional counter for the array of objects just to assist in finding JSON schema errors"},
            "engine_num": {"const": 0, "description": "MUST appear before other fields. The identifier used by the analsysis engine"},            
            "units": {"const": "SqFt", "description": "The units for material_cost and labor_cost"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 1},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 2},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 3},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 4},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 5},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 6},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 7},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 8},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 3 Name R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 9},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 3 R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 10},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 3 R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 11},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 3 R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 12},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 4 R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 13},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 4 R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 14},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 4 R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 15},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type Name 4 R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 16},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 17},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Wall User Insulation Type 2 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation type 2 units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 18},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Wall User Insulation Type 3 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation type 3 units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 19},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 20},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 21},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R11"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 22},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R19"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 23},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R30"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 24},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"const": "Rigid Foam Board"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 25},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Duct Insulation"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 31},
            "units": {"const": "Each"},
            "measure_name": {"const": "Tune Up Heating System"},
            "measure_type": {"const": "HVAC System"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 3},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Tune Up"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 41},
            "units": {"const": "Each"},
            "measure_name": {"const": "Smart Thermostat"},
            "measure_type": {"const": "HVAC System"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 15},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Thermostat"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 48},
            "units": {"const": "Each"},
            "measure_name": {"const": "Tune Up Cooling System"},
            "measure_type": {"const": "HVAC System"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 3},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Tune Up"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 50, "description": "Costs and life come from audit HVAC form, only label used from this"},
            "units": {"const": "Each"},
            "measure_name": {"const": "Replace HVAC System"},
            "measure_type": {"const": "HVAC System"}
          },
          "required": ["engine_num", "measure_name", "measure_type"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 53},
            "units": {"const": "Linear Foot"},
            "measure_name": {"const": "Add Awning"},
            "measure_type": {"const": "Add Awning"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 54},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Add Exterior Shading Sun Screen Fabric"},
            "measure_type": {"const": "Add Exterior Shading"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 55},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Add Exterior Shading Sun Screen Louvered"},
            "measure_type": {"const": "Add Exterior Shading"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 56},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Add Exterior Shading Low-e Film"},
            "measure_type": {"const": "Add Exterior Shading"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 57},
            "units": {"const": "Each Window"},
            "measure_name": {"const": "Weatherize Window"},
            "measure_type": {"const": "Weatherize Window Materials"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 58},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Add Storm Window Clear"},
            "measure_type": {"const": "Add Storm Window"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 15},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 59},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Replace Window Double Pane"},
            "measure_type": {"const": "Replace Window"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 60},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Replace Window Double Pane Low-e"},
            "measure_type": {"const": "Replace Window"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 61},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Add Storm Window Low-e"},
            "measure_type": {"const": "Add Storm Window"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 15},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Window"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 72},
            "units": {"const": "Each"},
            "measure_name": {"const": "Water Heater Tank Insulation"},
            "measure_type": {"const": "Water Heater Tank Insulation Wrap"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 13},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Water Heater"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 73},
            "units": {"const": "Each"},
            "measure_name": {"const": "Water Heater Pipe Insulation"},
            "measure_type": {"const": "R-1.85 (1/2\") Water Pipe Insulation"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 13},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 74},
            "units": {"const": "Each"},
            "measure_name": {"const": "Low Flow Showerheads"},
            "measure_type": {"const": "Low Flow Showerhead"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 15},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 76},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 77},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 78},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 3 Name R49"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 79},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 4 Name R49"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 80},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 5 Name R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 81},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 5 Name R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 82},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 5 Name R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 83},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 5 Name R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 84},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 5 Name R49"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 85},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 6 Name R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 86},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 6 Name R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 87},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 6 Name R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 88},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 6 Name R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 89},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Attic Insulation R49"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Attic Insulation Type 6 Name R49"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 90},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Wall User Insulation Type 4 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation type 4 units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 91},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Wall User Insulation Type 5 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation type 5 units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 92},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Wall User Insulation Type 6 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "$comment": "If the Wall Insulation type 6 units are R/in, then costs are for a 2x4 cavity fill",
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 93},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Knee Wall Insulation Type 2 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 94},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Knee Wall Insulation Type 3 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 95},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Knee Wall Insulation Type 4 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 96},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Knee Wall Insulation Type 5 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 97},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Kneewall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Knee Wall Insulation Type 6 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 98},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Sillbox Insulation Type 2 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 99},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Sillbox Insulation Type 3 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 100},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Sillbox Insulation Type 4 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 101},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Sillbox Insulation Type 5 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 102},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Sillbox Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Sillbox Insulation Type 6 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 30},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 103},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R38"},
            "measure_type": {"const": "Fiberglass Batts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 112},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 4 Name R11 (user defined)"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 113},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 4 Name R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 114},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 4 Name R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 115},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 4 Name R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 116},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 5 Name R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 117},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 5 Name R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 118},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 5 Name R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 119},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 5 Name R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 120},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R11"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 6 Name R11"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 121},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R19"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 6 Name R19"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 122},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R30"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 6 Name R30"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 123},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Floor Insulation R38"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Floor Insulation Type 6 Name R38"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 124},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Foundation Wall Insulation Type 2 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 125},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Foundation Wall Insulation Type 3 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 126},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Foundation Wall Insulation Type 4 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 127},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Foundation Wall Insulation Type 5 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 128},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Foundation Wall Insulation"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Foundation Wall Insulation Type 6 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 129},
            "units": {"const": "Each Door"},
            "measure_name": {"const": "Door Replacement"},
            "measure_type": {"const": "Exterior Door"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Door"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 130},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "White Roof Coating"},
            "measure_type": {"const": "Reflective Roof Paint or Coating"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 7},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 131},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "measure_type": {"const": "Blown Cellulose"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 132},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "measure_type": {"const": "Blown Fiberglass"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 133},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Fill Closed Floor Cavity Type 4 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 134},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Fill Closed Floor Cavity Type 5 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "num": {"type": "integer"},
            "engine_num": {"const": 135},
            "units": {"const": "SqFt"},
            "measure_name": {"const": "Fill Closed Floor Cavity"},
            "measure_type": {"type": ["string", "null"], "maxLength": 50, "description": "Fill Closed Floor Cavity Type 6 Name"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 20},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "labor_cost": {"type": "number", "minimum": 0, "maximum": 5000},
            "other_cost": {"type": "number", "minimum": 0, "maximum": 5000, "units": "Each Measure"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost", "labor_cost", "other_cost"]
        },{
          "properties": {
            "engine_num": {"const": 136},
            "units": {"const": "Each Measure"},
            "measure_name": {"const": "Seal Ducts"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000, "$comment" : "Just setup costs"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost"]
        },{
          "properties": {
            "engine_num": {"const": 137},
            "units": {"const": "Each Measure"},
            "measure_name": {"const": "General Air Sealing"},
            "life": {"type": "number", "minimum": 1, "maximum": 30, "default": 10},
            "material_cost": {"type": "number", "minimum": 0, "maximum": 5000, "$comment" : "Just setup costs"}
          },
          "required": ["engine_num", "measure_name", "life", "material_cost"]
        }
      ]
    },

    "neat_insulation_types": {
      "type": "array",
      "title": "User Defined Insulation Types",
      "description": "Details for the fixed set of possible user defined Insulation types ",
      "uniqueItems": true,
      "additionalItems": false,
      "items": [{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 1},
            "name": {"const": "Blown Cellulose"},
            "units": {"const": "R/in"},
            "value": {"type": "number", "minimum": 1, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 2},
            "name": {"const": "Blown Fiberglass"},
            "units": {"const": "R/in"},
            "value": {"type": "number", "minimum": 1, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 3},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Attic"},
            "usage_id": {"const": 1},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 1},
            "name": {"const": "Fiberglass Batts"},
            "units": {"const": "R"},
            "value": {"type": "number", "minimum": 2, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 2},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 3},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Knee Wall"},
            "usage_id": {"const": 2},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 1},
            "name": {"const": "Blown Cellulose"},
            "units": {"const": "R/in"},
            "value": {"type": "number", "minimum": 1, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 2},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 3},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Wall"},
            "usage_id": {"const": 3},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 38}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 1},
            "name": {"const": "Fiberglass Batts"},
            "units": {"const": "R/in"},
            "value": {"type": "number", "minimum": 1, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 2},
            "name": {"const": "Blown Cellulose"},
            "units": {"const": "R/in"},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 3},
            "name": {"const": "Blown Fiberglass"},
            "units": {"const": "R/in"},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Floor"},
            "usage_id": {"const": 4},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 10}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 1},
            "name": {"const": "Fiberglass Batts"},
            "units": {"const": "R"},
            "value": {"type": "number", "minimum": 2, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 2},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 3},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Sill"},
            "usage_id": {"const": 5},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 50}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 1},
            "name": {"const": "Rigid Foam Board"},
            "units": {"const": "R"},
            "value": {"type": "number", "minimum": 2, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 2},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 3},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 4},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 5},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        },{
          "properties": {
            "usage": {"const": "Foundation Wall"},
            "usage_id": {"const": 6},
            "index": {"const": 6},
            "name": {"type": ["string", "null"], "maxLength": 30},
            "units": {"type": ["string", "null"], "maxLength": 4},
            "value": {"type": ["number", "null"], "minimum": 0, "maximum": 25}
          },
          "required": ["usage_id", "index", "value"]
        }

      ]
    },

    "key_parameters": {
      "type": "object",
      "title": "Key Parameters",
      "description": "Top level energy and economic parameters from setup library",
      "additionalProperties": false,
      "properties": {
        "real_discount_rate"              : {"type": "number", "minimum": 0,    "maximum": 10,    "description": "%"},
        "minimum_acceptable_sir"          : {"type": "number", "minimum": 0,    "maximum": 10,    "description": "Factor"},        
        "new_showerhead_gpm"              : {"type": "number", "minimum": 1  ,  "maximum": 5,     "description": "gal/min"},
        "single_defrost_kwh"              : {"type": "number", "minimum": 0.01, "maximum": 1,     "description": "kWh"},
        "annual_outside_film_coeff"       : {"type": "number", "minimum": 1,    "maximum": 5,     "description": "Btu/hr-sqft-F"},
        "r_value_uninsulated_other_wall"  : {"type": "number", "minimum": 1,    "maximum": 10,    "description": "hr-sqft-F/Btu"},
        "r_value_exterior_siding_other"   : {"type": "number", "minimum": 0.1,  "maximum": 10,    "description": "hr-sqft-F/Btu"},
        "new_dwh_blanket_r_value"         : {"type": "number", "minimum": 1  ,  "maximum": 15,    "description": "hr-sqft-F/Btu"},
        "base_free_heat_from_internals"   : {"type": "number", "minimum": 1,    "maximum": 5000,  "description": "Btu/hr"},
        "heating_setpoint_day"            : {"type": "number", "minimum": 50,   "maximum": 80,    "description": "deg F"},
        "heating_setpoint_night"          : {"type": "number", "minimum": 50,   "maximum": 80,    "description": "deg F"},
        "cooling_setpoint_day"            : {"type": "number", "minimum": 50,   "maximum": 90,    "description": "deg F"},
        "cooling_setpoint_night"          : {"type": "number", "minimum": 50,   "maximum": 90,    "description": "deg F"}
      },
      "required": [
        "real_discount_rate"              ,
        "minimum_acceptable_sir"          ,
        "new_showerhead_gpm"              ,
        "single_defrost_kwh"              ,
        "annual_outside_film_coeff"       ,
        "r_value_uninsulated_other_wall"  ,
        "r_value_exterior_siding_other"   ,
        "new_dwh_blanket_r_value"         ,
        "base_free_heat_from_internals"   ,
        "heating_setpoint_day"            ,
        "heating_setpoint_night"          ,
        "cooling_setpoint_day"            ,
        "cooling_setpoint_night"          
      ]
    }

  }
}
