--- jupytext: text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.13.8 kernelspec: display_name: 'Python 3' name: python3 --- (market)= # market The representation of an electricity market, usually the day-ahead energy market. It is also possible to define a reserve capacity market by connecting the market object to a reserve_group object. Only generators and pumps connected to the reserve_group will participate in the reserve market, and the reserve obligation in the reserve_group serves as market 'load' | | | |---|---| |Input connections|{ref}`reserve_group`, {ref}`busbar`| |Output connections|{ref}`reserve_group`, {ref}`busbar`| |License|SHOP_OPEN| |Release version|13.0.0.a| ```{contents} :local: :depth: 1 ``` ## Introduction There are several electricity markets that a hydropower producer can participate in, and the market object holds all information about prices and volumes that can be traded in the market. The most important market is the day-ahead energy pool market, where energy is traded in hourly or sub-hourly blocks. [Reserve capacity](reserves) markets are also possible to model in SHOP. ## Energy markets An energy market in SHOP is part of most SHOP runs. The [sale_price](market:sale_price) and [buy_price](market:buy_price) attributes define the prices for buying and selling energy in the market, while [max_sale](market:max_sale) and [max_buy](market:max_buy) define the maximum amount that can be sold or bought in the market. The buy_price should normally be higher than the sale_price, otherwise SHOP will buy and sell energy in the same hour to make a quick profit. The market does not have to be connected to any [generators](generator), [pumps](pump), [thermal generators](thermal), [wind farms](wind), [solar farms](solar), or [batteries](battery) as the default behaviour in SHOP is to allow all units to participate in all energy markets. The recommended way of handling multiple energy markets that can be served by different sets of units is to use the [](busbar) object. If an energy market is connected to a busbar, only the units connected to that busbar may participate in the market. Note that there are two load attributes, [load on market](market:load) and [load on busbar](busbar:load). If the busbar object is used, the load should always be placed on the busbar object. If there is no busbar object created in the model, the load should be added to the market. This duplication is unfortunate, and will be removed in the future in favour of only having the load on the busbar. The value of the load is post-calculated in SHOP by using the average of the sale and buy prices, unless the [load_price](market:load_price) attribute is defined. The value is saved to the [objective function](objective) as [load_value](objective:load_value). The penalty for not fulfilling the load can be set globally with the [load_penalty_cost](global_settings) attribute on the [](global_settings) object. Any incurred penalty is shown in the [load_penalty](market:load_penalty) attribute on the market if no busbar is used, or on the [power_excess](busbar:power_excess) and [power_deficit](busbar:power_deficit) attributes on each busbar. ## Reserve capacity markets Modelling reserve capacity markets is done by specifying the reserve capacity type traded in the market with the attribute [market_type](market:market_type) (default is 'ENERGY'). Then, the market object must be connected to a [](reserve_group) object which in turn is connected to generators, pumps, and batteries that may deliver the reserve capacity. Any reserve obligation defined in the reserve_group (such as [frr_up_obligation](reserve_group:frr_up_obligation)) will be handled in a similar way to load in energy markets. It is however always necessary to specify an obligation to the reserve group for the reserve market to function, even if the obligation is zero in all time steps. The load attribute on a reserve market will not be used and should not be specified. Unlike energy markets, reserve markets are independent of the busbar object since the reserve_group decides which units may participate in the market. The other market attributes, such as sale_price and max_sale, have the same function as in energy markets. The [reserve market example](reserve-market-example) shows how a simple reserve market can be modelled in SHOP. As for the load_value in energy markets, the reserve obligation value is also post-calculated and saved as [reserve_oblig_value](objective:reserve_oblig_value). The load_price attribute is used in this calculation if it is present, otherwise it is the sale_price in the reserve market that is used. Any incurred penalty for not fulfilling the reserve obligation is saved to [reserve_obligation_penalty](market:reserve_obligation_penalty) on the market object and to the appropriate reserve penalty TXY in the reserve_group (such as [frr_up_violation](reserve_group:frr_up_violation)). The penalties for violating the obligation can be specified on the reserve_group by setting the [frr_penalty_cost](reserve_group:frr_penalty_cost) and similar attributes. Otherwise, the default [reserve_group_penalty_cost](global_settings:reserve_group_penalty_cost) on the global_settings object is used. ## Examples - [](reserve-market-example) ## Attributes ```{code-cell} ipython3 :tags: ['remove-input', 'full-width'] from IPython.core.display import HTML HTML("""
""") ``` (market:prod_area)= ### prod_area Future deprecation: use a busbar object per price area and connect the appropriate units and markets to the busbars. Definition of which production area this market belongs to. All the plants with corresponding prod_area will sell their production to markets in this price area. (xUnit: NO_UNIT, yUnit: NO_UNIT) (market:market_type)= ### market_type String defining the product that is sold in this market. Allowed values are ENERGY, FCR_N_UP, FCR_N_DOWN, FCR_D_UP, FCR_D_DOWN (from version 14.2.0.0), FRR_UP, FRR_DOWN, RR_UP, and RR_DOWN. If this value is not given default market type is ENERGY. (xUnit: NO_UNIT, yUnit: NO_UNIT) (market:load)= ### load Future deprecation: use a busbar object to add load to a set of connected units and markets. Fixed demand that must be delivered to this market. This comes in addition to any power sold to the market. (xUnit: NO_UNIT, yUnit: MW) (market:max_buy)= ### max_buy The maximum power that can be bought from the market (xUnit: NO_UNIT, yUnit: MW) (market:max_sale)= ### max_sale The maximum power that can be sold to the market (xUnit: NO_UNIT, yUnit: MW) (market:load_price)= ### load_price Price for load obligation to this market. If load_price is not given, sale_price is used to calculate the load value. (xUnit: NO_UNIT, yUnit: NOK/MWH) (market:buy_price)= ### buy_price Price for buying power from this market (xUnit: NO_UNIT, yUnit: NOK/MWH) (market:sale_price)= ### sale_price Price for selling power to this market (xUnit: NO_UNIT, yUnit: NOK/MWH) (market:buy_delta)= ### buy_delta A (small) amount that will be added to the buy price in this market (xUnit: NO_UNIT, yUnit: NOK/MWH) (market:sale_delta)= ### sale_delta A (small) amount that will be subtracted from the sale price in this market (xUnit: NO_UNIT, yUnit: NOK/MWH) (market:bid_flag)= ### bid_flag Flag determining the time steps that should be included in the bid matrix (xUnit: NO_UNIT, yUnit: NO_UNIT) (market:common_scenario)= ### common_scenario Definition of non-anticipativity constraints for each market. The amount traded in the market must be the same for all scenarios and time steps where common_scenario is equal. (xUnit: NO_UNIT, yUnit: NO_UNIT) (market:buy)= ### buy Resulting power bought from this market. (xUnit: NO_UNIT, yUnit: MW) (market:sale)= ### sale Resulting power sold to this market. (xUnit: NO_UNIT, yUnit: MW) (market:sim_sale)= ### sim_sale Simulated power sold to this market. (xUnit: NO_UNIT, yUnit: MW) (market:sim_buy)= ### sim_buy Simulated power bought from this market. (xUnit: NO_UNIT, yUnit: MW) (market:reserve_obligation_penalty)= ### reserve_obligation_penalty Future deprecation: the reserve obligation penalty for reserve markets is found under the connected reserve_group object (rr_up_violation etc.). Resulting penalty when the reserve obligation is violated (xUnit: NO_UNIT, yUnit: MW) (market:load_penalty)= ### load_penalty Future deprecation: use a busbar object to add load to a set of connected units and markets. Resulting penalty when the load obligation is violated (xUnit: NO_UNIT, yUnit: MW)