US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Default Parameter Code Valid Value Value Corrections #6403

Open djw4erg opened 2 months ago

djw4erg commented 2 months ago

Overview

The DTO check for valid Default Parameter Codes values excludes "SORX" (Maximum SO2 Emission Rate). The Monitor Default edit screens Parameter dropdown does not include "Maximum SO2 Emission Rate" (SORX). Both imports and the screen should allow the use of "SORX".

The DTO check for valid Default Parameter Codes values excludes "SORX" (Maximum SO2 Emission Rate) and includes "BWA" (Moisture Fraction in Ambient Air). Twenty-three instances of Default Parameter Code "SORX" currently exist with all beginning on January 1st, 2009. No instances of "BWA" exists and could only be entered through a screen in ECMPS 1.0. The purpose of this ticket is to update the DTO check to allow the import and entry of MP JSON that contains "SORX" Default Parameter Codes.

Background

Issues Found During Performance Testing

Changes

Make the following generic crosscheck changes to:

  1. Allow the DTO checking for valid Default Parameter Codes to include "SORX".
  2. Allow the creation, editing, and display of "SORX" defaults in the Monitor Default create/edit screen.
  3. Correct the creation, editing, and display of "BWA" defaults in the Monitor Default create/edit screen.
Id Name Value 1 Value 2
11 Parameter to Category SORX DEFAULT1
191 Parameter Code to Units of Measure Code for Defaults BWA PCT2
191 Parameter Code to Units of Measure Code for Defaults SORX LBMMBTU
192 Parameter Code to Purpose Code for Defaults BWA PM
192 Parameter Code to Purpose Code for Defaults SORX MD
193 Parameter Code to Fuel Code for Defaults BWA [see note]3
193 Parameter Code to Fuel Code for Defaults SORX PNG
193 Parameter Code to Fuel Code for Defaults SORX NFS
193 Parameter Code to Fuel Code for Defaults SORX DSL
194 Parameter Code to Source Code for Defaults BWA DATA
194 Parameter Code to Source Code for Defaults SORX DATA
194 Parameter Code to Source Code for Defaults SORX DEF

Notes:

  1. Update the existing "Parameter to Category" "SORX" Value 2 to "DEFAULT".
  2. CAPD confirmed (Support Meeting October 10th 2024) to use "PCT" (Percentage) as the UOM for BWA in ECMPS 2.0, Any changes to this will be handled by a subsequent discussion and ticket.
    • CAPD confirmed this in the October 10th 2024 ECMPS Support Meeting.
    • The ECMPS 2.0 Reporting Instructions may need to be updated to match this change.
  3. Add a line for each Fuel Code in the CAMDECMPSMD FUEL_CODE table.
    • CAPD confirmed this in the October 10th 2024 ECMPS Support Meeting.
    • The ECMPS 2.0 Reporting Instructions may need to be updated to match this change.
  4. Value 3 is null for each row.
  5. The changes will affect the data returned by CAMDECMPSMD.VW_DEFAULTS_MASTER_DATA_RELATIONSHIPS, which is used by the DTO checks and to populate the Monitor Default screen dropdowns.

Technical Information

Currently the DTO check for the Default Parameter Code uses the following to get a list of the valid parameter codes.

`SELECT distinct parameter_code as "value" FROM camdecmpsmd.vw_defaults_master_data_relationships

SELECT * FROM camdecmpsmd.vw_defaults_master_data_relationships

It returns "BWA" but does not return "SORX". "BWA" is not a Default Parameter Code in the ECMPS 1.0 XSD's DefaultParameterCodeType, but "SORX" is.

Additional Information

Locations with "SORX" Default Parameter Codes

ORIS Facility Locations
1913 Inver Hills 1, 2, 3, 4, 5, 6
4014 Wheaton Generating Plant 1, 2, 3, 4, 5, 6
10143 Colver Green Energy AAB01

Acceptance Tests:

  1. Allow importing of "SORX" and "BWA" defaults. (Currently there are no BWA defaults)
  2. Allow the creation, editing, and display of "SORX" defaults in the Monitor Default create/edit screen.
  3. Correct the creation, editing, and display of "BWA" defaults in the Monitor Default create/edit screen.
  4. Evaluate the data and make sure no issues are encountered.
djw4erg commented 2 months ago

Issues Found During Performance Testing

Additional issues were found during performance testing. Per 9/12/2024 performance testing meeting, documenting these issues here as part of this ticket research.

Example 1: The following types of import and evaluation errors are generated for ORIS 1913, 1 & 2.

Import:

image

Evaluate: These are related to inactive SORX default records (1/1/2009 - 12/31/2009).

image

Example 2: The following types of import and evaluation errors are generated for ORIS 4014, 2, 3 and 4.

Import:

image

Evaluate: These are related to inactive SORX default records (1/1/2009 - 12/31/2017).

image

Reply

This issue is not really an "inactive record" issue in my opinion. The failing DTO check seems to implement DEFAULT-47-B, but it should implement the Default Parameter Code Type from the ECMPS 1.0 MP XSD. That type definition includes "SORX" (Maximum SO2 Emission Rate). The definition includes all the default parameter codes allowed by the ECMPS 2.0 check except for "BWA" (Moisture Fraction in Ambient Air). Changing the DTO check to match the XSD Default Parameter Code Type will eliminate the problem for "SORX".

Note that the "SORX" appears to be a pre-ECMPS relic with all 23 instances starting on 1/1/2009.

Additionally we probably need to check with Charlie to determine whether reporting "BWA" (Moisture Fraction in Ambient Air) for Monitor Defaults is actually allowed.

ibarra-michelle commented 1 week ago

Verified in dev for for ORIS 4014 Config 2:

Hey @djw4erg, I have a question for you: when started testing in dev, I reverted, exported, and imported the MP file, then evaluated the file. The evaluation output a critical error, QUAL-38-C, "You have not reported all the required Monitor Qualification Percent records for QualificationTypeCode PK BeginDate 1/1/2008." I added a Qualification Action (Qualification Year 2024) , and was able to complete my QA testing. Could you confirm if this QUAL-38-C error is expected? If so, I will move the ticket to QA Done. Otherwise, we should determine alternative next steps or talk at the Friday Standup meeting, thanks.

Resource: This is a link to the passing MP file of the Wheaton Generating Plant, 2-(11-20-2024).json.

Acceptance Tests:

"SORX" defaults:

"BWA" defaults:

FYA - @esaber76 and @bryanramirez1

esaber76 commented 1 week ago

Verified in dev for for ORIS 4014 Config 2:

Hey @djw4erg, I have a question for you: when started testing in dev, I reverted, exported, and imported the MP file, then evaluated the file. The evaluation output a critical error, QUAL-38-C, "You have not reported all the required Monitor Qualification Percent records for QualificationTypeCode PK BeginDate 1/1/2008." I added a Qualification Action (Qualification Year 2024) , and was able to complete my QA testing. Could you confirm if this QUAL-38-C error is expected? If so, I will move the ticket to QA Done. Otherwise, we should determine alternative next steps or talk at the Friday Standup meeting, thanks.

Resource: This is a link to the passing MP file of the Wheaton Generating Plant, 2-(11-20-2024).json.

Acceptance Tests:

"SORX" defaults:

  • [x] Allow importing of "SORX" defaults.
  • [x] Allow the creation, editing, and display of "SORX" defaults in the Monitor Default create/edit screen.
  • [x] Evaluate the data and make sure no issues are encountered.

"BWA" defaults:

  • [x] Allow importing of "BWA" defaults. (Currently there are no BWA defaults)
  • [x] Correct the creation, editing, and display of "BWA" defaults in the Monitor Default create/edit screen.
  • [x] Evaluate the data and make sure no issues are encountered.

FYA - @esaber76 and @bryanramirez1

@ibarra-michelle - yes this is expected for locations with active PK or GF qualification records. They need to add them every new calendar year in the MP and our data is so old...

ibarra-michelle commented 1 week ago

@ibarra-michelle - yes this is expected for locations with active PK or GF qualification records. They need to add them every new calendar year in the MP and our data is so old...

Thanks for confirming @esaber76. I'll move this over to QA Done.