frequenz-floss / frequenz-api-microgrid

gRPC+protobuf specification and Python bindings for the Frequenz Microgrid API
https://frequenz-floss.github.io/frequenz-api-microgrid/
MIT License
6 stars 6 forks source link

Remove the `Inclusion`/`Exclusion` terminology in RPCs for adding bounds #180

Closed tiyash-basu-frequenz closed 8 months ago

tiyash-basu-frequenz commented 1 year ago

What's needed?

Our API processes Bounds with a conservative approach, allowing clients to specify them as either 'Inclusion' or 'Exclusion' types. Clients provide one pair of bounds at a time, tagged accordingly. The philosophy is to ensure safety by:

  1. Intersecting Inclusion Bounds: Multiple Inclusion bounds intersect to form the narrowest possible range, focusing on restrictive aggregation.
  2. Unioning Exclusion Bounds: Multiple Exclusion bounds merge into a broad range, aiming for extensive coverage.

This method ensures that the aggregated bounds is never less conservative than any of the input bounds.

However, in reporting bounds within data streams, we've moved away from labeling them as 'Inclusion' or 'Exclusion'. Instead, we return a single list of bounds, accepting any input request parameter falling within these bounds. This shift leads to a discrepancy: users specify bounds with labels, but receive an unlabeled, aggregated list. This mismatch could cause confusion about the bounds' interpretation.

Proposed solution

A potential solution is to let users submit a list of bounds without specifying 'Inclusion' or 'Exclusion'. Our service could then intersect these lists to derive a final, conservatively aggregated set of bounds, aligning with our cautious approach.

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response