Skip to content

Conversation

@brtietz
Copy link
Collaborator

@brtietz brtietz commented Aug 13, 2021

Reduce the number of dispatch algorithms to places where the underlying algorithm is different, and add new enums for weather (generation) forecast and load forecasting. These are fully fleshed out for FOM, BTM will come in another pull request. Pairs with SAM PR: NREL/SAM#681

New forecast enum numbers:
FOM:

  • 0 - Economic
  • 1 - PV Smoothing
  • 2 - Custom
  • 3 - Manual

BTM:

  • 0 - Peak Shaving
  • 1 - Input Grid Target
  • 2 - Custom
  • 3 - Manual
  • 4 - Price signals

…tomated economic dispatch since the numbers would likely change
}
}

// Re-compute PV AC forecast for AC connected batteries
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjanzou This code change is the reason the number of violations increased in the pv smoothing test. The new AC look ahead number includes additional losses and therefore I'd argue it's more accurate. Let me know if it makes sense to update the numbers in the test or solve the test failure some other way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably re-evaluate with the code from EPRI - although it will not include the additional losses - maybe if we use the updated pv profile as input to the Python from EPRI - we can match the violation count to the new SAM count...

Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

Copy link
Collaborator

@dguittet dguittet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor requests from me. After those, I think it's good to go!

look_ahead = true;
look_ahead = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_LOOK_AHEAD;
look_behind = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_LOOK_BEHIND;
input_forecast = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_CUSTOM;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the standard semantics for this is the case keyword. That'll also make sure batt_weather_forecast is within the correct bounds for `dispatch_t::WEATHER_FORECAST_CHOICE1

if (batt_dispatch == dispatch_t::FOM_AUTOMATED_ECONOMIC || batt_dispatch == dispatch_t::FOM_PV_SMOOTHING) {
look_ahead = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_LOOK_AHEAD;
look_behind = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_LOOK_BEHIND;
input_forecast = batt_weather_forecast == dispatch_t::WEATHER_FORECAST_CHOICE::WF_CUSTOM;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, look_ahead, etc should all be False to start then one should be toggled on

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are flagged to false in the header file. I'll proceed with the case statement for clarity.


int batt_forecast_choice = as_integer("batt_dispatch_wf_forecast_choice");
if (is_assigned("batt_pv_clipping_forecast")) {
p_pv_clipping_forecast = as_vector_ssc_number_t("batt_pv_clipping_forecast");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember you asking about lifetime forecasts, but herebatt_pv_clipping_forecast is 1 year only? Please specify in var table if its 1 yr forecast, if it isn't already

…pdate forecast variables to accept lifetime lengths as available. Update vartable descriptions to indicate length requirements. Remove errorneous kw to w conversion when forecast is labelled in kw
@brtietz brtietz merged commit aa225dd into develop Aug 19, 2021
@brtietz brtietz deleted the refactor_battery_enums branch August 24, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants