Add multi‑commodity support to device scheduler#1946
Add multi‑commodity support to device scheduler#1946Ahmad-Wahid wants to merge 19 commits intofeat/switching-between-gas-and-electricityfrom
Conversation
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Documentation build overview
Show files changed (13 files in total): 📝 11 modified | ➕ 1 added | ➖ 1 deleted
|
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
…chemas Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
This reverts commit b22c6d7.
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
|
@Flix6x could you please suggest some assertions for both test cases? |
|
Please comment on why the test suite is failing. |
|
Please try to run these test cases: |
Flix6x
left a comment
There was a problem hiding this comment.
I reviewed the two tests.
| # ---- assertions | ||
| assert isinstance(schedules, list) | ||
| assert len(schedules) >= 2 # at least one schedule per device |
There was a problem hiding this comment.
Given that the prices are constant, I'd expect the tie-breaking preference to charge sooner and discharge later would kick in.
The schedules should represent that by showing all charging happens in the first time slots, each up until the max capacity for the device (there is no site capacity).
Please add the assert statements for this behaviour and observe that the schedules are not currently reflecting this behaviour. Therefore, there must be a problem in the code, too. What do the schedules look like when you schedule this system against main (without setting the commodities)? I mean, you'd expect the same result as before, right?
Let's also add a check against the electricity costs for both devices. The expected totals should be explained in the code. For instance, at a 100 EUR/MWh, a total demand of x kWh and an efficiency of y, we expect z costs.
| def test_mixed_gas_and_electricity_assets(app, db): | ||
| """ | ||
| Test scheduling two flexible assets with different commodities: | ||
| - Battery (electricity) | ||
| - Gas boiler (gas) | ||
| """ |
There was a problem hiding this comment.
What are you testing in this test? Please explain the reason for the test's existence in the docstring.
My take: the gas boiler is currently creating gas, which is pretty weird. :) You'll need a production-capacity set to 0 kW. Afterwards, the gas boiler just stands idle. I would expect this test to have the gas boiler do something, too, and then proof that electricity costs and gas costs are both as expected.
I also think in this test the two devices are essentially completely separate systems. That is, shared commodity, constraints or storage. I think that is worth pointing out.
Signed-off-by: F.N. Claessen <claessen@seita.nl>
This PR adds initial support for multi‑commodity commitments (e.g. gas and electricity) in the device_scheduler, building on the grouped‑devices functionality. Flow commitments can now be tagged with a commodity, and EMS‑level flow constraints are applied per commodity by aggregating the relevant devices.
TODO
closes https://github.com/SeitaBV/simulations/issues/987