RadiantLabs / modeling-api-docs

Official Modeling API documentation
0 stars 1 forks source link

Max Option Lookup Issue for Various AHS Regions #57

Closed lukeduran closed 2 months ago

lukeduran commented 5 months ago

We are getting quite a few errors that seem to be related to not being able to fined max option look up for various regions. In the small sample from which I have tested, I have received errors for the following seven regions:

  1. AHS Region: DC, District Of Columbia County
  2. AHS Region: VA, Alexandria City County
  3. AHS Region: IL, Dupage County
  4. AHS Region: MO, St Louis County
  5. AHS Region: AL, Dekalb County
  6. AHS Region: VA, Charlottesville City County
  7. AHS Region: IL, Mchenry County

I would like to understand this error better so that we can have an idea on if this will be a bigger issues across the US as we broaden the surface area that is using this integration. What causes this error @joshuamzm @kellyatradiantlabs?

Below are three examples, but I have more to offer up!

Example 1

{
    "request": {
        "headers": {
            "User-Agent": "python-requests/2.28.1",
            "Accept-Encoding": "gzip, deflate",
            "Accept": "*/*",
            "Connection": "keep-alive",
            "Content-Type": "application/json",
            "Authorization": "Bearer jqnTR0wR6nmnS6u5mLEm1NSXq1kHSaF16LYlInbQ8tC04QHa",
            "Content-Length": "934"
        },
        "body": {
            "addressFull": "345 Oglethorpe St NE, Washington, DC 20011-1635",
            "addressComponents": {
                "addressLine1": "345 Oglethorpe St NE",
                "city": "Washington",
                "stateAbbreviation": "DC",
                "zipCode": "20011-1635"
            },
            "baseBuilding": {
                "buildingSummary": {
                    "yearBuilt": 1960,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8,
                    "conditionedFloorArea": 985
                },
                "enclosure": {
                    "airInfiltration": {
                        "rate": 1018,
                        "rateUnit": "CFM"
                    },
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 49,
                            "id": "attic-insulation-1"
                        }
                    ]
                }
            },
            "globalControls": {
                "debug": true,
                "includeInputs": true,
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "resolution": [
                    "annual",
                    "monthly"
                ],
                "timelineStartDate": "2024-04-08",
                "timelineDurationInYears": 1,
                "units": {
                    "energyStandard": "MBtu",
                    "coal": "metric ton",
                    "electricity": "MBtu",
                    "fuelOil": "MBtu",
                    "naturalGas": "MBtu",
                    "propane": "MBtu",
                    "woodCord": "MBtu",
                    "woodPellets": "MBtu",
                    "monetary": "USD",
                    "emissions": "CO2"
                }
            }
        }
    },
    "response": {
        "headers": {
            "Server": "nginx/1.24.0",
            "Date": "Mon, 08 Apr 2024 19:27:27 GMT",
            "Content-Type": "application/json;charset=utf-8",
            "Content-Length": "2511",
            "Connection": "keep-alive",
            "X-Request-Id": "01htzjvyshkkekcn9jz4gdprqw",
            "Strict-Transport-Security": "max-age=31536000"
        },
        "body": {
            "globalControls": {
                "timelineStartDate": "2024-04-08",
                "debug": true,
                "includeInputs": true,
                "resolution": [
                    "monthly",
                    "annual"
                ],
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "timelineDurationInYears": 1,
                "units": {
                    "monetary": "USD",
                    "electricity": "MBtu",
                    "naturalGas": "MBtu",
                    "woodPellets": "MBtu",
                    "propane": "MBtu",
                    "coal": "metric ton",
                    "emissions": "CO2",
                    "woodCord": "MBtu",
                    "energyStandard": "MBtu",
                    "fuelOil": "MBtu"
                }
            },
            "addressFull": "345 Oglethorpe St NE, Washington, DC 20011-1635",
            "baseBuilding": {
                "enclosure": {
                    "airInfiltration": {
                        "rate": 1018,
                        "rateUnit": "CFM"
                    },
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 49,
                            "id": "attic-insulation-1"
                        }
                    ]
                },
                "buildingSummary": {
                    "conditionedFloorArea": 985,
                    "yearBuilt": 1960,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8
                }
            },
            "addressComponents": {
                "zipCode": "20011-1635",
                "addressLine1": "345 Oglethorpe St NE",
                "stateAbbreviation": "DC",
                "city": "Washington"
            },
            "errors": [
                {
                    "message": "\"+ node ./dist/cli-generate-hpxml-files.js --rowPath /tmp/modeling-api/hpxml-gen-inputs/01htzjvyshkkekcn9jz4gdprqw/142879069_modified.json --outputDir /tmp/modeling-api/hpxml-gen-outputs/NORMAL/01htzjvyshkkekcn9jz4gdprqw --dataVersion radiantV5 --defaultsVersion 2.4.0 --hpxmlVersion 3.0.0 --modelingInputsPath /tmp/modeling-api/hpxml-gen-inputs/01htzjvyshkkekcn9jz4gdprqw/142879069_modeling_inputs.json --packageIds AUTOMATED_MEASURES --automatedMeasuresPath /tmp/modeling-api/hpxml-gen-inputs/01htzjvyshkkekcn9jz4gdprqw/142879069_automated_measures.json --disableSchematron --debug\\n{\\\"code\\\":3,\\\"error\\\":\\\"Could not find max option lookup. AHS Region: DC, District Of Columbia County\\\",\\\"stack\\\":\\\"Error: Could not find max option lookup. AHS Region: DC, District Of Columbia County\\\\n    at solveForDep (/app/dist/utils/lookup-defaults.js:117:15)\\\\n    at /app/dist/utils/lookup-defaults.js:39:63\\\\n    at arrayMap (/app/node_modules/lodash/lodash.js:653:23)\\\\n    at Function.map (/app/node_modules/lodash/lodash.js:9622:14)\\\\n    at recursiveLookup (/app/dist/utils/lookup-defaults.js:39:40)\\\\n    at lookupDefaults (/app/dist/utils/lookup-defaults.js:31:31)\\\\n    at generateBaseInputs (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/generate-base-inputs.js:16:68)\\\\n    at genRadiantV5Hpxml300Defaults240 (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/index.js:37:70)\\\\n    at generateHpxml (/app/dist/generate-hpxml/index.js:25:89)\\\\n    at generateHpxmlAndSaveToFile (/app/dist/cli-generate-hpxml-files.js:100:67)\\\"}\"",
                    "code": "error-generating-hpxml"
                }
            ]
        }
    }
}

Example 2

{
    "request": {
        "headers": {
            "User-Agent": "python-requests/2.28.1",
            "Accept-Encoding": "gzip, deflate",
            "Accept": "*/*",
            "Connection": "keep-alive",
            "Content-Type": "application/json",
            "Authorization": "Bearer jqnTR0wR6nmnS6u5mLEm1NSXq1kHSaF16LYlInbQ8tC04QHa",
            "Content-Length": "1605"
        },
        "body": {
            "addressFull": "127 Webster Woods Dr, Saint Louis, MO 63119-3946",
            "addressComponents": {
                "addressLine1": "127 Webster Woods Dr",
                "city": "Saint Louis",
                "stateAbbreviation": "MO",
                "zipCode": "63119-3946"
            },
            "baseBuilding": {
                "buildingSummary": {
                    "yearBuilt": 1941,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8,
                    "conditionedFloorArea": 3362
                },
                "enclosure": {
                    "airInfiltration": {
                        "rate": 3592,
                        "rateUnit": "CFM"
                    },
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 38,
                            "id": "attic-insulation-1"
                        }
                    ],
                    "foundations": [
                        {
                            "type": "basement unconditioned",
                            "id": "floor-and-foundation-insulation-2"
                        }
                    ]
                },
                "systems": {
                    "hvac": {
                        "hvacHeatingSystems": [
                            {
                                "systemType": "furnace",
                                "fuel": "natural gas",
                                "heatLoadFraction": 0.8,
                                "heatEfficiency": 0.8,
                                "heatEfficiencyUnits": "AFUE",
                                "id": "heating-systems-1"
                            }
                        ],
                        "hvacCoolingSystems": [
                            {
                                "systemType": "central air conditioner",
                                "coolLoadFraction": 0.8,
                                "coolEfficiency": 14.0,
                                "coolEfficiencyUnits": "SEER",
                                "id": "cooling-systems-1"
                            },
                            {
                                "systemType": "central air conditioner",
                                "coolLoadFraction": 0.2,
                                "coolEfficiency": 14.0,
                                "coolEfficiencyUnits": "SEER",
                                "id": "cooling-systems-2"
                            }
                        ]
                    },
                    "waterHeating": {
                        "waterHeatingSystems": []
                    }
                }
            },
            "globalControls": {
                "debug": true,
                "includeInputs": true,
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "resolution": [
                    "annual",
                    "monthly"
                ],
                "timelineStartDate": "2024-04-08",
                "timelineDurationInYears": 1,
                "units": {
                    "energyStandard": "MBtu",
                    "coal": "metric ton",
                    "electricity": "MBtu",
                    "fuelOil": "MBtu",
                    "naturalGas": "MBtu",
                    "propane": "MBtu",
                    "woodCord": "MBtu",
                    "woodPellets": "MBtu",
                    "monetary": "USD",
                    "emissions": "CO2"
                }
            }
        }
    },
    "response": {
        "headers": {
            "Server": "nginx/1.24.0",
            "Date": "Mon, 08 Apr 2024 20:57:29 GMT",
            "Content-Type": "application/json;charset=utf-8",
            "Content-Length": "3111",
            "Connection": "keep-alive",
            "X-Request-Id": "01htzqrxd68mg41qea6tyjafsa",
            "Strict-Transport-Security": "max-age=31536000"
        },
        "body": {
            "globalControls": {
                "timelineStartDate": "2024-04-08",
                "debug": true,
                "includeInputs": true,
                "resolution": [
                    "monthly",
                    "annual"
                ],
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "timelineDurationInYears": 1,
                "units": {
                    "monetary": "USD",
                    "electricity": "MBtu",
                    "naturalGas": "MBtu",
                    "woodPellets": "MBtu",
                    "propane": "MBtu",
                    "coal": "metric ton",
                    "emissions": "CO2",
                    "woodCord": "MBtu",
                    "energyStandard": "MBtu",
                    "fuelOil": "MBtu"
                }
            },
            "addressFull": "127 Webster Woods Dr, Saint Louis, MO 63119-3946",
            "baseBuilding": {
                "systems": {
                    "waterHeating": {
                        "waterHeatingSystems": []
                    },
                    "hvac": {
                        "hvacHeatingSystems": [
                            {
                                "heatLoadFraction": 0.8,
                                "heatEfficiency": 0.8,
                                "fuel": "natural gas",
                                "systemType": "furnace",
                                "id": "heating-systems-1",
                                "heatEfficiencyUnits": "AFUE"
                            }
                        ],
                        "hvacCoolingSystems": [
                            {
                                "coolEfficiencyUnits": "SEER",
                                "coolLoadFraction": 0.8,
                                "coolEfficiency": 14.0,
                                "systemType": "central air conditioner",
                                "id": "cooling-systems-1"
                            },
                            {
                                "coolEfficiencyUnits": "SEER",
                                "coolLoadFraction": 0.2,
                                "coolEfficiency": 14.0,
                                "systemType": "central air conditioner",
                                "id": "cooling-systems-2"
                            }
                        ]
                    }
                },
                "enclosure": {
                    "airInfiltration": {
                        "rate": 3592,
                        "rateUnit": "CFM"
                    },
                    "foundations": [
                        {
                            "type": "basement unconditioned",
                            "id": "floor-and-foundation-insulation-2"
                        }
                    ],
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 38,
                            "id": "attic-insulation-1"
                        }
                    ]
                },
                "buildingSummary": {
                    "conditionedFloorArea": 3362,
                    "yearBuilt": 1941,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8
                }
            },
            "addressComponents": {
                "zipCode": "63119-3946",
                "addressLine1": "127 Webster Woods Dr",
                "stateAbbreviation": "MO",
                "city": "Saint Louis"
            },
            "errors": [
                {
                    "message": "\"+ node ./dist/cli-generate-hpxml-files.js --rowPath /tmp/modeling-api/hpxml-gen-inputs/01htzqrxd68mg41qea6tyjafsa/42225588_modified.json --outputDir /tmp/modeling-api/hpxml-gen-outputs/NORMAL/01htzqrxd68mg41qea6tyjafsa --dataVersion radiantV5 --defaultsVersion 2.4.0 --hpxmlVersion 3.0.0 --modelingInputsPath /tmp/modeling-api/hpxml-gen-inputs/01htzqrxd68mg41qea6tyjafsa/42225588_modeling_inputs.json --packageIds AUTOMATED_MEASURES --automatedMeasuresPath /tmp/modeling-api/hpxml-gen-inputs/01htzqrxd68mg41qea6tyjafsa/42225588_automated_measures.json --disableSchematron --debug\\n{\\\"code\\\":3,\\\"error\\\":\\\"Could not find max option lookup. AHS Region: MO, St Louis County\\\",\\\"stack\\\":\\\"Error: Could not find max option lookup. AHS Region: MO, St Louis County\\\\n    at solveForDep (/app/dist/utils/lookup-defaults.js:117:15)\\\\n    at /app/dist/utils/lookup-defaults.js:39:63\\\\n    at arrayMap (/app/node_modules/lodash/lodash.js:653:23)\\\\n    at Function.map (/app/node_modules/lodash/lodash.js:9622:14)\\\\n    at recursiveLookup (/app/dist/utils/lookup-defaults.js:39:40)\\\\n    at lookupDefaults (/app/dist/utils/lookup-defaults.js:31:31)\\\\n    at generateBaseInputs (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/generate-base-inputs.js:16:68)\\\\n    at genRadiantV5Hpxml300Defaults240 (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/index.js:37:70)\\\\n    at generateHpxml (/app/dist/generate-hpxml/index.js:25:89)\\\\n    at generateHpxmlAndSaveToFile (/app/dist/cli-generate-hpxml-files.js:100:67)\\\"}\"",
                    "code": "error-generating-hpxml"
                }
            ]
        }
    }
}

Example 3

{
    "request": {
        "headers": {
            "User-Agent": "python-requests/2.28.1",
            "Accept-Encoding": "gzip, deflate",
            "Accept": "*/*",
            "Connection": "keep-alive",
            "Content-Type": "application/json",
            "Authorization": "Bearer jqnTR0wR6nmnS6u5mLEm1NSXq1kHSaF16LYlInbQ8tC04QHa",
            "Content-Length": "1383"
        },
        "body": {
            "addressFull": "411 E Howell Ave, Alexandria, VA 22301-1213",
            "addressComponents": {
                "addressLine1": "411 E Howell Ave",
                "city": "Alexandria",
                "stateAbbreviation": "VA",
                "zipCode": "22301-1213"
            },
            "baseBuilding": {
                "buildingSummary": {
                    "yearBuilt": 1940,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8,
                    "conditionedFloorArea": 1415
                },
                "enclosure": {
                    "airInfiltration": {
                        "rate": 2157,
                        "rateUnit": "CFM"
                    },
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 49,
                            "id": "attic-insulation-1"
                        }
                    ]
                },
                "systems": {
                    "hvac": {
                        "hvacHeatingSystems": [
                            {
                                "systemType": "furnace",
                                "fuel": "natural gas",
                                "heatLoadFraction": 1.0,
                                "heatEfficiency": 0.8,
                                "heatEfficiencyUnits": "AFUE",
                                "id": "heating-systems-1"
                            }
                        ],
                        "hvacCoolingSystems": [
                            {
                                "systemType": "central air conditioner",
                                "coolLoadFraction": 1.0,
                                "coolEfficiency": 16.0,
                                "coolEfficiencyUnits": "SEER",
                                "compressorType": "single stage",
                                "id": "cooling-systems-1"
                            }
                        ]
                    },
                    "waterHeating": {
                        "waterHeatingSystems": []
                    }
                }
            },
            "globalControls": {
                "debug": true,
                "includeInputs": true,
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "resolution": [
                    "annual",
                    "monthly"
                ],
                "timelineStartDate": "2024-04-08",
                "timelineDurationInYears": 1,
                "units": {
                    "energyStandard": "MBtu",
                    "coal": "metric ton",
                    "electricity": "MBtu",
                    "fuelOil": "MBtu",
                    "naturalGas": "MBtu",
                    "propane": "MBtu",
                    "woodCord": "MBtu",
                    "woodPellets": "MBtu",
                    "monetary": "USD",
                    "emissions": "CO2"
                }
            }
        }
    },
    "response": {
        "headers": {
            "Server": "nginx/1.24.0",
            "Date": "Mon, 08 Apr 2024 20:52:44 GMT",
            "Content-Type": "application/json;charset=utf-8",
            "Content-Length": "2919",
            "Connection": "keep-alive",
            "X-Request-Id": "01htzqr494nrwy197cq8rqs1kk",
            "Strict-Transport-Security": "max-age=31536000"
        },
        "body": {
            "globalControls": {
                "timelineStartDate": "2024-04-08",
                "debug": true,
                "includeInputs": true,
                "resolution": [
                    "monthly",
                    "annual"
                ],
                "includeBase": true,
                "includeTypical": true,
                "useFixture": false,
                "timelineDurationInYears": 1,
                "units": {
                    "monetary": "USD",
                    "electricity": "MBtu",
                    "naturalGas": "MBtu",
                    "woodPellets": "MBtu",
                    "propane": "MBtu",
                    "coal": "metric ton",
                    "emissions": "CO2",
                    "woodCord": "MBtu",
                    "energyStandard": "MBtu",
                    "fuelOil": "MBtu"
                }
            },
            "addressFull": "411 E Howell Ave, Alexandria, VA 22301-1213",
            "baseBuilding": {
                "systems": {
                    "waterHeating": {
                        "waterHeatingSystems": []
                    },
                    "hvac": {
                        "hvacHeatingSystems": [
                            {
                                "heatLoadFraction": 1.0,
                                "heatEfficiency": 0.8,
                                "fuel": "natural gas",
                                "systemType": "furnace",
                                "id": "heating-systems-1",
                                "heatEfficiencyUnits": "AFUE"
                            }
                        ],
                        "hvacCoolingSystems": [
                            {
                                "coolEfficiencyUnits": "SEER",
                                "coolLoadFraction": 1.0,
                                "coolEfficiency": 16.0,
                                "systemType": "central air conditioner",
                                "id": "cooling-systems-1",
                                "compressorType": "single stage"
                            }
                        ]
                    }
                },
                "enclosure": {
                    "airInfiltration": {
                        "rate": 2157,
                        "rateUnit": "CFM"
                    },
                    "attics": [
                        {
                            "floorAssemblyEffectiveRValue": 49,
                            "id": "attic-insulation-1"
                        }
                    ]
                },
                "buildingSummary": {
                    "conditionedFloorArea": 1415,
                    "yearBuilt": 1940,
                    "bedroomsCount": 3,
                    "averageCeilingHeight": 8
                }
            },
            "addressComponents": {
                "zipCode": "22301-1213",
                "addressLine1": "411 E Howell Ave",
                "stateAbbreviation": "VA",
                "city": "Alexandria"
            },
            "errors": [
                {
                    "message": "\"+ node ./dist/cli-generate-hpxml-files.js --rowPath /tmp/modeling-api/hpxml-gen-inputs/01htzqr494nrwy197cq8rqs1kk/209044485_modified.json --outputDir /tmp/modeling-api/hpxml-gen-outputs/NORMAL/01htzqr494nrwy197cq8rqs1kk --dataVersion radiantV5 --defaultsVersion 2.4.0 --hpxmlVersion 3.0.0 --modelingInputsPath /tmp/modeling-api/hpxml-gen-inputs/01htzqr494nrwy197cq8rqs1kk/209044485_modeling_inputs.json --packageIds AUTOMATED_MEASURES --automatedMeasuresPath /tmp/modeling-api/hpxml-gen-inputs/01htzqr494nrwy197cq8rqs1kk/209044485_automated_measures.json --disableSchematron --debug\\n{\\\"code\\\":3,\\\"error\\\":\\\"Could not find max option lookup. AHS Region: VA, Alexandria City County\\\",\\\"stack\\\":\\\"Error: Could not find max option lookup. AHS Region: VA, Alexandria City County\\\\n    at solveForDep (/app/dist/utils/lookup-defaults.js:117:15)\\\\n    at /app/dist/utils/lookup-defaults.js:39:63\\\\n    at arrayMap (/app/node_modules/lodash/lodash.js:653:23)\\\\n    at Function.map (/app/node_modules/lodash/lodash.js:9622:14)\\\\n    at recursiveLookup (/app/dist/utils/lookup-defaults.js:39:40)\\\\n    at lookupDefaults (/app/dist/utils/lookup-defaults.js:31:31)\\\\n    at generateBaseInputs (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/generate-base-inputs.js:16:68)\\\\n    at genRadiantV5Hpxml300Defaults240 (/app/dist/generate-hpxml/radiantV5-hpxml300-defaults240/index.js:37:70)\\\\n    at generateHpxml (/app/dist/generate-hpxml/index.js:25:89)\\\\n    at generateHpxmlAndSaveToFile (/app/dist/cli-generate-hpxml-files.js:100:67)\\\"}\"",
                    "code": "error-generating-hpxml"
                }
            ]
        }
    }
}
kellyatradiantlabs commented 5 months ago

@lukeduran Thank you for the specific list and including 3 examples! This is related to #42, as well. There is a step in our data transformations that takes the County name (e.g. SAINT LOUIS) and reformats it into the syntax you listed above (supposed to be "MO, St Louis County"). Your initial ticket #42 allowed us to identify a handful of locations where this transformation wasn't working. As part of the v2.0.0 release, we've implemented new logic to handle places like DC, all parishes in LA (that aren't actually called counties), and "__ City County" regions (like Charlottesville City). Your list in this ticket is showing more places where additional logic is necessary, such as places that have different casing (e.g. DeKalb) and Saints (which can be listed as St., St, or Saint). These changes will all be incorporated into v2.0.0 and will hopefully resolve the vast majority of edge cases.

kellyatradiantlabs commented 3 months ago

This request is now working in our v2.0.0 development environment.