Economic Pricing in Peer-to-Peer Electrical Trading for a Sustainable Electricity Supply Chain Industry in Thailand

: The state-owned power Electricity Generating Authority of Thailand (EGAT), a monopoly market in charge of producing, distributing, and wholesaling power, is the focal point of Thailand’s electricity market. Although the government has encouraged people to install on-grid solar panels to sell electricity as producers and retail consumers, the price mechanism, i


Introduction
Over the last three decades, energy production and transmission along the transmission line were the responsibility of the Electricity Generating Authority of Thailand (EGAT).The electricity was then distributed and retailed to residential, commercial, and industrial electricity users by the Provincial Electricity Authority (PEA) and the Metropolitan Electricity Authority (MEA).In the mid-to-late 1990s, to address the rising demand for electricity, Independent Power Producer (IPP), Small Power Producer (SPP), and Very Small Power Producer (VSPP) programs were established.Their primary objective was to assist in lowering the EGAT's investment burden and reducing the total cost of electricity generation to levels below public sector generation costs.However, all of the generated electrical energy from the IPPs, SPPs, and VSPPs must be fed into the EGAT as an enhanced single buyer (ESB), which is a centralized system.This system has been operating in this manner until now.
In addition, the Energy Regulatory Commission (ERC) was established on 1 February 2008 [1].The regulatory organization is in charge of regulating the energy industry, which includes gas and electricity.Actually, it is anticipated that an independent regulatory body will contribute to greater accessibility, reliability, and public involvement in the energy sector. Figure 1 illustrates the current structure of the Thai electricity industry [2].One of the responsibilities of the ERC is to regulate the electrical energy price that the EGAT will pay for each producer.The electrical energy pricing rate depends on the energy source for generating electricity such as natural gas, coal, and renewable energy.Normally, the energy cost generated from renewable energy, i.e., solar, wind, or biomass, is lower than that generated from fuel, trash, or industrial waste.Therefore, the ERC has announced the purchasing price of electrical energy as summarized in Table 1 [3].On the other hand, the PEA and the MEA, who distribute electricity to consumers, also gather electrical energy fees.The current electrical energy tariff for selling to residential consumers is a ladder method [4].The more electricity that is used, the more bills that must be paid.Electricity tariffs are classified into two groups, namely, those who consume no more than 400 units per month and those who use more than 400 units per month.The electricity tariff information is shown in Table 2.
Nevertheless, in recent years, the establishment of small-scale distributed generation systems from solar energy and wind energy has taken place rapidly.In many nations, including Thailand, prosumers are becoming more and more popular as both producers and consumers of electrical energy.Additionally, a new paradigm has been introduced known as peer-to-peer (P2P) electrical energy trading, in which local prosumers and consumers can trade electricity with one another.Thus, P2P energy free trade is currently in its infancy in Thailand.However, from the above information, it is obviously seen that Thailand's electricity market is still with the ESB, where the electrical energy purchasing rate is fixed, while the electrical energy selling rate is varied due to the ladder price, which leads to a 1-2 times higher purchasing price for renewable energy.One of the responsibilities of the ERC is to regulate the electrical energy price that the EGAT will pay for each producer.The electrical energy pricing rate depends on the energy source for generating electricity such as natural gas, coal, and renewable energy.Normally, the energy cost generated from renewable energy, i.e., solar, wind, or biomass, is lower than that generated from fuel, trash, or industrial waste.Therefore, the ERC has announced the purchasing price of electrical energy as summarized in Table 1 [3].On the other hand, the PEA and the MEA, who distribute electricity to consumers, also gather electrical energy fees.The current electrical energy tariff for selling to residential consumers is a ladder method [4].The more electricity that is used, the more bills that must be paid.Electricity tariffs are classified into two groups, namely, those who consume no more than 400 units per month and those who use more than 400 units per month.The electricity tariff information is shown in Table 2.
Nevertheless, in recent years, the establishment of small-scale distributed generation systems from solar energy and wind energy has taken place rapidly.In many nations, including Thailand, prosumers are becoming more and more popular as both producers and consumers of electrical energy.Additionally, a new paradigm has been introduced known as peer-to-peer (P2P) electrical energy trading, in which local prosumers and consumers can trade electricity with one another.Thus, P2P energy free trade is currently in its infancy in Thailand.However, from the above information, it is obviously seen that Thailand's electricity market is still with the ESB, where the electrical energy purchasing rate is fixed, while the electrical energy selling rate is varied due to the ladder price, which leads to a 1-2 times higher purchasing price for renewable energy.As mentioned above, the consumer electrical energy expense is about 1-2 times higher than the selling income from renewable energy, especially from solar energy.The price difference may result from operating costs, management costs, maintenance costs, administrative costs, and other overhead profits that are formed to be the structure of electricity costs in Thailand, as presented by Leelasantitham [2].For the genuine equity and sustainability of all parties involved in Thailand's electrical energy trade, the objective of this study is to develop a model of fully free-trade price mechanisms where a blockchain can be used as a peer-to-peer free-trading platform.
Moreover, the main contribution of this paper is its minimization of the previous research gaps, which will be discussed in Section 2, by developing the P2P energy trading model based on the mix of the double-auction technique, pricing optimization, the demand and supply economic law, and bipartite graph theory.Then, the benefits of the practical implications to the economic pricing in the P2P electrical trading for the Sustainable Electricity Supply Chain Industry (SESCI) in Thailand are presented in Section 6.
Additionally, the scope of this study is narrow and clear.Attention is paid to the buying and selling of electrical energy rates from renewable energy only.According to the previous study results of the double auction system [5], randomly simulating the generated and the consumed electrical energy data of four houses, consumers, and prosumers, are used as the initial data along with the buying and the selling prices of electrical energy.At that time, the procedures replicate the data re-established with the sale of N houses in the form of a double auction, then, the results are obtained to analyze the trading price trends by using the law of demand and supply in addition to the principle of the bipartite graph.

P2P Energy Trading
According to the emerging trends in digitalization, de-centralization, and the concept of the sharing economy, P2P energy trading is a type of local energy trading where prosumers can directly exchange extra energy with their neighbors, individuals, or local communities' energy consumers [2].In P2P trading, a peer can be a single energy user or a collection of users, such as producers and prosumers.A group of energy users can exist on a variety of scales, such as a single family, a community, or a local distribution network.In addition, through reduced peak demand, lower capital and operating costs, and increased power system reliability, grid distribution system operators can also profit from this model, which can encourage the use of renewable energy in communities like cooperatives, where residents can benefit collectively from photovoltaic (PV) solar rooftop systems.
Furthermore, in the context of the current energy markets, the P2P model has the ability to alter some existing roles, resulting in the formation of new roles, brokers, and representatives in future P2P trades.With the recent advancements in decentralized blockchain technology (BT), distributed ledger technologies are being used to introduce transaction security in peer-to-peer energy trading.With the use of a consensus algorithm, like the Proof-of-Work (PoW), Proof-of-Stake (PoS), or Proof-of-Authority (PoA) algorithm, BT can be applied to P2P transactions in a way that ensures security, transparency, and unchangeable records without the need for a central authority.These characteristics of BT make it a suitable candidate for implementing P2P trading in the electricity market.In fact, this technology has been applied and established in various areas in many countries and has also been demonstrated in many studies.
P2P electricity trading has been established to be a viable way to promote and manage proliferated prosumers in distribution systems through a significant amount of research and pilot programs.Table 3 shows a short summary of the related research works on energy trading platforms that used blockchain technology.It is obvious that some researchers studied an electrical energy trading scenario on local distribution networks and microgrids [6][7][8][9][10][11][12] with various methods such as game theory and double auction trade to set P2P energy trading platforms [5,[13][14][15], whilst others used case studies to prove their hypotheses and frameworks [5,16,17].However, there were some limitations such as the exclusion of certain information from their works about prosumer trade confidentiality, economic conditions, and pricing optimization.For this study, a blockchain-based business model guideline for Thai electrical utility systems, as provided by Leelasantitham [2], was also utilized in the BT double-auction prepaid electricity trading platform [5,21].The case study found that P2P transactions were direct purchases between the electricity producers and the consumers, which led to fewer operating steps and reduced electrical energy costs in the network.The structure of the electricity trading industry presented in that research is shown in Figure 2.For the double-auction trading platform, in competitions for both bidders and sellers, in the case of an offeror, the highest bidder will match each other.Once the winner's price is determined, the seller who offers the fastest bid will win the auction.In that research, a four-house model was used to represent the consumers and the prosumers in the P2P trading system network, as shown in Figure 3.For this study, a blockchain-based business model guideline for Thai electrical utility systems, as provided by Leelasantitham [2], was also utilized in the BT double-auction prepaid electricity trading platform [5,21].The case study found that P2P transactions were direct purchases between the electricity producers and the consumers, which led to fewer operating steps and reduced electrical energy costs in the network.The structure of the electricity trading industry presented in that research is shown in Figure 2.For the double-auction trading platform, in competitions for both bidders and sellers, in the case of an offeror, the highest bidder will match each other.Once the winner's price is determined, the seller who offers the fastest bid will win the auction.In that research, a fourhouse model was used to represent the consumers and the prosumers in the P2P trading system network, as shown in Figure 3.As mentioned above, one of the gaps in the related studies is pricing optimization.Thus, the pricing optimizations for energy trading were also reviewed, and their summary is provided in Table 4.Some studies used the optimization approach to prevent energy loss for the suppliers, including power balance and energy management systems [22][23][24].The others used the profit maximization algorithm (PMA) to increase productivity along For this study, a blockchain-based business model guideline for Thai electrical utility systems, as provided by Leelasantitham [2], was also utilized in the BT double-auction prepaid electricity trading platform [5,21].The case study found that P2P transactions were direct purchases between the electricity producers and the consumers, which led to fewer operating steps and reduced electrical energy costs in the network.The structure of the electricity trading industry presented in that research is shown in Figure 2.For the double-auction trading platform, in competitions for both bidders and sellers, in the case of an offeror, the highest bidder will match each other.Once the winner's price is determined, the seller who offers the fastest bid will win the auction.In that research, a fourhouse model was used to represent the consumers and the prosumers in the P2P trading system network, as shown in Figure 3.As mentioned above, one of the gaps in the related studies is pricing optimization.Thus, the pricing optimizations for energy trading were also reviewed, and their summary is provided in Table 4.Some studies used the optimization approach to prevent energy loss for the suppliers, including power balance and energy management systems [22][23][24].The others used the profit maximization algorithm (PMA) to increase productivity along As mentioned above, one of the gaps in the related studies is pricing optimization.Thus, the pricing optimizations for energy trading were also reviewed, and their summary is provided in Table 4.Some studies used the optimization approach to prevent energy loss for the suppliers, including power balance and energy management systems [22][23][24].The others used the profit maximization algorithm (PMA) to increase productivity along with increasing profits for the electricity producers [21,[25][26][27].According to their results, it can be seen that, in the near future, the free trading market for electricity trading may open, and the energy trading market may shift from ESB to P2P energy trading.

Demand and Supply Theory
The idea that supplies and demands interact to determine prices is known as the law of supply and demand.It is predicated on the law of supply and the law of demand, which are two other economic laws [8,34].While the law of demand claims that when prices rise, consumers buy fewer products and services, the law of supply asserts that when prices rise, companies see higher profit margins and increase their supplies of goods and services.These suggest that prices will decrease when there is a surplus of items or services compared with demand, and prices are likely to increase when demand surpasses supply.Theoretically, as supply and demand converge, a free market should aim for an equilibrium quantity and price.Supply and demand prices are exactly equal at that point.This means suppliers meet their clients' demands by producing just enough items or services at the appropriate cost.In regard to P2P power trading, this equilibrium point was discovered in this study.Table 5 presents the related research works on the pricing model in which the law of supply and demand was applied.
Corresponding to the demand response based on real-time prices, some studies implemented P2P energy trading in smart homes, which minimized consumers' electricity costs because of reduced wastage and management of the supply and demand of electricity in the microgrids [31].Allowing for a reduction in the maximum net load, the results of one study showed that offline processing was as fast as online processing [35].A dynamic supplier price setting was used to write smart contracts using BT along with an energy management Energies 2024, 17, 1220 7 of 19 system model to increase the efficiency of sky usage cost-effectively.The study [36] found that electricity bills could be reduced by as much as 44.73%.It was also found that electricity costs could be reduced by 51.80% when using the scheduling algorithm.

Bipartite Graph Theory
A bipartite graph is a type of graph that describes the relationship between two sets of data such that there are never two adjacent vertices in the same set.In other words, this is a graph where each edge joins a vertex from one set to another.Generally, this type of graph is often used to describe a one-to-one relationship and to solve matching problems.Some researchers have used bipartite graph theory to help determine the case of a one-to-one relationship, for example, P2P trading or the double-auction matching platform.
Some studies presented a decision-supporting model for P2P lending investment to help make investment decisions using the principles of the bipartite graph [36,43].For simultaneous recalculation, they used real data from America's largest P2P lending marketplace to estimate the loans from unknown people.The results of these studies can prove that the model helped the borrowers choose good loans from the lenders.Similarly, it helped the loan owners to lend profitably.The bipartite correlation diagrams led to the calculation of the decision model for the investment; example case studies for selling and buying are shown in Figures 4 and 5, respectively.
Energies 2024, 17, x FOR PEER REVIEW 7 of 19 also found that electricity costs could be reduced by 51.80% when using the scheduling algorithm.

Bipartite Graph Theory
A bipartite graph is a type of graph that describes the relationship between two sets of data such that there are never two adjacent vertices in the same set.In other words, this is a graph where each edge joins a vertex from one set to another.Generally, this type of graph is often used to describe a one-to-one relationship and to solve matching problems.Some researchers have used bipartite graph theory to help determine the case of a one-toone relationship, for example, P2P trading or the double-auction matching platform.
Some studies presented a decision-supporting model for P2P lending investment to help make investment decisions using the principles of the bipartite graph [36,43].For simultaneous recalculation, they used real data from America's largest P2P lending marketplace to estimate the loans from unknown people.The results of these studies can prove that the model helped the borrowers choose good loans from the lenders.Similarly, it helped the loan owners to lend profitably.The bipartite correlation diagrams led to the calculation of the decision model for the investment; example case studies for selling and buying are shown in Figure 4 and Figure 5, respectively.The equation used to calculate the buyer's confidence, LS, is shown as follow The equation used to calculate the seller's confidence, BS, is shown as follow where statusj = {0, 1}; m = the number of completed purchases; n = the number of and e = the amount of energy that sellers have sold to buyers.

Contents and Contributions
According to the literature review, it is obvious that blockchain technology is for the P2P electricity trading platform with various pricing mechanisms.Howe do not know what the trend will be if the electrical treading market in Thailand pletely free.Thus, this study focuses on this issue for both sides, the buyers and the along with the pricing scenarios for the P2P electrical trading in Thailand to discov sentiment in the market.Based on the relevant research studies mentioned ab comparative P2P energy trading models, with various techniques and metho shared in Table 6.
Therefore, the primary contributions of this paper to the literature are desc follows: (1) In this study, the P2P energy trading model, based on the mix of the doubletechnique, the pricing optimization, the demand-and-supply law, and b graph theory, is presented to minimize the previous research gaps.Several N case studies that take the responsive demand and the varied numbers of parti prosumers into account are carried out in order to demonstrate the efficac studied model.(2) After the developed model is conducted and verified, the benefits of the p implications to the economic pricing in P2P electrical trading for the SESCI land are explored in terms of the social environment and the economic area.tion, the SESCI consists of five main processes in the electrical industry, i.e., f curement, electricity production, electrical transmission system, electricity tr The equation used to calculate the buyer's confidence, LS, is shown as follows: The equation used to calculate the seller's confidence, BS, is shown as follows: where status j = {0, 1}; m = the number of completed purchases; n = the number of sellers; and e = the amount of energy that sellers have sold to buyers.

Contents and Contributions
According to the literature review, it is obvious that blockchain technology is suitable for the P2P electricity trading platform with various pricing mechanisms.However, we do not know what the trend will be if the electrical treading market in Thailand is completely free.Thus, this study focuses on this issue for both sides, the buyers and the sellers, along with the pricing scenarios for the P2P electrical trading in Thailand to discover their sentiment in the market.Based on the relevant research studies mentioned above, the comparative P2P energy trading models, with various techniques and methods, are shared in Table 6.

Price at the Equilibrium State
The price, Px, at the equilibrium point can be determined by using the theory of demand and supply [18].The linear supply and demand equations are shown as follows: The equation for the supply curve is where Qs = the amount of supply; a = the quality of supplied products; and b = the price of each supplied product.The equation for the demand curve is where Qd = the amount of demand; c = the quality of demanded products; and d = the price of each demanded product.
In order to find the equilibrium price, the supply function is set to equal to the demand function so that Qs = Qd (5)

The N-House P2P Trading Model
After the 4-house P2P trading model in Section 3.1 was verified, it was extended to become the N-house P2P trading model where buyers and sellers were completely free to trade.The study procedures are as follows:

•
Random numbers for use of double-auction bids for more than 4 houses.

•
Determination of purchasing sentiment and selling using the bipartite graph principle.

•
Determining the probability of winning an auction compared to the price.

•
Finding the equilibrium price using the principle of supply and demand.

Price at the Equilibrium State
The price, P x , at the equilibrium point can be determined by using the theory of demand and supply [18].The linear supply and demand equations are shown as follows: The equation for the supply curve is where Q s = the amount of supply; a = the quality of supplied products; and b = the price of each supplied product.The equation for the demand curve is where Q d = the amount of demand; c = the quality of demanded products; and d = the price of each demanded product.
In order to find the equilibrium price, the supply function is set to equal to the demand function so that

The N-House P2P Trading Model
After the 4-house P2P trading model in Section 3.1 was verified, it was extended to become the N-house P2P trading model where buyers and sellers were completely free to trade.The study procedures are as follows:

•
Random numbers for use of double-auction bids for more than 4 houses.

•
Determination of purchasing sentiment and selling using the bipartite graph principle.

•
Determining the probability of winning an auction compared to the price.

•
Finding the equilibrium price using the principle of supply and demand.

The Four-House P2P Trading Model
From the random sampling data on buying demand and selling supply, according to Figure 3, House A and House B made bids, while House C and House D made offers.The prices of the electrical energy for buying and selling were between THB 1.00 and 5.00 per unit and the total demand and supply of the electrical energy in those four houses was 20 kWh; the data are shown in Table 7.According to the information in Table 7, the calculation of the demand and supply equations was completed as follows: Supply Equation ( 3 At the equilibrium state, the price, P x , was determined by Equation ( 5) as: Then, P x = 3.27 and Q d = Q s = 10.6.From Equations ( 3) and ( 4), we predicted the related price between demand and supply, which led to the forecasting results.The numerical distribution model for the four-house experimental test was used, and its related price demand and supply graph is shown in Figure 7.
After the data obtained from the experiment were represented in the chart, it was found that the relationship between buying and selling demand was in accordance with the theory of supply and demand.For the demand curve, when a product's price drops, the demand curve's trend also declines.This means that consumers will consume more electrical energy if its price is low.On the other hand, the trend in the supply curve rises when the product's price increases.This implies that suppliers want to sell more energy as they perceive higher profit margins if the price is high.However, it is obviously seen from the graph that the equilibrium price was 3.27 THB/kWh when the amount of electrical energy was 10.6 kWh.After the data obtained from the experiment were represented in the chart, it was found that the relationship between buying and selling demand was in accordance with the theory of supply and demand.For the demand curve, when a product's price drops, the demand curve's trend also declines.This means that consumers will consume more electrical energy if its price is low.On the other hand, the trend in the supply curve rises when the product's price increases.This implies that suppliers want to sell more energy as they perceive higher profit margins if the price is high.However, it is obviously seen from the graph that the equilibrium price was 3.27 THB/kWh when the amount of electrical energy was 10.6 kWh.

The N-House P2P Trading Model
In this experimental scenario, it was assumed that the P2P free-trade electrical power market consists of 100 houses that made random 10,000 bids and 10,000 offers.The relationship between buying confidence and selling confidence was observed; their frequencies of buying success and of selling success are shown in Figure 8.

The N-House P2P Trading Model
In this experimental scenario, it was assumed that the P2P free-trade electrical power market consists of 100 houses that made random 10,000 bids and 10,000 offers.The relationship between buying confidence and selling confidence was observed; their frequencies of buying success and of selling success are shown in Figure 8.After the data obtained from the experiment were represented in the chart, it was found that the relationship between buying and selling demand was in accordance with the theory of supply and demand.For the demand curve, when a product's price drops, the demand curve's trend also declines.This means that consumers will consume more electrical energy if its price is low.On the other hand, the trend in the supply curve rises when the product's price increases.This implies that suppliers want to sell more energy as they perceive higher profit margins if the price is high.However, it is obviously seen from the graph that the equilibrium price was 3.27 THB/kWh when the amount of electrical energy was 10.6 kWh.

The N-House P2P Trading Model
In this experimental scenario, it was assumed that the P2P free-trade electrical power market consists of 100 houses that made random 10,000 bids and 10,000 offers.The relationship between buying confidence and selling confidence was observed; their frequencies of buying success and of selling success are shown in Figure 8.

Relationship between Buying Success Confidence and Bid Price
When the data on the purchasing sentiment and the success in winning bids were broken down, the confidence data between 0.86 and 0.95 led to a 78.51-88.35percent accuracy.This shows the consistency in the purchase confidence.There is an obvious correlation with the number of the winning bids, as shown in Table 8, which can be seen more clearly in the chart in Figure 9.When the data on the purchasing sentiment and the success in winning bids were broken down, the confidence data between 0.86 and 0.95 led to a 78.51-88.35percent accuracy.This shows the consistency in the purchase confidence.There is an obvious correlation with the number of the winning bids, as shown in Table 8, which can be seen more clearly in the chart in Figure 9.

Relationship between Sales Success Confidence and the Offer Price
When the data on the selling sentiment and the success in winning bids were broken down, the confidence data between 0.86 and 0.95 led to 87.11-90.00percent accuracy.This shows the consistency in the sales confidence.There is an obvious correlation with the number of the winning bids, as shown in Table 9, which can be seen more clearly in the chart in Figure 10.

Relationship between Sales Success Confidence and the Offer Price
When the data on the selling sentiment and the success in winning bids were broken down, the confidence data between 0.86 and 0.95 led to 87.11-90.00percent accuracy.This shows the consistency in the sales confidence.There is an obvious correlation with the number of the winning bids, as shown in Table 9, which can be seen more clearly in the chart in Figure 10.The scatter plots in Figure 11 display the selling and the buying prices on the horizontal axis with their confidence on the vertical axis.According to the trendlines, from the buyer's view, when the buyers offer low prices, they have low buying confidence.But if they pay more attention to buying at higher prices, their buying confidence will increase.The scatter plots in Figure 11 display the selling and the buying prices on the horizontal axis with their confidence on the vertical axis.According to the trendlines, from the buyer's view, when the buyers offer low prices, they have low buying confidence.But if they pay more attention to buying at higher prices, their buying confidence will increase.On the other hand, from the seller's view, when the sellers offer low prices, their sales confidence is high.When the sellers want to sell at higher prices, their sales confidence will decrease.It is evidently seen that the intersection point of both trendlines, which represents the equilibrium price at the equilibrium state, is approximately THB 2.8 per unit.The scatter plots in Figure 11 display the selling and the buying prices on the horizontal axis with their confidence on the vertical axis.According to the trendlines, from the buyer's view, when the buyers offer low prices, they have low buying confidence.But if they pay more attention to buying at higher prices, their buying confidence will increase.On the other hand, from the seller's view, when the sellers offer low prices, their sales confidence is high.When the sellers want to sell at higher prices, their sales confidence will decrease.It is evidently seen that the intersection point of both trendlines, which represents the equilibrium price at the equilibrium state, is approximately THB 2.8 per unit.The P2P free-trade model for N houses tested by the bipartite graph method revealed the buyer relationship and buying behavior, which helps to identify how successful each buyer is.The statistical purchase success rates are between 0.86% and 0.95% with an accuracy between 77.62% and 88.35%.Similarly, the model can also give insights into seller The P2P free-trade model for N houses tested by the bipartite graph method revealed the buyer relationship and buying behavior, which helps to identify how successful each buyer is.The statistical purchase success rates are between 0.86% and 0.95% with an accuracy between 77.62% and 88.35%.Similarly, the model can also give insights into seller relationships and selling behavior, which can be used to predict sales opportunities from past sales behavior.The successful sales statistic values are between 0.86% and 0.95% with an accuracy between 87.84% and 90.00%.Moreover, the equilibrium price, which was derived by using the demand and supply law and the bipartite graph method, was THB 2.78 per kWh.

Discussion
According to the four-house and the N-house double-auction data simulations, the results of the tested P2P pricing model agreed with each other and their trendlines went in the same direction.Those models were also verified by the proven results from demand and supply theory and bipartite graph theory.This can be expressed as: more goods on the supply side leads to the lower price of those goods on the market.In other words, the lack of products results in their higher price.Moreover, the buying confidence will rise with higher prices, and if the purchasing price is high, the buying confidence is also increased.In addition, when the demand for a product is high, the price of the product will rise, and the price of the product will decrease if there is less demand for it.In terms of sales confidence, the chances of sales success will vary inversely with the offered prices.If the offered price for sale is high, the chances of winning the auction or confidence in the sale will decrease, while if the bidding price is low, the sales confidence will increase.
Both models have consistency in terms of price trends, but they still cannot point out the right price.Indeed, the bipartite graph method is the backbone for the buyer and the seller's estimated prices to be used in the competition.With the bipartite graph principle, P2P trading gives confidence in the trading, increasing the chances of winning bids and the chances of winning auction sales.The result showed that the equilibrium price was 2.78 THB/kWh.Given that the regulated price that suppliers can sell their electrical energy produced from solar energy is 2.20 THB/kWh (as shown in Table 1) and consumers must pay about 3.27 to 4.51 THB/kWh for their used energy (as shown in Table 2), the suppliers can increase their income by 0.58 THB/kWh, while the consumers can decrease their energy expense by about 0.49 to 1.73 THB/kWh.Therefore, it can be concluded that both suppliers and consumers will obtain more advantages from participating in this P2P model such as increasing incomes and decreasing expenses, respectively.In addition, this will help both buyers and sellers offer the right price due to the mechanism of a truly free market, which will cause true fairness in the sustainable electricity supply chain industry in Thailand.The findings of this study are consistent with those of the previous reports [2].
Once the regulated price is cheaper than the price determined in P2P transactions, consumers will have no willingness to participate in the transaction.However, according to the demand and supply law, consumers normally still want to pay less than that regulated price, while the suppliers, who want to sell their goods, will also cut their margins off, which leads to the lower selling price.Therefore, the equilibrium price in P2P transactions will change to another lower price, which is lower than the regulated price again.Then, both suppliers and consumers still obtain advantages such as gaining profits and saving expenses, respectively.
In addition, the P2P trading platform will not have any participants in the transactions if the Thai government announces a policy that will promote the very high regulated buying price and subsidize the regulated selling price in the electricity market.That means the suppliers will be willing to sell their produced electricity to EGAT to gain very high profits, while the consumers will prefer to buy electricity directly from the grid instead of the suppliers.This phenomenon will not sustain the social, environmental, or economic aspects.Finally, when the government does not have the money to finance the policy, the regulated prices will return to the real regulated prices, and then P2P transactions will be active again.

Beneficially Practical Implications of Economic Pricing in P2P Electrical Trading for a Sustainable Electricity Supply Chain Industry (SESCI) in Thailand: Social, Environment, and Economic Aspects
Nowadays, the electrical energy industry in Thailand is necessary for the country's developments in many areas such as trade, industry, communication, and housing, which are related to the direction of growth and the country's economy.The planning to determine the direction of development at the country's policy level in electric power is very important for long-term sustainable developments in the future, especially in the three cores of sustainability, i.e., society, environment, and economics [46,47].The important issues are used in the planning to determine the policy direction, i.e., the consideration of controlling the amount of demand and supply sides of energy use and production together.This method can be used to study and analyze the elements from the electricity supply chain from upstream, including the procurement of electrical energy, to midstream, including producers, and all the way to downstream, including consumers [2].It consists of five main processes in the electrical industry, i.e., (1) fuel procurement, (2) electricity production, (3) the electrical transmission system, (4) electricity transportation in the distribution system, and (5) electrical retail.The benefits of the studied P2P electrical trading platform on those five processes in the field of social, environmental, and economic areas are shown in Table 10.Lowering fuel transportation or restricting gas pipeline installations helps diminish the overall environmental impact on the surrounding areas.
Reducing expenses on importing fuel and natural gas. (

2) Electricity production
The electrical power generation from PV system is simple and user-friendly, empowering communities to self-educate and install it themselves.
Using clean energy for power generation decreases pollutant emissions.
Possible to develop a business that supplies equipment for PV system installations at the community level. (

3) Electrical transmission system
Flexibility in the installation and utilization of local microgrids helps diminish reliance on centralized electricity transmission.
Implementing community microgrid systems diminishes the demand for nationwide transmission system installations, leading to less intrusion into forested areas and mitigated environmental impacts.
Microgrids improve the electrical system's stability and dependability, resulting in less compensations due to power outages and blackouts in the local area.

(4) Electricity transportation in the distribution system
There is adaptability in handling energy management at the community level, contributing to a decrease in reliance on central energy management.
Clean energy-produced electricity, devoid of pollutants, contributes to establishing a Green Community identity.
By deploying microgrids, electricity losses in the transmission system are reduced, allowing for the highest possible revenue from electricity sales. (

5) Electrical retail
Utilizing peer-to-peer (P2P) platforms can enhance the reputation and support the sustainability of community-based electricity sales business.
It involves creating a sustainable awareness that encourages community members to understand the importance of environmental conservation, pollution reduction, and mitigating the impact of the greenhouse effec on both the local populace and the entire nation.
Establishing electricity prices that are fair and appropriate for stakeholder based on the supply and demand economic law.Income from selling electricity will be directed back into the community to enhance local economic growth.

Conclusions, Limitations, and Future Work
The peer-to-peer trading systems that exist today continue to focus on creating trading platforms.Some of them focus on managing electrical power in the system to be worthwhile and sufficient for all users in the system, while there are few works that explain the upcoming price mechanism.The results of this study revealed two key findings as discussed below.

Explaining the Price Mechanism
When there is completely competitive buying and selling, it was discovered that it actually followed the law of supply and demand.But that method could not determine if it would win or lose in the race.Therefore, the bipartite graph theory calculation was applied as a tool to determine the chances and the probability of buying success and the probability of a successful sale and to find out the right price to win the auction.

The Appropriate Price at the Equilibrium Point
Whether the models were proved by the demand and supply theory or the bipartite graph method, the prices at the equilibrium point were approximately the same, in this case, it was about THB 2.78 per unit.This kind of price mechanism is useful for biding a satisfactory price and offering a reasonable price in term of buyers and sellers, respectively.Compared with the current single-buyer monopoly market, the results of this study showed that the price of electrical energy per unit was much cheaper.We believe that if the studied system is adapted, it will be fair for all stakeholders in electrical energy trading.
However, there are some limitations in this research.The model testing is predicated on the idea that the total amount of power in the system needs to have sufficient volume.But if the supply is not enough, the behaviors of the buyers and the sellers in the auction system will change.Nevertheless, the market will reach equilibrium anyway.In addition, it is important to investigate the potential increase in the distribution network costs in the event that renewable energy prices become more competitive and peer-to-peer electricity trading becomes more active in the future, as well as the service charge of the brokers and the stakeholders.Moreover, in order to attain the desired benefits, P2P electricity trading techniques, which are varied, probably need to be tailored in accordance with the target distribution systems, such as on islands, villages, or distant places.Therefore, while it is worthwhile to conduct additional research into the P2P electricity trading mechanisms of future distribution systems, it is also necessary to develop designed guidelines, platforms, government policies, and regulations for these mechanisms.

Figure 1 .
Figure 1.The current structure of the Thai electricity industry.

Figure 1 .
Figure 1.The current structure of the Thai electricity industry.

Figure 4 .
Figure 4. Bipartite relationship in selling.The letters S, B, and t stand for selling, buying, and transaction, respectively, while the numbers 1, 2, 3, and 4 represent the house number.The blue, orange, and green colors represent the matched transactions from the seller numbers 1, 2, and 3, respectively.

Figure 4 .
Figure 4. Bipartite relationship in selling.The letters S, B, and t stand for selling, buying, and transaction, respectively, while the numbers 1, 2, 3, and 4 represent the house number.The blue, orange, and green colors represent the matched transactions from the seller numbers 1, 2, and 3, respectively.

Figure 5 .
Figure 5. Bipartite relationship in buying.The letters S, B, and t stand for selling, buying, a transaction, respectively, while the numbers 1, 2, 3, and 4 represent the house number.The orange, and green colors represent the matched transactions from the buyer numbers 1, 2, respectively.

Figure 5 .
Figure 5. Bipartite relationship in buying.The letters S, B, and t stand for selling, buying, and transaction, respectively, while the numbers 1, 2, 3, and 4 represent the house number.The blue, orange, and green colors represent the matched transactions from the buyer numbers 1, 2, and 3, respectively.

Figure 6 .
Figure 6.Example data obtained by uniform random sampling in an auction.The red color represents the offer prices and the amount of energy for selling, while the black color represents the bidding prices for buying.

Figure 6 .
Figure 6.Example data obtained by uniform random sampling in an auction.The red color represents the offer prices and the amount of energy for selling, while the black color represents the bidding prices for buying.

Figure 7 .
Figure 7. Relationship between price and quantity when n = 4.

Figure 8 .
Figure 8. Success frequencies in buying and selling.

Figure 7 .
Figure 7. Relationship between price and quantity when n = 4.

Figure 7 .
Figure 7. Relationship between price and quantity when n = 4.

Figure 8 .
Figure 8. Success frequencies in buying and selling.Figure 8. Success frequencies in buying and selling.

Figure 8 .
Figure 8. Success frequencies in buying and selling.Figure 8. Success frequencies in buying and selling.

Energies 2024 , 19 Figure 10 .
Figure 10.Sales confidence chart.4.2.3.The Trend of the Relationship between Price and Sentiment for N Houses

Figure 10 .
Figure 10.Sales confidence chart.4.2.3.The Trend of the Relationship between Price and Sentiment for N Houses

Table 2 .
PEA and MEA electrical energy selling price (ladder method).

Table 3 .
Related research works on energy trading platforms.

Table 4 .
Related research works on pricing optimization.

Table 5 .
Related research works on the pricing model.

Table 5 .
Related research works on the pricing model.

Table 6 .
Comparison of the results from other research studies and this work.

Table 7 .
Buying and selling prices with the amount of demand and supply in the system.

Table 8 .
Distribution of buying sentiment and the number of winning bids.

Table 8 .
Distribution of buying sentiment and the number of winning bids.

Table 9 .
Distribution of selling sentiment and the number of winning bids.

Table 9 .
Distribution of selling sentiment and the number of winning bids.The Trend of the Relationship between Price and Sentiment for N Houses

Table 10 .
Benefits of the P2P platform on the electricity supply chain in social, environmental, and economic areas.