FCR Market
FCRmarket
Source code in markets\FCR_market.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
__init__(market_config, battery_config, day, db)
Initializes the FCRmarket class with the given configurations and database connection.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
market_config
|
dict
|
Configuration for the FCR market. |
required |
battery_config
|
dict
|
Configuration for the battery, including energy and power limits. |
required |
day
|
str
|
The day for which the market is being initialized. |
required |
db
|
object
|
Database connection object for retrieving market data. |
required |
Source code in markets\FCR_market.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
calculate_fcr_revenue(fcr_prices, market_config, battery_config)
Calculates the revenue for FCR based on prices, market configuration, and battery configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fcr_prices
|
Series
|
FCR prices for the day. |
required |
market_config
|
dict
|
Market configuration with power share. |
required |
battery_config
|
dict
|
Battery configuration with power and energy limits. |
required |
Returns:
Type | Description |
---|---|
pd.Series: Revenue for each 4-hour block of the day. |
Source code in markets\FCR_market.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
get_fcr_prices(day, folder_path=None, db=None)
Retrieves FCR prices from a local file for the given day.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path
|
str
|
Path to the file containing FCR prices. |
required |
day
|
str
|
The day for which FCR prices are retrieved. |
required |
Returns:
Type | Description |
---|---|
pd.Series: FCR prices for the specified day. |
Source code in markets\FCR_market.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
get_fcr_prices_from_db(day, db)
Retrieves FCR prices from the database for the given day.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
day
|
str
|
The day for which FCR prices are retrieved. |
required |
db
|
object
|
Database connection object. |
required |
Returns:
Type | Description |
---|---|
pd.Series: FCR prices for the specified day. |
Source code in markets\FCR_market.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
set_marketable_power(battery_config, market_config)
Sets the marketable power and SOC boundaries based on battery and market configurations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
battery_config
|
dict
|
Battery configuration with power and energy limits. |
required |
market_config
|
dict
|
Market configuration with power share. |
required |
Notes
- Marketable power is calculated based on PQ-regulations formula 3.9.
- SOC boundaries are calculated based on PQ-regulations formulas 3.7 and 3.8.
Source code in markets\FCR_market.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|