PowerShaper Event reporting

Once a turn down event has finished the hourly dsr_reporting.tasks.poll_completed_events() task will detect this and create a CompletedEvent record locally. It is to this that usage data are added. Each site that was initially associated is stored as a CompletedEventSite, and each of these then has halfhourly usage records associated with it (ParticipantReports). If a user has opted out of an event, the CompletedEventSite is retained but its status is set to CANCELLED.

A separate task dsr_reporting.tasks.add_participantreports_to_eventsite() creates halfhour ParticipantReports for each CompletedEventSite that did not opt out, and makes an initial attempt to store energy consumption and baseline data for each of these halfhourly reports.

As the availability of smart meter data can lag by up to a few days a separate hourly task, dsr_reporting.tasks.add_data_to_participantreports(), runs over all the ParticipantReports that have missing data either from smart meters or telemetry and attempts to fill them in. This function only tries to access fetch telemetry data if the ParticipantReport has no data at all. Smart Meter data is preferred, so if there is Smart Meter data associated with the ParticipantReport, we don’t need telemetry.

The completeness of the data is stored on the CompletedEventSite (meter_data_complete and telemetry_data_complete) to avoid very repetitious and computatioinally intensive aggregate queries to calculate this dynamically each time it is required.

Calculating Flex

Flex is defined in this system as the reduction in energy during a turn down event from a baseline calculated from an average of the past usage at this time.

The baseline is calculated by:

  • Taking usage for the previous three weeks

  • Selecting only the weekdays or weekends - depending on when the event is

  • Selecting the usage in the same 30 minute period on each of those days

  • Taking the average of the those values

The flexibility provided is the difference between the baseline and actual consumption during the event.

If smart meter data are available, flex is calculated from this out of preference. If it is not, telemetry data are used. Telemetry data are never compared with meter data.

Flex is presented to the user and administrator in the following way:

../../../_images/flex-report-graph.png

Users can view their own results as well as the combined flex provided for the event. A combined report graph is not shown until flex can be calculated for every participant.

Issues

  • The add_data_to_participantreports() task that attempts to fill in missing data never gives up; it runs hourly on all gaps for all sites in all events for eternity. This was a fair first pass but needs to be improved because data records are sometimes permanently missing, meaning that the work done by this task is ever-increasing.