Preprint
Article

Optimization of an Agent-Based Model for Continuous Trading Energy Market

Altmetrics

Downloads

159

Views

49

Comments

0

A peer-reviewed article of this preprint also exists.

Submitted:

14 April 2023

Posted:

17 April 2023

You are already at the latest version

Alerts
Abstract
The high penetration of intermittence resources in the energy market accelerates significantly the decarbonization process but, on the other hand, the electrical system has to face the problem of unbalances. Renewable Energies Sources (RES) are hard to precisely forecast, and power plants are not able to predict the amount of energy that they can provide far from the real time delivery. In this frame, the intraday market gets a fundamental role allowing agents to adjust their position close to the delivery time. In this work we suggest an agent-based model of intraday market combined with genetics algorithms to understand what the best strategy could be adopted by players in order to optimize the market efficiency in terms of welfare and unsold quantity. In the first part we show the effect on the market prices of different scenarios in which players aim at maximizing their revenues and selling/buying all their volumes. In the second part we show the effect of a particular genetic algorithm on the model, focusing on how agents can adapt their strategy to enhance the market efficiency. Comparative analyses are also performed to investigate how the welfare of the system increases as well as the unsold quantity decrease when genetic algorithm is introduced
Keywords: 
Subject: Engineering  -   Electrical and Electronic Engineering

1. Introduction

In order to implement the decarbonization process pointed out recently, e.g., in the Paris agreement of 2015 [1], the exploitation of renewable energies sources (RES) to produce electrical energy is increased. Due to their volatile generation profile [2] electricity market has to adapt its structure allowing players to trade energy as close as possible to the delivery time [3]. Consequently, the European market registered a significant growth of the volumes traded in the short-term electricity markets [4]. In this context, the intraday (ID) market became very important due to the fact that it is the last session in which agents can exchange energy without incurring in any financial penalties for having differences between their declared market position and their actual available energy. Trying to provide good liquidity, the European regulator Agency for the Cooperation of Energy Regulators (ACER) decided to couple the ID market of all countries under a single platform called Single Intraday Coupling (SIDC) [5]. The market structure of SIDC is characterized by two different mechanisms: continuous trading and discrete auctions [6]. Even if auctions allow to trade energy efficiently thanks to the marginal price mechanism and they are able to evaluate the capacity interconnection [7], they cannot provide a fundamental characteristic in a market characterized by intermittent resources: the information efficiency. It is defined as the capacity to react quickly to events, and it is well-developed only with the continuous mechanism [8]. In fact, during continuous trading, market agents can continuously submit bids until one hour before the delivery, whenever they can get benefit from the market movements [9]. At the time being, it is interesting to study which elements could affect the market and how agents react to the events triggered by competitors to gain more revenues or to sell and buy energy quickly. In literature there are many different electricity market models that aim to study the agents’ behavior and to understand the strategies adopted by players. The continuous trading market is well replicated by the continuous double auction (CDA) mechanism [10]. Past studies utilized the CDA mechanism to implement different scenarios with a variation of strategies adopted by players to achieve particular objectives [11,12]. So far, several proceedings have been studied to optimize agents’ behavior like the ZIP strategy in [13] that follows the ZI strategy of Gode and Sunder [14], the GD strategy [15], the improved GDX strategy [16] and the adaptive aggressiveness (AA) strategy of Vytelingum et all. [17] that use the Widrow-Hoff algorithm [18] to adapt the willingness to enter in the market each time the agent submits a bid. The intention on entering in the market by submitting offers at a certain price is a crucial characteristic of agents’ strategy to reach their goals. In this work, a new method to optimize the strategy of the participants using genetics algorithms to adjust their willingness to participate in the market is introduced. These algorithms are inspired by the process of natural selection where the fittest individuals are selected to generate new offspring. The sons inherit the characteristics of their parents, and they are added to the next generation. The offspring with the best characteristics, so the best adoption of a price offer, have better chances to survive and generate a new prole of better individuals aiming at optimizing the particular objective functions. When the process stops, the algorithm finds the population composed of the fittest individuals. To insert this optimization process into the continuous exchange of energy system, first a flexible model able to replicate the continuous market has been created and then a genetic algorithm called NSGA-II is used. The set of players becomes the population with specific features that change at each generation to find the best solution of the market in terms of welfare and energy balance. The paper is structured as follows: in chapter 2 the characteristics of intraday electricity market are presented. In chapter 3 the introduction of genetics algorithm and how it suits in our model is described. Chapter 4 explained how the model works under determined assumptions. Results of different scenarios are shown in chapter 5 while conclusions are explained in chapter 6.

2. Intraday market

In Europe, intraday market is historically organized into two different structures: auctions and continuous trading. Since the combination of the two mechanism is showed to be more efficient in terms of liquidity, market depth and volatility [4], ACER with the capacity congestion and allocation management (CACM) [19] regulation set up the ID market of all Europe as a hybrid model composed by three auctions and continuous trading.
During auctions agents can submit bids within a certain timeframe. After the gate closure all bids are aggregated to create the demand and supply curve. The intersection of the two curves defines the uniform price of all transactions regarding that session of auction. This mechanism is called system marginal price and, as we said in the introduction, it is very efficient in terms of price transparency, but it cannot provide a solution if imbalances occur after the gate closure of the auction.
On the other hand, during continuous trading players can submit bids at any time choosing three types of products (hourly, half-hourly and quarter-hourly) until one hour before the delivery time. The rule of this mechanism is the first-come-first-served principle [20] by which a transaction takes place when the price of a sell (buy) bid is equal or lower (higher) than the price of a buy (sell) bid previously submitted and stored. The price of the transaction corresponds to the price already present in the order book.
If no matches occur the bid can be stored, partially stored or deleted by the shared order book depending on its execution restrictions such as fill or kill (FOK), immediate or cancel (IOC), and all or nothing (AON) conditions.
Orders are stored following a price-time priority principle: the order with the best price is the first, meaning that sell (buy) orders are ranked from the lowest (highest) to the highest (lowest) price. If orders present the same price the one with the oldest time stamp gets the priority. Orders matching is a deterministic process [21], which takes place when a trade is concluded. To have a match, orders must have the same contract and come from opposite side (sell/buy) and the sell order price must be equal or below to the price of a buy order. As soon as an order obtains a match, it is reduced by the quantity traded but orders with the FOK and AON restrictions can be matched only entirely. Orders are always matched at the best possible price, so the best sell order is matched with the best buy order. When an order is executed, it can sequentially generate multiple matches with different orders already presented in the order book. As soon as the order obtain a match at a certain price, the next price become the best and the order can be matched another time. This process continues if the conditions of the incoming orders are executable or when the quantity is zero. All the information necessary to submit an order is shown in table 13.
Table 1. Information on submitted orders.
Table 1. Information on submitted orders.
Parameter Description
Order ID Identification number
Entry time Time of submission
Transaction time Time of matching
Validity time Time until the transaction can be done
Delivery start Time of delivery opening
Delivery end Time of delivery closing
Product Type of product: hourly, half-hourly...
Delivery area Zone in which the order is submitted
Market area Area of the market
Side Buy/sell
Price Price in €/MWh
Currency
Quantity Quantity of energy in MWh
Execution restriction Restriction of the order (IOC, FOK…)
Order ID Identification number
Entry time Time of submission
So far, only regular orders have been described; however, during continuous trading, agents can also submit other two types of orders: iceberg and block orders. In iceberg order the total amount is entered immediately but only a reduced part with the requested price, called ‘shown quantity’ is visible in the order book [22]. Once the shown quantity is matched, another slice of the order becomes available for the same price of the previous part. When the last slice is matched, the order is removed from the order book. Execution restrictions cannot be applied to an iceberg order. Block order is ‘an order with a total delivery period greater than the smallest delivery period of the product for which the order is being entered’. It includes multiple contracts referring to the same product with consecutive delivery periods.
Once an order is stored in the order book, it can be viewed from all zones of SIDC as long as there is enough transmission capacity available between the zone of the seller and the zone of the buyer. The capacity transmissions are visible in the capacity management module that is connected directly with the transmission system operators (TSO) of al SIDC zones. All the information about trades of the post-coupling process are available in the so-called shipping module. So far, the SIDC market around Europe is characterized by different structures: for example, the Iberian market has six auctions plus continuous trading while the German one has only one auction besides the continuous trading [23]. European union authorities are still trying to understand which could be the best number of auctions, but it is clear that continuous trading is necessary: it allows to not lose the information on the congestion constraints, and to increase its efficiency. In our work we simulate continuous trading aiming at understanding which parameters can improve the general welfare of the system creating the conditions to trade optimally with the help of NSGA-II genetic algorithm. In the following chapter the optimization problem, which is the key to the innovation carried by this paper, is presented.

3. The optimization problem

In the last decades, different optimization techniques inspired by nature have been investigated. Genetic algorithms (GA) are a very useful and widely studied optimization techniques; in particular, one of the most used algorithms is the Non-Dominated Sorting Genetic Algorithm NSGA-II [24]. GAs works very well when the number of design variables is low e.g., lower than 10, so, they are commonly used in multi-objective optimization of e.g., electrical machines and electromagnetic devices, because these problems are characterized by a few design degrees of freedom. In this paper, the NSGA-II is applied to a scheduling problem, which is usually characterized by a large number of parameters, depending on the problem formulation.
In GA optimization, a population, which is a set of individuals, is evaluated at each iteration (generation) in terms of rank and crowding distance. In particular, the population is ordered in terms of Pareto front and sub-fronts and a rank is assigned to each front: the solutions belonging to the Pareto front have the lowest rank (e.g. rank=1) while higher ranks are assigned to dominate sub-fronts. For each solution belonging to a given front, the crowding distance is calculated: the solutions aggregating in a cluster are characterized by a crowding distance value lower than isolated solutions. Taking into account the crowding distance helps in obtaining regularly spaced i.e. not clustered solutions in the objective space.
The individuals of the current population are ordered first by rank index and then, among each front, by the crowding distance. The best (fittest) individuals are the ones characterized by a low rank and high crowding distance.
In order to create the next generation, highly fit individuals of the current iteration are combined by a crossover operator to produce offspring.
Meanwhile, to increase variation in the search space, a mutation operator is performed at a certain probability level.
The generated offspring solutions are added to the current population. Suppose the population size is N. Then the current population size will be 2*N, since the offspring solutions are added to the current population. Then, the current population is sorted using non-dominance and crowding distance and truncated to N individuals. In this way, the next generation population has size N.
This process continues until the stopping criterion, usually a maximum number of generations or a given accuracy in the results, is met.
Once the simulation ends, the solution is a set of nondominated optimal solutions, forming the Pareto front. A solution x* is considered dominated by a solution x if x is equal or better than the solution x* referring to the objective functions [25]. The set of solutions is optimal when the result of any objective function can be improved without decline the results of at least another objective function. More precisely, assuming that P is the set of the non-dominated solutions of the set S and Nobj is the total number of the objective functions, the Pareto front of set S can be written as:
P = f = f 1 x 1 , f 2 x 2 f N o b j x T ,   x S
And it can be represented as in Figure 1. [26]
In the following continuous market model, a set of solutions is represented by the willingness of agents to enter in the market, submitting offers at a certain price compared to the equilibrium market price as reported in Section 4.4, while the objective functions are explained in Section 4.6.

4. Proposed market model

In this section, first how the NSGA-II algorithm fits in the model is outlined, then the characteristics of the continuous ID market model are described defining all assumptions that we took into account to represent the trading efficiently. Assumptions are taken mostly from the works of Bouskas et al. [27] and Shinde et al [28]. The algorithm that simulates the ID market is composed by different phases fundamental to determine how the NSGA-II suits in the context. In fact, every time one generation starts, different market sessions are launched characterized by agents with different peculiarities described in section 4.4 and all individuals (market players) trade among themselves until the market session is finished. Results of each market session depict the welfare of the system, the welfare of buyers and sellers and the unsold quantity that cause imbalances. These are the objectives functions better described in section 4.6. Obviously, most of the characteristics of the market are fixed and NSGA-II does not interact with them so the market can be replicated properly. The optimization algorithm will be applied only to one characteristic that define the behavior adopted by agents and highlights their strategies defined in section 4.6. Now, before introducing the variables and the functions that directly interacts with NSGA-II, a detailed description of the continuous market model is presented. It represents the context in which the individuals, composed of market agents, interact continuously trying to gain a profitable solution for their market session.
As previously mentioned, in the continuous ID market there are three types of products but, to reduce the complexity of the time coupling, in our model we considered only hourly contracts. Secondly, all contracts refer to limit orders without any execution restrictions. So, all orders specify the side (sell/buy), a volume (MWh) and a price that underlines the limit for which they can be matched. All agents come from the same bidding zone so they can obtain a match among all other agents avoiding problems of capacity interconnections.
Taken into account these assumptions, we have divided the model into two main parts: the ‘order book’ and the ‘bid simulator’.

4.1. Order book

In the order book, all offers are collected and processed, reproducing exacting the system order book of the SIDC by considering the assumption previously explained. It ranks the offers with the price-time merit order as reported in Figure 2 and matches or partially matches them following the first-come-first-served rule.
Agents can consult the order book that display the prices and volumes of the offers, the agent who trade the bid and at what time an offer is submitted, the last match price and the book depth. Every time an order is stored, matched or partially matched the order book updates all information visible from the agents. An agent can also decide to eliminate an order that did not achieve a match and, consequently, the order book deletes all information’s about the bid. In Figure 3 a graphical simulation of the order book is presented.
Once the time-horizon for the trading session is ended or when all agents have sold or bought the entire volume of energy the order book closes and shows all results of the transactions. The agents can consult the order book to see how many buy and sell orders are stored and which is the best bid currently ranked.

4.2. Bid simulator

The bid simulator has the task of creating the agents, give them the possibility to submit an offer at a certain time, decide the quantity and the price of the offer and adjust their strategy following the market conditions.

4.2.1. Agent creation

For each agent, four characteristics are defined:
  • the identification number (I), an integer number varying in the range [1, N _ m a x ] with N _ m a x the maximum number of agents
  • the kind of the agent (a), an integer number varying in the range [0, 9] (from 0 to 4 for buyers and from 5 to 9 for sellers)
  • the volume of energy (MWh) that an agent wants to buy (sell) in the ID market;
  • the ‘private value’ ( p v ) defined as the maximum (minimum) price (€/MWh) that a buyer (seller) is willing to spend (accept) for buying (selling) energy.
The I number is assigned at the beginning of the algorithm, and it is useful to understand which players obtained the best results at the end of the simulation. The five typologies of buyers and sellers are:
  • dispatchable generators that need to buy or sell energy to don’t incur in penalty imbalances;
  • dispatchable generators that could buy or sell energy to earn more money;
  • non-dispatchable generators that are willing to enter in the market;
  • non-dispatchable generators that want to earn more money taking the risk to get penalties imbalances;
  • agents that submit offers very close to the equilibrium price of the market.
The volume of energy is a constant quantity and agents submit a slice of it every time they decide to place an order. The private value is calculated with the following procedure: a random number extrapolate from historical prices of imbalance penalties
p v s = α s · Δ i m b
p v b = α b · Δ i m b
With α s ϵ [ 1 ,   1.3 ] and α b ϵ [ 0.7,1 ] . And Δ i m b calculates as indicate in Table II.
Table 1. Methodology of unbalanced prices.
Table 1. Methodology of unbalanced prices.
Agent positive unbalancing Agent negative unbalancing
Zonal positive unbalancing Agent receives:
M i n ( P d a m ,   M i n   P m b )
Agent pays:
P d a m
Zonal negative unbalancing Agent receives:
P d a m
Agent pays:
M a x ( P d a m ,   M a x   P m b )
So, agents with a positive imbalance can sell energy and they will be remunerated at the day-ahead market price ( P d a m ) if he is bidding in a zone with negative unbalancing while he will be remunerated at the minimum price between the day-ahead market price and the balancing market price ( P m b ) if the bidding zone presents a positive unbalancing. On the contrary, agents with negative imbalances will pay P d a m if they are bidding in a positive unbalancing zone or the maximum price between P d a m and P m b if they are bidding in a zone with negative unbalancing.
The other three variable parameters are assigned to the agents in order to develop our algorithm properly for an energy market model. These variables are the number of submissions (n), the remaining quantity of energy ( r q ) to buy or sell and the aggressiveness ( A g ). n and r q are important indices for agent submission strategy of an order. Aggressiveness is a key parameter to model price strategy of players inspired by the adaptive-aggressiveness (or AA) strategy [17] and it is the key characteristic that agent uses to lead their behavior as well as the ‘genes’ of the population that NSGA-II modifies to find the optimal solutions. It is defined as the inclination to be more active in the market. An aggressive agent submits better bids than the equilibrium price, increasing the chance of find a match but renouncing big profits. On the other hand, a passive player submits bids worse than the equilibrium price taking the risk to not reach a match but trying to find a more profitable transaction. For instance, an aggressive seller (buyer) will submit offers with a lower (higher) price than the equilibrium one while a passive seller (buyer) will present offers with a higher (lower) cost than the equilibrium price. High level of aggressiveness has a range between 0 and 1: A g   ϵ   [ 0,1 ] while low level of aggressiveness has a range between -1 and 0: A g   ϵ   [ 1,0 ]

4.2.2. Offer submission

In the SIDC the trading starts one hour after the closing of day-ahead market at t o p e n and end one hour before the delivery time at t c l o s e so we call the trading time: T = [ t o p e n ,   t c l o s e ] . In our model we discretize the continuous trading time into different step Δ t . At each time step an agent is selected by the system and he can decide whether buy or sell an amount of energy or not. The agent’s selection is made by three different methods: randomly, following the average match prices or depending on the quantity submitted. The random method is the easiest and it is also the one that give more random results: the algorithm selects casually an identify number and the associated agent decide whether submit a bid or not as showed in the algorithm1. Let’s give some notation to facility the reading of the algorithm: S b i indicate the player’s i decision of submission,   V i m a x is the total volume of the agent i, and V i is the volume submitted by the agent i. P i is the price submitted by the agents i, P m is the equilibrium market price, P a v is the price average of the last 5 matches as maximum, p b b and p b s are respectively the best buy order and the best sell order present in the order book and maxP is the maximum price offer allows in the market.
Algorithm 1: random selection of a participant
1: Open order book Δ t = t o p e n 2: while Δ t < t c l o s e do
3: agent= rand (I)
4: Order: O i ( V i , P i ) 5: Sending the order to the order book
6: Update agent’s strategy
7: end while
8: Close order book
Point 3 of algorithm 1 can be set with other two methods mentioned before. In particular:
Algorithm 1.1: selection depending on the average matched prices
3: for Δ t <10
3.1: agent= rand (I)
3.2: end for
3.3: Calculation of match price average:
P a v = i = 1 N 5 _ m a c t h P m a t c h e s N m a t c h e s
3.4: if P a v < P m
3.5: agent= 75% buyer, 25% seller
3.6: else
3.7: agent= 75% seller, 25% buyer
3.8: end for
This procedure states that when the market price ( P a v ) is lower than the equilibrium market price, buyers are more willing to enter in the market trying to find a more profitable deal, while P a v is higher than the equilibrium price, sellers enter in the market to gain better revenues.
Algorithm 1.2: selection depending on the volume submitted
3: for Δ t <10
3.1: agent= rand (I)
3.2: end for
3.3: Percentage of the volume submitted over total volume for all agents
3.4: for i=1: number of agents
V s = V i   V i m a x
3.5: end for
3.6: agent= choose by a vector of probabilities depending on V s
In this method the agent with the highest probability to be selected is the one who presents the lowest value of V s . This happens because an agent who has not been able to sell/buy its volume of energy is more willing to submit an offer than agents who have already sold the majority of the volume. Agent selection is chosen at the beginning of the analyses, and it cannot be changed by NSGA-II algorithm, but it is useful to represent different scenarios of continuous market.

4.2.3. Choice of the volume

The mechanism by which an agent decides the volume of a bid doesn’t follow a real strategy. Each round it submits a quantity in between the 10 and 20% of its total quantity. Analyzing data of German ID market of transaction occurred in 2020 [29] we saw that most of the traders preferred to submit a lot of order with a small quantity of energy volume (around 5MWh). For this reason, in our model all players submit just a small part of the entire capacity at every submission time. When an agent finishes its quantity, he cannot be called by the system until the end of the simulation. When all agents finish their quantity, the simulation stops. The amount of energy submitted by each agent is not considered a key parameter for these analyses because it is supposed that volumes to buy or sell is known a priori at the beginning of the market session by all agents, and consequently it is not affected by the NSGA-II algorithm.

4.2.4. Order prices

The agent’s formulation of prices follows the AA strategy [17] of the continuous double auction (CDA) [28] and it is enhanced by the introduction of the NSGA-II algorithm. In fact, in order to comply the objective functions regarding the welfare and the unsold quantity, agents must be able to submit their bids with the optimal price in a certain market timeframe. For instance, following the market results, a seller will decide whether to enter in the market presenting a high price offer (that could increase his welfare while taking the risk to not find a bid in the opposite direction) or to submit a low-price offer that increase the possibility to sell his imbalance volume. These analyses show how the NSGA-II algorithm is able to optimize the agent’s decision in the session of continuous market. The price formulation is also strictly dependent to the characteristics of the power plant. The function used to generate prices is continue and dependent to the aggressiveness A g and ϴ that represents the magnitude of the gradient [30]. For the fivekinds of agents previously mentioned we defined 5 different strategies for buyers and 5 for sellers (for all strategies: if the match average price has not been already calculated p a v = p m ):
Strategy 1b: dispatchable buyer generator with high risk of imbalances due to a breakdown
1: set initial aggressive ( A g ) value between [0.6;1]
2: if buyers’ book-depth is empty
3: price p i = p a v + p v p a v * e a g * ϴ 1 e ϴ 1 (6)
4: if buyers’ book is not empty
5: p i = m a x ( p a v ; p m , ; p b b ) + p v m a x ( p a v ; p m , ; p b b ) * e a g * ϴ 1 e ϴ 1 (7)
These generators that need to buy/sell energy are power plant that faced a breakdown after the closing of day-ahead market and cannot respect the bids previously accepted so they want to be sure to enter in the ID market to adjust their position even without obtaining big revenues.
Strategy 2b: dispatchable buyer generator that buys energy only if the trade is highly profitable.
1: set initial aggressive ( A g ) value between [-1; -0.6]
2: if buyers’ book-depth is empty
3: price p i = p a v * 1 e a g * ϴ 1 e ϴ 1 (8)
4: if buyers’ book is not empty
5: price p i = m i n ( p a v ; p m , ; p b b ) * 1 e a g * ϴ 1 e ϴ 1 (9)
These are dispatchable generators that could buy/sell energy in the market. They are already balanced but with the possibility to produce or take more energy from the market with high costs. So, they decide to enter only if obtaining big revenues.
Strategy 1s: dispatchable seller generator with high risk of imbalances due to a breakdown
1: set initial aggressive ( A g ) value between [0.6;1]
2: if sellers’ book-depth is empty
3: price p i = p v + p a v p v * 1 e a g * ϴ 1 e ϴ 1 (10)
4: if sellers’ book is not empty
5: price p i = p v + m i n ( p a v ; p m , ; p b s ) p v * 1 e a g * ϴ 1 e ϴ 1 (11)
This strategy refers to the strategy 1b but for sellers.
Strategy 2s: dispatchable seller generator that sells energy only if the trade is highly profitable
1: set initial aggressive ( A g ) value between [-1; -0.6]
2: if sellers’ book is empty
3: price p i = p a v + m a x P p a v * e a g * ϴ 1 e ϴ 1 (12)
4: if sellers’ book is not empty
5: p i = m a x ( p a v ; p m , ; p b s ) + m a x P m a x ( p a v ; p m , ; p b s ) * e a g * ϴ 1 e ϴ 1 (13)
This strategy refers to the strategy 2b but for sellers
For non-dispatchable generators, formulas for bids prices are the same of the dispatchable generators. The main differences are the initial aggressiveness and the possibility to switch from an aggressive strategy to a passive one and vice-versa depending on the market conditions. We report the strategies of a non-dispatchable buyer that starts active and a non-dispatchable seller that starts passive. The strategies adopted respectively buy passive buyer and active follows the same rules
Strategy 3b: non-dispatchable buyer generator
1: set initial aggressive ( A g ) value between [0; 1]
2: price p i = p a v + p v p a v * e a g * ϴ 1 e ϴ 1 (14)
3: processing the bid in the order book
4: update A g
5: if A g >0 restart from point 2
6: else, price p i = p a v * 1 e a g * ϴ 1 e ϴ 1 (15)
Strategy 4s: non-dispatchable seller generator
1: set initial aggressive ( A g ) value between [-1; 0]
2: price p i = p a v + m a x P p a v * e a g * ϴ 1 e ϴ 1 (16)
3: processing the bid in the order book
4: update A g
5: if A g )<0 restart from point 2
6: else, price p i = p v + p a v p v * 1 e a g * ϴ 1 e ϴ 1 (17)
Strategies 3b and 4s represent dispatchable generators with the characteristics of switching between an aggressive to a passive behavior. This represents the hard forecast of energy production for a no-programmable resource that has to face the random climate conditions.
The last type of agent introduced are the one who submits bids only following the market equilibrium price, that statistically [17] is the price at which most of the match occurred. For this type of player, the aggressiveness is not necessary
Strategy 5: non-dispatchable seller or buyer generator
p i = p m * ( 0.8 + 0.4 * r a n d )
They want to buy/sell energy without a particular strategy, but they submit bids focusing on the fact that the majority of transactions takes place around the prices that come out form the day-ahead market [23].
For four typologies of agents out of five, the aggressiveness is the parameter that defines the prices of their bids and that is the reason why it is set as the ‘gene’ of each individual in the NSGA-II simulation.

4.2.5. Submission of a bid

In [29] is stated that most of the bids submitted are then deleted by agents and only a small percentage remain in the order book. To replicate this trading in our model we introduced the possibility to delete a bid submitted upon the occurrence of certain conditions. Algorithm 2 explains the agent’s decision:
Algorithm 2: decision to submit or delete a bid for buyer
1: if buyers’ book is empty submit bid
2: if p i >   p a v * ( 1 ε ) submit bid else don’t submit
3: bid processing in the order book
4: if no-match occurs and if sellers’ book > ψ delete bid
5: if no-match occurs and if sellers’ book <= ψ don’t delete bid
Algorithm 2.1: decision to submit or delete a bid for seller
1: if sellers’ book is empty submit bid
2: if p i <   p a v * ( 1 + ε ) submit bid else don’t submit
3: bid processing in the order book
4: if no-match occurs and if buyers’ book > ψ delete bid
5: if no-match occurs and if buyers’ book <= ψ don’t delete bid
Where ε is a parameter in the range [0;1] that determine the choice of an agent if submitting or not depending on how far the position of the bid in the order book ranking is. An ε close to 1 increases the willingness of submission while an ε close to 0 decreases the willingness of submission. Ψ is aositive value that determine the choice of deleting a bid stored in the order book or not. For example, if a seller submits a bid, it is not matched and ψ=5 it means that there are five buy bids that cannot be matched with the one just submitted due to its high price. So, it is hard that the bid will find a match later and it is better to delete it and submit another one.

4.2.6. NSGA-II Optimization strategy

Each agent starts the market session with a given level of aggressiveness ( A g ϵ [-1; 1]) and can modify this level following the market events. In more detail, an aggressive agent that find a match can decide to decrease his aggressiveness to obtain a match with bigger revenues and on the other hand, a passive agent that does not find a match can decide to increase his aggressiveness to have more chance to enter in the market. The general aim of anagent is to obtain the optimal level of aggressiveness that enables to enter in the market and maximize the profits. In our model we first replicated the method presented by Vytellingum et all. [17] to regulate agents’ aggressiveness and secondly, we compared the results with a model that use genetic algorithm to update the same parameters. In particular we introduced the non-dominating sorting genetic algorithm (NSGA-II) implemented based on [31] defining two objective functions and a set of variables. Here the NSGA-II is described and explained how it can be applied to our model. The algorithm that simulates the ID market is composed by different phases fundamental to determine how the NSGA-II suits in the context. In fact, every time one generation starts, different market sessions are launched characterized by agents with different peculiarities described in section 4.1 and all individuals (market players) trade among themselves until the market session is finished. Results of each market session depict the welfare of the system, the welfare of buyers and sellers and the unsold quantity that cause imbalances. These are the objectives functions better described further on. Obviously, most of the characteristics of the market are fixed and NSGA-II does not interact with them so the market can be replicated properly. The optimization algorithm will be applied only to aggressiveness characteristic that define the behavior adopted by agents and highlights their strategies defined in section 4.4.
Now all the parameters that we set in the NSGA-II algorithm to be combined with our model are described. The process starts with different sets of players who represent the population. Each set of players is characterized by a set of variables (aggressiveness) individually associated to a player. Thus, variables are scalar values joined into a string to form the solution. How fit is a set of players is evaluated thanks to the objective functions. The algorithm gives a score to the set of individuals to represent the probability to be selected for reproducing and pass the characteristics of aggressiveness to the next set of players. A high score gives more chance to the set of players to be selected for reproducing. For each pair of set of players to be coupled a crossover point is chosen randomly within the sets of aggressiveness and the next generation sets of players are created by exchanging the aggressiveness of the previous sets among themselves until the crossover point is achieved. At this point the new set of players is added to the set of population. When a new set of players is formed, a mutation may occur. This mince that some of the aggressiveness in the new set of players can be changed. The process ends when the sets of aggressiveness converge so there are not significative differences between a set of players and the next one ore when the number of generations is completed by the program. In the following section the objective functions used to determine which are the best sets of aggressiveness that players must utilize to trade in the continuous ID market is described.
At this point the objective functions are described. Analysis has been focused on the optimization of functions regard the welfare of the agents, the total welfare and the unsold quantity which is the source of penalty imbalances in the market. For each optimization, only two of the aforementioned objective functions have been considered. For instance, the welfare of buyers (related to their expenses) and the unsold quantity are optimized at the same time to find out what is the best compromise of aggressiveness that allows to deliver big amounts of energy without incurring in prices higher and lower compared to the market price. The objective functions considered two by two, depending on the optimization problem to solve, are the following:
A. Welfare sellers
This function represents the revenues of the sellers in respect of what they are expecting to gain. It has to be maximized.
W s = i = 1 N . s e l l e r s q m i * ( p m i p o i )
B. Welfare buyers
This function represents the savings of buyers in respect to what they are willing to spend. It has to be maximized.
W b = i = 1 N . b u y e r s q m i * ( p 0 i p m i )
C. Total welfare
This function represents the general welfare of the system. It has to be maximized
W t o t = W s + W b
D. Remaining volumes
This function represents the total volumes that agents have not been able to exchange in the market. It has to be minimized.
V r = i = 1 n . a g e n t s V i m a x V i
Where q m i , p m i and p o i are respectively the quantity matched the price of the match the price of the submission of player i.
For every generation a set of aggressiveness is assigned to the population divided equally into sellers and buyers, and the objective functions are calculated. The best set of individuals are the ones that obtain the highest welfare, or the lowest unsold quantity and they get the lowest rank and the highest crowding distance into NSGA-II. The process continues until the end of the generations as previously mentioned. The combination of different objective function has been led to analyze four different problems to evaluate the market efficiency:
  • Problem 1:(G.A.1) wants to maximize the buyers and sellers’ welfare and minimize the unsold quantity.
  • Problem 2: (G.A.2) wants to maximize the buyers and sellers’ welfare only.
  • Problem 3: (G.A.3) aims at maximizing the total welfare and minimizing the unsold quantity
  • Problem 4: (G.A.4) tries to maximize at the same time the buyers, sellers, and total welfare.

5. Results

In the following chapter we introduce the results achieved in our model. In the first part we show the market trading when all players try to maximize their objective in the continuous model. In the second one we present the results obtained with the introduction of NSGA-II algorithm and its improvements for the market efficiency. We carried out 3 different simulations, but a lot of other scenarios can be investigated combining all the parameters that we mentioned so far.
In the first simulation, the behavior assumed by agents without the NSGA-II algorithm is studied, then another scenario aims at studying the different strategies adopted by players with NSGA-II algorithm is presented and, in the last analyses the same scenario with and without NSGA-II are presented and compared.

5.1. Results without genetic algorithm

Here, 50 agents (five for each type) trading in 1,000 steps are represented. They are selected following algorithm 1.1 and the ε parameter is close to 1 so players are willing to submit bids even far from the equilibrium price. In Figure 4 and Figure 5 the prices of orders submitted, and the prices of matches are highlighted. In Figure 6 and Figure 7 the variation of aggressiveness and the welfare of players are reported.
In Figure 4 the big volatility of prices typical of the ID market in which players aim at maximizing their profits due le first-come-first-served rule can be appreciated since the range price vary from 20€/MWh to 130€/MWh for buyers and sellers. The number of matches increases close to the gate closing as shown in Figure 5, and this happens because agents adapt their strategies following the market conditions and at the end are more able to find a match. In Figure 6, the trend of aggressiveness shows that to find a profitable match, agents decide step by step to adopt a conservative behavior and obtain an aggressivity around 0. In the last plot (Figure 7) we display the level of welfare achieved by ten different agents and sellers seem have a better welfare than buyers and dispatchable agents reach better transactions than non-dispatchable. That probably happens because non-dispatchable agents are the ones subjected to the biggest imbalances and need to buy energy before the closing of the ID session even submitting bid with high prices. The remarkable fact is that, when agents try to maximize (minimize) their profit (expenses), the welfare is not well distributed and even the total welfare of the system is affected. By introducing the genetics algorithm, the total welfare increases significantly, and all players are satisfied, as shown is the next section.

5.2. Results with genetic algorithm

In this section we show how the use of NSGA-II algorithm modifies the results in terms of welfare and volumes sold compared to the simple AA-method. In these analyses we want to solve a multi-objective problem and consequently the solution is not unique. We find a set of optimal solutions reported in the Pareto front [33]. The method is very useful since it gives the opportunity to better understand the system exploring the consequences of different decisions with respect to the objectives [34]. In the first optimization using NSGA-II a scenario with eight players (one for each kind excluding the buyer and seller of strategy 5) is considered. The trading lasts for 100 steps, selected following algorithm 1.1. The set of aggressiveness is the variable modified by the algorithm for each generation and the objective functions are the unsold quantity and the buyers’ expenses. Both functions must be minimized. In Figure 8 we plot the Pareto front with the unsold volumes on x-axis and the buyers’ expenses on y-axes.
The set of solutions varies from zero expenses for buyers, but no volumes exchanged to almost all volumes exchanged with high expenses for buyers. In table III we report the values of the set of aggressiveness that lead to the solutions obtained in Figure 8.
Table 3. Values of aggressiveness and the corresponding objective functions.
Table 3. Values of aggressiveness and the corresponding objective functions.
Set A g 1 A g 2 A g 3 A g 4 A g 5 A g 6 A g 7 A g 8 Unsold volume (MWh) Expenses (€/MWh)
1 0.15 0.19 -0.21 -0.71 0.83 -0.92 -0.57 -0.72 2328 0 1
2 0.13 0.29 -0.17 -0.60 0.83 -0.87 -0.75 -0.71 1088 2618491 2
3 0.13 0.36 -0.17 -0.59 0.84 -0.89 -0.74 -0.62 2328 0 3
4 -0.52 -0.52 0.25 -0.06 0.16 -0.52 -0.65 0.70 1128 1440241 4
5 -0.53 -0.55 0.24 -0.05 0.17 -0.54 -0.64 0.68 1328 985245 5
6 0.15 0.18 -0.19 -0.74 0.82 -0.91 -0.57 -0.62 1668 389589 6
7 0.13 0.35 -0.17 -0.59 0.84 -0.89 -0.74 -0.62 2048 64209 7
8 0.15 0.19 -0.21 -0.71 0.83 -0.92 -0.57 -0.72 1588 893321 8
We can notice that the optimal solutions are always characterized by 5 passive and only three active agents. Among these, 4 over 5 are very passive (less than -0.5) and 1 over three is very active (more than 0.5). Since the aggressivity from A g 1 to A g 1 refer to buyers while from A g 5 to A g 8 refer to seller it seems that the Pareto front is obtained when among buyers there are two active players, one passive and one very passive while among sellers there are three passive and one very aggressive. This means that the best solution is not achieved when players turn their strategy pricing energy around the equilibrium price as we have seen with the AA method.

5.3. Comparison of scenario with and without NSGA-II

In the last analyses we compare the results obtained with the adaptive aggressiveness method and results obtained with the genetics algorithm in terms of welfare and unsold quantity. The scenario is composed by 20 agents (two for each typology) trading in 500 steps. For every step they can submit the same amount of energy (10 MWh) and they all start with the same volume. We carried out four different analyses with genetics algorithm changing every time the objective functions as we explained in section IV. Figure 9 shows the comparison of welfare while Figure 10 highlights the volumes unsold. Values are taken choosing a random point in the middle of Pareto front.
All simulations using NSGA II algorithm led to better results in terms of total welfare and unsold quantity. With the AA algorithm sellers gain good results to the detriment of buyer, consequently the total welfare is low. With the genetic algorithm, the welfare of buyers and sellers is almost equivalent, and the total welfare increases even when it is not directly maximized (G.A.1 and G.A.2). It is worth noting that the G.A.1 has the best general welfare even if it is not maximized.
Figure 10 shows that genetic algorithm can minimize the unsold quantity achieving better results than AA algorithm increasing the welfare of the system.

6. Results

In this paper, an agent-based model of continuous intraday market in which players can exchange energy throughout an order book that collects and matches order following the SIDC market rules is presented. First of all, we apply the adaptive-aggressiveness (AA) strategy to formulate the prices of orders submitted by agents and then we introduced genetic algorithm to study how the different strategies can be combined to maximize the welfare of the system or minimize the unsold quantity. The AA strategy shows that agents, approaching to the real time, tend to submit orders close to the equilibrium price that we set at the beginning of the session in order to achieve a positive match overall when they are not willing to submit offers far from the best order book prices. That behavior is the best compromise to gain good revenues and sell/buy the entire volumes of energy available. Additionally, in a scenario in which players submit bids even far from the best order book price, the number of matches increase close to the delivery time and still follow the equilibrium market price. In the second part of our paper, we analyze the effect of the NSGA-II algorithm applied to the agent strategies. It shows that the best results for the whole system are achieved under particular set aggressiveness adopted by players and not when they get a conservative behavior. In particular the welfare of the system increases for all scenarios using the NSGA-II model compared to the AA strategy and only the welfare of sellers decreases in some cases. Better results are achieved also looking the unsold quantity in the system: NSGA-II create better conditions that allow agent to trade all volumes that they need. An interesting improvement of this analysis could be to investigate how agents adapt their strategies in a market divided into different zones with a limit of transmission capacity and with the possibility to trade different orders with different execution restrictions.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. European commission. EU action. Available online: https://climate.ec.europa.eu/eu-action/international-action-climate-change/climate-negotiations/paris-agreement_en (accessed on 20 August 2022).
  2. ENTSO-E. Power statistics. Available online: https://www.entsoe.eu/data/power-stats/ (accessed on 22 August 2022).
  3. European Commission, Directorate-General for Energy, Schumacher, L., Küpper, G., Henneaux, P., et al., The future electricity intraday market design, Publications Office, 2019. [CrossRef]
  4. Neuhoff, Karsten, et al. Intraday Markets for Power: Discretizing the Continuous Trading. Energy Policy Research Group, University of Cambridge, 2016. JSTOR. https://www.jstor.org/stable/resrep30358.
  5. ACER Electricity and gas retail markets volume, ACER market monitoring report, 2018.
  6. ENTSOE. Single intraday coupling (SIDC). Available online: https://www.entsoe.eu/network_codes/cacm/implementation/sidc/ (accessed on 25 August 2022).
  7. Maurício T. Tolmasquim, Tiago de Barros Correia, Natália Addas Porto, Wikus Kruger,Electricity market design and renewable energy auctions: The case of Brazil,Energy Policy,Volume 158,2021,112558,ISSN 0301-4215. [CrossRef]
  8. J. Bellenbaum, M. Bucksteeg, T. Kallabis, C. Weber Intraday cross-zonal capacity pricing. Paris, 2016.
  9. Henriot, Arthur. “Market Design with Centralized Wind Power Management: Handling Low-Predictability in Intraday Markets.” The Energy Journal, vol. 35, no. 1, 2014, pp. 99–117. JSTOR. https://www.jstor.org/stable/24693820.
  10. Anke, Weidlich and Veit Daniel, (2008), Agent-Based Simulations for Electricity Market Regulation Advice: Procedures and an Example, Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), 228, (2-3), 149-172. [CrossRef]
  11. N.R. Jennings, An agent-based approach for building complex software sys- tems, Commun. ACM 44 (4) (2001) 35–41. [CrossRef]
  12. T. Nagata and H. Sasaki, "A multi-agent approach to power system restoration," in IEEE Transactions on Power Systems, vol. 17, no. 2, pp. 457-462, May 2002. [CrossRef]
  13. Cliff, Dave. “Minimal-Intelligence Agents for Bargaining Behaviors in Market-Based Environments.” (1997).
  14. Gode, Dhananjay K., and Shyam Sunder. “Allocative Efficiency of Markets with Zero-Intelligence Traders: Market as a Partial Substitute for Individual Rationality.” Journal of Political Economy, vol. 101, no. 1, 1993, pp. 119–37. JSTOR. https://www.jstor.org/stable/2138676.
  15. Steven Gjerstad, John Dickhaut,Price Formation in Double Auctions,Games and Economic Behavior,Volume 22, Issue 1,1998,Pages 1-29,ISSN 0899-8256. [CrossRef]
  16. Tesauro, Gerald and Jonathan Bredin. “Strategic sequential bidding in auctions using dynamic programming.” AAMAS '02 (2002). [CrossRef]
  17. P. Vytelingum, D. Cliff, N.R. Jennings,Strategic bidding in continuous double auctions, Artificial Intelligence,Volume 172, Issue 14,2008,Pages 1700-1729,ISSN 0004-3702. [CrossRef]
  18. B. Widrow and M. E. Hoff, “Adaptive Switching Circuits,” 1960 IRE WESCON Convention Record, 1960, pp. 96-104.
  19. Eur Lex. Official website of the European Union. Available online: https://eurlex.europa.eu/legalcontent/EN/TXT/?uri=CELEX%3A32015R1222 (accessed on 01 September 2022).
  20. EPEXSPOT. Epexspot Operational Rules. Available online: https://www.epexspot.com/en/regulation (accessed on 30 August 2022).
  21. NEMO Committee. Public description of continuous trading match algorithm. Available online: https://www.ote-cr.cz/cs/kratkodobe-trhy/integrace-trhu/files-xbid/public-description-of-continuous-trading-matching-algorithm.pdf (accessed on 5 September 2022).
  22. OMIE. Details of intraday market operation. Available online: https://www.omie.es/sites/default/files/inlinefiles/intraday_and_continuous_markets.pdf (accessed on 5 September 2022).
  23. Alberizzi, A. Zani, P. Di Barba, M., Pantos, " Statistical analysis of two different intraday market designs: the German and Iberic intra-day market," 2022 18th International Conference on the European Energy Market (EEM). [CrossRef]
  24. K. Deb, Multi-Objective Optimisation Using Evolutionary Algorithms, Wiley, 2001. [CrossRef]
  25. J.R.Manne ‘Swarm intelligence for multi-objective optimization in engineering design’. Advanced Methodologies and Technologies in Artificial Intelligence, Computer Simulation, and Human-Computer Interaction, page 15. [CrossRef]
  26. Kumar, Mahesh & Nallagownden, Perumal & Elamvazuthi, Irraivan. (2016). Advanced Pareto Front Non-Dominated Sorting Multi-Objective Particle Swarm Optimization for Optimal Placement and Sizing of Distributed Generation. Energies. 9. 982. [CrossRef]
  27. Journal Articl,e Deep Reinforcement Learning, P. Aske arXiv preprint arXiv:2201.02135 2022. [CrossRef]
  28. Shinde P, Boukas I, Radu D, Manuel de Villena M, Amelin M. Analyzing Trade in Continuous Intra-Day Electricity Market: An Agent-Based Modeling Approach. Energies. 2021; 14(13):3860. [CrossRef]
  29. Alberizzi, A. Zani and P. Di Barba, " Analysis of the intraday market: statistical analysis of German single intraday coupling” 2022 AEIT International Annual Conference (AEIT), 2022. [CrossRef]
  30. Vytelingum, Perukrishnen. “The structure and behaviour of the continuous double auction.” (2006).
  31. Vytelingum, P., Dash, R.K., David, E. and Jennings, N. R. (2004) A risk-based bidding strategy for continuous double auctions. 16th European Conference on Artificial Intelligence, 79-83, Valencia, Spain.
  32. K. Deb, A. Pratap, S. Agarwal and T. Meyarivan, "A fast and elitist multiobjective genetic algorithm: NSGA-II," in IEEE Transactions on Evolutionary Computation, vol. 6, no. 2, pp. 182-197, April 2002. [CrossRef]
  33. Miguel Martínez-Iranzo, Juan M. Herrero, Javier Sanchis, Xavier Blasco, Sergio García-Nieto,Applied Pareto multi-objective optimization by stochastic solvers,Engineering Applications of Artificial Intelligence,Volume 22, Issue 3,2009,Pages 455-465,ISSN 0952-1976. [CrossRef]
  34. P. Hilber, V. Miranda, M. A. Matos and L. Bertling, "Multiobjective Optimization Applied to Maintenance Policy for Electrical Networks," in IEEE Transactions on Power Systems, vol. 22, no. 4, pp. 1675-1682, Nov. 2007. [CrossRef]
Figure 1. Pareto front solution set.
Figure 1. Pareto front solution set.
Preprints 71052 g001
Figure 2. Graphic representation of classification of bids in the order book.
Figure 2. Graphic representation of classification of bids in the order book.
Preprints 71052 g002
Figure 3. Order book simulation.
Figure 3. Order book simulation.
Preprints 71052 g003
Figure 4. Prices of orders submitted.
Figure 4. Prices of orders submitted.
Preprints 71052 g004
Figure 5. Prices of matches – scenario 5.
Figure 5. Prices of matches – scenario 5.
Preprints 71052 g005
Figure 6. Aggressive trend evolution.
Figure 6. Aggressive trend evolution.
Preprints 71052 g006
Figure 7. Welfare of each player.
Figure 7. Welfare of each player.
Preprints 71052 g007
Figure 8. Pareto front resulting from the analyses.
Figure 8. Pareto front resulting from the analyses.
Preprints 71052 g008
Figure 9. Comparison of welfare for different analyses.
Figure 9. Comparison of welfare for different analyses.
Preprints 71052 g009
Figure 10. Comparison of unsold volume for different analyses.
Figure 10. Comparison of unsold volume for different analyses.
Preprints 71052 g010
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated