Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Upgrading

* Add back support for old active power formula config `AC_ACTIVE_POWER`.
* The minimum required version of `frequenz-microgrid-component-graph` is now `v0.3.4`.

## New Features

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [
"marshmallow-dataclass >= 8.7.1, < 9",
"asyncclick >= 8.3.0.4, < 9",
"typing-extensions >= 4.14.1, < 5",
"frequenz-microgrid-component-graph >= 0.2.0, < 0.3",
"frequenz-microgrid-component-graph >= 0.3.4, < 0.4",
"frequenz-client-assets >= 0.2.0, < 0.3",
]
dynamic = ["version"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_graph_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ async def test_formula_generation() -> None:
graph = await g.get_component_graph(MicrogridId(10))

assert graph.grid_formula() == "COALESCE(#2, #4, 0.0) + #3"
assert graph.pv_formula(None) == "COALESCE(#4, #2, 0.0)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Earlier we preferred inverters as primary, and meters as secondary or fallback. Now the order is reversed.

Because some big sites have one meter and 5 inverters behind them etc, we don't need to process 5 components when we can just do one, during normal operation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is a config variable now and can be reversed.

assert graph.pv_formula(None) == "COALESCE(#2, #4, 0.0)"