Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Request mechanism #247

Merged
merged 6 commits into from
Nov 14, 2023
Merged

Data Request mechanism #247

merged 6 commits into from
Nov 14, 2023

Conversation

maurerle
Copy link
Member

This adds a new data_request mechanism which can be used to request the power generation of a unit or the market price of a market.
This is needed for contracts, which are developed in a follow-up PR

  • add data_request mechanism to market and units_operator
  • do not shadow on_stop and setup methods
  • unify usage of start_time and end_time

This allows workflows like:

  1. request market_price of last week from market
  2. wait for result from market
  3. calculate contract result (e. g. hours in which the price is above or below some value) in the contract_market_agent

do not shadow on_stop and setup methods
unify usage of start_time and end_time
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (61d58a8) 78.33% compared to head (05acc78) 78.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #247      +/-   ##
==========================================
+ Coverage   78.33%   78.44%   +0.11%     
==========================================
  Files          39       39              
  Lines        4218     4259      +41     
==========================================
+ Hits         3304     3341      +37     
- Misses        914      918       +4     
Flag Coverage Δ
pytest 78.44% <92.59%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
assume/common/market_objects.py 100.00% <100.00%> (ø)
assume/markets/base_market.py 88.73% <100.00%> (+1.16%) ⬆️
assume/common/outputs.py 49.75% <0.00%> (-0.51%) ⬇️
assume/common/units_operator.py 90.52% <90.90%> (-0.44%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nick-harder nick-harder left a comment

Choose a reason for hiding this comment

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

Everything looks fine, but could you please also add some tests for the new functionality and updated setup() function for the market operator? Just to be sure we have working features on main.

maurerle and others added 3 commits November 12, 2023 16:45
remove unit_id mapping, by adding the unit_id implicit to the order, this fixes the graph on the dashboard
update grafana dashboard to include economic metrics
fix ramping in example_02
@nick-harder
Copy link
Member

@maurerle hi Florian, so are no additional tests required for this functionality? I saw a commit with fix tests, but no extra tests. Or are they a part of another commit?

@nick-harder nick-harder merged commit 3bddb13 into main Nov 14, 2023
4 checks passed
@nick-harder nick-harder deleted the data_request_mechanism branch November 14, 2023 07:29
maurerle added a commit that referenced this pull request Mar 5, 2024
This PR implements a feed in policy, which calculates the value a
special demand agent pays on top of the market prices as a
feed-in-tariff.
The contract is accepted on a monthly base for example, and evaluated on
a weekly base.
For this, the generation and market_price of the last week is requested
using the data_request mechanism developed in #247 - then the resulting
orderbook is created and sent to the contract participants using the
already existing `clearing` process.

This works in general, though the results are not correct yet. I think
the volume and price is applied for the whole series and the dashboard
needs some polishment too.

---------

Co-authored-by: Nick Harder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants