Running the Adapter
The script can be run with following command line options:
nms-DERMSAdapter [-db] [-v] [-debug][-help][-recache]
Option
Description
-db
Input is RDBMS table. Otherwise, the input is a CSV file.
-v
Turn on verbose output.
-debug
Turn on debug for assisting with issues in the adapter. If debug is turned on, it will turn on verbose.
-help
Print help.
-recache
Sending recache profile message. If recache is turned on, it will not recache profiles.
 
The following assumptions apply:
1. Location of the DERMS, NCA, and External Load and Gen Forecast Data
File Based Input: The input CSV files for DERMS, NCA, and External Load and Gen are stored in the $OPERATIONS_MODELS/derms_forecasts directory. The CSV file extension name for external load and gen forecast is defined in SRS rules(rule_value_2) LOAD-GEN_EXTERNAL_INPUT_FILE_FORMAT
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, NCA, and External Load and Gen 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.
5. Once the data is validated ,External Load and Gen forecast data is written to the pf_gen_load_forecast Table. The data may come from mutiple external sources and these are configured in SRS rules(rule_value_1) LoadGenForecastDefault.
rule_value_integer_1 indicates unique integerKey to the forecast source.
rule_value_Integer_2 will define the ranking system that determine which to use in the powerflow analysis (low number has higher priority).
rule_value_integer_5 specifies type of forecast data available at external forecast source(1=only Distgen, 2= only Load, 3= both Load and Distgen).
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.