--- 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("""