FFFF Inconsistent time index handling in BDEW profiles · Issue #104 · oemof/oemof-demand · GitHub
[go: up one dir, main page]

Skip to content

Inconsistent time index handling in BDEW profiles #104

Open

Description

@srhbrnds

Problem

The time index is handled inconsistently across the BDEW profile classes, and the docs don't say what's expected.

  1. Outdated docstring in HeatBuilding
    HeatBuilding.__init__(self, df_index, **kwargs) builds its DataFrame from df_index, but the docstring only documents a year parameter, which the code doesn't use.

  2. Timezone of the index is not documented
    ElecSlp(year) creates a timezone-naive index internally, and the example in get_scaled_power_profiles uses naive timestamps. For HeatBuilding, the docs don't mention timezones at all. However, get_sf_values() and get_weekday_parameters() rebuild naive indices from date + hour, which suggests df_index should be timezone-naive.

Proposed changes

  • Replace year with df_index in the HeatBuilding docstring.
  • State explicitly in the docs that the index must be timezone-naive (if that is the intended behaviour).

Feature request: df_index for ElecSlp

Current behaviour: ElecSlp(year) always returns one full calendar year at 15-min resolution. For model periods that don't start on Jan 1, users have to cut and append yearly profiles manually.

Requested behaviour: Allow ElecSlp to accept a df_index (any start, length and resolution), analogous to HeatBuilding. The year parameter could remain for backwards compatibility.

Originally raised in the openmod forum: https://forum.openmod.org/t/oemof-bdew-heat-profiles/6131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0