Skip to content

Commit 44be580

Browse files
committed
Document how to use shifting groups the shift the target power
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 0b71dad commit 44be580

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/frequenz/sdk/microgrid/__init__.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,43 @@
187187
found in the documentation for any of the
188188
[`propose_power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_power]
189189
methods.
190+
191+
### Shifting the target power by an offset
192+
193+
There are cases where the target power needs to be shifted by a certain amount, for
194+
example, to make adjustments to the operating point. This can be done by designating
195+
some actors to be part of the `shifting_group`.
196+
197+
When creating a `*Pool` instance using the above-mentioned constructors, an optional
198+
`in_shifting_group` parameter can be passed to specify that this actor is special, and
199+
the target power of the regular actors will be shifted by the target power of all
200+
shifting actors together.
201+
202+
In a location with 2 regular actors and 1 shifting actor, here's how things
203+
would play out:
204+
205+
1. When only non-shifting actors have made proposals, the power bounds available
206+
from the batteries are available to them exactly.
207+
208+
| actor priority | in shifting group? | proposed power/bounds | available bounds |
209+
|----------------|--------------------|-----------------------|------------------|
210+
| 3 | No | 1000, -4000..2500 | -3000..3000 |
211+
| 2 | No | 2500 | -3000..2500 |
212+
| 1 | Yes | None | -3000..3000 |
213+
214+
Power actually distributed to the batteries: 2500W
215+
216+
2. When the shifting actor has made proposals, the bounds available to the
217+
regular actors gets shifted, and the final power that actually gets
218+
distributed to the batteries is also shifted.
219+
220+
| actor priority | in shifting group? | proposed power/bounds | available bounds |
221+
|----------------|--------------------|-----------------------|------------------|
222+
| 3 | No | 1000, -4000..2500 | -2000..4000 |
223+
| 2 | No | 2500 | -2000..2500 |
224+
| 1 | Yes | -1000 | -3000..3000 |
225+
226+
Power actually distributed to the batteries: 1500W
190227
""" # noqa: D205, D400
191228

192229
from ..actor import ResamplerConfig

0 commit comments

Comments
 (0)