# An Ad-Hoc Initial Solution Heuristic for Metaheuristic Optimization of Energy Market Participation Portfolios

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- Deliberate state interference motivated by a desire to support so-called national energy champions.
- Lack of interest by dominant players or governments to build additional transmission lines to facilitate cross-border trade.
- Weak enforcement of European directives at the country level.

## 2. Portfolio Optimization in Electricity Markets

## 3. Proposed Methodology

#### 3.1. Objective Function

#### 3.2. Constraints

#### 3.3. Initial Solution Heuristic

- 1st Since seller players are not allowed to purchase energy in the day-ahead spot market, this variable is automatically set to zero (7):$$ifM=\mathrm{Spot}\text{}\mathrm{Market},Bpo{w}_{M,d,p}=0$$
- 2nd The higher price between the day-ahead spot market price and the intraday and balancing market sessions is saved (8):$$search(\mathrm{max}p{s}_{M,d,p}),savep{s}_{M,d,p}$$
- 3rd The prices for buying and selling power in bilateral contracts and local markets (considered in this model as Smart Grid (SG) level markets) are calculated considering the limit purchase volume. If the maximum selling price is greater than these, the maximum purchase volume in the spot, balancing and intraday market is allocated (9). This allows buying at lower prices, so that it can be sold in market opportunities with higher expected price. This model considers local markets (at the SG scale) in a rather simplistic approach, based on the principles introduced in [48]. The market works through bilateral trading only, where deals can be reached only among local entities. In summary, SGs are delimited by geographical boundaries, and local trading through bilateral contracts can occur between players located in the same geographical area. Additionally, trading (also by bilateral contracts), can also occur between distinct SG operators, by transacting a volume that meets the needs of the players aggregated by the corresponding SG. Please refer to [48], for details on the considered local market model:$$ifsavedprice\ge p{s}_{M,d,p}\left(\mathrm{max}Bpow\right)\phantom{\rule{0ex}{0ex}}Bpo{w}_{M}=\mathrm{max}quantity,forM=BilateralandSG$$
- 4th In the balancing and intraday market it is only possible for a player to either buy or sell in each negotiation period (buy or sell). Thereby, the highest expected price among all market sessions is compared to the purchase price of the maximum volume in each balancing market session. If the maximum price is higher, the maximum amount of purchase will be automatically allocated in the balancing or intraday market sessions (10), similarly to step 3:$$ifp{s}_{M,d,p}\left(\mathrm{max}Bpow\right)forbalancingsections\le pricesaved\phantom{\rule{0ex}{0ex}}Bpo{w}_{M}=\mathrm{max}quantity,forbalancingsession$$
- 5th The volume allocated to be purchased is added to TEP, thus finding the total volume available to be sold (Equation (11)):$$\mathrm{max}quantityforsale=\mathrm{max}quantitybuy+TEP$$
- 6th In some markets the expected price is strongly dependent on the negotiated amount (e.g., bilateral contracts, see [47]). Hence, the sale price in those markets is calculated for several volume intervals (Equation (12)):$$ifBpow,Spowdependentthequantity,searchthebestoption\phantom{\rule{0ex}{0ex}}bestoption=bestvalueinallintervals$$
- 7th An iterative search is made with the objective of finding a quantity whose expected market price is higher than the maximum found price. Only the market types whose expected price is strongly dependent on the traded amount are subject to this search. In the case of any being found, the associated amount is allocated to that market (Equation (13)):$$ifM=BilateralandSG,\phantom{\rule{0ex}{0ex}}searchquantitywherepricesavedprice$$
- 8th The amount available for selling is updated based on the amount allocated in the two previous markets (Equation (14));$$salequanty=\mathrm{max}quantyforsale-Spo{w}_{M};M=\left(Bilateral,SG\right)$$
- 9th The remaining volume is allocated to the market where the remaining amount can be more profitable, while always respecting the constraints for buying and selling in the same market (Equation (15)):$$Bpow=maxpriceforsalequantity,forSpotorBalancing$$

## 4. Case Study

^{®}Xeon

^{®}w3565 3.20GHz, with 4 Cores, 8 GB of RAM and operating system Windows 10 64bits.

## 5. Results

**.**However, in the PSO, QPSO and NPSO-LRS algorithms the values of mean number of iterations and execution time increase when compared to the solution without the proposed heuristic because, these algorithms are most of the times converging to a local maximum, rather than the global optimum. This makes the search process stop faster, and in a smaller number of iterations, but thus leading to a much lower mean objective function mean value. With the use of the proposed heuristic, the search process is located towards the localization of the global maximum, but still a more extensive search process is required in that localization in order to reach the global best objective function value.

## 6. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Sioshansi, F. Evolution of Global Electricity Markets: New Paradigms, New Challenges, New Approaches, 1st ed.; Elsevier Science & Technology: Amsterdam, The Netherlands, 2013. [Google Scholar]
- Sioshansi, F.P.; Pfaffenberger, W. Electricity Market Reform : An International Perspective; Elsevier: Amsterdam, The Netherlands, 2006. [Google Scholar]
- Hogan, W.W.; Kennedy, J.F. Eletricity Market Restructuring: Reforms Of Reforms; Harvard University: Cambridge, MA, USA, 2001. [Google Scholar]
- European Commission. Energy Prices and Costs in Europe; European Commission: Brussels, Belgium, 2016. [Google Scholar]
- European Commission. Regulation No 443/2009 of the European Parliament and of the Council; European Commission: Brussels, Belgium, 2009. [Google Scholar]
- European Commission. 2030 Framework for Climate and Energy Policies. Available online: http://ec.europa.eu/clima/policies/2030/index_en.htm (accessed on 5 October 2015).
- Ku Leuven Energy Institute. The Current Electricity Market Design in Europe; Ku Leuven Energy Institute: Leuven, Belgium, 2005. [Google Scholar]
- Sioshansi, F.P. Competitive Electricity Markets: Design, Implementation, Performance; Elsevier: Amsterdam, The Netherlands, 2008. [Google Scholar]
- EPEX SPOT. European Power Exchange. Available online: https://www.epexspot.com/en/ (accessed on 9 January 2017).
- EPEX SPOT SE. NWE Monthly Progress Report; EPEX SPOT: Paris, France, 2013. [Google Scholar]
- N-Side Energy Solutions. Available online: https://www.n-side.com/energy-solutions-2/ (accessed on 8 April 2017).
- Redes Energéticas Nacionais (REN) Day-Ahead Market Coupling - Price Coupling of Regions (PCR). Available online: http://www.mercado.ren.pt/EN/Electr/InterProj/RegInitSWE/DayAhead/Pages/default.aspx (accessed on 9 January 2017).
- EPEX SPOT. Price Coupling of Regions (PCR) PCR Project, Main Features; EPEX SPOT: Paris, France, 2016. [Google Scholar]
- European Comission. Spain, Energy Report 2014; European Comission: Brussels, Belgium, 2014. [Google Scholar]
- Pratt, A.; Krishnamurthy, D.; Ruth, M.; Wu, H.; Lunacek, M.; Vaynshenk, P. Transactive Home Energy Management Systems: The Impact of Their Proliferation on the Electric Grid. IEEE Electrif. Mag.
**2016**, 4, 8–14. [Google Scholar] [CrossRef] - Jokic, A.; van den Bosch, P.P.J.; Hermans, R.M. Distributed, price-based control approach to market-based operation of future power systems. In Proceedings of the 2009 6th International Conference on the European Energy Market, Leuven, Belgium, 27–29 May 2009. [Google Scholar]
- Ilic, D.; Da Silva, P.G.; Karnouskos, S.; Griesemer, M. An energy market for trading electricity in smart grid neighbourhoods. In Proceedings of the 2012 6th IEEE International Conference on Digital Ecosystems and Technologies (DEST), Campione d’Italia, Italy, 18–20 June 2012. [Google Scholar]
- Project, E.H. Local Energy Retail Markets for Prosumer Smart Grid Power Services. Available online: http://empowerh2020.eu/ (accessed on 2 October 2017).
- Centrica Centrica to Build Pioneering Local Energy Market in Cornwall. Available online: https://www.centrica.com/news/centrica-build-pioneering-local-energy-market-cornwall-0 (accessed on 9 Janaury 2017).
- Powerpeers Choose Yourself who You Get Energy. Available online: https://www.powerpeers.nl/ (accessed on 1 April 2017).
- ISO Powering New York, Today and Tomorrow. Available online: http://www.nyiso.com (accessed on 20 March 2017).
- Cerjan, M.; Matijaš, M.; Delimar, M. Dynamic Hybrid Model for Short-Term Electricity Price Forecasting. Energies
**2014**, 7, 3304–3318. [Google Scholar] [CrossRef] - Praça, I.; Ramos, C.; Vale, Z.; Cordeiro, M. MASCEM: A multiagent system that simulates competitive electricity markets. IEEE Intell. Syst.
**2003**, 18, 54–60. [Google Scholar] [CrossRef] - Li, H.; Tesfatsion, L. Development of open source software for power market research: The AMES test bed. J. Energy Mark.
**2009**, 2, 111. [Google Scholar] [CrossRef] - Koritarov, V.S. Real-world market representation with agents. IEEE Power Energy Mag.
**2004**, 2, 39–46. [Google Scholar] [CrossRef] - Pinto, T.; Vale, Z.; Praça, I.; Pires, E.J.S.; Lopes, F. Decision Support for Energy Contracts Negotiation with Game Theory and Adaptive Learning. Energies
**2015**, 8, 9817–9842. [Google Scholar] [CrossRef] - Faia, R.; Pinto, T.; Vale, Z. Optimization of Electricity Markets Participation with Simulated Annealing. In Trends in Practical Applications of Scalable Multi-Agent Systems, the PAAMS Collection; de la Prieta, F., Escalona, J.M., Corchuelo, R., Mathieu, P., Vale, Z., Campbell, T.A., Rossi, S., Adam, E., Jiménez-López, D.M., Navarro, M.E., et al., Eds.; Springer: Seville, Spain, 2016; Volume 473, pp. 27–39. [Google Scholar]
- Faia, R.; Pinto, T.; Vale, Z. GA Optimization Technique for Portfolio Optimization of Electricity Market Participation. In Proceedings of the IEEE Symposium on Computational Intelligence Applications in Smart Grid (IEEE CIASG’16) of the 2016 IEEE Symposium Series on Computational Intelligence (IEEE SSCI 2016), Athens, Greece, 6–9 December 2016. [Google Scholar]
- Pinto, T.; Morais, H.; Sousa, T.M.; Sousa, T.; Vale, Z.; Praça, I.; Faia, R.; Pires, E.J.S. Adaptive Portfolio Optimization for Multiple Electricity Markets Participation. Neural Netw. Learn. Syst. IEEE Trans.
**2016**, 27, 1720–1733. [Google Scholar] [CrossRef] [PubMed] - Markowitz, H. Portfolio Selection. J. Financ.
**1952**, 7, 77. [Google Scholar] [CrossRef] - Suksonghong, K.; Boonlong, K.; Goh, K.L. Multi-objective genetic algorithms for solving portfolio optimization problems in the electricity market. Int. J. Electr. Power Energy Syst.
**2014**, 58, 150–159. [Google Scholar] [CrossRef] - Bar-Lev, D.; Katz, S. A Portfolio Approach to Fossil Fuel Procurement in the Electric Utility Industry. J. Financ.
**1976**, 31, 933–947. [Google Scholar] [CrossRef] - Krey, B.; Zweifel, P. Efficient Electricity Portfolios for Switzerland and the United States; University of Zurich: Zurich, Switzerland, 2006. [Google Scholar]
- Faia, R.; Pinto, T.; Vale, Z.; Pires, E.J.S. Portfolio Optimization for Electricity Market Participation with Particle Swarm. In Proceedings of the 2015 26th International Workshop on Database and Expert Systems Applications (DEXA), Valencia, Spain, 1–4 September 2015; pp. 62–67. [Google Scholar]
- Chang, T.J.; Yang, S.C.; Chang, K.J. Portfolio optimization problems in different risk measures using genetic algorithm. Expert Syst. Appl.
**2009**, 36, 10529–10537. [Google Scholar] [CrossRef] - Pinto, T.; Vale, Z.; Sousa, T.M.; Sousa, T.; Morais, H.; Praça, I. Particle Swarm Optimization of Electricity Market Negotiating Players Portfolio. Highlights Pract. Appl. Heterog. Multi-Agent Syst.
**2014**, 430, 273–284. [Google Scholar] - Eberhart, R.; Kennedy, J. A new optimizer using particle swarm theory. In Proceedings of the Sixth International Symposium on Micro Machine and Human Science, MHS’95, Nagoya, Japan, 4–6 October 1995; pp. 39–43. [Google Scholar]
- Selvakumar, A.I.; Thanushkodi, K. Anti-predatory particle swarm optimization: Solution to nonconvex economic dispatch problems. Electr. Power Syst. Res.
**2008**, 78, 2–10. [Google Scholar] [CrossRef] - Faia, R.; Pinto, T.; Vale, Z. Portfolio Optimization for Electricity Market Participation with NPSO-LRS. In Proceedings of the 2016 International Conference on Database and Expert Systems Applications, Porto, Portugal, 5–8 September 2016. [Google Scholar]
- Protopopescu, V.; Barhen, J. Solving a class of continuous global optimization problems using quantum algorithms. Phys. Lett. A
**2002**, 296, 9–14. [Google Scholar] [CrossRef] - Dos Santos Coelho, L. A quantum particle swarm optimizer with chaotic mutation operator. Chaos Solitons Fractals
**2008**, 37, 1409–1418. [Google Scholar] [CrossRef] - Faia, R.; Pinto, T.; Vale, Z. Optimization of electricity markets participation with QPSO. In Proceedings of the 2016 13th International Conference on the European Energy Market (EEM), Porto, Portugal, 6–9 June 2016; pp. 1–5. [Google Scholar]
- Miranda, V.; Miranda, V.; Fonseca, N. New evolutionary particle swarm algorithm (EPSO) applied to voltage/VAR control. In Proceedings of the 14th Power Systems Computation Conference, Seville, Spain, 24–28 June 2002. [Google Scholar]
- Ma, G.; Zhou, W.; Chang, X. A novel particle swarm optimization algorithm based on particle migration. Appl. Math. Comput.
**2012**, 218, 6620–6626. [Google Scholar] - Ledesma, S.; Aviña, G.; Sanchez, R. Practical Considerations for Simulated Annealing Implementation. In Simulated Annealing; Ming, C., Ed.; InTech: Rijeka, Croatia, 2008. [Google Scholar]
- Algarvio, H.; Lopes, F.; Sousa, J.; Lagarto, J. Multi-agent electricity markets: Retailer portfolio optimization using Markowitz theory. Electr. Power Syst. Res.
**2017**, 148, 282–294. [Google Scholar] [CrossRef] - Faia, R.; Pinto, T.; Vale, Z. Dynamic Fuzzy Estimation of Contracts Historic Information Using an Automatic Clustering Methodology. In Highlights of Practical Applications of Agents, Multi-Agent Systems, and Sustainability—The PAAMS Collection SE-23; Bajo, J., Hallenborg, K., Pawlewski, P., Botti, V., Sánchez-Pi, N., Duque Méndez, N.D., Lopes, F., Julian, V., Eds.; Springer: Salamanca, Spain, 2015; Volume 524, pp. 270–282. [Google Scholar]
- Morais, H.; Pinto, T.; Vale, Z.; Praça, I. Multilevel Negotiation in Smart Grids for VPP Management of Distributed Resources. IEEE Intell. Syst.
**2012**, 27, 8–16. [Google Scholar] [CrossRef] - MIBEL Mercado Iberico de Eletrecidade. Available online: http://www.mibel.com/index.php?lang=pt (accessed on 27 February 2017).
- GECAD Table 2 (extended). Available online: http://www.gecad.isep.ipp.pt/ies/public-data/energies/table2.pdf (accessed on 27 February 2017).

**Figure 3.**Confidence interval of 95% confidence for QPSO, for: (

**a**) randomly generated initial solution; (

**b**) initial solution based on the proposed heuristic

Action | Spot | Bilaterals | Balancing 1 | Balancing 2 | Smart Grid | Objective Function (€) |
---|---|---|---|---|---|---|

Seles (MW) | 18 | 11 | 0 | 0 | 1 | 1730.208 |

Purchases (MW) | 0 | 0 | 10 | 10 | 0 |

Algorithms | Objective Function (€) | Execution Time (s) | Number of Iterations | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

Min | Max | Mean | STD | Min | Max | Mean | STD | Min | Max | Mean | STD | |

PSO | 571.5 | 1998.6 | 1483.8 | 270 | 0.117 | 0.437 | 0.184 | 0.035 | 42 | 119 | 64 | 10.9 |

PSO-ST | 1805.7 | 2000.6 | 1981.1 | 47.4 | 0.451 | 2.288 | 1.046 | 0.277 | 168 | 872 | 384 | 101 |

EPSO | 482.8 | 2000.6 | 1579.4 | 307 | 0.597 | 251.12 | 27.930 | 54.814 | 36 | 10000 | 1621 | 3173.9 |

EPSO ST | 1875.1 | 2000.6 | 1972.7 | 28.4 | 0.544 | 181.72 | 13.168 | 30.568 | 33 | 10000 | 783 | 1808.2 |

QPSO | 320.7 | 1998.9 | 1232.0 | 305 | 0.026 | 0.784 | 0.292 | 0.116 | 3 | 193 | 61 | 35.2 |

QPSO-ST | 1730.2 | 2000.6 | 1939.2 | 56.4 | 0.090 | 0.634 | 0.282 | 0.090 | 11 | 192 | 63 | 26.0 |

NPSO-LRS | 1416.4 | 2000.6 | 1762.4 | 144 | 0.033 | 4.176 | 1.500 | 0.466 | 7 | 943 | 363 | 112 |

NPSO-LRS-ST | 1889.1 | 2000.6 | 1992.1 | 20.9 | 0.866 | 5.818 | 1.806 | 0.499 | 226 | 1466 | 448 | 122 |

MPSO-TVAC | 1416.6 | 2000.6 | 1947.2 | 133 | 5.282 | 28.181 | 6.841 | 0.871 | 398 | 2000 | 492 | 60.2 |

MPSO-TVAC-ST | 1816.7 | 2000.6 | 1873.7 | 85.1 | 3.518 | 6.185 | 4.059 | 0.232 | 270 | 340 | 298 | 11.4 |

GA | 1545.5 | 2000.6 | 1971.2 | 76.4 | 5.094 | 9.226 | 7.478 | 0.679 | 1915 | 3076 | 2625 | 218 |

GA-ST | 1730.2 | 2000.6 | 1993.0 | 40.3 | 0.006 | 5.544 | 4.728 | 0.743 | 1 | 1712 | 1663 | 255 |

SA | 1781.5 | 1927.2 | 1884.0 | 55.5 | 0.495 | 0.868 | 0.551 | 0.021 | 1720 | 1907 | 1831 | 26.1 |

SA-ST | 1945.0 | 2000.6 | 1988.3 | 11.7 | 0.484 | 0.889 | 0.510 | 0.020 | 1710 | 1749 | 1730 | 6.4 |

Algorithms | Objective Function (€) | Difference Between Random and Heuristic Solution (€) | Difference Relative to the Best (€) | |
---|---|---|---|---|

Random | Heuristic | |||

PSO | 1998.60057 | 2000.645575 | 2.05 | 5.60 × 10^{−12} |

EPSO | 2000.645441 | 2000.645575 | 1.35 × 10^{−4} | 6.10 × 10^{−11} |

QPSO | 1998.943579 | 2000.603042 | 1.66 | 2.13 × 10^{−5} |

NPSO-LRS | 2000.645575 | 2000.645575 | 1.98 × 10^{−11} | 0 |

MPSO-TVAC | 2000.645575 | 2000.645575 | 1.01 × 10^{−7} | 1.94 × 10^{−12} |

AG | 2000.624022 | 2000.61882 | 2.0 × 10^{−4} | 1.34 × 10^{−5} |

SA | 1927.242146 | 2000.627211 | 73.39 | 9.18 × 10^{−6} |

Type solution | PSO | EPSO | QPSO | NPSO-LRS | MPSO-TVAC | GA | SA | |
---|---|---|---|---|---|---|---|---|

Random | Upper bound | 1500.58 | 1598.41 | 1250.89 | 1771.31 | 1955.41 | 1975.91 | 1887.48 |

Lower bound | 1467.09 | 1560.38 | 1213.03 | 1753.42 | 1938.90 | 1966.44 | 1880.61 | |

Error | 16.74 | 19.01 | 18.93 | 8.94 | 8.25 | 4.73 | 3.43 | |

Heuristic | Upper bound | 1984.01 | 1974.49 | 1942.69 | 1993.35 | 1879.00 | 1995.46 | 1988.99 |

Lower bound | 1978.13 | 1970.97 | 1935.70 | 1990.76 | 1868.46 | 1990.47 | 1987.54 | |

Error | 2.90 | 1.75 | 3.49 | 1.29 | 5.27 | 2.49 | 0.72 |

Parameter | Execution Time | Number of Iterations |
---|---|---|

Stat t | 7.437 | 7.254 |

Df | 1565.568 | 1585.684 |

P-value | 8.385 × 10^{−14} | 2.868 × 10^{−13} |

Mean 1 | 27.93 | 1621 |

Mean2 | 13.168 | 783 |

STD 1 | 54.814 | 3173.9 |

STD 2 | 30.568 | 1808.2 |

Confidence level | 95% | 95% |

© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Faia, R.; Pinto, T.; Vale, Z.; Corchado, J.M.
An Ad-Hoc Initial Solution Heuristic for Metaheuristic Optimization of Energy Market Participation Portfolios. *Energies* **2017**, *10*, 883.
https://doi.org/10.3390/en10070883

**AMA Style**

Faia R, Pinto T, Vale Z, Corchado JM.
An Ad-Hoc Initial Solution Heuristic for Metaheuristic Optimization of Energy Market Participation Portfolios. *Energies*. 2017; 10(7):883.
https://doi.org/10.3390/en10070883

**Chicago/Turabian Style**

Faia, Ricardo, Tiago Pinto, Zita Vale, and Juan Manuel Corchado.
2017. "An Ad-Hoc Initial Solution Heuristic for Metaheuristic Optimization of Energy Market Participation Portfolios" *Energies* 10, no. 7: 883.
https://doi.org/10.3390/en10070883