Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datamodel: add load as an allowed variable #806

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

dplarson
Copy link
Contributor

@dplarson dplarson commented Jan 24, 2023

  • Closes Add variable type for gross load #787 .
  • I am familiar with the contributing guidelines.
  • Tests added. NOTE: there are no explicit tests for existing variables (including net_load), so for now this PR does not add new tests.
  • Updates entries to docs/source/api.rst for API changes. NOTE: no API changes
  • Adds descriptions to appropriate "what's new" file in docs/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

Add load as an allowed variable. Previously the datamodel only supported net_load as a variable and therefore made no distinction between (gross) load vs net load. One of the key differences is that load is generally defined as a non-negative measure of energy demand, while net load is the signed measured of energy demand import (positive values) vs export (negative values). This is a subtle but important difference, and supporting both variables (load and net_load) in the datamodel will enable better defined functionality for users. For example, when validating load data, negative values should be treated as erroroneous. But negative values net load data should be treated as valid.

Add `load` as an allowed variable. Previously the datamodel only
supported `net_load` as a variable and therefore made no distinction
between (gross) load vs net load. One of the key differences is that
load is generally defined as a non-negative measure of energy demand,
while net load is the signed measured of energy demand import (positive
values) vs export (negative values). This is a subtle but important
difference, and supporting both variables (`load` and `net_load`) in the
datamodel will enable better defined functionality for users. For
example, when validating load data, negative values should be treated as
erroroneous. But negative values net load data should be treated as
valid.
@dplarson dplarson requested a review from awig January 24, 2023 08:24
@dplarson dplarson added enhancement New feature or request datamodel labels Jan 24, 2023
@dplarson
Copy link
Contributor Author

Note: the way everything is coded in the API and Dashboard, the addition of the load variable in sfa-core gets propagated automatically to the API and Dashboard. For example, if try to create a new Observation in the Dashboard, the load variable is listed without having to make any code changes to the sfa-dashboard repo.

screenshot_observation

screenshot_variables

@dplarson
Copy link
Contributor Author

Forgot to mention: based on discussions among the current project team, we settled on using the nomenclature of "load" and "net load", rather than "gross load" and "net load", where "load" is a non-negative measure of energy demand while "net load" is a signed measure to differentiate between import vs export of energy (e.g., import energy to meet demand vs export excess solar generation once the local demand is met).

This is due to a combination of factors, including higher prevalence of "load" compared to "gross load" (or similarly, "true demand") and simplicity of naming. While there are valid arguments for other choices, the choice of "load" as the name seems to be the best choice at this time for all those involved in the Arbiter (contributors/maintainers, forecast providers, and forecast consumers).

@awig
Copy link
Member

awig commented Jan 24, 2023

I've been able to replicate using the local dashboard. Changes are straightforward and simple. No pytest issues.

Copy link
Member

@awig awig left a comment

Choose a reason for hiding this comment

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

Simple. Test and repeated in dashboard.

@awig awig merged commit b8a9abe into SolarArbiter:master Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodel enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add variable type for gross load
2 participants