-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ration-state Handle appliance operation state
- Loading branch information
Showing
9 changed files
with
187 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 5.0.4 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
from dataclasses import dataclass | ||
from typing import Dict | ||
from datetime import timedelta | ||
|
||
|
||
@dataclass(frozen=True) | ||
class TimeSeriesEntry: | ||
time: timedelta # since start of time series | ||
value: float # in kW | ||
|
||
|
||
@dataclass(frozen=True) | ||
class TimeSeries: | ||
""" | ||
Data class to represent time series | ||
:values: a mapping from a time step to its value | ||
:type values: dict[int, float] | ||
Data class to represent time series. The time series is configured in an event-discrete way. A value that is set | ||
at a certain second value is valid until the start second value of the following entry. | ||
:values: a mapping from a time in seconds (from operation start) to power in kW | ||
:length: the total length of the time series | ||
""" | ||
|
||
values: Dict[int, float] | ||
values: list[TimeSeriesEntry] | ||
length: timedelta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters