Open christianparpart opened 1 year ago
Add two more boxed types
Both reflecting non-negative power with the semantic meaning encoded into the type system.
There shall be convenience methods like
@staticmethod from_power(Power)
as_power(self) -> Power
s.a.
as discussed in the meeting, to encode meaning into the power values to catch value errors as early as possible, also aiding code review.
No response
in the FCR Prequalification Actor we've prototyped the use of such abstractions and had quite positive impressions about it.
I guess the battery pool charge/discharge command should return this new type, right? So this would be a breaking change?
What's needed?
Add two more boxed types
Both reflecting non-negative power with the semantic meaning encoded into the type system.
There shall be convenience methods like
@staticmethod from_power(Power)
, andas_power(self) -> Power
Proposed solution
s.a.
Use cases
as discussed in the meeting, to encode meaning into the power values to catch value errors as early as possible, also aiding code review.
Alternatives and workarounds
No response
Additional context
in the FCR Prequalification Actor we've prototyped the use of such abstractions and had quite positive impressions about it.