assume-framework / assume

ASSUME - Agent-based Simulation for Studying and Understanding Market Evolution
https://assume.readthedocs.io
20 stars 5 forks source link

Market coupling #335

Closed nick-harder closed 2 months ago

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.01266% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 77.51%. Comparing base (2b5a465) to head (5ad059a).

Files Patch % Lines
assume/common/grid_utils.py 0.00% 11 Missing :warning:
...me/markets/clearing_algorithms/complex_clearing.py 93.93% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #335 +/- ## ========================================== + Coverage 77.40% 77.51% +0.11% ========================================== Files 43 43 Lines 5018 5056 +38 ========================================== + Hits 3884 3919 +35 - Misses 1134 1137 +3 ``` | [Flag](https://app.codecov.io/gh/assume-framework/assume/pull/335/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | Coverage Δ | | |---|---|---| | [pytest](https://app.codecov.io/gh/assume-framework/assume/pull/335/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | `77.51% <81.01%> (+0.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kim-mskw commented 3 months ago

I thought about this more and have the following claim: with a DC OPF in pypsa the differences between the nodal pricing clearing and this should be neglectable, if we do not have strategic behavior of units

nick-harder commented 3 months ago

@kim-mskw I discussed it further in my team and the conclusion was, that in order to replicate the exact behavior with pypsa we need to define links instead of lines, and also not just a link, but a link in each direction, so 2 links per line. In that case the results will be exactly the same. When using our current formulation due to voltage calculations, which pypsa does, the results slightly differ at some points. We have tested it yesterday and so the result. You can test it also in this branch by running the nodal example and the zonal example, and comparing their price. So I am now 95% sure this is the correct way to go to implement zonal market coupling. I will conduct some further tests next week, but I expect now even bigger differences for larger systems. Also using our optimization is faster and this gives us more flexibility and better value in the long term, not making us dependedent on pypsa. Pypsa models can be still used to create and load szenarios, just as a market clearing this new market cleaering needs to be used.