Running the Adapter
The script can be run with following command line options:
nms-DERMSAdapter [-db] [-v] [-debug][-help]
The following assumptions apply:
1. Location of the DERMS and NCA Forecast Data
• File Based Input: The input CSV files for DERMS and NCA are stored in the $OPERATIONS_MODELS/derms_forecasts directory.
• RDBMS Table Based Input: DERMS forecast updates are available in the following table:
• On operational service bus:
pf_derms_forecast_updates (FORECAST_DATE, RESOURCE_NAME, POWER_SOURCE_TYPE, FORECAST_VALUE)
• On enterprise service bus:
derms_forecast_updates (FORECAST_DATE, RESOURCE_NAME, POWER_SOURCE_TYPE, FORECAST_VALUE)
2. Processing the Forecast Data
• File Based Input: Once the CSV files of DERMS and NCA have been processed, they are moved to the $OPERATIONS_MODELS/derms_forecasts/parsed_csvs directory.
• RDBMS Table Based Input: The processed rows will be deleted from the input database table.
3. Once the data is validated, DER forecast data is written to the following table:
• On operational service:
Based on the forecast type (rule_value_2) defined by the SRS rules distGenDefault:
• 0 = Weather Affected Fuel Type; write to pf_weather_zone_forecast
• 1 = Single DER Forecast type; write to table pf_der_forecast
• 2 = Demand Response type; write to table pf_demand_reponse_forecast
Staging mechanism is used to load data from input RDBMS table to the run time forecast tables.
• On enterprise service bus:
pf_derms_forecast_updates (FORECAST_DATE, RESOURCE_NAME, POWER_SOURCE_TYPE, FORECAST_VALUE)
4. Once the data is validated, NCA forecast data is written to the net_cap_allocation_forecast table: For duplicate items within a single input file or in the RDBMS table, the first item read will be used. In some instances, these duplicates may be flagged as errors and placed into the error log file.
The OPAL configuration can be examined for examples of how this script is used. In OPAL, the script is called from a parent script (LoadOPALDermsForecasts), which is called from the OPAL‑postbuild script.