# Market To allow for various representations of price-elastic production and demand with marginal cost/value $ C_{market} $ that are not covered by the specific categories otherwise defined, generic *market steps* are introduced through the variable $ market $, measured in GWh: $$ \forall \enspace m \in \textrm{MarketSteps},\ k \in \textrm{Timesteps} $$ $$ 0 \leq \textrm{market}(s,k) \leq \textrm{MarketCapacity}(m,k) \qquad \space, \textrm{if } \textrm{MarketCapacity}(m,k) > 0 $$ $$ \textrm{MarketCapacity}(m,k) \leq \textrm{market}(m,k) \leq 0 \qquad , \textrm{if } \textrm{MarketCapacity}(m,k) < 0 $$ The additional cost component: $$ Cost: += \sum_{m,k}C_{market}(m,k)*\textrm{market}(m,k)$$ Note that $ \textrm{MarketCapacity}(m,k) $ is negative for sale steps and positive for purchase steps. ## Dynamically adjusted market steps In this section, we detail a mode of simulating market steps in which the purchase/sale is adjusted dynamically according to previous decisions in the purchase/sale variables. Whereas the formulation above might lead to an abrupt adjustment of purchase/sale in response to changing prices, it might be more realistic to enable a more gradual adjustement of purchase/sales which smoothens out variations in the case of shorter but transient price peaks. In the dynamically adjusted market step functionality, we separate the total purchase/sale capacity into three segments: | Part | Description | |---------|-------------| |$ \textrm{FlexibleMarketCapacity} $| Part of the total purchase capacity that can be used based on the current power price. | |$ \textrm{InflexibleMarketCapacity} $| Part of the total purchase capacity that is used no matter how high/low the price becomes. ( We distinguish between purchase and sales.) | |$ \textrm{InflexibleUnusedMarketCapacity} $| Part of the total purchase capacity that is not used no matter how low/high the price becomes. | The flexible capacity constrains the purchase and sales variables as follows $$ \forall \enspace m \in \textrm{Steps},\ k \in \textrm{Timesteps} $$ $$ 0 \leq \textrm{purchase} (m,k) \leq \textrm{FlexibleMarketCapacity}(m,k) $$ $$ \textrm{FlexibleMarketCapacity}(m, k) \leq \textrm{sales} (m,k) \leq 0, $$ and the inflexible market capacity is subtracted from the right hand side of the power balance of area *a*: $$ \textrm{POWBAL}(a,k) [RHS]: -= \textrm{InflexibleMarketCapacity}(m,k). $$ The objective function is updated with cost and capacities as follows: $$ Cost: += \sum_{m,k} C_m^+*\textrm{purchase}(m,k) + \sum_{m,k} C_m^-*\textrm{sales}(m,k) $$ where $ purchase(m,k) $ or $ sales(m,k) $ is the variable representing how much energy is purchased/sold by the flexible capacity, depending on whether the market step is a purchase or sales option and $ C_m^{\pm} $ their respective costs. The three response types differ in how the three capacity parts are calculated. Before showing the equations we define the total consumption of a step to be either $$ \textrm{TotalConsumption}(k) = \textrm{InflexibleMarketCapacity}(k) + \textrm{purchase}(k) $$ or $$ \textrm{TotalConsumption}(k) = \textrm{InflexibleMarketCapacity}(k) + \textrm{sales}(k) $$ and $ \textrm{TotalConsumption} $ will henceforth be understood to be the total amount purchased or total amount sold depending on the step type. ### Momentary The purchase/sale changes immediately according to price level with $$\textrm{InflexibleMarketCapacity}(k) = 0$$ $$\textrm{InflexibleUnusedMarketCapacity}(k) = 0$$ $$\textrm{FlexibleMarketCapacity}(k) = \textrm{MarketCapacity(k)},$$ which is equivalent to the formulation in the previous section. ### Asymptotic The purchase (sale) approaches zero (max capacity) asymptotically when prices stay high (low) over time. $$ \textrm{InflexibleMarketCapacity}(k) = \alpha(k) \textrm{TotalConsumption}(k - \Delta k) $$ $$ \textrm{InflexibleUnusedMarketCapacity}(k) = \alpha(k) (\textrm{MarketCapacity}(k) - \textrm{TotalConsumption}(k - \Delta k) )$$ $$ \textrm{FlexibleMarketCapacity}(k) = \textrm{MarketCapacity}(k) (1-\alpha(k)) $$ where $ \alpha(k) \in [0,1] $ is an inertia parameter and $ \Delta k > \text{DecisionProblemLength} $ is how far back in time to find the previous consumption. If $ \textrm{InflexibleUnusedMarketCapacity}(k) < 0 $ and the market step is a purchase option or $ \textrm{InflexibleUnusedMarketCapacity}(k) < 0 $ and the step is a sales option we replace part of the above equations with $$ \textrm{InflexibleUnusedMarketCapacity}(k) = 0 $$ $$ \textrm{InflexibleUsedMarketCapacity}(k) = \alpha(k) \textrm{MarketCapacity}(k) $$ ### Linear The purchase (sale) approaches zero (max capacity) linearly when prices stay high (low) over time. $$ \textrm{InflexibleMarketCapacity}(k) = \textrm{TotalConsumption}(k - \Delta k) - (1 - \beta(k)) \textrm{MarketCapacity(k)} $$ $$ \textrm{FlexibleMarketCapacity}(k) = 2(1-\beta(k)) \textrm{MarketCapacity}(k) $$ where $ \beta(k) \in [0,1] $ is an inertia parameter and $ \Delta k > \text{DecisionProblemLength} $ denotes how far back in time we need to go in order to find the previous consumption. If $ \textrm{InflexibleMarketCapacity(k)} < 0 $ and the market step is a purchase option or $ \textrm{InflexibleMarketCapacity(k)} > 0 $ and the step is a sales option, we replace the above equations with $$ \textrm{InflexibleMarketCapacity}(k) = 0 $$ $$ \textrm{FlexibleMarketCapacity}(k) = (1 - \beta(k)) \textrm{MarketCapacity}. $$ If $ \textrm{TotalConsumption}(k) > \textrm{MarketCapacity} $ and the market step is a purchase option or $ \textrm{TotalConsumption}(k) < \textrm{MarketCapacity} $ and the step is a sales option we use $$ \textrm{FlexibleMarketCapacity}(k) = \textrm{MarketCapacity(k)} - \textrm{InflexibleMarketCapacity}(k). $$