Je Soussigné

Isaías Faria

kBIS -M ILP ) Mixed-Integer Linear Program for MWkBIS OMBSR-G-HEU Graph-oriented temporal decomposition Heuristic for OMBSR (OM BSR -LP ) Continuous relaxation of (OM BSR -M ILP ) (OM BSR ′ -LP ) Continuous relaxation of (OM BSR -M ILP ′ ) (OM BSR -M ILP ) Mixed-Integer Linear Program for OMBSR (OM BSR -M ILP ′ ) Alternative Mixed-Integer Linear Program for OMBSR (OM BSR -M IN LP ) Mixed-Integer NonLinear Program for OMBSR (OM BSR -M IN LP ′ ) Alternative Mixed-Integer NonLinear Program for OMBSR OMBSR-RF-HEU Relax-and-Fix Heuristic for OMBSR Chapter 5 OMBSE

Keywords: Recherche Opérationnelle, Système de Stockage d'Energie à Plusieurs Batteries, Mécanisme de

ou à l'étranger dans une version identique ou similaire à un organisme examinateur.

Acknowledgement

The realization of this thesis has been an excellent opportunity to meet and exchange with many people that I have had the pleasure to interact during the last three years. I would therefore like to thank each one of them.

First of all, I would like to thank Matthieu CHARDY and Mustapha BOUHTOU for the trust on the realization of this thesis. The last three years were extremely important for my personal and professional formation, with a rich knowledge, professional and extra-professional exchange. I am extremely grateful with you for it.

I would like to thank my two thesis supervisors, Safia KEDAD-SIDHOUM and Cédric BENTZ, for their excellent supervision during this thesis. I would like to thank them for the confidence they have shown in me to carry out my research, for their availability and for their expertise which they have been able to pass on to me throughout the period of the thesis. I would like to thank Dominique QUADRI and André ROSSI for having accepted to be reporters and thank them warmly for their attentive rereading and the great interest they have shown in my work. My gratitude also goes to Stefano SECCI and Christian ARTIGUES for agreeing to be part of my doctoral jury.

I also would like to thank the MSA team (now INNOV team) and all the colleagues in Orange Labs that received me and helped me with everything I needed since my first day of work. I am very happy to be part of this great team. I would like to emphasize that it was a pleasure to have Olfa as manager during these three years: kindness, listening, and availability to solve the administrative questions. Of course, I would like to thank all the doctoral students, interns and alternants that I have had contact with. Everyone was very nice to me and helped me a lot in different aspects.

Finally, I thank and dedicate this thesis to my father Geraldo MAGELA, to my mother Elizabete ACKNOWLEDGEMENT APARECIDA, to my girlfriend Laura BERNAL whom I have the pleasure to meet in the middle of this thesis, and to William GUYOT-L ÉNAT and Angeline GUYOT-L ÉNAT for the essential support that was given to me. You all have a special place in my heart.

Finally, I would like to thank all my friends, family and colleagues for the support and enjoyable time we spent together. You have been essential along the way.

Agradecimentos

A realização desta tese foi uma excelente oportunidade para conhecer e trocar experiências com muitas pessoas. Gostaria, num primeiro momento, agradecer a cada uma delas.

Antes de mais nada, gostaria de agradecer a Matthieu CHARDY e Mustapha BOUHTOU por terem confiado em mim para a realização desta tese. Os últimos três anos foram extremamente importantes para minha formação pessoal e profissional, com uma rica troca de conhecimentos e conselhos profissionais e extra-profissionais. Sou extremamente grato a vocês. Gostaria de agradecer aos meus dois supervisores de tese, Safia KEDAD-SIDHOUM e Cédric BENTZ, por sua excelente supervisão durante esta tese. Gostaria de agradecer-lhes pela confiança que demonstraram em mim para realizar minha pesquisa, pela disponibilidade e pela experiência que puderam me transmitir durante todo o período de realização da tese. Gostaria de agradecer a Dominique QUADRI e André ROSSI por terem aceitado ser relatores e agradecer-lhes calorosamente por sua releitura atenta e pelo grande interesse que demonstraram em meu trabalho. Minha gratidão também vai para Stefano SECCI e Christian ARTIGUES por concordar em fazer parte do meu júri de doutorado.

Também gostaria de agradecer a equipe MSA (agora equipe INNOV) e todos os colegas da Orange Labs que me receberam e me ajudaram com tudo o que eu precisava desde meu primeiro dia de trabalho. Estou muito feliz em fazer parte desta grande equipe. Gostaria de enfatizar que foi um prazer ter Olfa como minha gestora durante estes três anos: gentileza, atenção e disponibilidade para resolver as questões administrativas. Naturalmente, gostaria de agradecer a todos os estudantes de doutorado, estagiários e colegas de trabalho com os quais tive contato. Todos foram muito simpáticos para mim e me ajudaram muito em diferentes aspectos.

Finalmente, agradeço e dedico esta tese a meu pai Geraldo MAGELA, a minha mãe Elizabete APARECIDA, a minha namorada Laura BERNAL, que tive o prazer de conhecer no decorrer desta tese, e a William GUYOT-L ÉNAT e Angeline GUYOT-L ÉNAT pelo apoio essencial que me foi dado.

Todos vocês têm um lugar especial no meu coração. Finalmente, gostaria de agradecer a todos os meus amigos, familiares e colegas pelo apoio e pelo tempo agradável que passamos juntos. Vocês foram essenciais ao longo dessa trajetória.

Abstract

The use of batteries as backup in case of power outages is common in telecommunications networks, since they provide critical services and need to keep their services always online. These batteries are used in conjunction with antennas and other equipment, and strict safety usage rules must be considered in order to guarantee that they are always available in case of a power outage. Besides, the telecommunications operator could use these batteries in order to participate in the electricity market provided that the grid is reliable enough, as long as the safety usage rules are respected. Indeed, since the energy price varies over time, batteries can be used to avoid buying energy when this price is high, and recharged when the energy price is low, a behavior that will be denoted as a peak-shaving strategy. A second profitable way for a company to use its batteries is by performing load curtailments. Indeed, when the power demand of a country is greater than the production, the Transmission System Operator must take steps in order to stabilize the grid such as ask power plants to produce more energy. Another way is to ask energy-intensive consumers to reduce their consumption during a given time period (in which case they are said to perform a load curtailment), by offering them a reward in exchange. In this thesis, we consider the problem of optimizing the total energy costs using batteries installed for backup in order to participate in the energy market by performing peak-shaving and load curtailments, with the help of a proper batteries management. Our goal is to reduce the total energy operational expenses for the company, and maximize the rewards received by performing load curtailments. A study of the electricity market architecture in France is conducted to understand the demand, flexibility mechanisms and how the operational constraints in the use of batteries of a telecommunications operator interact with the energy market. We identified different challenges that were investigated individually to better understand the characteristics of the underlying optimization problem and thus to develop more efficient solving methods. For each one, mixed-integer linear programs and heuristics are then proposed to solve the related problem. Once we Résumé L'utilisation de batteries de secours en cas de coupure de courant est fréquente dans les réseaux de télécommunications, car ils fournissent des services critiques et doivent rester en ligne en permanence.

Ces batteries sont utilisées en conjonction avec des antennes et d'autres équipements, et des règles strictes de sécurité d'utilisation doivent être prises en compte afin de garantir qu'elles soient toujours disponibles en cas de coupure de courant. En outre, l'opérateur de télécommunications pourrait utiliser ces batteries afin de participer au marché de l'électricité à condition que le réseau soit suffisamment fiable et que les règles de sécurité d'utilisation soient respectées. En effet, puisque le prix de l'énergie varie dans le temps, les batteries peuvent être utilisées pour éviter d'acheter de l'énergie lorsque ce prix est élevé, et être rechargées lorsque le prix de l'énergie est plus bas, un comportement appelé stratégie d'écrêtement des pointes (peak-shaving en anglais). Une deuxième façon rentable pour une entreprise d'utiliser ses batteries est d'effectuer des effacements de charge. En effet, lorsque la demande d'électricité d'un pays est supérieure à la production, le gestionnaire du réseau de transport doit prendre des mesures afin de stabiliser le réseau, par exemple en demandant aux centrales électriques de produire davantage d'énergie. Un autre moyen est de demander aux consommateurs intensifs en énergie de réduire leur consommation pendant une période donnée (on dit alors qu'ils effectuent un effacement de charge), en leur offrant une récompense en échange. Dans cette thèse, nous considérons le problème de l'optimisation des coûts totaux de l'énergie en utilisant des batteries installées pour la sauvegarde afin de participer au marché de l'énergie en effectuant des écrêtements de pointe et des effacements de charge, avec l'aide d'une gestion appropriée des batteries. Notre objectif est de réduire les dépenses totales d'exploitation de l'énergie pour l'entreprise, et de maximiser les récompenses reçues en effectuant des effacements de charge. Une étude de l'architecture du marché de l'électricité en France est d'abord menée pour comprendre les mécanismes de flexibilité de la demande et comment les contraintes opérationnelles dans l'utilisation des batteries d'un opérateur de télécommunications RESUME interagissent avec le marché de l'énergie. Nous avons identifié différents défis qui ont été explorés individuellement pour mieux comprendre les caractéristiques du problème d'optimisation sous-jacent et ainsi développer des méthodes de résolution plus efficaces. Pour chacun d'entre eux, des programmes linéaires en nombres entiers mixtes et des heuristiques sont ensuite proposés pour résoudre le problème correspondant. Après avoir exploré et compris les défis individuels, nous avons proposé des programmes linéaires en nombres entiers mixtes et des heuristiques pour le problème principal de cette thèse, que nous prouvons être NP-Dur, en incorporant les prix de l'énergie du marché et la disponibilité des batteries. Enfin, des simulations basées sur des données réalistes provenant de l'opérateur de télécommunications français Orange montrent la pertinence des modèles et de l'heuristique proposés : ceux-ci se montrent efficaces en termes de calcul pour résoudre des instances à grande échelle, et des économies et des revenus significatifs peuvent être générés grâce aux politiques optimisées de gestion du stockage d'énergie à plusieurs batteries.

Mots-clés: Recherche Opérationnelle, Système de Stockage d'Energie de Multiples Batteries, Mécanisme de Réponse à la Demande, Effacements d'Energie, Programmation Linéaire en Nombres Entiers Mixtes, Algorithmes de Graphes, Réseaux de Télécommunications.

Resumo

O uso de baterias como backup em caso de quedas de energia é comum em redes de telecomunicações, já que elas fornecem serviços críticos e precisam manter seus serviços sempre online. Essas baterias são usadas em conjunto com antenas e outros equipamentos, e regras rígidas de segurança de uso devem ser consideradas para garantir que elas estejam sempre disponíveis em caso de queda de energia. Além disso, o operador de telecomunicações pode usar essas baterias para participar do mercado de eletricidade, desde que a rede seja suficientemente confiável, e desde que as regras de segurança de uso sejam respeitadas. De fato, como o preço da energia varia com o tempo, as baterias podem ser usadas para evitar a compra de energia quando este preço é alto, e recarregadas quando o preço da energia é menor, um comportamento conhecido como estratégia de corte de pico (peak-shaving em inglês). Uma segunda maneira lucrativa para uma empresa é utilizar suas baterias para realizar reduções de carga. De fato, quando a demanda de energia de um país é maior do que a produção, o Operador do Sistema de Transmissão deve tomar medidas para estabilizar a rede, tais como pedir às usinas elétricas que produzam mais energia. Outra forma é pedir aos consumidores intensivos de energia que reduzam seu consumo durante um determinado período de tempo (nesse caso se diz que eles realizam uma redução de carga), oferecendo-lhes uma recompensa em troca. Nesta tese de doutorado, consideramos o problema de otimizar os custos totais na compra de energia utilizando baterias instaladas para backup, a fim de participar do mercado de energia realizando cortes de pico e reduções de carga, com a ajuda de um gerenciamento adequado das baterias. Nosso objetivo é reduzir os gastos operacionais totais de energia para a empresa, e maximizar as recompensas recebidas pela realização de reduções de carga. Um estudo da arquitetura do mercado de eletricidade na França é realizado primeiramente para entender os mecanismos de flexibilidade da demanda e como as restrições operacionais no uso de baterias de um operador de telecomunicações interagem com o mercado de energia. Identificamos diferentes desafios que foram explorados individualmente para entender melhor RESUMO as características do problema de otimização subjacente e assim desenvolver métodos de solução mais eficientes. Para cada um deles, programas lineares inteiros mistos e heurísticas são então propostos como métodos de resolução. Uma vez explorados e compreendidos os desafios individuais, propusemos programas lineares inteiros mistos e heurísticas para o problema principal desta tese, que provamos ser fortemente NP-Hard, incorporando os preços de mercado da energia e a disponibilidade de baterias.

Finalmente, simulações baseadas em dados realistas da operadora de telecomunicações francesa Orange mostram a relevância dos modelos e heurísticas propostos: estes provam ser computacionalmente eficientes na solução de instâncias de larga escala, e economias e recompensas significativas podem ser geradas através das políticas otimizadas de gerenciamento de armazenamento de energia das baterias.

Mots-clés: Pesquisa Operacional, Sistema de Armazenamento de Energia de Múltiplas Baterias, Mecanismo de Resposta à Demanda, Peak-Shavings, Programação Linear Inteira Mista, Algoritmos em Grafos, Redes de Telecomunicações.

Glossary

The electricity market notations

In this report, the following notations concerning the electricity market that will be used:

• Ampere (Amps): A unit of electricity current.

• Battery: Two or more primary cells connected to provide a source of electric current.

• Circuit: A complete path through which an electric current can flow.

• Current (I): Flow of electric charge. 1 Amp = 1 Coulomb per second.

• Efficiency: Ratio of output power to input power of a device.

• Electrical Conductor: Material that can conduct electricity.

• Electrical Energy: Energy required to push electrons through the components of a circuit.

• Electricity: Type of energy that comes from electrical energy.

• Energy: Ability to do work, and work is moving something against a force, like gravity. There are many different types of energy: light, heat, gravity, chemical and electrical energy.

• Energy Efficiency: The achievement of using less energy without reducing the benefit provided by the end-use service.

• Kilowatt Hour (kWh): Energy represented by 1 kilowatt of power consumed for a period of 1 hour.

• Power (P): The rate at which energy is released, transmitted or converted to another form; the rate of doing work. The unit of power is the Watt (W), equal to one Joule of energy per second.

GLOSSARY

• Volt: The unit used to measure voltage in a circuit.

• Voltage (V): The amount of energy carried by a unit of electrical charge. 1 Volt corresponds to energy of 1 Joule per Coulomb.

The energy storage assets notations

Let us properly define the notations concerning the energy storage assets that will be used in this report:

• Battery Power: the rate at which a battery can deliver energy, given in Watt.

• Battery Capacity: the amount of energy that the battery can store, given in Watt hours (Wh).

• Battery Autonomy: the duration that a battery can provide its maximum power, usually given in hours.

• Battery Lifespan: represents the number of cycles (i.e., one discharge and one recharge) that the battery can perform before its replacement.

• Level of Discharge: the percentage of the battery that has been discharged.

• Battery Efficiency: the ratio of energy recovered from the battery, to the energy delivered to the battery, when they return to the same state of charge.

List of Acronyms

Introduction

Over the last few years, different aspects of the electricity market have been studied, especially with the emergence of smart-grids (Tuballa and Abundo, 2016). Such networks may involve multiple energy sources, storage systems, smart-consumption and local energy production [START_REF] Dang | The energy web: Concept and challenges to overcome to make large scale renewable and distributed energy resources a true reality[END_REF][START_REF] Koutsopoulos | Optimal energy storage control policies for the smart power grid[END_REF].

In this context, batteries can be used in different ways with the aim of reducing production and transportation costs, reducing energy consumption, and increasing grid reliability when used as backup.

More precisely, the use of batteries as backup in case of power outages is common in telecommunications networks, since they provide critical services and need to keep their services always online [START_REF] Kiehne | Batteries in power supplies for the new telecommunication services[END_REF]. These batteries are used in conjunction with antennas and other equipment, and strict safety usage rules must be considered in order to guarantee that they are always available in case of a power outage. Besides, the telecommunications operator (company) could use these batteries in order to participate in the electricity market provided that the grid is reliable enough, as long as the safety usage rules are respected. Indeed, since the energy price varies over time, batteries can be used to avoid buying energy when this price is high, which is known as the demand response mechanism [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF]. The batteries will then be recharged when the energy price is low. The energy production and demand define the energy prices over a day, which must be paid to buy energy from a market. Such an electricity market is known as retail market, and the demand response mechanism has been widely studied over the last decade (Torriti, 2015;[START_REF] Johnson | Energy peak shaving with local storage[END_REF][START_REF] Mishra | Smartcharge: Cutting the electricity bill in smart homes with energy storage[END_REF][START_REF] Labidi | Smart grid-aware radio engineering in 5G mobile networks[END_REF]. This mechanism is based on changes in electricity use by end-use customers from their normal consumption patterns in response to changes in energy prices over time.

Recently, another profitable way for a company to use its batteries, has emerged. In order to illustrate how it works, let us consider a typical energy production and demand system as shown in Figure 1. In such a system, the energy is delivered to the customers by the electricity distributors.

INTRODUCTION

The energy is supplied from the generators to the distributors by the Transmission system Operator (TO), which is also in charge of the network stability. Indeed, when the power demand is greater than the production, the TO must take steps in order to stabilize the grid (i.e., ask power plants to produce more energy). Another way is to ask energy-intensive consumers to reduce their consumption during a given time period (in which case they are said to perform a load reduction or load curtailment), by offering them a reward in exchange [START_REF] Brown | Public utility pricing and output under risk[END_REF]. Usually, such a reward depends on the amount of energy not bought during a load curtailment, which is the case for the French context (RTE-Portal, 2020). In addition, performing load curtailments requires to establish rules that must be contractualized between the company and the TO (RTE- Portal, 2020).

Figure 1 -Electricity markets agents.

Since 2016, the French telecommunications operator Orange France uses its base stations batteries installed for backup to adjust the power consumption and perform load curtailments through the socalled Block Exchange Notification of demand response mechanism (NEBEF) (RTE-Portal, 2020). In this context, Orange France interacts directly with the TO thanks to its high load flexibility capacity by participating in the so-called curtailment market through the NEBEF mechanism. This is done by using its batteries for which strict safety usage rules need to be respected anyway. However, no optimization strategy in such a use is taken into account.

In this thesis, we consider the problem of optimizing the total energy costs by using batteries installed for backup in order to participate in the retail and curtailment markets, with the help of a proper batteries management. Our goal is to reduce the total energy operational expenses for the company, known as OPerational EXpenditure (OPEX), and maximize the rewards received from the curtailment market. Note that the OPEX and the rewards received are represented by monetary units and are considered simultaneously. Hence, we have a single-objective optimization problem.

INTRODUCTION

Concerning the contributions of this thesis, which are detailed in Chapter 2, we first conducted a theoretical analysis of the problem and its properties, proving that it is a problem that aggregates different difficulties to solve. Different mathematical models, either approaching parts of the problem or considering the complete problem, have been proposed and evaluated. We also present different algorithms and heuristics with good computational and economical performance that are useful for solving large real instances. Different numerical experiments are performed and confirm the performance of the proposed methods.

This report is organized as follows: In Chapter 1, Section 1.1 presents the functioning of the electricity market, and Section 1.2 presents the battery storage assets and their use in telecommunication networks. In the following, Chapter 2 presents a literature review, the positioning of this thesis and the major challenges of the optimization problem. We detail three key aspects of the problem and

INTRODUCTION

Chapter 1

Contextualization

In this chapter we introduce the electricity market we are going to interact with, and the energy assets that are used. In fact, we present elements of context, the way the market works, and specific properties that are very important for understanding the subject, as well as the rules and constraints considered in our work.

THE ELECTRICITY MARKET

The electricity market

In this section we introduce the electricity market, its principles of operation and the way energy prices are established, as well as the energy markets with which the customers can interact. We focus on the balancing mechanism of the network and how the consumers can value their reserves of energy.

General functioning 1.Introduction

Energy is everywhere and can be divided into two main forms: kinetic energy and potential energy.

Kinetic energy is the energy contained in moving objects and potential energy is any form of energy that can be stored for future use. We can cite many examples of energy, such as light, heat, gravity, chemical and electrical energy. Note that one type of energy can be converted into another, but not created or destroyed. In our work, we consider electrical energy.

Electrical energy is produced by moving particles, called electrons, with a negative charge. In general, electrical energy moves through a wire in an electrical circuit. If electrons accumulate in an object, but can no longer flow, it is said to be static electricity creating an electrical charge [START_REF] Room | Work, energy, and power[END_REF]). Batteries are an example of objects where electrons are stored. If an electrical conductor touches the battery, the electrical charge is released, creating an electrical current as the electrical energy is carried from the battery to another location by the electrons. Then we have electricity, which is the type of energy caused by flow of electrons. The conventional direction of the electric current is from the negative side of the charge to the positive side.

In fact, the negative side charged with an excess of electrons and the positive side with a lack of electrons cause the electrical potential, called a voltage, to move the electrons. Such a voltage is measured in Volts (V), and represents the pressure exerted by the charged side of an electric circuit that pushes the charged electrons through a wire.

Another important metric in the context of electrical energy is the word current, which represents the speed at which electrons flow through the conductor (usually a wire). Such a current is a physical quantity that can be measured and expressed numerically, and for which the standard metric is the ampere (A).

THE ELECTRICITY MARKET

Energy production, transmission and distribution

In this section we present the entire process from energy generation to energy consumption, and the mechanisms involved. Understanding this process is important because the subject addressed in this thesis is directly related to the transmission stage.

In the real world, energy is produced in power plants (nuclear, gas, hydroelectric, solar, etc.) and has to be sent to the customer's location. Thus, the electrical power is transferred via transmission wires.

Generation: Concerned with the process of power generation, based on the conversion of natural energy into electrical energy, several energy sources have been used over the years. Historically, thermal power plants for energy production have been widely used throughout the world. Examples include petroleum, nuclear, geothermal, and waste incineration power stations. Close to half (45.5%) of the net electricity generated in the EU in 2018 came from combustible fuels (such as natural gas, coal and oil), while a quarter (25.8%) came from nuclear power stations (Eurostat, 2020).

In some regions, the production of energy through hydroelectric power plants is an important alternative to thermal power plants, being a production with fewer emissions of pollutants. In Europe, 13% of all energy production in 2018 comes from hydroelectric plants (Eurostat, 2020), while in some countries, such as Brazil, energy production from hydroelectric plants is more intense (65%) [START_REF] Epe | Electricity production, consumption and market overview[END_REF].

Recently, there has been a worldwide effort for the massive use of renewable energy production, such as wind turbines and solar panels. The technological development of these technologies increases efficiency, and also reduces their cost of production and installation. Consequently, the installation of solar panels in homes and businesses is becoming increasingly common. Customers then become "prosumers", because they are consumers and producers of energy at the same time. As a result, distributed energy production has been increasingly studied and is seen as a form of production for future generations of electrical grids. However, only 15.4% of all energy production in Europe in 2018 comes from solar panels or wind power plants (Eurostat, 2020).

The agents responsible for the production are commonly called "producers" or "generators".

Transmission: Electric power transmission involves sending electricity from a power generation site to an electrical substation where the voltage is transformed and distributed to consumers. When 1.1. THE ELECTRICITY MARKET Figure 1.1 -General schema of power generation, transmission and distribution. electric power is generated at a power plant, it has a tension typically between 11.7kV and 33kV.

However, its voltage is stepped up to between 100kV and 700kV before it is sent to the distribution centers via transmission lines to reduce transmission losses. Indeed, the current is frequently reduced and the voltage is increased. On the one hand, current reduction means a lesser number of electrons traveling at the same point of the conductor while at the same time reducing the friction. On the other hand, voltage increasing means a higher differential power pressure groups of electrons to flow "more frequently". The equipment responsible for such an increase of voltage is the transformer. Every power plant uses a transformer to make the voltage level higher before transmission for long distances, as illustrated in Figure 1.1. In the French context, Figure 1.2 illustrates transmission network in December 2019. The illustrated panel shows in real time the hubs and transmission lines and their working states.

A second aspect of utmost importance in power transmission is to keep the current in the transmission network constant. Depending on whether production is higher or lower than consumption, the frequency increases or decreases. However, for the smooth operation of all devices connected to the network, it is essential that the frequency is extremely stable, which requires an almost perfect balance at all times between production and consumption. The agent responsible for the power transmission and at the same time of the balance of the network (i.e., keeping demand equal to production all the time) is the "Transmission system Operator (TO)".

In this context, the TO must take action in real time to balance demand and production. Among the mechanisms used, we can mention the modification of energy prices to encourage an increase or 1.1. THE ELECTRICITY MARKET Figure 1.2 -The French transmission grid. December 2019. source [START_REF] Ferriere | Un lieu parmi les plus importants de france! le centre de contrôle du réseau électrique[END_REF]. reduction in consumption, the use of reserves to be activated in case of a peak in demand, or even the possibility to ask a large consumer to reduce its demand for a period of time by offering a financial reward.

Distribution: Electricity distribution is the final step in the delivery of electricity from the highvoltage transmission system to the end consumers. Distribution substations connect to the transmission system and step down the transmission voltage to medium voltage ranging from 2 kV to 35 kV with the use of transformers. So-called distribution lines then transport this medium-voltage power to distribution transformers located close to the consumers' installations. The distribution transformers are responsible for lowering the voltage so that the power can be used for lighting, industrial equipment, and household appliances.

The agents responsible for the distribution are commonly called "distributors" or "suppliers".

Electricity commerce and pricing definition

After the liberalization and opening of the electricity markets to competition, a market where electricity is traded before final delivery to the consumer between different actors was created. The 1.1. THE ELECTRICITY MARKET wholesale market concerns negotiations between actors operating in the energy field, while the retail market concerns negotiations between suppliers and end customers directly.

The French electricity market

Besides, France has one of the largest energy markets on the continent [START_REF] Comission | European gas and electricity market reports[END_REF]. In 2019, 79.1% of all energy produced came from nuclear sources, while only 20.2% was renewable. However, there is a movement towards reducing the use of nuclear power plants and increasing the use of renewable energy (IEA, 2019). In the same year, renewable electricity generation exceeded fossil fuel generation for the first time in history. Around 40% of the energy produced in the European Union was generated from renewable energies (wind, solar, hydro and bioenergy), while fossil fuels generated 34% [START_REF] Energiewende | The european power sector in 2019: Up-to-date analysis on the electricity transition[END_REF].

Historically, the French energy market was marked by an absolute monopoly, with EDF ( Électricité de France, in French) and GDF (Gaz de France, in French) being the main actors in energy production and distribution [START_REF] Marty | Le marché français de capacité d'électricité[END_REF]. It was only in 2007, following the liberalization of the European energy market, that France restructured its energy market. Since 2010, when France approved the NOME law (Nouvelle Organisation du Marché de l'Electricité, in French) to promote competition in the retail electricity market [START_REF] Creti | The nome law: implications for the french electricity market[END_REF], any company can become an agent in energy distribution or production. Indeed, prosumers can act in daily balance, as a reserve for periods of greater demand such as winter, or as an immediate reserve to use when necessary [START_REF] Kieny | A continuous evolution of the flexibility mechanisms in the french electricity system[END_REF]. Only energy transmission does not have an open market because its management is extremely complex. In this context, RTE (Réseau de transport d'électricité, in French) was created, and is responsible for transmitting the energy and maintaining the balance of the network.

Wholesale market

The wholesale electricity market plays a central role in the operation of the French electricity system by allowing the supply of electricity to be balanced with demand. On the one hand, electricity is injected into the grid via producers or imported from other countries, and on the other hand, electricity is extracted from the grid to satisfy final consumption and/or for export.

Concerning the agents that play a role in this part of the market, they are classified into four different types: The generators trade and sell the output from their power plants, the suppliers trade 1.1. THE ELECTRICITY MARKET electricity and then sell it to end-use customers for their consumption, the traders trade to purchase and sell (or vice versa), thereby helping to ensure market liquidity, and the demand side management (or load reduction) operators that profit from their customers' lowered consumption. At any moment, the TO ensures the real-time balance of the system if necessary. French intraday markets allow exchanges within France up to five minutes before delivery.

Two types of products can be traded. On the one hand, spot products are traded for same-day or next-day delivery, and on the other hand, future contracts are traded for delivery at a certain point in the future. Concerning the spot products, they are of two types: In the Day-Ahead market, hourly products are traded for delivery on the next day, and in the Intraday market, half-hourly, hourly products or blocks spanning several hours are traded for delivery on the same day. Concerning the future products and contracts, the participants can sign buyer/seller contracts for the supply of electricity in future at a price negotiated on the contract trade date (CRE, 2018).

Retail market

Since the French electricity and natural gas markets are opened to competition, consumers are free to choose their energy supplier. In this context, consumers can choose between two types of offers: the first is the product market, where prices are set freely by suppliers; and the second, where regulated sales tariffs are set by the government and proposed by the incumbents.

The retail price of an electricity product, whether by regulated tariff or market price, includes fixed costs that are identical for all suppliers and costs that vary. The fixed costs consist of the grid access costs set by the regulatory agency CRE (Commission de Régulation de l'Energie, in French), while the variable costs are related to the generation or supply of electricity, commercial costs, margin or return taken by the supplier. By optimizing these costs, suppliers are able to offer lower prices to their customers.

There exist two types of offers for which consumers can contract: so-called "Fixed price offers", where the price, excluding taxes, does not change during the duration of the contract, but is subject to changes in taxes and contributions; and offers called "indexed price offers", in which prices follow changes in regulated sales tariffs or other wholesale market indices specified in the contract [START_REF] Cre | Electricity market[END_REF].

THE ELECTRICITY MARKET

Formally, the retail market rule considered in our study is the following one:

• There is a maximum amount of power that the distributor can supply and which is supported by the distribution grid;

Demand side management

Considering that the customer can opt for a contract where the price of energy varies during the day, it is natural to think of different strategies to adapt energy consumption according to prices. In general terms, the consumer is always interested in consuming as little as possible in the periods when energy costs are highest, shifting consumption to periods of the day when energy is cheapest. This strategy is commonly known as Demand Side Management (DSM) (Strbac, 2008) or as Peak-Shaving, and has been widely adopted by different types of customers, but it has also been a growing research topic in recent years.

The DSM also plays an important role in the sustainable and low-carbon energy transition that aims to optimize energy use and mitigate emissions. Several elements are used in such a management:

The reallocation of power demand (reallocating the production of a certain product for example) to different periods, or the use of batteries to store energy and allow the use of different renewable energy sources (solar panels, wind power plants, etc.) are widely adopted [START_REF] Meyabadi | A review of demand-side management: Reconsidering theoretical framework[END_REF].

The problem addressed in this thesis iterates with both the Wholesale and Retail markets by adapting the energy consumption of telecommunications base stations. In this thesis, we consider the base stations of the French telecommunications operator Orange.

The grid stability

One of the fundamental characteristics of electricity transmission is that the amount of energy injected must equal the amount of energy extracted from the grid, which is why it is necessary to constantly balance consumption and production. So it is necessary to ensure sufficiently far in advance that the available means of production will be able to meet demand at any given time.

In France, transmission is done in alternating current at a frequency of 50 Hertz (refereed to as frequency of reference) in a situation of balance between supply and demand [START_REF] Legifrance | Code de l'énergie[END_REF]. In the United States, transmission is at a frequency of 60 Hertz. Hence, transmission operators must 1.1. THE ELECTRICITY MARKET then keep the frequency as close as possible to the reference values. If energy production is greater than demand, the frequency increases, while the frequency decreases if production is unable to meet demand.

Grid imbalances responses

To absorb grid imbalances between electricity production and consumption, RTE (in France), accumulates and activates energy reserves (called balancing reserves) provided by different agents: producers, consumers or other actors likely to inject or withdraw energy from the grid. They are of three different types: primary, secondary, and tertiary (Portal). Each one of them is used in specific situations.

When there is an imbalance in the grid, RTE can activate the primary reserve. This is done at the power plant level, automatically with a delay of a few seconds to a few minutes, and involves all European power producers that are connected to the transmission system. In Europe, the primary reserve must be able to respond to a power difference of 3,000 MW. The French system is responsible for 540 MW.

Then, RTE can activate the secondary reserve, also automatically. In this case, only French power producers with a production capacity exceeding 120 MW are considered. The secondary reserve in France has a capacity of between 500 MW and 1,180 MW.

Finally, RTE has the possibility to activate the tertiary reserve (also called the adjustment mechanism in France), composed of French producers and consumers that are asked to participate in the balancing mechanism, modifying very quickly their planned operational program (RTE-Portal, 2020).

Note that they can be energy producers, or large consumers that are able to reduce their consumption for a period (strategy called load reduction).

Companies and consumers can participate in the tertiary reserve in two different ways: through a contractualized reserve, or through a non-contractualized reserve based on available capacity. In the case of the contractualized reserve, RTE opens a bidding process, in accordance with Article L. 321-11 of the French Energy Code, which customers bid for. In the case of non-contractualized reserves, customers place their extra production or reduction capacity at the disposal of RTE, which can request the activation of the reserve when needed. Note that, in the non-contractualized model, the client 1.1. THE ELECTRICITY MARKET Figure 1.3 -General schema of actions taken by RTE in case of a power outage. Source: www.servicesrte.com is compensated only when it is requested to use its reserve, while, in the contractualized model, the client is compensated even if RTE decides not to use its reserve.

Figure 1.3 illustrates the actions taken by RTE in the event of a power outage. Note that, when a generator has a problem, the reserves supply the power demand as quickly as possible. Consequently, the system frequency drops and returns to the nominal level.

In this context, the problem addressed in this thesis is based on the interaction of a telecommunications operator with the transmission operator in the French context.

Valorization of the flexibility in France

In France, there are some modalities that allow the customer to put his flexible power, which can be activated at any time, at the disposal of the transmission operator. He can value their power capacities (in MW) or their stored energy (MWh).

Valorization of the capacities: This type of mechanism consists in making available to the transmission operator a certain amount of power that can be activated at any time according to the type of contract adopted.

The first way to value capacities is through the tertiary reserve. The second one is through the 1.1. THE ELECTRICITY MARKET capacity mechanism. In this context, the capacity mechanism aims to ensure security of electricity supply in France during winter peak periods. It is based on the obligation to cover consumption during peak hours by obligated actors and on the certification and evaluation of generation and reduction capacities. This mechanism has been in force since 2017 through the NOME law.

Valorization of the energy: In this context, the customer puts his energy (or ability to reduce his consumption) available to the transmission operator for a certain period of time, that can be used when needed. The consumer is then paid by the market for the energy sold (or consumption reduction requested) in euros per MWh. Reducing consumption also contributes to the regulation of energy prices (avoiding the variable costs associated with producing additional energy in periods of high demand).

In this context, there exist two main mechanisms in France that allow the customers to valorize their reserves: the NEBEF mechanism, and the adjustment mechanism.

Concerning the NEBEF mechanism (Notification d'Echanges de Blocs d'Effacement, in French), the consumer can sell the energy not consumed directly to the wholesale market. Each MWh reduced by the consumer can be sold at the real market value. In concrete terms, this is selling the electricity that will not be consumed on a given day, the day before (e.g., selling today the energy that will not be consumed tomorrow). Once negotiated, the operator avoids requesting extra energy production to balance the grid.

The consumer can participate directly to this mechanism if it has at least 100kW of capacity, otherwise it is necessary to use an intermediate agent called aggregator. In addition, the maximum duration of a load reduction is limited to 2 hours.

Concerning the adjustment mechanism, it assists in balancing the electric grid in real time by allowing energy to be sold to RTE in real time for grid management purposes. Consumers make load reduction offers, specifying the price per MWh, duration, reduction power, and conditions of use. RTE can, at any time, activate the offers made respecting the conditions of use established in the contract.

Measurement of the effective reduction of a load curtailment: Measuring how much energy was actually reduced by a consumer during a call for load reduction is one of the extremely important aspects in the valuation of flexibility. In fact, it is difficult to verify that the energy effectively reduced is equal to the amount contracted in a load curtailment offer. Furthermore, it is necessary to be 1.2. ENERGY STORAGE ASSETS able to distinguish a reduction in consumption due to a usual demand variation from a reduction in consumption due to the load curtailment requested by the transmission operator. To this end, monitoring the amount of power reduced consists firstly in estimating a reference value corresponding to the consumer's usual consumption before and during the power reduction call. Formally, the reference value is the average of the power bought immediately before the load curtailment together with the power demand forecast during the whole load curtailment (RTE-Portal, 2020).

Once the reference value is calculated, the effective reduction realized is calculated as the difference between the reference value and the power purchased during the load curtailment.

The problem addressed in this thesis is based on the participation to the NEBEF mechanism in the French context.

Curtailment market rules

To participate in the NEBEF mechanism, some rules are contracted between the transmission system operator and the customer. Formally, the curtailment market rules considered in our study are the following ones:

• Each load curtailment performed must respect a minimal and maximal duration;

• During each load curtailment performed, the power consumption must be reduced by at least a certain amount.

Energy storage assets

In this section we present the main types of energy storage, with emphasis on batteries. Information about how they work, the main types, and the main use cases are also covered. Finally we present the use of batteries in the telecommunication context and the battery inventory of the French telecommunication operator Orange.

As such batteries are used as backup, safety usage rules must be respected for any additional uses.

These rules are also presented in this section.

Introduction

Energy storage is a strategy that has been widely used around the world over the years and has several economic, reliable, and environmental benefits. Storing energy allows us to reduce the cost of energy production, transportation, and consumption, and to increase the reliability of the grid when used as backup. It also allows the integration of different devices and resources, and can be used to reduce environmental impact. However, electricity to be stored needs to be transformed into other types of energy, such as mechanical or chemical.

Energy can be stored in different ways using different technologies, for example:

• Hydroelectric pumping: Cost-effective technology that provides stability to the electrical system and can generate significant levels of clean energy with fast response times. Electricity is used to pump water into a reservoir. When the water is released from the reservoir, it flows downward through a turbine to generate electricity.

• Thermal storage: This technology allows energy to be stored in materials that allow it to be trapped and released when needed. An example is when electricity is used to produce chilled water or ice during periods of low demand, which is later used for cooling during periods of peak electricity consumption.

• Batteries: Device that store energy in chemical compounds capable of generating an electrical charge. There are many types, such as lead-acid, lithium-ion, or nickel-cadmium batteries.

The main advantages of batteries are their fast response, ease of installation, scalability, and reliability.

We can also mention several other types of energy storage, such as compressed air, flywheels, flow batteries and supercapacitors.

Battery assets

One of the most common energy storage resources are batteries. They come in different types, capacities, and performances. Essentially, a battery is a device that stores chemical energy and converts it into electrical energy through an electrochemical process, called electrolysis. A battery is composed 1.2. ENERGY STORAGE ASSETS Figure 1.4 -Electrochemical cell scheme. Source: www.science.org.au of one or more electrochemical cells, each composed of two electrodes separated by an electrolyte, as illustrated in Figure 1.4. An electrode is a solid electrical conductor that carries electric current. In a battery, the electrodes are made of different materials: one that reacts with the electrolyte that produces a current of electrons (called the anode), and another that reacts with the electrolyte that allows the electrode to accept the electrons (called the cathode) [START_REF] Ferrese | Battery fundamentals[END_REF]. Concerning the electrolyte, it can be a liquid, gel, or a solid substance, but it must be able to allow the movement of charged ions.

Battery properties

The properties of a battery, such as current, voltage, power, and range, are essential properties to analyze before purchasing.

In the context of batteries, the voltage represents the force that the electrolysis process at the electrodes pushes the electrons thought cells. Voltage is also known as the potential difference given by the chemical reaction that occurs at each electrode. The amount of work that the same number of electrons can do increases as the voltage does. Another important property is current: the number of electrons that is given by the battery per time. It can be seen as the capacity of the electrolysis process to release electrons.

In addition, energy is characterized by the power rate at which a battery can operate. Battery power is calculated from the multiplication of current (Amp) and voltage (Volts) and is given in Watt.

Note that both current and voltage are important in finding out what a battery is suitable for.

ENERGY STORAGE ASSETS

In the context of batteries, autonomy is the duration that a battery can provide its maximum power, usually given in hours. Note that a battery with 2 hours of autonomy giving 1200W can have its autonomy increased to 4 hours if it operates at 600W. The capacity of the battery (i.e. the amount of energy that the battery can store, given in Watt hours (Wh)) is obtained by multiplying its power by its autonomy. A battery with a power of 1200W and 2 hours of autonomy has a capacity of 2400 Wh, or 2.4 kWh.

Finally, the lifetime of a battery represents the number of cycles that the battery can perform before replacement. The lifetime depends on how the battery is used (discharge intensity, frequency of use, if it is recharged immediately and with which power rate, and the temperature) and the material it is made of.

Recharging process

Some common batteries can be used once and are non-rechargeable. In this case, when the electrodes release all the positive or negative ions into the electrolyte, there is no more electric current and the battery reaches the end of its useful life. Some electrodes and electrolytic materials are expected to allow a reverse electrolysis process, recharging the battery, taking the battery back to its starting point and giving it a new life.

The recharging process is characterized by connecting a source of electricity to the battery, reversing the chemical reaction that occurred during the discharge. However, the recharging process is not perfect. The sending of the ions from the electrolyte back to their initial electrodes is not as clean or as well structured as the electrodes of a new battery. The electrodes degrade with each recharge of the battery, which means that the battery loses performance over time. In fact, the battery has a lifetime that is given in number of recharge cycles considering some usage patterns, such as frequency of use, temperature, or average level of discharge. This last standard is known as depth of discharge (DoD) and is defined by the percentage of electrons passed from anode to cathode in relation to the total number of electrons available in a complete electrolysis process. However, we will keep the notation level of discharge instead of depth of discharge for sake of clarity.

During the recharging process, the current and voltage for recharging are key factors in keeping batteries safe by minimizing energy loss. Each type of battery related to the technology used in its manufacture requires a different power rate for recharging. In general, this power must be constant to 1.2. ENERGY STORAGE ASSETS preserve the chemical properties of the electrodes and electrolytes of a battery. Indeed, an important aspect is the sulfation in the plate of lead-acid batteries that occurs when they are deprived of a full charge. When too much sulfation occurs, it impacts the battery performance because it impedes the conversion between chemical and electrical energy. Consequently, recharging lead-acid batteries immediately after each use is commonly used [START_REF] Catherino | Sulfation in lead-acid batteries[END_REF].

The battery recharge time is called the Neutralization Delay, representing the duration (in hours) for recharging the battery to its full capacity. Note that such a delay depends on the level of discharge performed, and that the energy level in the battery does not increase linearly until the end of the recharge. In effect, the battery recharges much faster at the beginning of the recharging delay and slowly at the end, depending on the recharge strategy adopted and on the battery technology. In this context, different strategies are proposed to recharge batteries while minimizing energy losses and also keeping the recharge process safe (the internal temperature can increase considerably) [START_REF] Pandžić | An accurate charging model of battery energy storage[END_REF]. Regarding lithium batteries, different fast recharge strategies have been widely studied, as presented in the review by Tomaszewska et al. (2019). Regardless of the strategy adopted or the type of battery, DoD-based recharge time predictions depending on the level of discharge have been quite effective [START_REF] Dunstan | Smart battery providing battery life and recharge time prediction[END_REF][START_REF] Guruacharya | Battery recharge time of a stochastic linear and nonlinear energy harvesting systems[END_REF].

Types of batteries

Different conductive materials can be used in battery production. They are used in the electrodes and electrolytes with an impact on efficiency, lifetime, recharge rate, energy density, and production cost. In this section we provide more information about three types of batteries: GEL, AGM and Lithium. In this thesis, only GEL and AGM batteries are taken into account in our experimentation.

However, lithium batteries are beginning to be used in the telecommunications context requiring further studies, as presented in Appendix B.

First, in AGM (Absorbent Glass Mat) batteries the electrolyte is absorbed by capillarity onto a fiberglass mat placed between the electrodes. In GEL batteries, the electrolyte is a solid matrix with silica gel and sulfuric acid. More recently, lithium ion batteries have been widely adopted due to their safety and efficiency. In this context, lithium has excellent electrochemical properties and batteries are manufactured by combining it with different materials such as manganese dioxide, carbon monofluoride, iron disulfide, silver chromate and others [START_REF] Bibliography Koksbang | Review of hybrid polymer electrolytes and rechargeable lithium batteries[END_REF].

ENERGY STORAGE ASSETS

AGM batteries are more capable of providing high currents for short periods of time than GEL batteries. In addition, AGM batteries have a lower production cost than GEL batteries. However, GEL batteries perform better for daily use with slow and deep discharges [START_REF] Victron | Gel and agm batteries[END_REF], while AGM batteries perform better with a level of discharge up to 80% and are preferable for use in non-regular scenarios. As a result, GEL batteries tend to have a slightly longer life than AGM batteries. The lifetime of AGM and GEL batteries depends essentially on the average level of discharge and the frequency of use. The lifetime of AGM and GEL batteries can vary from 450 cycles for AGM batteries and 500 cycles for GEL batteries with an average of level of discharge of 80 % to 1500 and 1750, respectively, with an average of the level of discharge of 35 %.

Lithium battery technology marks the beginning of a new energy era. It has significant advantages over AGM and GEL batteries, such as: up to 3x higher energy density (amount of energy a device can hold per unit volume); level of discharge does not affect their lifetime, which is also longer; up to 15% higher charging efficiency; can be used in safety-critical contexts; are recyclable. Even though the installation cost of a lithium battery is higher compared to GEL and AGM batteries, the cost per cycle becomes lower thanks to its long lifetime. However, lithium batteries require optimal temperatures for optimal performance, while AGM and GEL batteries are more flexible in this aspect.

Batteries in telecommunications

1.2.3.1 Cases of use Batteries are used not only in data-centers as backup to prevent network outages but also on sites together with other devices such as antennas [START_REF] Kiehne | Batteries in power supplies for the new telecommunication services[END_REF][START_REF] Nasiriani | Optimal peak shaving using batteries at datacenters: Characterizing the risks and benefits[END_REF].

More recently, telecommunications operators are seeking to use the large collection of batteries in other aspects, for example, they can be used with the objective of reducing the consumption of fuel in site generators, as presented by [START_REF] Marquet | Sollan-dimsol r d project, solar and renewable energy in france telecom[END_REF].

In Finland, the energy generator Fortum Power and Heat Oy is looking for different uses of telecommunications base station batteries as power reserves to interact with the energy market [START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF], while the Italian telecommunications operator TIM explores the economic opportunities of using the batteries installed in its data centers in the demand-response mechanism [START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF].

In France, the telecommunication operator Orange also uses its base station batteries to participate in the French balancing mechanism.

SUMMARY OF RULES

Batteries safety usage rules

Since the batteries are installed for backup use, the following safety usage rules must be respected for any use other than for backup. These rules are given and endorsed by the team of experts of Orange France. The safety usage rules considered in our study are the following ones:

• There is a minimum (and a maximum) power discharge rate for each battery in discharge;

• There is a minimum (and a maximum) amount of energy that can be stored in each battery;

• Each battery must be immediately fully recharged after each use with a constant power rate;

• Each battery must be fully charged at the beginning and at the end of the planning horizon;

• There is a maximum number of cycles that each battery can perform over the time horizon.

Note that the process of recharging a battery is not linear and depends on many factors such as temperature, battery type and battery health. However, the team of experts of Orange France imposes a constant power recharge that integrates a safe margin to simplify and assure that the battery will be recharged at the end of the recharging period.

Orange France assets

The French telecom operator Orange has a large number of battery assets over the country on its sites, i.e. base stations with antennas, each equipped with a battery for backup. In our work, we have access to 5715 batteries among such sites, mainly of AGM and GEL technologies. The address of each site is known, and the distance between two sites can be obtained by geolocating each one. We observed that the power of each battery is equivalent to the power demand average of the site. This is expected because the cost of maintenance of the batteries are elevate, and hence, sites have only the backup power strictly necessary.

Summary of rules

This section summarizes all the rules that are taken into account in this thesis. They come from the energy market and from the battery safety usage rules. The complete list of the rules is the following: 1.3. SUMMARY OF RULES R1 -At least a minimum amount of energy B min , given in kWh, must remain in the battery at any time period; R2 -The battery must be immediately fully recharged after each use with a constant power rate P B , given in kW, up to its maximal capacity B max , given in kWh; R3 -The battery must be fully charged at the beginning and at the end of the planning horizon; R4 -A minimum power discharge of D min , given in kW, is imposed when the battery is in discharge mode; R5 -The maximum power rate that the battery can deliver is limited to D max and given in kW; R6 -Each battery b cannot be used more than N b times over the time horizon; R7 -No more than P max kW can be bought from the distributor at any time period; R8 -The duration of each curtailment performed is bounded by ∆ min and ∆ max time periods; R9 -No more than p max c kW can be bought from the distributor during the curtailment c if it is performed.

R10 -The number of load curtailments that can be performed over the time horizon is limited to N c . Note that rules R1-R6 concern the safety usage rules, and rules R7-R10 to the energy market.

In Chapter 3, only rules R1-R5, and R7-R9 are considered, while only rules R1-R7 are considered in Chapter 4. In Chapter 5, all rules R1-R10 are taken into account.

Chapter 2

Positioning and major contributions

In this chapter, we present the main challenges addressed in this thesis and the outline of our research. In addition, we review the literature, and present the industrial positioning of this thesis.

OPTIMIZING THE ENERGY COSTS BY USING BATTERIES IN THE ENERGY MARKET

2.1 Optimizing the energy costs by using batteries in the energy market

The main problem addressed in this thesis is the optimization of total energy costs by using batteries originally installed for backup in telecommunications base stations in order to participate in energy markets, with the help of a proper battery management. In this context, batteries are used to participate in the retail market by adapting the energy consumption of the network based on the energy prices, but also to perform load curtailments, that help to maintain the network balance, in exchange for a financial reward. Our goal is to reduce the total operational energy expenses for the company while maximizing the rewards received from the curtailment market. Currently, the batteries are already used to participate in the energy markets, but no optimization strategy is explored.

The optimization problem in question must take into account some contractual rules and physical limits of the batteries. These rules, summarized in Section 1.3, which will be formally presented in more detail in Chapters 3,4,and 5, can be classified into three distinct groups as follows:

• Safety usage rules R1-R6 introduced in Section 1.2.3.2.

• Retail market rule R7 presented in Section 1.1.2.3.

• Curtailment market rules R8-R10 introduced in Section 1.1.3.3.

Each of these groups of rules impacts the solution of the problem in different ways, and can make the optimization problem more difficult or easier to solve. Among these three groups of rules, only the retail market rule have been fully explored by other studies considering batteries [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF]Torriti, 2015;[START_REF] Johnson | Energy peak shaving with local storage[END_REF][START_REF] Mishra | Smartcharge: Cutting the electricity bill in smart homes with energy storage[END_REF][START_REF] Labidi | Smart grid-aware radio engineering in 5G mobile networks[END_REF].

In Section 2.2, we present the major challenges identified that impact the problem solving, and look for literature references and solving methods that may help in tackling them.

Major challenges

We identified three major challenges that make the problem potentially difficult to solve. The first major challenge is related to the particular rules of use for batteries installed for backup in the context of telecommunications, the so-called safety usage rules. The second challenge is related to the impact of energy market rules, more precisely rules from the curtailment market, on the optimization of the 2.2. MAJOR CHALLENGES battery use. Finally, the third challenge is related to the large number of batteries to be optimized.

Having a large and diverse collection of batteries, such as that of telecom operators, can cause significant bottlenecks in solving the problem.

Impact of the safety usage rules

Concerning the impact of the safety usage rules on a single Battery Energy Storage System (BESS) management, some related studies address them individually [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF][START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF][START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF]. More precisely, [START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF] consider some physical aspects, such as a maximum discharge rate, a constant recharge power rate, and a maximum amount of cycles, while [START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF] consider the maximum amount of cycles that the battery can perform. Concerning the rules such as recharging the batteries immediately after each use with a constant power rate and imposing a minimum discharge power on the batteries, no previous studies have addressed them. Consequently, the impact of these rules on battery management is not known, requiring further analysis and study.

Impact of the curtailment market rules

Some studies have already addressed partially the curtailment market rules (presented in Section 1.1.3.3) in other contexts [START_REF] Zhang | An adjustable robust optimization approach to scheduling of continuous industrial processes providing interruptible load[END_REF][START_REF] Lan | Integrated resources planning in microgrids considering interruptible loads and shiftable loads[END_REF][START_REF] Mkireb | Robust optimization of demand response power bids for drinking water systems[END_REF]. In addition, the use of batteries in order to perform load curtailments was treated in some studies [START_REF] Zakeri | Economics of energy storage in the german electricity and reserve markets[END_REF][START_REF] Nasrolahpour | A bilevel model for participation of a storage system in energy and reserve markets[END_REF][START_REF] Schillemans | Strategic participation of merchant energy storage in joint energy-reserve and balancing markets[END_REF]. However, no previous studies have addressed these rules in the scenario where batteries subject to safety usage rules are used to perform load curtailments. Consequently, the impact of these rules on battery management is not known, requiring further analysis and study.

Impact of the multi-battery management

Another challenge is the optimal management of a Multiple Battery Energy Storage Systems 2.3. LITERATURE REVIEW (MBESS), requiring more efficient control strategies. In this context, recent studies propose different methods to treat the dimensionality efficiently [START_REF] Babazadeh | A new control scheme in a multi-battery management system for expanding microgrids[END_REF][START_REF] Zhu | Control-limited adaptive dynamic programming for multibattery energy storage systems[END_REF][START_REF] Fan | Distributed equalisation strategy for multibattery energy storage systems[END_REF]. In our case, we consider a MBESS for which the safety usage rules must be considered, something that no previous studies have addressed. Consequently, the impact of these rules in the management of a MBESS is not known, requiring further analysis and study.

Literature review

Evaluation of the reserves Smart grids aim to offer high flexibility, responsiveness and efficiency to electrical networks, and have been widely studied (Tuballa and Abundo, 2016). In particular, they allow better integration of renewable and decentralized energy sources while maintaining the security of the electricity grid, allowing for greater collaboration between the agents. In this context, batteries can be used as backup devices. [START_REF] Kiehne | Batteries in power supplies for the new telecommunication services[END_REF] studied such a use of batteries in different parts of a telecommunications system, to keep the network safe and the services active in case of a power outage. Moreover, a study was conducted at Orange Company by [START_REF] Marquet | Sollan-dimsol r d project, solar and renewable energy in france telecom[END_REF], in order to address the use of batteries in telecommunications systems to reduce the use of fuel and the OPEX of remote power plants and, if possible, to remove the diesel engines that are installed in remote stations. Such batteries are used in conjunction with renewable energy devices, such as solar panels and wind turbines, in remote areas where antennas are installed without an energy supplier. In addition, the reliability of the energy grid has been improved over the years, allowing batteries primarily installed for backup to be used for other purposes, when they are not being used for backup [START_REF] Moslehi | Smart grid -a reliability perspective[END_REF].

Therefore, they can become valuable facilitators of fast controls in a smart grid.

The collaboration between the agents of a smart-grid is fundamental to the grid power balance and can be profitable to both consumers and production agents. Prosumers, i.e., consumers who also produce and share energy excess in the electrical network, have a fundamental role in the balancing mechanism, as they can actively help to balance the network production and demand [START_REF] Camarinha-Matos | Collaborative smart grids-a survey on trends[END_REF][START_REF] Zafar | Prosumer based energy management and sharing in smart grid[END_REF] or financially value their reserves [START_REF] Zafar | Prosumer based energy management and sharing in smart grid[END_REF]RTE-Portal, 2020;[START_REF] Iria | Optimal Participation of an Aggregator of Prosumers in the Electricity Markets[END_REF]. In this context, information and communication technologies, as well as optimiza-2.3. LITERATURE REVIEW tion techniques are fundamental elements to interact with the energy market. In the French energy system, i.e., in the first European country to open all its national market structures to all consumers, prosumers can act in daily balance, as a reserve for periods of greater demand such as winter, or as an immediate reserve to use when necessary [START_REF] Kieny | A continuous evolution of the flexibility mechanisms in the french electricity system[END_REF]RTE-Portal, 2020).

Participation in the retail market

The flexibility to re-schedule energy consumption allows prosumers to adapt their demand from their normal consumption patterns in response to variations in the energy prices, generating savings [START_REF] Aghaei | Demand response in smart electricity grids equipped with renewable energy sources: A review[END_REF]. [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF] introduced such a demand response mechanism by using a single battery to reduce the electricity bill by exploiting the variation of the energy prices.

In their study, a battery is used in peak-time periods, where the energy costs more, and recharged in periods where the energy is cheaper. They also consider that the batteries must be fully charged at the beginning and at the end of the planning horizon and take into account some physical aspects, such as a maximum discharge rate. Several later studies explore the demand response mechanism in different usage scenarios and with various solving approaches [START_REF] Hoke | Look-ahead economic dispatch of microgrids with energy storage, using linear programming[END_REF][START_REF] Mishra | Smartcharge: Cutting the electricity bill in smart homes with energy storage[END_REF][START_REF] Bibliography Good | Flexibility in multi-energy communities with electrical and thermal storage: A stochastic, robust approach for multi-service demand response[END_REF][START_REF] Huang | Minimizing electricity costs by sharing energy in sustainable microgrids[END_REF][START_REF] Longe | Optimisation algorithms for energy management in the smart grid[END_REF]. Among them, linear programming is widely used as a solution method in many studies related to reducing the energy cost by optimizing the battery use, such as in [START_REF] Hoke | Look-ahead economic dispatch of microgrids with energy storage, using linear programming[END_REF]; Good and Mancarella (2017); [START_REF] Marzband | Optimal energy management system based on stochastic approach for a home microgrid with integrated responsive load demand and energy storage[END_REF]; [START_REF] Moreno | A milp model for optimising multi-service portfolios of distributed energy storage[END_REF]; [START_REF] Yang | Optimal energy flow control strategy for a residential energy local network combined with demand-side management and realtime pricing[END_REF]. As an example, [START_REF] Hoke | Look-ahead economic dispatch of microgrids with energy storage, using linear programming[END_REF] study the use of a battery to minimize the cost of operating a microgrid while meeting resource constraints from conventional generators, solar panels, and wind turbines. To address the tie-line power fluctuation and reduce the size of energy storage systems, a hierarchical control strategy for battery storage and demand-side resources is proposed in [START_REF] Wang | A demand response and battery storage coordination algorithm for providing microgrid tie-line smoothing services[END_REF]. Moreover, Good and Mancarella (2017) treat the uncertainty in power demand, renewable energy generation, and prices, through the use of a linear program with a robust strategy. Another work related to the use of a battery in the demand response mechanism is the one of [START_REF] Mishra | Smartcharge: Cutting the electricity bill in smart homes with energy storage[END_REF], who studied the impact of using storage systems on the stability of the grid.

In this case, an uncoordinated massive adoption of a demand response mechanism can overcharge the grid in the cheap time periods, since recharging the batteries of all consumers during such periods can cause instability in the network. In the same vein, recent studies have proposed other methods like 2.3. LITERATURE REVIEW neural networks and heuristics based on particle swarms in order to optimize such a battery usage, as well as transformations of future grids into decentralized and multi-dimensional systems [START_REF] Huang | Minimizing electricity costs by sharing energy in sustainable microgrids[END_REF][START_REF] Longe | Optimisation algorithms for energy management in the smart grid[END_REF][START_REF] Kerdphol | Optimum battery energy storage system using pso considering dynamic demand response for microgrids[END_REF]. Some works evaluate with the help of simple simulation models the potential gain and feasibility of using existing battery systems of telecommunications networks [START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF] and data-centers [START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF] in a demand response mechanism.

More recently, batteries are being used in a demand response mechanism (without participating in the NEBEF mechanism) to help reduce carbon emissions [START_REF] Van Ackooij | Demand response versus storage flexibility in energy: multi-objective programming considerations[END_REF][START_REF] Wang | Economic and efficient multi-objective operation optimization of integrated energy system considering electrothermal demand response[END_REF]. For example, van Ackooij et al. ( 2020) study a bi-objective energy management problem to reduce total energy operation costs and carbon emissions in thermal and hydro-thermal systems. They consider a battery to store energy for future uses, where effectiveness and efficiency are taken into account.

Indeed, batteries with high storage capacity can be very cost-effective, not only by reducing operating costs, but also by reducing carbon emissions.

Participation in the curtailment market

One way to interact with the energy markets is to perform curtailments. In this context, a prosumer reduces his energy consumption over a period of time by relieving the load on the network, receiving a reward in exchange. In order to reduce energy consumption over a time period, we can either re-schedule production or stop services. [START_REF] Zhang | An adjustable robust optimization approach to scheduling of continuous industrial processes providing interruptible load[END_REF] proposed a scheduling model for powerintensive processes in order to be able to participate in the curtailment market. When performing a curtailment, the production is re-scheduled to reduce power consumption during the curtailment. In the same vein, [START_REF] Lan | Integrated resources planning in microgrids considering interruptible loads and shiftable loads[END_REF] present an integrated resource planning model that takes into account the curtailments. In their work, the power demand is partially controllable since wind turbines, solar cells, diesel generators, and batteries, are considered. However, batteries are used exclusively to store the excess of energy produced locally.

Concerning the use of an energy storage system acting as reserves in the balancing mechanism, some recent studies have started to explore these aspects [START_REF] Zakeri | Economics of energy storage in the german electricity and reserve markets[END_REF][START_REF] Schillemans | Strategic participation of merchant energy storage in joint energy-reserve and balancing markets[END_REF][START_REF] Nasrolahpour | A bilevel model for participation of a storage system in energy and reserve markets[END_REF]. As an example, [START_REF] Zakeri | Economics of energy storage in the german electricity and reserve markets[END_REF] (2017) propose a decision-making tool based on stochastic bi-level model to determine the strategy for using a storage system in the curtailment market, while considering uncertainties.

In the French context, in order to benefit from performing curtailments, prosumers can be agents in the NEBEF mechanism, which is managed by the French transmission system operator RTE (RTE- Portal, 2020). The economic potential of such a mechanism has been addressed in recent studies such as Iria (2019); [START_REF] Mkireb | A linear programming approach to optimize demand response for water systems under water demand uncertainties[END_REF][START_REF] Mkireb | Robust optimization of demand response power bids for drinking water systems[END_REF]. In particular, the work presented by [START_REF] Mkireb | Robust optimization of demand response power bids for drinking water systems[END_REF] is the first addressing the problem of evaluating the financial gain of participating in the curtailment market through the NEBEF mechanism in the context of water supply systems. This work takes into account demand uncertainties through a robust optimization approach. However, the authors do not consider the possibility of using an energy storage system. Concerning the rewards received when performing a load curtailment, the reward depends on the amount of energy that is reduced during the load curtailment, for which the rules are previously contracted [START_REF] Chrysikou | A review of incentive based demand response methods in smart electricity grids[END_REF]. In the German context, the parliamentary chamber approved in 2016 the new legislation on energy, refereed to as the Electricity Market Act 2.0 (BMWi, 2015). This act increases the competition in the German balancing market by providing access to all sources of flexibility, such as flexible demand and EES.

Multi-battery management

Several works have addressed the multi-battery aspect [START_REF] Shan | Optimization scheduling of multi-battery energy storage system and interruptible load with iterative adaptive dynamic programming[END_REF][START_REF] Babazadeh | A new control scheme in a multi-battery management system for expanding microgrids[END_REF][START_REF] Zhu | Control-limited adaptive dynamic programming for multibattery energy storage systems[END_REF][START_REF] Fan | Distributed equalisation strategy for multibattery energy storage systems[END_REF]. As an example, [START_REF] Babazadeh | A new control scheme in a multi-battery management system for expanding microgrids[END_REF] propose a multiple battery management system with different types of battery, focusing on the minimization of the total system cost, and considering the impact of the usage on the lifetime of the batteries. In the a multi-battery energy storage system in their work. However, in all these studies, only rules related to battery limits are considered (i.e., capacity, efficiency, power). In our case, since the batteries are installed for backup, additional rules must be taken into account.

Research outline and major contributions

Once the major challenges have been identified, we outline our research outline to explore the impact of each one. Since the basis of our study is the management of base station batteries for uses other than their primary backup function, the adopted strategy consists in exploring individually the impact of (i) the curtailment market rules and (ii) the multi-battery management, considering in both cases the safety usage rules. Once we understand the impact of the curtailment market rules and of the growth in the number of batteries whose use must respect the safety usage rules, we address all rules in a single problem.

Figure 2.1 illustrates the intersection of the different aspects that can render the problem more 2.4. RESEARCH OUTLINE AND MAJOR CONTRIBUTIONS complex and either recalls some related works or refers to the chapters addressing these problems.

Exploring the curtailment market rules in a single battery context

In the first part of this thesis, we explore exclusively the impact of curtailment market rules R8-R9

together with safety usage rules R1-R5, without considering the multi-battery aspect. In this context, we consider a problem with only one site and one battery so that we can understand exactly how curtailment market rules impact battery management, and analyze what the impact on the solving methods is. This problem is called Optimization of a Battery Storage system used by a company to participate in the Curtailment market (referred to as OBSC), and is presented in Chapter 3.

We identify the key aspects of the curtailment market rules that make the problem more difficult or easier to solve, and also identify two variants that can be solved in polynomial time. Then, we model the problem as a mixed-integer linear program, and also propose an algorithm that solves the variants to optimality in polynomial time and that can be used as a heuristic to solve the OBSC problem.

The main contributions of this first part are:

• Modeling the constraints of the French curtailment market and the safety usage rules in the batteries of the French telecommunications operator Orange in the form of linear equations;

• The analysis of the problem under study in order to identify the aspects that make the problem more difficult to solve;

• Identification of two practical variants that can be solved to optimality in polynomial time;

• The proposal of an exact polynomial time algorithm, based on graph theory to solve the variants, and that can also be used as a heuristic for OBSC. The problem can actually be reduced to the computation of a longest path in a direct acyclic graph;

• An experimental evaluation of the economic gains related to the use of a battery installed for backup in the curtailment market for the telecommunications operator with realistic instances.

In terms of scientific publications, two papers were published in international conferences as part of this first study: Silva et al. (2019a), andSilva et al. (2020a). In addition, two papers were presented in national conferences: Silva et al. (2020c), and[START_REF] Silva | Optimizing battery usage for a telecommunications company participating in a curtailing market[END_REF].

RESEARCH OUTLINE AND MAJOR CONTRIBUTIONS

2.4.2 Exploring the multi-battery system management in the context of the retail market

In the second part of this thesis, we explore exclusively the impact of managing multiple batteries together under safety usage rules R1-R6, without considering load curtailments. In this context, we consider only one site equipped with multiple batteries that are used only to participate in the retail market, and load curtailments are not allowed. The goal is to understand exactly how increasing the number of batteries has an impact on the optimization considering safety usage rules. The reason why we do not consider several sites equipped with a battery each, as introduced in Chapter 1.1, is that the coupling between the sites appears only when load curtailments are performed. Therefore, we can deal optimally with each of the sites individually with an adaptation of the algorithm proposed to solve the variants of the OBSC problem. Consequently, to explore the dimensionality aspect of the number of batteries without load curtailments under the safety usage rules, it is necessary to consider all batteries at the same site. This problem is so-called Optimization of a Multi-Battery Storage system in order to participate in the Retail market (referred to as OMBSR), and is presented in Chapter 4.

We model the problem as two different mixed-integer linear programs, and we also prove that OMBSR is NP-Hard. Then, we propose two heuristics to solve the problem: one based on a graph oriented approach, and the second one based on the meta-heuristic relax-and-fix.

The main contributions of this second part are:

• The proposal of two mixed-integer linear programs for OMBSR;

• The proof that OMBSR is NP-Hard;

• The proposal of two heuristics economically and computationally efficient based on different aspects for large-scale OMBSR instances: one heuristic based on graph theory inspired by the properties of the realistic instances tested; and a second heuristic based on the relax-and-fix approach that gives better results for the general case;

• The proposal of a reduction of the Maximum Weight Budgeted Independent Set Problem on interval graphs into the Longest Budgeted Path Problem on direct acyclic graphs, and of a pseudo-polynomial time algorithm to solve it;

• An experimental evaluation of the economic gains related to the use of batteries installed for backup in the retail market for the telecommunications operator.

RESEARCH OUTLINE AND MAJOR CONTRIBUTIONS

In terms of scientific publications, one paper was presented in an international conference (Silva et al., 2020b) and published in an international journal (Silva et al., 2022). In addition, one paper was presented in a national conference (Silva et al., 2021b).

Optimizing the complete optimization problem

Finally, once we understand the impact of the curtailment market rules R8-R10 and of the growth in the number of batteries whose use must respect the safety usage rules R1-R6, we address all aspects in a single problem. In this context, we consider multiple sites each one equipped with a single battery whose use must respect the safety usage rules to participate in the energy market by performing peakshavings and load curtailments. The whole problem is called Optimization of a Multi-Battery Storage system participating in the Energy market (refereed to as OMBSE), and is presented in Chapter 5.

Firstly we model the OMBSE problem as a mixed-integer linear program and we prove that OMBSE is NP-Hard. In the following, we decompose the corresponding model using the Lagrangian relaxation technique and solve it using the subgradient method. The resulting sub-problems of the Lagrangian relaxation can be solved to optimality in polynomial time thanks to the algorithm proposed to solve the variants of the OBSC problem, and the subgradient heuristic can run in polynomial time thanks to the same algorithm. In addition, we propose a bidimensional relax-and-fix heuristic that can also be used to solve large scale instances.

The main contributions of this third part are:

• The proposal of a mixed-integer linear program for OMBSE;

• The proof that OMBSE is NP-Hard;

• Two different decompositions of the proposed model based on the Lagrangian relaxation technique;

• The proposal of a subgradient method to solve the relaxed model reusing the algorithms proposed for sub-problems of OBSC;

• The proposal of a bidimensional relax-and-fix heuristic that can also be used to solve large scale instances;

• A quantification of the economic and operational gains related to the use of batteries installed for backup in the energy markets for the telecommunications operator.

In terms of scientific publications, one presentation was made at an international conference (Silva et al., 2021a) as part of this study.

Chapter 3

Optimization of a single battery storage system to participate in the curtailment market

In this chapter, we consider the problem of optimizing the total energy costs of a telecommunications site using a battery installed for backup in order to participate in the retail and curtailment markets, with the help of a proper battery management. Our goal is to reduce the total energy costs and maximize the rewards received from the curtailment market.

Formally, the problem treated in this chapter is the Optimization of a Battery Storage system used by a company to participate in the Curtailment market (referred to as OBSC), in order to reduce its energy costs. The main issue is to respect the market rules and the safety usage rules while minimizing the net total energy cost.

This chapter allows us to understand in detail the impact of curtailment market rules on battery management. The elements presented in this chapter are the base of the algorithm presented in Chapter 5 for solving the problem in a multi-battery framework.

Concerning the scientific contributions, we identify the aspects that make the problem more difficult to solve, and two practical variants that can be solved to optimality in polynomial time, are presented in Section 3.1. We also model the constraints of the energy market and the safety usage rules in the form of linear equations and we propose a mathematical programming model for the problem, presented Section 3.2.1. In Section 3.2.2, we propose an exact polynomial time algorithm, based on graph theory to solve the variants, and that can also be used as a heuristic for OBSC. Furthermore, a complete technical analysis of the impact of curtailments on the battery management that allowed the development of the graph oriented approach proposed is presented in Section 3.2.2.3. Finally, an experimental evaluation of the economic gains by solving OBSC using our solving approaches with realistic instances is presented in Section 3.3. We consider the deterministic setting of OBSC that we now formally describe. Let us consider a telecommunications operator with a power demand W t , given in kW, at each period t of a horizon of T discrete equally-sized time periods of duration ∆ in hours. The cost (given in monetary units) for purchasing one unit of energy at each time period is known. In the following, for the sake of simplicity, we consider the power price at each time period t denoted by E t , obtained from the energy price by multiplying it by ∆. Note that this cost is fixed by the electricity distributor, and so is the maximum amount of power P max , given in kW, that can be bought at any time period (i.e., rule R7).

For network security purposes, two rules must be respected: on the one hand, a minimum amount of energy, denoted by B min and given in kWh, must always remain in the battery (i.e., rule R1); on the other hand, in order to improve its lifespan, the battery must be immediately recharged after each use, up to its maximum energy capacity, denoted by B max and given in kWh, with a constant power rate P B (i.e., rule R2), given in kW. Besides, a minimum power discharge per time period, denoted by D min and given in kW, is imposed when the battery is in discharge mode (i.e., rule R4). Moreover, the battery has a maximal power rate, denoted by D max and given in kW, that it can release due to current and voltage limitations (i.e., rule R5). Note that D min ∈ [0, D max ], and that the power demand W t is assumed to be greater than D min at any time period t over the horizon.

The battery must also be fully charged at the beginning and at the end of the planning horizon (i.e., rule R3).

At each time period t, we assume that the reward R t (given in monetary units), that will be received by the telecommunications operator from the transmission system operator (TO) for each energy unit not bought from the distributor during this period provided that it belongs to a curtailment, is known.

Each curtailment has a minimum (resp. maximum) duration ∆ min (resp. ∆ max ), given as a number of time periods, that must be respected (i.e., rule R8). Moreover, during each time period of a curtailment, the telecommunications operator must reduce the power bought from the distributor by at least a given value P T O in kW. As a consequence, for each curtailment c, a maximum amount of power p max c (in kW) can be purchased from the distributor at each time period covered by c (i.e., rule R9). The way such an amount is computed is imposed by the TO depending on the country. Let us also consider u t as the power bought from the distributor at each time period t (in kW). In order to compute p max c for a given c, a reference value ω c , which takes into account the average power demand during the curtailment and the power u t purchased at the period t just before curtailment c begins (i.e., t = f c -1), is needed. Such a reference value is computed as follows:

ω c = ∑ lc t=fc W t + u fc-1 l c -f c + 2 (3.1)
Note that the value of u fc-1 may depend on the curtailment performed before c.

Once the reference power ω c is known, p max c is then computed as follows:

p max c = max(0, ω c -P T O ) (3.2) Figure 3
.1-a illustrates a curtailment c 1 starting at time period 5 and ending at time period 8, and a curtailment c 2 starting at time period 14 and ending at time period 17. In this figure, the violet line represents the power demand over the planning horizon. The orange area represents the amount of energy used from the battery, the blue one the amount of energy bought from the distributor for consumption, and the green one the amount bought for recharge. In this example, the battery is immediately charged after c 1 with a constant power rate P B until the end of time period 13. Note that,

PROBLEM DESCRIPTION

during each time period t of c 1 (resp. c 2 ), i.e., for each t ∈ {5, . . . , 8} (resp. for each t ∈ {14, . . . , 17}), the amount of power that can be bought is limited by p max c 1 (resp. p max c 2 ). Figure 3.1-b illustrates the energy stock level in the battery over the planning horizon. During each curtailment, the battery power capacity decreases, and, during each recharge phase, this capacity increases until the battery is fully charged.

Recall that our goal is to manage the use of the battery while respecting both the battery safety usage and the energy markets rules, at minimal cost. The total amount of energy savings consists of two parts. The first part is provided by the difference between the energy prices during battery use and recharge (i.e., when participating in the retail market in a demand response mechanism), and the second one by the reward paid for the amount of energy not bought from the distributor (i.e., when performing curtailments). This second part is computed either by the On Time Reward (OTR) rule, or by the First Time Reward (FTR) rule (RTE-Portal, 2020). If we use OTR, a variable reward R t is considered at each time period t during each curtailment (see Equation (3.3)). If we use FTR, the reward R fc given at the beginning of the curtailment c is considered for all time periods during the curtailment, and then multiplied by the amount of energy not bought during this curtailment (see Equation (3.4)). The amount of energy not bought during a given curtailment is equal to the battery discharge over its duration. In the following, for the sake of simplicity, we consider the rewards price per unit of power at each time period t denoted by R t , obtained from the rewards price per unit of energy by multiplying it by ∆.

Furthermore, we consider a telecommunications operator with only one battery and only one energy supplier without renewable energy sources. The battery is ready for use, and no installation or set up costs are considered. In addition, the battery must be fully charged before performing any curtailment.

No battery losses are considered either, and any curtailment performed must respect the rules of the energy market. We also consider that the decision of when a curtailment is performed is taken by the telecommunications operator and not imposed by the transmission system operator.

Finally, the problem stated above is referred to as OBSC in the following, and any OBSC instance is fully defined by the following parameters: W , ∆, E, P max , B min , B max , P B , D min , D max , R, ∆ min , ∆ max , P T O , and the reward policy (represented by a boolean value). The safety usage rules R1-R5 and the market rules R7-R9, defined in Section 1.3, are also taken into account.

SOLVING APPROACHES

Practical variants

In some cases, because of specific engineering rules or technical limitations, additional constraints must be considered. Therefore, we study some variants of the general problem which can be classified into two main families of problems. The first one considers the case in which the possible battery discharge levels are discrete (and will be referred to as OBSC-D). Usually, the measurement systems used to monitor the battery charge have technical limitations that prevent from considering continuous discharge levels. This induces a discretization of the discharge levels which depends on the accuracy of these systems. The corresponding variants consider discharge levels given in percentage of B max .

Secondly, additional engineering rules can also be imposed on the battery usage to improve its lifespan. An example is the case where the battery must stay in rest mode for at least one time period after its complete recharge. The second family of variants studied in this work precisely considers that the battery must necessarily be in rest mode for at least a fixed number of time periods after each complete recharge (and will be referred to as OBSC-R). This assumption can be imposed in practice to ensure, for instance, that the battery is indeed fully charged before being re-used, even though the actual recharging rate is not P B (i.e., is not a constant power rate).

In such variants, the impact of the temporal correlation between two load curtailments induced by the computation of ω c (see Equation 3.1), as presented in Section 3.2.2.3, can be handled more easily. Thanks to this, they can be solved in polynomial time, and Section 3.2 describes an efficient algorithm to solve OBSC-D and OBSC-R. In addition, since any solution for one of these variants is also a feasible solution for OBSC, such an algorithm can also be used as a heuristic method for solving OBSC.

Solving approaches

In this section we present two approaches to solve the OBSC problem. First we present an exact method based on a mixed-integer program, and later we present an algorithm for some particular cases.

Mathematical models

Mixed-integer nonlinear programming formulation

The formulation described in this section, that can be used to model OBSC as a mixed-integer nonlinear program, will be referred to as (OBSC-MINLP). Since a curtailment c starts (resp. ends) at a time period f c (resp. l c ) called first (resp. last) period, the goal is to identify, among the O(T 2 ) possible pairs (f c , l c ) over the horizon, the ones corresponding to the curtailments to be performed. Such a decision is reflected by the value of a binary variable y c . Then, the battery discharge d c after the curtailment c has been performed is given by the difference of energy stock in the battery between the beginning of period f c and the end of period l c . Recall that we are looking for a set of curtailments (f c , l c , d c ) that can be performed without conflict, while minimizing the total energy cost.

Let us consider C the set of all possible pairs

(f c , l c ) such that ∆ min ≤ l c -f c + 1 ≤ ∆ max . A set T = {t 1 , .
.., t T } representing the discrete planning horizon over T time periods is also considered, as well as an auxiliary set C t , ∀t ∈ T , representing the pairs (f c , l c ) of all possible curtailments that can be performed at time period t. In other words, C t contains all the pairs (f c , l c ) with f c < l c such that

f c ≤ t ≤ l c .

Decision Variables

Firstly, a solution is determined by the values of the following variables:

-x t ∈ [B min , B max ], ∀t ∈ T : amount of energy available in the battery at the beginning of each time period t, given in kWh. An additional variable x T +1 represents the energy available at the end of the planning horizon.

The following additional binary variables are used to control which curtailments are performed:

-y c , ∀c ∈ C: equal to 1 if a curtailment c starting at time period f c and ending at time period l c is performed, and to 0 otherwise.

To model the power bought at each time period t, the following variables are used:

-u D t ∈ [0, W t ]
, t ∈ T : power bought for the demand consumption (in kW);

SOLVING APPROACHES

-u B t ∈ [0, P B ], t ∈ T : power bought for battery recharge (in kW).

Auxiliary variables can also be used to simplify the model writing. However, they are not strictly necessary, and could be removed and replaced by their value, obtained from the corresponding equality constraints (3.7) and(3.12): - The objective function is defined as follows:

z t , t ∈ T : equal to 1 if the pair (f c , l c ) of some curtailment c performed is in C t ,
min ∑ t∈T E t (u B t + u D t ) - ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ ∑ t∈T R t (W t -u D t ), if OTR (3.3) ∑ c∈C R fc y c (x fc /∆ -x lc+1 /∆), if FTR (3.4)
The first part corresponds to the cost of buying energy, and the second one to the reward received for each curtailment performed. The goal is to minimize the total cost. In the first case, i.e., in the case of the OTR reward policy, W t -u D t is larger than zero only if some curtailment is being performed at each time period t. In the second case, i.e., in the case of the FTR reward policy, x fc -x lc+1 gives the amount of energy used from the battery during the curtailment, which is also the sum of the amount of power not bought from the distributor at each time period during the curtailment. A solution is given by the battery power capacity at each time period.

The following constraints define the state of the battery at each time period t:

z t = ∑ c∈Ct y c ∀t ∈ T (3.5) x t -x t+1 ≤ ∆D max z t ∀t ∈ T (3.6) -x t + x t+1 ≤ (B max -B min )(1 -z t ) ∀t ∈ T (3.7)
Constraints (3.5), together with the fact that z t ∈ {0, 1} for all t ∈ T , guarantee that at most one curtailment can be performed at each time period. Constraints (3.6) guarantee that, if the battery 3.2. SOLVING APPROACHES power capacity decreases, then one curtailment must be performed, but also that the power discharge during any time period of a curtailment is at most D max . Constraints (3.7) ensure that, if the battery power capacity increases, then no curtailment is being performed.

Note that, if the battery has the same power capacity during two consecutive time periods, then the corresponding variables z t are free. However, Constraints (3.5) guarantee that, if a curtailment is performed, then all z t are equal to 1 over the curtailment duration.

In the same vein, Constraints (3.8) guarantee the minimal battery discharge at each time period where the battery is used, which is min(W t , D min ):

x t -x t+1 ≥ ∆ min(W t , D min )z t -∆P B (1 -z t ) ∀t ∈ T (3.8)
Constraints (3.9) guarantee that a curtailment can start only if the battery is fully charged (and hence that two consecutive curtailments cannot occur):

B max ∑ c∈Ct | t=fc y c ≤ x t ∀t ∈ T (3.9)
Since no losses are considered, the battery power balance is ensured by Constraints (3.10), while Constraints (3.11) express the limit conditions:

x t+1 -x t = ∆u B t + ∆u D t -∆W t ∀t ∈ T (3.10) x t 1 = x t T +1 = B max (3.11)
The power purchased from the market is the sum of the power bought for charging the battery (u B t ) and the power bought for consumption (u D t ), which is ensured by the following constraints:

u B t = (1 -z t ) min(B max /∆ -x t /∆, P B , P max -W t ) ∀t ∈ T (3.12) (W t -D max )z t + W t (1 -z t ) ≤ u D t ∀t ∈ T (3.13) u D t ≤ W t (1 -z t ) + ∑ c∈Ct y c p max c ∀t ∈ T (3.14) p max c = max(0, ∑ lc t ′ =fc-1 W t ′ + x fc /∆ -x fc-1 /∆ l c -f c + 2 -P T O ) ∀c ∈ C (3.15)
The power bought for charging the battery is min(P B , P max -W t ) when it is possible to buy energy (i.e., if z t = 0), if the capacity of the battery is not exceeded (see Constraints (3.12)). The power

SOLVING APPROACHES

bought for consumption u D t must be exactly the demand forecast when the battery is charging, which is ensured by Constraints (3.13) and (3.14). If a curtailment is being performed, this power cannot be larger than min(W t , p max c ) or smaller than W t -D max , which is also guaranteed by Constraints (3.13) and (3.14). Note that imposing u D t ≥ W t -D max during a curtailment also guarantees that the battery power discharge per time period is smaller than D max . The value of p max c is provided by (3.15). If the battery is fully charged and not being used, Constraints (3.12) guarantee that the amount of power bought for recharge is equal to 0, and once more Constraints (3.13) and (3.14) guarantee that the amount of power bought for consumption will be exactly the power demand, since z t and y c p max c for each c ∈ C t are equal to 0 in this case. Note that Constraints (3.9) together with Constraints (3.12) guarantee that, after a curtailment, the battery is fully charged before another curtailment can be performed, at a constant power rate respecting the maximum power P max that can be bought from the distributor at each time period. Furthermore, we assume that the value of P max is greater than the power demand W t at any time period t ∈ T .

Finally, the domains of the variables are:

u D t ∈ [0, W t ], u B t ∈ [0, P B ], x t ∈ [B min , B max ] ∀t ∈ T (3.16) z t ∈ {0, 1} ∀t ∈ T (3.17) p max c ∈ R + ∀c ∈ C (3.18) y c ∈ {0, 1} ∀c ∈ C (3.19)
All the rules defined in Section

Mixed-integer programming formulation for the practical variants

In this section, we present the changes applied to (OBSC-MILP) to formulate the two variants OBSC-D and OBSC-R. Firstly, let us define D as the set of all battery discharge levels allowed in each 3.2. SOLVING APPROACHES variant over all the possible curtailments. For OBSC-D, the subset D is part of the input and all the curtailments share the same set of possible discharge levels. In the case of 1% discharge levels, the set D is {0.01B max , 0.02B max , ...}. For OBSC-R, Section 3.2.2.2 derives such a subset D by using the fact that the battery must necessarily be in rest mode for at least N time periods after each recharge.

Concerning OBSC-D, a binary variable k c,d for each c ∈ C and d ∈ D will be used to guarantee that the battery discharge level when performing a curtailment c belongs to D. The following constraints then ensure this point:

y c (x fc -x lc+1 ) = ∑ d∈D k c,d d ∀c ∈ C (3.20) ∑ d∈D k c,d = y c ∀c ∈ C (3.21)
Let us denote such an adaptation of (OBSC-MILP) to the variant OBSC-D, in which Constraints (3.20) are linearized following the instructions given in Section 3.2.1.3, as (OBSC-D-MILP).

Concerning OBSC-R, we make use of the following constraints to guarantee that the battery is in rest mode for at least N time periods between two consecutive curtailments:

B max ∑ c∈Ct | t=fc y c ≤ x t-i ∀i ∈ {1, . . . , N }, ∀t ∈ {i + 1, . . . , T } (3.22)
Let us denote such an adaptation of (OBSC-MILP) to the variant OBSC-R as (OBSC-R-MILP).

As mentioned before, these variants can in fact be solved in polynomial time in |D|, where |D| is proved to be polynomial in T in the case of OBSC-R. Further details are provided in Section 3.2.2.

Linearization of the mathematical model

For a product between a binary and a float variable b i and f j ∈ [0, F max ] respectively, we can apply the McCormick strategy (see [START_REF] Mccormick | Computability of global solutions to factorable nonconvex programs: Part i-convex underestimating problems[END_REF]), which amounts to using a new variable lin bf j i ∈ [0, F max ] to replace this product b i f j , together with the following constraints:

lin bf j i ≤ b i F max (3.23) lin bf j i ≤ f j (3.24) lin bf j i ≥ f j -(1 -b i )F max (3.25)

SOLVING APPROACHES

The non-linearities of this type in (3.3)-(3.19) are the products x t y c (with andx t z t in (3.4), (3.14) and(3.12), respectively. Thanks to (3.5), we need to introduce only two new families of variables: lin xy c t for all c in C, t in T to linearize (3.4), and lin ypmax c for all c in C to linearize (3.14). Then, we can simply replace x t z t by

x t ∈ [0, B max ]), y c p max c (with p max c ∈ [0, P max ])
∑ c∈Ct lin xy c t in (3.12). Furthermore, to linearize x = min(a, b) for a, b ∈ [M ′ , M ], we introduce a binary variable y ∈ {0, 1}
such that, if a > b, then y = 1, otherwise y = 0. We can then rewrite x as follows:

x ≤ a, x ≤ b (3.26) a -b ≤ (M -M ′ )y, b -a ≤ (M -M ′ )(1 -y) (3.27) x ≥ a -(M -M ′ )y, x ≥ b -(M -M ′ )(1 -y) (3.28)
In our case, we have two new families of binary variables: lin side t for all t in T to linearize (3.12), and lin sidepmax c for all c in C to linearize (3.15). In the case of (3.12), we have

u B t = (1-z t ) min(a, b), where a = B max /∆ -x t /∆ and b = min(P B , P max -W t ).
In order to linearize this expression, we have to multiply all the terms a and b in (3.26) and (3.28) by 1 -z t . Hence, we derive the following constraints, where M ′ = 0 and M = max(P max , B max /∆):

u B t ≤ (1 -z t )(B max /∆ -x t /∆), u B t ≤ (1 -z t ) min(P B , P max -W t ) (3.29) (B max /∆ -x t /∆) -min(P B , P max -W t ) ≤ M lin side t , min(P B , P max -W t ) -(B max /∆ -x t /∆) ≤ M (1 -lin side t ) (3.30) u B t ≥ (1 -z t )(B max /∆ -x t /∆) -M (1 -z t )lin side t , u B t ≥ (1 -z t ) min(P B , P max -W t ) -M (1 -z t )(1 -lin side t ) (3.31)
Note that, since u B t ∈ [0, P B ], Constraints (3.31) can be replaced by:

u B t ≥ (1 -z t )(B max /∆ -x t /∆) -M lin side t , u B t ≥ (1 -z t ) min(P B , P max -W t ) -M (1 -lin side t ) (3.32)
Indeed, when z t = 0, (3.31) and (3.32) are equivalent, and, when z t = 1, (3.29) together with (3.32) and u B t ∈ [0, P B ] ensure that u B t = 0.

SOLVING APPROACHES

In the case of (3.15), we can rewrite such constraints as

p max c = -x = -min(0, - ∑ lc t ′ =fc-1 W t ′ +x fc /∆-x fc-1 /∆ lc-fc+2
+ P T O ), and linearize them by considering the terms a = 0 and b = -

∑ lc t ′ =fc-1 W t ′ +x fc /∆-x fc-1 /∆ lc-fc+2 + P T O , with b ∈ [-P max , P max ].
The complete linear version of (OBSC-MINLP), referred to as (OBSC-MILP), can then be written as follows:

min ∑ t∈T E t (u B t + u D t ) - ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ ∑ t∈T R t (W t -u D t ) (3.3) ∑ c∈C (R fc /∆)(lin xy c fc -lin xy c lc+1 ) (3.33) z t = ∑ c∈Ct y c ∀t ∈ T (3.5) x t -x t+1 ≤ ∆D max z t ∀t ∈ T (3.6) -x t + x t+1 ≤ (B max -B min )(1 -z t ) ∀t ∈ T (3.7) x t -x t+1 ≥ ∆ min(W t , D min )z t -∆P B (1 -z t ) ∀t ∈ T (3.8) B max ∑ c∈Ct | t=fc y c ≤ x t ∀t ∈ T (3.9) x t+1 -x t = ∆(u B t + u D t -W t ) ∀t ∈ T (3.10) x t 1 = x t T +1 = B max (3.11) ∆u B t ≤ B max -x t -z t B max + ∑ c∈Ct lin xy c t ∀t ∈ T (3.34) u B t ≤ (1 -z t ) min(P B , P max -W t ) ∀t ∈ T (3.35) B max /∆ -x t /∆ -min(P B , P max -W t ) ≤ max(P max , B max /∆)lin side t ∀t ∈ T (3.36) min(P B , P max -W t ) -B max /∆ + x t /∆ ≤ max(P max , B max /∆)(1 -lin side t ) ∀t ∈ T (3.37) ∆u B t ≥ B max -x t -z t B max + ∑ c∈Ct lin xy c t -max(∆P max , B max )lin side t ∀t ∈ T (3.38) u B t ≥ (1 -z t ) min(P B , P max -W t ) -max(P max , B max /∆)(1 -lin side t ) ∀t ∈ T (3.39) (W t -D max )z t + W t (1 -z t ) ≤ u D t ∀t ∈ T (3.13) u D t ≤ W t (1 -z t ) + ∑ c∈Ct lin ypmax c ∀t ∈ T (3.40) 3.2. SOLVING APPROACHES p max c ≥ ∑ lc t ′ =fc-1 W t ′ + x fc /∆ -x fc-1 /∆ l c -f c + 2 -P T O ∀c ∈ C (3.41) ∑ lc t ′ =fc-1 W t ′ + x fc /∆ -x fc-1 /∆ l c -f c + 2 -P T O ≤ 2P max lin sidepmax c ∀c ∈ C (3.42) - ∑ lc t ′ =fc-1 W t ′ + x fc /∆ -x fc-1 /∆ l c -f c + 2 + P T O ≤ 2P max (1 -lin sidepmax c ) ∀c ∈ C (3.43) p max c ≤ ∑ lc t ′ =fc-1 W t ′ + x fc /∆ -x fc-1 /∆ l c -f c + 2 -P T O + 2P max (1 -lin sidepmax c ) ∀c ∈ C (3.44) p max c ≤ 2P max lin sidepmax c ∀c ∈ C (3.45) lin xy c t ≤ y c B max ∀c ∈ C, ∀t ∈ T (3.46) lin xy c t ≤ x t ∀c ∈ C, ∀t ∈ T (3.47) lin xy c t ≥ x t -(1 -y c )B max ∀c ∈ C, ∀t ∈ T (3.48) lin ypmax c ≤ y c P max ∀c ∈ C (3.49) lin ypmax c ≤ p max c ∀c ∈ C (3.50) lin ypmax c ≥ p max c -(1 -y c )P max ∀c ∈ C (3.51) u D t ∈ [0, W t ], u B t ∈ [0, P B ], x t ∈ [B min , B max ], z t ∈ {0, 1}, lin side t ∈ {0, 1} ∀t ∈ T (3.52) p max c ∈ R + , y c ∈ {0, 1}, lin ypmax c ∈ [0, P max ], lin sidepmax c ∈ {0, 1} ∀c ∈ C (3.53) lin xy c t ∈ [0, B max ] ∀t ∈ T , ∀c ∈ C (3.54)

Variants solving approach

This section presents an exact graph-oriented solving method for OBSC-D and OBSC-R, based on the enumeration of all possible curtailments that can be performed over the planning horizon. The problem reduces to the computation of a longest path in a directed acyclic graph (DAG) whose nodes correspond to the possible curtailments. The discrete set D of allowed battery discharge levels is an input for this algorithm, and hence must be defined in advance.

SOLVING APPROACHES

Graph-oriented algorithm for a discrete discharge levels

As already mentioned, a curtailment c will be represented by a triple (f c , l c , d c ), and a solution to the problem will consist of the curtailments (f c , l c , d c ) performed over the horizon such that

∆ min ≤ l c -f c + 1 ≤ ∆ max .
Originally, the amount d c of energy not bought during the curtailment c is a continuous variable, and all its possible values cannot be extensively enumerated. However, under some general assumptions associated with practical cases, such as the ones mentioned in Section 3.1.2, where the variants OBSC-D and OBSC-R are defined, the possible values of d c over all curtailments c actually belong to a discrete subset D (note that, for OBSC-D, this is true by definition).

Let us define t B c as the last recharging time period associated with curtailment c, and

r c = u B t B c
as the power bought for recharging during this period.

Property 1 For a given curtailment c = (f c , l c , d c ), the time period t B c and the value of r c can be computed from l c and d c .

Proof. Since the battery is recharged with the power rate min(P B , P max -W t ), the power that must be bought for recharge at each time period t ∈ T is known. For a given curtailment c = (f c , l c , d c ), the battery is necessarily in recharge at the time period t, for each t ∈ T such that t > l c and

∆ ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) < d c (
otherwise, the battery is already fully charged). The last recharging time period t B c > l c is the last time period t ∈ T such that the battery is necessarily in recharge, i.e., t B c is such that

∆ ∑ t B c -1 t ′ =lc+1 min(P B , P max -W t ′ ) < d c and ∆ ∑ t B c t ′ =lc+1 min(P B , P max - W t ′ ) ≥ d c .
Consequently, r c is computed as follows:

r c = d c /∆ - t B c -1 ∑ t=lc+1 min(P B , P max -W t )
Indeed, r c is the amount left to recharge the battery to its maximum energy capacity at the time period t B c . Note that t B c and r c depend only on the curtailment c itself, and that the curtailments performed before c do not have any impact on their computation. □

If we consider two consecutive curtaiments, we have the following result:

Lemma 1 Given any two curtailments c i and c j performed consecutively in a given solution, the value of ω c j (and hence of p max c j ) can be computed from t B c i , r c i , f c j and l c j .

SOLVING APPROACHES

Proof. Let c i and c j be two such curtailments. On the one hand, if c j starts immediately after the full battery recharge associated with c i (i.e., if f c j = t B c i + 1), then the value of ω c j is computed using Equation (3.1). In this case, u fc j -1 = W fc j -1 + r c i . On the other hand, if c j starts at least one period of time after the full battery recharge associated with c i (i.e., if f c j > t B c i + 1), then there exists only one possible value of ω c j . Indeed, the power bought for recharging immediately before the curtailment c j is 0, and hence, in this case, u fc j -1 = W fc j -1 . In both cases, the value of p max c j is derived using Equation (3.2). □

The following technical result allows to propose a reformulation of the objective function in the general case (i.e., D does not need to be discrete) for the sake of its efficient computation when D is discrete, as it constitutes a structural result which will in particular be used to prove Property 2 (see Section 3.2.2.2):

Proposition 1 Let F opt be the set of vectors ((y c ) c∈C , (d c ) c∈C ) such that:

• for each c ∈ C, y c ∈ {0, 1} and d c ≥ 0, • for each c ∈ C and c ′ ∈ C \ {c}, if y c = y c ′ = 1, then {f c , . . . , t B c } ∩ {f c ′ , . . . , t B c ′ } = ∅, where, for each c ∈ C, t B c > l c is the integer such that d c ∈]∆ ∑ t B c -1 t=lc+1 min(P B , P max -W t ), ∆ ∑ t B c t=lc+1 min(P B , P max -W t )], • for each c ∈ C, if y c = 1, then we must have d c ∈ [ ∑ lc t=fc ∆ max(min(W t , D min ), W t -p max c ), min( ∑ lc t=fc ∆ min(W t , D max ), B max -B min )],
where the value of p max c is computed using Property 1 and Lemma 1.

In any feasible solution to an instance of OBSC, we have ((y c ) c∈C , (d c ) c∈C ) ∈ F opt . Moreover, for any

((y c ) c∈C , (d c ) c∈C ) ∈ F opt , one can obtain a feasible solution of value: ∑ t∈T E t W t - ∑ c∈C y c f G c (d c , d c -) where f G c (d c , d c -
) is a function that can be computed in linear time, and where, for each curtailment c such that y c = 1, c -is the only curtailment such that y c -= 1 and there exists no curtailment c ′ such that y c ′ = 1 and l c -< f c ′ ≤ l c ′ < f c . In other words, for each curtailment c, c -is the curtailment that immediately precedes c.

SOLVING APPROACHES

In particular, the optimal value of OBSC can be rewritten as follows:

∑ t∈T E t W t - max ((yc) c∈C ,(dc) c∈C )∈Fopt ∑ c∈C y c f G c (d c , d c -)
Furthermore, in the case where the value of p max c depends only on the value of y c for each c,

f G c (d c , d c -) is a continuous piecewise linear function of d c having O(T ) segments.
The proof of Proposition 1 is given in Section 3.2.2.3, and shows, actually, that We now define a directed graph G = (V, A), where the set of nodes V corresponds to the set of all possible curtailments. Note that the number of curtailments enumerated is bounded by T 2 |D|.

f G c (d c , d c -) is the difference between two functions f S c (d c , d c -) and f B c (d c ). Intuitively, for each curtailment c performed, the value of f G c (d c , d c -)

SOLVING APPROACHES

An arc in A is defined from a curtailment c i (represented by the triple (f c i , l c i , d c i )) to a curtailment c j (represented by the triple (f c j , l c j , d c j )) if c j can start after c i , i.e., on the one hand, if c j starts after the last recharging time period associated with c i (i.e., f c j > t B c i ), and, on the other hand, if

d c j ∈ [ ∑lc j t=fc j ∆ max(min(W t , D min ), W t -p max c j ), min( ∑lc j t=fc j ∆ min(W t , D max ), B max -B min )],
where the value of p max c j is computed from the one of d c i by using Property 1 and Lemma 1. Additionally, two dummy curtailments v s = (-1, -1, 0) and v t = (T + 1, T + 1, 0), as well as arcs (v s , v) and (v, v t )

for each vertex v ∈ V \ {v s , v t }, are also added to G, to allow the computation of a longest path from v s to v t . Finally, for each arc a ij = (c i , c j ) in G, we define the weight of a ij as the economic gain

f G c j (d c j , d c i ).
For any arc a sj = (v s , c j ) in G, the weight is obtained by setting u B fc j -1 = 0 to compute p max c j . For any arc a it = (c i , v t ) in G, the weight is set to 0. Since the weight of each arc of G is known, the cumulative total gain of a path p can be computed as the sum of the weights of the arcs in p, which corresponds to the economic gain of all curtailments performed along p. By construction, there always exists a path from v s to v i and from v i to v t for any v i ∈ V \ {v s , v t }. We will show that choosing the sequence of curtailments that results in the best final economic gain without conflicts is equivalent to choosing the longest path from v s to v t in G, and we will show how we can efficiently compute such a path:

Proposition 2 The graph G is a DAG.

Proof. A topological ordering L of V can be obtained by sorting the vertices by increasing order of the first time period of the curtailment associated with each one of them. If two curtailments start at the same time period, choose a random order. Firstly, there is no arc between two vertices starting at the same time period (there exists a conflict between two curtailments starting at the same time period). Secondly, for any arc a = (v i , v j ) of G, the curtailment associated with v j starts after the complete recharge associated with v i . This implies that v j is always after v i in L. □ Proposition 3 Whenever the set D is discrete, the optimal value of OBSC is equal to the length of a longest path from v s to v t in G.

Proof. Let us assume that we are given an optimal solution to an instance of OBSC, of value OP T .

The corresponding values of the variables y c and d c = y c (x fc -x lc+1 ) must belong to F opt as defined in Proposition 1, by definition. Each such pair (y c , d c ) is associated with a vertex in G by definition of G,

SOLVING APPROACHES

and all the pairs used in this optimal solution form a path from v s to v t in G from the definition of the arcs in G. Because the weight of each such arc Hence, this provides a feasible solution to the associated instance of OBSC, of value to v t by adding the arc (v, v t ). Such a path may not be a longest path, but it does provide a feasible solution, from Proposition 1. This implies that we can limit the computation time and compare the best intermediate solution obtained with the ones found by other solution methods.

(v i , v j ) is exactly f G c j (d c j , d c i ), this yields a path from v s to v t in G whose length is ∑ t∈T E t W t -OP T from
∑ t∈T E t W t -λ. □ Since G is a DAG,
As previously mentioned, the algorithm described in this section is based on the enumeration of all triples (f c , l c , d c ), and hence the set D of all possible values of d c over all curtailments c must be defined. Under some general assumptions associated with practical cases, such as the ones mentioned in Section 3.1.2, where the variants OBSC-D (for which D is part of the input) and OBSC-R are defined, such a set D can be obtained as shown in the following section.

Computation of the discrete discharge levels for particular cases

In this section, we show that the set D is discrete for particular cases where the computation of p max c depends only on the values of f c and l c , e.g., when p max c is a constant. In addition, we show how to compute such a set.

There exist (at least) two particular cases for which the set D can be assumed to be discrete: when the battery is used only to participate in the retail market, and when the computation of p max c does not depend on the previous battery uses (i.e., p max c depends only on the values of f c and l c ). In the first case, since no curtailment is performed, the battery discharge level at each period during which the battery is used must only be larger than or equal to ∆D min . Hence, we can see p max c as a big constant, and the Constraints (3.14) will never be saturated when the battery is in use (i.e., when 3.2. SOLVING APPROACHES z t = 1). In the second case, we consider the variant OBSC-R, where a rest time period is imposed after each battery recharge. Since the battery stays at least one time period in rest mode, the amount of power bought in the last recharging time period of a curtailment c 1 has no impact on the computation of p max c 2 for the next curtailment c 2 (i.e., the value of u fc 2 -1 is always W fc 2 -1 in Equation (3.1)).

In the following, we consider the variant OBSC-R to derive the set D. Proof. For each curtailment c performed, we have t B c ∈ {l c + 1, . . . , T }. For each value in this interval (possibly up to some value t max such that ∆

∑ tmax t=lc+1 min(P B , P max -W t ) > min( ∑ lc t=fc ∆ min(W t , D max ), B max -B min )
, beyond which from Proposition 1 no feasible solution can exist), the value d c in any feasible solution must satisfy the range conditions of Proposition 1. Therefore, there exists c will be at least as good as the value of any solution such that the last recharging time period after c has been performed is still t B c and

d t B c such that f G c (d t B c , 0) is the maximum value of f G c (d c , d c -)
d c ′ is unchanged for any c ′ ̸ = c such that y c ′ = 1, but d c ̸ = d t B c .
Then, the set D c is composed of all such optimal battery discharge levels, one for each possible value of t B c . Note that the number of elements in D c is upper bounded by the length of the interval {l c + 1, . . . , T }, and hence by O(T ). Now, consider any optimal solution, a curtailment c 1 in this solution, and assume that

d c 1 / ∈ D c 1 .
Replace d c 1 by the value in D c 1 that yields the same value for t B c 1 . From the previous paragraph, the value of the obtained solution is at least as good. Moreover, this new solution is also feasible, and hence optimal. Indeed, let c 2 be the curtailment performed after c 1 in the optimal solution (if c 2 does not exist, then we are done): since the battery stays at least one time period in rest mode after c 1 ,

this means that f c 2 -t B c 1 > 1 (i.e., t B c 1 ∈ {l c 1 + 1, . . . , f c 2 -2} ⊆ {l c 1 + 1, . . . , T }),
and that the value of u fc 2 -1 in Equation (3.1) is W fc 2 -1 (a value on which the new value of d c 1 has no impact, as t B c 1 did not changed). Hence, this "local" change has not impact on the other curtailments of the considered 3.2. SOLVING APPROACHES optimal solution, and we can proceed in the same way for each such curtailments, including the last one.

□

Obviously, if we consider the other variant (i.e., when the battery is used only to participate in the retail market), then the proof is similar, except that

t B c 1 belongs to {l c 1 +1, . . . , f c 2 -1} ⊆ {l c 1 +1, . . . , T }.
Now, let us discuss some algorithmic issues. Thanks to Proposition 1, we know that, in order to compute the economic gains, we have to use the piecewise linear functions f S c , f B c and f G c , which can be computed in linear time (in T ). Hence, the optimal value of d c for a given curtailment c and a given value of t B c must necessarily be the endpoint of some segment of function f G c (the associated value for d will be referred to as a breakpoint). Note, in particular, that the number of breakpoints

d break h in f G c is
for t B c ) in time O((T -l c ) + (l c -f c + 1)) = O(T ).
It should be noticed that, when using the approach described in Section 3.2.2.1 for solving OBSC-R, an arc is defined from a curtailment

c i = (f c i , l c i , d c i ) to a curtailment c j = (f c j , l c j , d c j ) only if c j
starts at least N + 1 time periods after the last recharging time period associated with c i , i.e., only if

f c j > t B c i + N , in

SOLVING APPROACHES

Proof of Proposition 1

In this section, we provide the proof of Proposition 1. Beforehand, for the sake of a better understanding, we provide a reformulation of the objective function (3.3) and (3.4), that we now recall. In order to do this, and for the sake of simplicity, we define the set F of all the feasible solutions, i.e.,

F = {(y, x, z, p max , u D , u B ) ∈ {0, 1} C ×R +T ×{0, 1} T ×R +C ×R +T ×R +T | (3.5) -(3.19) are satisfied}.
Then, we have:

min (y,x,z,p max ,u D ,u B )∈F ∑ t∈T E t (u B t + u D t ) - ⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ ∑ t∈T R t (W t -u D t ), if OTR ∑ c∈C R fc y c (x fc /∆ -x lc+1 /∆), if FTR From Constraints (3.10), we have that u B t + u D t = W t + x t+1 /∆ -x t /∆ for each t.
Let us consider in what follows the following cases related to the three possible battery states at each time period t:

• Battery in discharge (x t -x t+1 > 0): from Constraints (3.6), we get z t = 1, and then, from Constraints (3.12), we derive u B t = 0. Hence, we get

u B t + u D t = u D t = W t -(x t /∆ -x t+1 /∆).
• Battery in recharge (x t -x t+1 < 0): from Constraints (3.7), we have that z t = 0, and, from

Constraints (3.13), u D t ≥ W t . Since u D t ≤ W t , we get u D t = W t , and thus u B t + u D t = u B t + W t .
• Battery in rest mode (x t -x t+1 = 0): from Constraints (3.8), (3.13) and (3.12), we have that z t = 0, that u D t = W t , and that u B t = 0. In this case, we get

u B t + u D t = W t .
Given that we are always in one of the three above cases for a given t, but not in two at the same time, and that the power demand W t is present in the sum u B t + u D t in all these cases, we can then group the power demand terms over t as ∑ t∈T W t . Additionally, for any curtailment c performed, the term x t+1 /∆ -x t /∆ = -(x t /∆ -x t+1 /∆) is present only during the battery discharge periods of c (i.e., for t ∈ {f c , . . . , l c }), and the term u B t is present only during the battery recharge periods of c (i.e., for t ∈ {l c + 1, . . . , t B c }). Hence, we obtain:

∑ t∈T (u B t + u D t ) = ∑ t∈T W t + ∑ c∈C y c ( - lc ∑ t=fc (x t /∆ -x t+1 /∆) + t B c ∑ t=lc+1 u B t )
min (y,x,z,p max ,u D ,u B )∈F ∑ t∈T E t W t ⏞ ⏟⏟ ⏞ T1 - ∑ c∈C y c ( lc ∑ t=fc E t (x t /∆ -x t+1 /∆) - t B c ∑ t=lc+1 E t u B t ) ⏞ ⏟⏟ ⏞ T2 - { ∑ t∈T R t (W t -u D t ), if OTR ∑ c∈C R fc y c (x fc /∆ -x lc+1 /∆), if FTR ⏞ ⏟⏟ ⏞ T3 (3.55) Since W t -u D t = x t /∆ -x t+1 /∆
for any battery discharge period t of any curtailment performed (and W t -u D t = 0 otherwise), we have

∑ t∈T R t (W t -u D t ) = ∑ c∈C y c ∑ lc t=fc R t (x t /∆ - x t+1 /∆), and, since x fc -x lc+1 = ∑ lc t=fc (x t -x t+1 ), we have ∑ c∈C R fc y c (x fc /∆ -x lc+1 /∆) = ∑ c∈C y c ∑ lc t=fc R fc (x t /∆ -x t+1 /∆).
Hence, we can merge the terms T2 and T3 in Equation (3.55):

min (y,x,z,p max ,u D ,u B )∈F ∑ t∈T E t W t ⏞ ⏟⏟ ⏞ T1 - ∑ c∈C y c ( lc ∑ t=fc { (E t + R t )(x t /∆ -x t+1 /∆) (E t + R fc )(x t /∆ -x t+1 /∆) ⏞ ⏟⏟ ⏞ f 1 (yc,xt,zt,p max c ,u D t ,u B t ) - t B c ∑ t=lc+1 E t u B t ⏞ ⏟⏟ ⏞ f 2 (yc,xt,zt,p max c ,u D t ,u B t )
) (3.56) Note that, since the standard cost term T1 is a constant, minimizing this objective function can be seen as maximizing the objective function

∑ c∈C y c (f 1 (y c , x t , z t , p max c , u D t , u B t ) -f 2 (y c , x t , z t , p max c , u D t , u B t )) over F.
Moreover, we introduce a new variable d c ≥ 0 for each c ∈ C, which represents the overall battery discharge level during curtailment c, and which is not needed in our MIP formulation, but that will be useful to rewrite the objective function. By definition, the value of d c for each curtailment c is

x fc -x lc+1 if c is performed (i.e.
, if y c = 1), and 0 otherwise.

This yields the following new constraints:

d c = y c (x fc -x lc+1 ) ∀c ∈ C (3.

SOLVING APPROACHES

Furthermore, we define a new set F ′ as follows:

F ′ = {(d c ) c∈C and ((y c ) c∈C , (x t ) t∈T , (z t ) t∈T , (p max c ) c∈C , (u D t ) t∈T , (u B t ) t∈T ) ∈ F satisfying (3.57)}. For each (y, d) = ((y c ) c∈C , (d c ) c∈C ), let F * (y, d) = {((x t ) t∈T , (u D t ) t∈T , (u B t ) t∈T ) such that ((d c ) c∈C , (y c ) c∈C , (x t ) t∈T , (z t ) t∈T , (p max c ) c∈C , (u D t ) t∈T , (u B t ) t∈T ) ∈ F ′ }.
We also define the set

F * = {((y c ) c∈C , (d c ) c∈C ) such that F * (y, d) ̸ = ∅}. Then, we have: max ((yc) c∈C ,(xt) t∈T ,(zt) t∈T ,(p max c ) c∈C , (u D t ) t∈T ,(u B t ) t∈T )∈F ∑ c∈C y c ( f 1 (y c , x t , z t , p max c , u D t , u B t ) -f 2 (y c , x t , z t , p max c , u D t , u B t ) ) = max ((yc) c∈C ,(xt) t∈T ,(zt) t∈T ,(p max c ) c∈C , (u D t ) t∈T ,(u B t ) t∈T ,(dc) c∈C )∈F ′ ∑ c∈C y c ( lc ∑ t=fc { (E t + R t )(x t /∆ -x t+1 /∆) (E t + R fc )(x t /∆ -x t+1 /∆) - t B c ∑ t=lc+1 E t u B t ) = max (y,d)∈F * ( max ((xt) t∈T ,(u D t ) t∈T , (u B t ) t∈T )∈F * (y,d) ∑ c∈C y c ( lc ∑ t=fc { (E t + R t )(x t /∆ -x t+1 /∆) (E t + R fc )(x t /∆ -x t+1 /∆) - t B c ∑ t=lc+1 E t u B t )) = max (y,d)∈F * ( ∑ c∈C y c max ((xt) t∈T ,(u D t ) t∈T , (u B t ) t∈T )∈F * c (y,d) ( lc ∑ t=fc { (E t + R t )(x t /∆ -x t+1 /∆) (E t + R fc )(x t /∆ -x t+1 /∆) ⏞ ⏟⏟ ⏞ f S c (xt,u D t ,u B t ) - t B c ∑ t=lc+1 E t u B t ⏞ ⏟⏟ ⏞ f B c (xt,u D t ,u B t ) ))
where F * c (y, d) is the restriction of the set F * (y, d) to the variables x t , u D t and u B t for all t ∈ T such that c ∈ C t . Note that the last equality comes from the fact that, once the values of all the variables y c are known, it can be checked that the only constraints in (3.5)- (3.19) and (3.57) linking the variables associated with time periods of different curtailments that are performed are Constraints (3.14) and (3.15). Hence, once the values of all the variables y c and of all the variables d c are known, there is no remaining links between the variables associated with time periods of different curtailments that are performed.

We now return to the proof of Proposition 1, that we first recall:

Proposition 1.
Let F opt be the set of vectors ((y c ) c∈C , (d c ) c∈C ) such that :

• for each c ∈ C, y c ∈ {0, 1} and d c ≥ 0, • for each c ∈ C and c ′ ∈ C\{c}, if y c = y c ′ = 1, then {f c , . . . , t B c }∩{f c ′ , . . . , t B c ′ } = ∅, where, for each c ∈ C, t B c > l c is the integer such that d c ∈]∆ ∑ t B c -1 t=lc+1 min(P B , P max -W t ), ∆ ∑ t B c t=lc+1 min(P B , P max -W t )],
• for each c ∈ C, if y c = 1, then we must have

d c ∈ [ ∑ lc t=fc ∆ max(min(W t , D min ), W t -p max c ), min( ∑ lc t=fc ∆ min(W t , D max ), B max -B min )],
where the value of p max c is computed using Property 1 and Lemma 1.

In any feasible solution to an instance of OBSC, we have ((y c ) c∈C , (d c ) c∈C ) ∈ F opt . Moreover, for any

((y c ) c∈C , (d c ) c∈C ) ∈ F opt ,
one can obtain a feasible solution of value:

∑ t∈T E t W t - ∑ c∈C y c f G c (d c , d c -)
where

f G c (d c , d c -
) is a function that can be computed in linear time, and where, for each curtailment c such that y c = 1, c -is the only curtailment such that y c -= 1 and there exists no curtailment c ′ such that y c ′ = 1 and l c -< f c ′ ≤ l c ′ < f c . In other words, for each curtailment c, c -is the curtailment that immediately precedes c.

In particular, the optimal value of OBSC can be rewritten as follows:

∑ t∈T E t W t - max ((yc) c∈C ,(dc) c∈C )∈Fopt ∑ c∈C y c f G c (d c , d c -)
Furthermore, in the case where the value of p max c depends only on the value of y c for each c,

f G c (d c , d c -) is a continuous piecewise linear function of d c having O(T ) segments.
Proof.

Our goal is to show that, once the values y c of the variables y c are known, the value

max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) -f B c (x t , u D t , u B t ) )
for each c can be written as a function

SOLVING APPROACHES

The first part of the proof will show that, once the values y c of all the variables y c are known,

f B c (x t , u D t , u B t )
for each c is in fact in itself a function of d c (and of d c only). Hence, once the value

d c is fixed, so is the value of f B c (x t , u D t , u B t ). Intuitively, f B c (x t , u D t , u B t
) is in fact equal to the battery recharging cost (in monetary units) of curtailment c. So, we begin by fixing some c ∈ C. At each recharging time period t ∈ {l c + 1, . . . , t B c }, no curtailment is performed and thus z t = 0. In addition, Constraints (3.5), (3.13) and (3.14) impose that u D t = W t . Hence, summing Equations (3.10) from l c + 1 to t -1 yields:

x t = x lc+1 + ∆ ∑ lc+1≤t ′ <t u B t ′ (3.58)
Note that, because of Constraints (3.9), the curtailment c can start only if the battery is fully charged, i.e., if x fc = B max . Hence, from Constraints (3.57), we have d c = B max -x lc+1 . Using this relation and replacing x t in (3.12) by its expression provided by (3.58), we have that:

u B t = min(d c /∆ - ∑ lc+1≤t ′ <t u B t ′ , P B , P max -W t ) (3.59)
This yields:

f B c (x t , u D t , u B t ) = t B c ∑ t=lc+1 E t min(d c /∆ - ∑ lc+1≤t ′ <t u B t ′ , P B , P max -W t ) (3.60)
By definition of t B c (see also the proof of Property 1), the value of u B t for each recharging time period l c + 1 ≤ t < t B c is min(P B , P max -W t ), and, for all t > t B c , no power bought for recharging the battery is related to c. The value of u B t depends on the value of d c only at the last recharging time period t B c , as shown in Property 1. Thus, we can extend the sum from t B c to T , and f B c can be rewritten as follows:

f B c (x t , u D t , u B t ) = T ∑ t=lc+1 E t [ min ( P B , P max -W t , d c /∆ -min(d c /∆, t-1 ∑ t ′ =lc+1 min(P B , P max -W t ′ ))
) ] (3.61) Note that, at each time period t after the complete battery recharge (i.e., when

∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) ≥ d c /∆, meaning that min(d c /∆, ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ )) = d c /∆), we have min(P B , P max -W t , d c /∆ -d c /∆) = 0,
and thus no power is bought for the recharge related to c, as requested. Let us fix a time period t ∈ {l c + 1, . . . , T }, and assume that the value of

d c ∈ [∆ ∑ t-1 t=lc+1 92 3.2. SOLVING APPROACHES min(P B , P max -W t ), ∆ ∑ t t=lc+1 min(P B , P max -W t )].
Then, the sum in (3.61) for t from l c + 1 to T can be decomposed into three parts:

• for t from l c + 1 to t -1, • for t = t,
• and for t from t + 1 to T .

In the first case, for any recharging time period t such that l c + 1 ≤ t < t, we have

d c ≥ ∆ ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) ≥ ∆ ∑ t t ′ =lc+1 min(P B , P max -W t ′ ), which implies, on the one hand, that min(d c /∆, ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ )) = ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ), and, on the other hand, that d c /∆ - ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) ≥ min(P B , P max -W t ). Hence, the sum in (3.61) for t from l c + 1 to t -1 is equal to ∑ t-1 t=lc+1 E t min(P B , P max -W t ). When t = t, we have d c ≥ ∆ ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) and d c /∆ - ∑ t-1 t ′ =lc+1 min(P B , P max - W t ′ ) ≤ min(P B , P max -W t ). Hence, the term in (3.61) for t = t is equal to E t ( (d c /∆ - ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ) ) . When t > t, we have d c ≤ ∆ ∑ t t ′ =lc+1 min(P B , P max -W t ′ ) ≤ ∆ ∑ t-1 t ′ =lc+1 min(P B , P max -W t ′ ),
which implies that each term of the sum in (3.61) for t from t + 1 to T is equal to E t min(P B ,

P max -W t , d c /∆ -d c /∆) = 0.
Hence, we can rewrite f B c by splitting the sum over t into three parts, as follows:

f B c (x t , u D t , u B t ) = t-1 ∑ t=lc+1 E t min(P B , P max -W t ) + E t ( d c /∆ - t-1 ∑ t=lc+1 min(P B , P max -W t ) ) + T ∑ t=t+1 0
This yields:

f B c (x t , u D t , u B t ) =(E t )d c /∆ + t-1 ∑ t=lc+1 (E t -E t ) min(P B , P max -W t ) (3.62) Note that ∑ t-1 t=lc+1 (E t -E t )
(i) to begin with, f B c (d c ) is equal to E t ∑ t t=lc+1 min(P B , P max -W t ) + ∑ t-1 t=lc+1 (E t -E t ) min(P B , P max -W t ) = E t min(P B , P max -W t ) + ∑ t-1 t=lc+1 E t min(P B , P max -W t ) = ∑ t t=lc+1 E t min(P B , P max -W t ). (ii) then, it is also equal to E t+1 ∑ t t=lc+1 min(P B , P max -W t ) + ∑ t t=lc+1 (E t -E t+1 ) min(P B , P max - W t ) = ∑ t t=lc+1 E t min(P B , P max -W t ).
As we have just shown that the value of f

( f S c (x t , u D t , u B t ) -f B c (x t , u D t , u B t ) )
as follows:

max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) -f B c (x t , u D t , u B t ) ) = max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) -f B c (d c ) ) = -f B c (d c ) + max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) )
The second part of the proof will show that, once the values y c of all the variables y c are known,

max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) for each c ∈ C is a function of the values d c and d c -(while f S c (x t , u D t , u B t ) is not)
, where c -is the curtailment with y c -= 1 that directly precedes c in the solution. Hence, once the values d c -and d c are fixed, so is the value of max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) . Intuitively, max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) )
is in fact equal to the optimal economic gain associated with a curtailment c to be performed, which is composed of the savings induced by not buying energy for consumption, and of the reward received when performing a curtailment.

If, for each t ∈ {f c , . . . , l c }, we define G ′ t = Et+Rt ∆ if the OTR reward policy is considered, and

G ′ t = Et+R fc ∆
if the FTR reward policy is considered, then we can rewrite the value of

( f S c (x t , u D t , u B t ) )
as follows:

max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) = max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( lc ∑ t=fc G ′ t (x t -x t+1 ) )
From Constraints (3.13), (3.14) From Constraints (3.57), the battery discharge can be written as d c = x fc -x lc+1 . Hence, from Constraints (3.9), we have that x fc = B max and

x lc+1 = B max -d c .
This implies that the value of max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( ∑ lc t=fc G ′ t (x t -x t+1 ) )
can be rewritten as follows (and hence depends on the values of the variables x t only):

max lc ∑ t=fc G ′ t (x t -x t+1 ) s.t. d min t ≤ x t -x t+1 ≤ d max t ∀t ∈ {f c , . . . , l c } (3.63) x fc = B max , x lc+1 = B max -d c (3.64) x t ∈ [B min , B max ] ∀t ∈ {f c , . . . , l c + 1} (3.65)
Note that, from Constraints (3.63), we must have that

d c = x fc -x lc+1 = ∑ lc t=fc (x t -x t+1 ) ≥ ∑ lc t=fc d min t and d c ≤ ∑ lc t=fc d max t .
In addition, from Constraints (3.64) and (3.65), we have that x fc = B max (3.66)

d c = x fc -x lc+1 ≤ B max -B min .
x t+1 = x t + (x ′ t+1 -x ′ t ) ∀t ∈ {f c , . . . , l c } (3.67)
Indeed, we have and, for the subsequent periods t j , i.e., such that j > k, we will have δ t j = 0. Formally, we have:

x lc+1 = x fc - ∑ lc t=fc (x t -x t+1 ) = B max - ∑ lc t=fc (x ′ t -x ′ t+1 ) = B max -d c ,
δ t i = max(0, min(d max t i -d min t i , d c - ∑ t j ∈L|j≥i d min t j - ∑ t j ∈L|j<i d max t j )), ∀t i ∈ L Note that δ t i = 0 if ∑ t j ∈L|j≥i d min t j + ∑ t j ∈L|j<i d max t j ≥ d c , and
δ t i = min(d max t i -d min t i , d c - ∑ t j ∈L|j≥i d min t j - ∑ t j ∈L|j<i d max t j ) otherwise.
Hence, δ t i can be rewritten as follows:

3.2. SOLVING APPROACHES

δ t i = min(d max t i -d min t i , d c -min(d c , ∑ t j ∈L|j≥i d min t j + ∑ t j ∈L|j<i d max t j )), ∀t i ∈ L
Note that, given an optimal solution (∆ t ) t∈{fc,...,lc} , the values of x t that respect Constraints (3.63) and (3.64) can be obtained as follows:

x fc = B max x t+1 = x t -∆ t ∀t ∈ {f c , . . . , l c }
Again, note that this implies

x lc+1 = x fc - ∑ lc t=fc (x t -x t+1 ) = B max - ∑ lc t=fc ∆ t = B max -d c . Finally, we can rewrite max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) )
as follows:

max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) = ∑ t i ∈L G ′ t i d min t i + ∑ t i ∈L G ′ t i [ min ( d max t i -d min t i , d c -min(d c , ∑ t j ∈L|j≥i d min t j + ∑ t j ∈L|j<i d max t j ) ) ] (
• for all t i in L such that i < i * , • for t i = t i * ,
• and for all t i in L such that i > i * .

In the first case, for any time period t i in L such that i < i * , we have that

d c ≥ d min + ∑ t j ∈L|j<i * (d max t j -d min t j ) ≥ d min + ∑ t j ∈L|j<i (d max t j -d min t j ),
∆ t i * = x t i * -x t i * +1 = d min t i * + d c -d min - ∑ t j ∈L|j<i * (d max t j -d min t j ).
In the third case, for any time period t i in L such that i > i * , we have

d c ≤ d min + ∑ t j ∈L|j≤i * (d max t j - d min t j ) ≤ d min + ∑ t j ∈L|j<i (d max t j -d min t j ), which implies from Equation (3.70) that ∆ t i = x t i -x t i +1 = d min t i .
Thus, we can rewrite max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) )
by splitting the sum over t i into three parts, as follows:

max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) = ∑ t i ∈L|i<i * G ′ t i d max t i + G ′ t i * ( d min t i * + d c -d min - ∑ t i ∈L|i<i * (d max t i -d min t i ) ) + ∑ t i ∈L|i>i * G ′ t i d min t i (3.71)
This yields:

max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) = ∑ t i ∈L|i<i * G ′ t i d max t i + G ′ t i * d c -G ′ t i * ( d min + ∑ t i ∈L|i<i * (d max t i -d min t i ) ) + ∑ t i ∈L|i≥i * G ′ t i d min t i (3.72)
Hence, we obtain that, for each c, max

((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) )
G ′ t i * d c . Thus, max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) ) is then
( f S c (x t , z t , u D t , u B t ) )
are linear, it is in fact, in this special case, a piecewise linear function of d c in the range [d min , d max ],

that we will simply denote by f S c (d c ). We can even show that f S c (d c ) is continuous with respect to d c in such a range. Indeed, let us assume that

d c = d min + ∑ t i ∈L|i≤i * (d max t i -d min t i ) for some t i * ∈ L, 3.2. SOLVING APPROACHES which implies that d c ∈ [d min + ∑ t i ∈L|i<i * (d max t i -d min t i ), d min + ∑ t i ∈L|i≤i * (d max t i -d min t i )] and that d c ∈ [d min + ∑ t i ∈L|i≤i * (d max t i -d min t i ), d min + ∑ t i ∈L|i≤i * +1 (d max t i -d min t i )]: (i) to begin with, f S c (d c ) is equal to ∑ t i ∈L|i<i * G ′ t i d max t i + G ′ t i * (d min + ∑ t i ∈L|i≤i * (d max t i -d min t i )) - G ′ t i * ( d min + ∑ t i ∈L|i<i * (d max t i -d min t i ) ) + ∑ t i ∈L|i≥i * G ′ t i d min t i = ∑ t i ∈L|i<i * G ′ t i d max t i + G ′ t i * (d max t i * - d min t i * ) + ∑ t i ∈L|i≥i * G ′ t i d min t i = ∑ t i ∈L|i≤i * G ′ t i d max t i + ∑ t i ∈L|i>i * G ′ t i d min t i .
(ii) then, it is also equal to

∑ t i ∈L|i≤i * G ′ t i d max t i +G ′ t i * +1 (d min + ∑ t i ∈L|i≤i * (d max t i -d min t i ))-G ′ t i * +1 ( d min + ∑ t i ∈L|i≤i * (d max t i -d min t i ) ) + ∑ t i ∈L|i≥i * +1 G ′ t i d min t i = ∑ t i ∈L|i≤i * G ′ t i d max t i + ∑ t i ∈L|i≥i * +1 G ′ t i d min t i = ∑ t i ∈L|i≤i * G ′ t i d max t i + ∑ t i ∈L|i>i * G ′ t i d min t i .
Summing up, we have managed to prove that, for each c, we have the following result:

max ((xt)t,(u D t )t,(u B t )t)∈F * c (y,d) ( f S c (x t , u D t , u B t ) -f B c (x t , u D t , u B t ) ) = f S c (d c , d c -) -f B c (d c ) Let f G c (d c , d c -) = f S c (d c , d c -) -f B c (d c )

Numerical experiments

In order to assess the efficiency and relevance of our models and algorithms for optimizing the savings using the demand response mechanism, we performed some numerical experiments on realistic instances, generated from public energy costs and data related to the curtailment market, as well as internal data from the French telecommunications operator Orange.

The two variants OBSC-D and OBSC-R are solved with the Graph-Oriented Algorithm, described in Section 3.2, that will be denoted as OBSC-GOA. The formulation (OBSC-MILP) is solved using a standard MILP solver, and the resulting solving method for OBSC will be denoted as OBSC-MILP.

This section is organized as follows. Firstly, in Section 3.3.1, we describe the instances and the environment used in our tests. Then, in Section 3.3.2, we present some results for the following problems and algorithms, for different values of the time horizon discretization ∆:

• OBSC, solved with OBSC-MILP;

• OBSC-D with battery discharge level per 5% and 1%, solved with OBSC-GOA;

• OBSC-R with one rest time period, solved with OBSC-GOA.

We explore, in Section 3.3.2 as well, the impact of the reward policy and of the characteristics of the battery on the obtained solutions.

Instances description

We based our testbed on 10 urban and rural sites from the mobile 4G network from the French telecommunications operator Orange. Each site is equipped with a battery, whose main characteristics are reported in , is also given. Finally, the value of B min is set to 50% of the battery energy capacity B max , and D min corresponds to 10% of D max . Figure 3.3 illustrates the profile of power demand over time for the site "S4" in the first week of the considered month, as well as the mean values over such a week. Such a profile is also observed for all other sites.

Concerning the data related to the distributor, we consider the unit costs from the French distributor EDF, publicly available at data.gouv.fr (2020). Besides, the maximum amount of power P max that 3.3. NUMERICAL EXPERIMENTS can be purchased per time period is established by contract for each site. In our tests, to guarantee that the value of P max is greater than the power demand W t at any time period t ∈ T , we set such a value to 3W ¯.

Concerning the data related to the transmission system operator, we consider rewards paid by the French operator RTE, whose values are publicly available (see RTE-Portal). Besides, the minimum and maximum curtailment duration are defined by contracts and are 1 and 2 hours, respectively.

Similarly, the contractualized power P T O considered is 50% of W ¯. Note that the value of P T O is adjusted to the case where one battery is used to perform curtailments. In a real world setting where multiple batteries are considered, this value is much higher. Lastly, the reward policy used in France is FTR. However, we also considered the OTR policy in our experiments. Moreover, the input values of the power demand, unit cost, and reward, over the time horizon, are taken as average values observed over a month.

In addition, to simplify the writing, we present the time discretization ∆ in minutes. Hence, we assume a daily time horizon with different time discretizations ∆ ∈ {15, 30, 60} in minutes (i.e., 1 4 , 1 2 and 1 hour respectively), which implies that T ∈ {96, 48, 24}, respectively.

All tests are performed on a server computer with 4GB of RAM and 1 Intel Xeon CPU running at 2.2GHz. The OBSC-MILP method used to solve the (OBSC-MILP) formulation is the branch-andbound implemented in CPLEX 12.9, with default settings. A time limit of 15 minutes is also imposed on the running time of each method, for all the tests performed.

Experimental analysis

Numerical results for instances considering FTR as the reward method are displayed in Table 3.2, both for OBSC-GOA and OBSC-MILP. Concerning the variants OBSC-D and OBSC-R solved with OBSC-GOA, discharge levels per 5% and 1% are considered for OBSC-D, and the associated results are displayed under the labels OBSC-D-5% and OBSC-D-1%, respectively, while, for OBSC-R, only one rest-time period is imposed between two curtailments, and the associated results are displayed under the label OBSC-R. In this table, column "Ref Cost" corresponds to the reference cost ∑ t∈T E t W t (given in e), obtained when no curtailment is performed. Column "CPU" reports the solving time in seconds, and column "sol" the value of the best feasible solution obtained. In column "sol" for labels OBSC-D-5% and OBSC-D-1%, the values in green correspond to cases where solving OBSC-D with OBSC-GOA provides better solutions than solving OBSC with OBSC-MILP, and significantly faster.

Besides, the optimality gap (in %) obtained for (OBSC-MILP) when using OBSC-MILP is provided in column "gap". It corresponds to the relative gap between the best integer solution found and the best lower bound obtained during the search. The optimal value of the continuous relaxation of (OBSC-MILP) obtained at the root of the search tree when using OBSC-MILP is provided in column "relax".

Note that, it is totally acceptable to have negative values in this column. In that case, the customer is earning money from the market by performing curtailments. Finally, the column "savings" stands for the percentage of savings obtained for the best feasible solution found with OBSC-MILP, or with OBSC-GOA for the considered variants, with respect to the reference cost. The instances prefixed with a " * " are the ones for which OBSC-MILP provides an optimal solution (i.e., is actually able to prove the optimality of the best integer solution obtained). Additional tests were also performed considering the OTR reward policy instead of the FTR one, both for OBSC-GOA and OBSC-MILP, and will be discussed in the sequel.

Computational efficiency of the methods

We begin by focusing on the algorithmic results and observe a significant impact of the time discretization on the performance of the considered algorithms.

Concerning OBSC-MILP, optimal values are obtained for all instances where ∆ = 60 in less than one second, while no optimality guarantee is observed for instances where ∆ = 15 within the CPU time limit. This is due to the fact that the number of variables y c in (OBSC-MILP) grows quadratically with the number of time periods T . Moreover, the optimality gap for instances with no optimality guarantee is quite significant for ∆ = 15 (242% on average), while it is only 9.6% on average for ∆ = 30. We also observe a low-speed convergence for all the tested instances. However, even for instances with no optimality guarantee, the best solution found gives a large reduction in the energy bill (78.1% on average when FTR reward policy is considered). Furthermore, the reward policy also has an impact on the computational performance since the structure of the optimal solutions can change.

More precisely, if FTR is considered, then the curtailments tend to start in the time periods when the reward prices are high. If OTR is considered, then the reward paid in a time period is the same independently of when a curtailment starts (i.e, only the difference of prices is taken into account to decide whether a curtailment is to be performed or not). Indeed, as expected, the additional computational experiments show that instances with an optimality guarantee and ∆ = 30 were solved faster with the OTR policy than with the FTR one (15% faster on average). In addition, for instances without optimality guarantee, considering the OTR policy yields optimality gaps smaller than the ones obtained when considering the FTR policy (137% and 154% on average, respectively).

Concerning OBSC-D and OBSC-R solved with OBSC-GOA, all instances are solved in less than 30 seconds with the FTR policy. We observe that, as expected, the cardinality of the set of discrete discharge levels D directly impacts the solving time for OBSC-D. This is due to the fact that the number of enumerated curtailments (and hence of vertices) grows linearly in |D|, which means that the number of arcs grows quadratically in |D|.

Notice that one interesting aspect of the OBSC-GOA solving method is that we observe a fast increase in the size of the graph used to compute the longest path, both in terms of the number of nodes and arcs. A clever implementation of an algorithm computing the longest path in a DAG allowed us to solve optimally instances with a number of nodes up to 87k and a number of arcs up to 3.1 billions.

However, the longest path in larger graphs could not be computed within 15 minutes. Finally, to confirm the relevance of our approaches, we illustrate in Figure 3.4 the profile of solutions given by OBSC-MILP in the case of site S4, when ∆ = 60. Such a profile is also observed for all other sites. The power demand over the time horizon is represented by the violet curve, the energy prices by the red one, and the reward paid by the TO by the green curve. We observe that, in the proposed optimal strategy, 5 curtailments are performed, and the cost of the energy bill is reduced by 55.18%. Among such a reduction, 16.55% are obtained by exploiting the variations of the energy price, i.e., by participating in the retail market through the demand response mechanism. Seemingly, the 3.3. NUMERICAL EXPERIMENTS great variety of the curtailments involved in such an optimal solution confirms the practical relevance of our approach.

Impact of the parameters on the economic gain

We now focus on the economic aspects of the solutions, and observe that a substantial gain is obtained by participating in the curtailment market, as the average savings range from 55% for ∆ = 60 up to 90% for ∆ = 15, compared to the reference cost. Such values confirm that participating in the curtailment market can generate significant gains for the company. Moreover, we observe that the reward policy has a direct impact on the savings that can be generated. Table 3.3 shows the savings obtained on average for OBSC and its variants considering FTR and OTR as reward policy. When the FTR policy is considered instead of OTR, the economic gain obtained increases significantly, from 88% to 105% on average. A similar but smaller increase is observed in the variants solved with OBSC-GOA.

Note that, when the savings are higher than 100%, the cost of buying energy decreases to zero and the telecommunications operator starts earning money by participating in the curtailment market.

The value of the time discretization ∆ has also an impact on the total amount of savings, since a better battery management policy can be obtained by a finer discretization of the time horizon. This is observed in Table 3.2 for instances where ∆ = 15, in comparison with the ones with ∆ = 60, despite the fact that no optimality guarantee is achieved for such instances. The savings obtained using OBSC-MILP are 89.8% (resp. 55%) on average for ∆ = 15 (resp. ∆ = 60) with respect to the reference cost.

Concerning the OBSC-D variant solved with OBSC-GOA, considering discharge levels per 5% gives on average an economic gain 2.5% smaller than the one obtained with OBSC-MILP on the instances with ∆ = 60, for which an optimality guarantee is always achieved. Note that such a gap increases on average when the value of the time discretization decreases, and grows up to 4% for instances with optimality guarantee and ∆ = 30. Moreover, we observe that the battery discharge discretization helps to reduce this gap, since more curtailments are enumerated. For battery discharge levels per 1%, the savings obtained are on average only 1% smaller than the ones obtained with OBSC-MILP on the instances with optimality guarantee.

Concerning the instances solved with OBSC-MILP without optimality guarantee, OBSC-D with battery discharge levels per 1% always gives better savings when ∆ = 15. Such savings are on average 3.3. NUMERICAL EXPERIMENTS 2.5% higher than the best ones obtained by solving these instances with OBSC-MILP. In some cases, even with battery discharge levels per 5%, the savings obtained are higher. However, the solutions obtained with OBSC-R always provide smaller savings than the ones provided by the best solutions found with OBSC-MILP.

Since any solution obtained by solving OBSC-D or OBSC-R is also a feasible solution for OBSC, such a solution can be used as a heuristic solution. As observed in Table 3.2, when the discretization of the battery discharge becomes finer, the solutions obtained for the OBSC-D variant give higher savings, but the solving time increases. To analyze the impact of the battery discharge discretization on the savings obtained and on the computation time required, additional tests on OBSC-GOA with a time limit extended to one hour were run. Figure 3.5 illustrates the profile of savings obtained and the running times for different battery discharge discretizations, ranging from 5% of B max to 0.01% of B max , for ∆ ∈ {15, 20, 30, 60} in the case of site S1. Such a profile is also observed for all other sites. In addition, the reward policy considered is FTR. We can observe that the savings obtained with a battery discharge discretization smaller than 1% of B max tends to stabilize, and the running time tends to increase exponentially. Moreover, when the discretization of the battery discharge becomes too small (i.e., discharge per 0.1% of B max or less), OBSC-GOA is stopped after one hour, and the best feasible solutions obtained give much less savings than the ones obtained with battery discharge levels per 1% (from 89% to 14% when ∆ = 15). We conclude that solving OBSC using OBSC-D with battery discharge levels per 1% or 0.5% gives a good trade-off between the quality of the solutions obtained and the solving time. Furthermore, we explored the characteristics of the battery installed and their impact on the economic gain obtained. Hence, additional tests were run considering the battery capacity B max in the range {5W ¯, 10W ¯} (5 and 10 hours supplying W ¯) and P B in the range {0.15B max , 0.30B max }. We observed that a higher P B allows us to obtain better savings, which is due to the fact that we can make a better use of time periods with lower prices, by recharging the battery faster during such periods.

Moreover, a lower P B tends to increase the average recharging cost, because the unitary energy price can increase during the recharging time. Concerning the battery capacity, we observed that a higher value of B max allows to take advantage of potential high energy prices during a curtailment, further discharging the battery. Hence, a large amount of energy can be used from the battery and bought cheaper to recharge the battery, increasing the savings obtained by performing curtailments.

Conclusion

This chapter focuses on the use of batteries that were originally installed as backup in the energy market. In particular, we have considered the OBSC problem optimizing the total energy costs by using a battery installed for backup in order to participate in the retail and curtailment markets, with the help of a proper battery management. As a resolution method, a mixed-integer linear program is proposed and solved using a standard solver, and any of its optimal solutions provides a strategy for using the battery at optimum cost. We also identified two practical variants of the problem, and proved them to be polynomial by providing an efficient graph-oriented algorithm to solve them. This solving method, which can be used only with discrete battery discharge levels, is based on the enumeration of all possible curtailments that can be performed over the planning horizon. Then, it computes a longest path in a directed acyclic graph whose nodes correspond to the possible curtailments.

As a result, we observed that participating in the curtailment market generates great savings (88% with FTR and 105% with OTR on average), hence reducing the energy OPEX of the company, and proving the premise of this study. A series of tests on realistic instances coming from the French context was performed, in order to analyze the mathematical model as well as the main properties of 3.4. CONCLUSION such instances. We observed in particular that OBSC-MILP could not achieve an optimality guarantee for all instances. However, even for instances without such an optimality guarantee, the best solution obtained already generates savings from 55% up to 90% on average, which represents a substantial reduction in electricity bill for the company. The reward policy and the battery capacity seem to be the parameters that have the greatest impact on these potential savings. Concerning the variants solved with the graph-oriented algorithm OBSC-GOA, all the instances were solved to optimality, and the results we obtained proved the economical relevance of such variants (only 2.5% worst than the optimal solutions of OBSC on average for the instances for which the optimality guarantee is achieved), by providing good approximate solutions for the general problem, and hence by being good and fast heuristics to solve it.

Concerning the performance of our algorithms, we observed that for instances in our testbed, the value of the time discretization and the reward policy are the parameters that have the most impact on the solving time. We considered a time limit of 15 minutes for solving each instance, and, in this aspect, OBSC-GOA proved to be computationally efficient, while we observed that the solving time of OBSC-MILP increases fast when some parameters increase.

Once we understand well the impact of curtailments on battery management, the issues that make such management more complex, and how to solve them, we can use the knowledge acquired in the management of an energy asset composed of several batteries. Note that, for the sake of clarity, rules R6 and R10 were not considered in this chapter because they are more pertinent when multiple batteries are used to prevent that one battery is used much more than others. In addition, the solving approaches proposed remains valid with minor changes. Indeed, we must change the Bellman's algorithm to store at each node the value of the best path considering the number of steps.

In the following, we will explore the management of multiple batteries being used in the curtailment market and reuse some of the algorithms and methods proposed in this chapter.

Chapter 4

Optimization of a multi-battery storage system to participate in the retail market After studying in detail the impact of curtailment market rules on the management of a battery, we are now interested in measuring and treating the dimensionality of the management of multiple batteries that are subject to the safety usage rules. Hence, in this chapter we consider the problem of optimizing total energy costs of a telecommunications site using the batteries installed for backup to participate in the retail market. Our goal is therefore to reduce the total energy costs for the company with a proper battery management. Note that the load curtailments are not considered, and the batteries can only be used to perform peak-shavings.

Formally, the problem treated in this chapter is the Optimization of a Multi-Battery Storage system participating in the Retail market (referred to as OMBSR), in order to reduce the total energy cost for the company. The main issue is to manage multiple batteries while respecting the energy market rules and the safety usage rules and minimizing the total energy cost.

This chapter allows us to understand in detail the impact of increasing the number of batteries on the optimization problem. We also explore the strategy of decomposing the OMBSR problem into sub-problems that can be solved more efficiently. Such a strategy is further incorporated in the algorithm presented in Chapter 5 to solve the same problem with load curtailments.

Concerning the scientific contributions, we formally define the problem and we present two mathematical programming models for OMBSR in Section 4.2. We also give the proof that OMBSR is NP-Hard, via a reduction from the 3-Partition problem, in Section 4.3. We propose two heuristics based on different aspects for large-scale OMBSR instances: one heuristic based on graph theory 4.1. PROBLEM STATEMENT

Problem statement

We consider a deterministic framework with a single telecommunication site similar to the one described in Chapter 3, defined by the parameters ∆, E, W , and P max . to the same usage rules R1-R5, defined in Section 1.3. In addition to these usage rules, the number of times that each battery can be used is limited to preserve its life time (i.e., rule R6). The rule R6 is now relevant to avoid that one battery is used more often than the others.

Concerning the energy market rules, only the rule R7, related to the retail market, is taken into account.

Recall that our goal is to use the batteries while respecting the energy retail market rules, and keeping the network safe (i.e. respecting the battery safety usage rules) at minimal cost. The total amount of energy savings that can be obtained is provided by the difference between the energy prices during a battery use and its recharge. The amount of energy not bought during the battery use is equal to the battery discharge.

The problem stated above is referred to OMBSR in the following, and any of its instances is fully described by the following parameters (some of which are vectors or sets): W , ∆, E, P max , B, B min , B max , P B , D min , D max and N . The safety usage rules R1-R6 and the market rule R7 of the problem are the same as the ones defined in Chapter 3.

Mathematical formulations 4.2.1 Mixed-integer nonlinear program based on enumeration of batteries cycles

The formulation that models OMBSR described in this section is a mixed-integer nonlinear program that will be referred to as (OMBSR-MINLP'). This formulation is inspired by the mathematical model proposed for the OBSC problem presented in Chapter 3, based on the enumeration of battery uses.

Since a battery discharge starts (resp. ends) at a time period f (resp. l) called first (resp. last) period, the goal is to identify, among the O(|B|T 2 ) possible triples (b, f, l) (b, c = (f, l)) over the horizon, the ones to be performed. Such a decision is reflected by the value of a binary variable y b,c

MATHEMATICAL FORMULATIONS

for each battery b and for each discharge during the interval c. Then, the battery discharge level d during the time period interval c is given by the difference of energy stock in the battery between the beginning of period f and the end of period l. Recall that we are looking for a set of discharges (f, l, d)

that can be performed for each battery while respecting the market and the battery safety usage rules and such that total energy cost is minimized.

Let us consider C as the set of all possible pairs (f, l) such that 1 ≤ l -f + 1 ≤ T . The set T = {t 1 , . . . , t T } represents the discrete planning horizon over T time periods, and the set C t , ∀t ∈ T , represents the pairs (f, l) of all possible battery discharges that can be performed at time period t. In other words, C t contains all the pairs (f, l) with f < l such that f ≤ t ≤ l.

MATHEMATICAL FORMULATIONS

Decision Variables

Firstly, a solution is determined by the values of the following variables:

- starting at time period f and ending at time period l, and to 0 otherwise.

To model the power bought at each time period t, the following variables are used:

-u D t ∈ [0, W t ], t ∈ T : power bought for the demand consumption at time period t (in kW);

-u B b,t ∈ [0, P B b ],
∀b ∈ B, t ∈ T : power bought for the recharge of battery b at time period t (in kW).

Auxiliary variables can also be used to simplify the model writing. However, they are not strictly necessary, and could be removed and replaced by their corresponding value:

-z b,t , ∀t ∈ T , ∀b ∈ B: equal to 1 if the battery b is discharged at time period t, and to 0 otherwise;

The objective function is defined as follows:

min ∑ t∈T E t ( ∑ b∈B u B b,t + u D t ) (4.1)
The objective function minimizes the total cost of purchasing energy. A solution is given by the stock of energy in each battery at each time period, provided by the values of the x b,t variables.

The following constraints define if each battery is in discharge or not at each time period t: Note that, if the battery has the same energy stock during two consecutive time periods, then the corresponding variables z b,t are free. However, Constraints (4.2) guarantee that, if a battery discharge is performed, then z b,t is equal to 1 for each t over the discharge duration. Constraints (4.5) guarantee that a battery can start being discharged only if the battery is fully charged:

z b,t = ∑ c∈Ct y b,c ∀b ∈ B, ∀t ∈ T (4.2) x b,t -x b,t+1 ≤ ∆D max b z b,t ∀b ∈ B, ∀t ∈ T (4.3) -x b,t + x b,t+1 ≤ ∆P B b (1 -z b,t ) -∆ min(W t , D min b )z b,
B max b ∑ c∈Ct | t=f y b,c ≤ x b,t ∀b ∈ B, ∀t ∈ T (4.5) u B b,t = (1 -z b,t ) min(B max b /∆ -x b,t /∆, P B b , P max -W t ) ∀b ∈ B, ∀t ∈ T (4.6) ∑ b∈B (x b,t+1 -x b,t ) = ∑ b∈B ∆u B b,t + ∆u D t -∆W t ∀t ∈ T (4.7) x b,t+1 -x b,t ≥ ∆u B b,t -∆D max b z b,t ∀b ∈ B, ∀t ∈ T (4.8) x b,t+1 -x b,t ≤ ∆u B b,t
∀b ∈ B, ∀t ∈ T (4.9)

The power bought for charging each battery is min(P B b , P max -W t ) when it is possible to buy energy (i.e., if z b,t = 0), if the capacity of the battery is not exceeded (see Constraints (4.6)). Note that two batteries can be used at the same time: either both are in discharge mode; or one is in discharge and another recharging; or both are in recharge mode. Constraints (4.8) together with Constraints (4.9) guarantee that the power bought to recharge a battery is related to the corresponding battery, preventing the exchange of power between two batteries (i.e., when the energy obtained from the discharge of one battery is used to recharge another).

Since no losses are considered, the energy stock balance of the batteries are ensured by Constraints (4.7). Besides, Constraints (4.7) together with the bounds on u D t impose a maximum cumu-

MATHEMATICAL FORMULATIONS

lative discharge of all batteries at the same time period, equal to the power demand W t . Indeed, note that the domain of variables u D t limits such a maximal discharge to W t .

The network capacity is modeled by Constraints (4.10).

∑ b∈B u B b,t + u D t ≤ P max ∀t ∈ T (4.10)
Furthermore, Constraints (4.11) guarantee that each battery will be used at most N b times over the time horizon, while Constraints (4.12) express the limit conditions:

∑ c∈C y b,c ≤ N b ∀b ∈ B (4.11) x b,t 1 = x b,x T +1 = B max b ∀b ∈ B (4.12)
Finally, the domains of the variables are:

u D t ∈ [0, W t ] ∀t ∈ T (4.13) u B b,t ∈ [0, P B b ], x b,t ∈ [B min b , B max b ], z b,t ∈ {0, 1} ∀b ∈ B,

Alternative mixed-integer nonlinear program

The main problem with the (OMBSR-MILP') formulation is that the number of (f, l) pairs enumerated can potentially be large and strongly impact the size of the model and hence the solving time.

Considering that curtailments are not allowed in OMBSR, it is possible to model the problem in an implicit way without the need to enumerate all the discharge duration of batteries. Consequently, the size of the model is reduced.

The formulation of OMBSR described in this section will be referred to as (OMBSR-MINLP).

MATHEMATICAL FORMULATIONS

Decision Variables

Firstly, the same families of variables x b,t , u D t , u B b,t , and z b,t from the formulation presented in Section 4.2.1 are considered.

In addition to those ones, the following additional variables are used to control the state of each battery:

-b start b,t ∈ {0, 1}, ∀b ∈ B, ∀t ∈ T : equal to 1 if the battery b starts being discharged at time period t, and to 0 otherwise. The objective function is defined as follows:

min ∑ t∈T E t ( ∑ b∈B u B b,t + u D t ) (4.16)
The objective function minimizes the total cost of purchasing energy. A solution is given by the stock of energy in the batteries at each time period, provided by the values of the x b,t variables.

The following constraints define if each battery is in discharge or not at each time period t:

x b,t -x b,t+1 ≤ ∆D max b z b,t ∀b ∈ B, ∀t ∈ T (4.17)

-x b,t + x b,t+1 ≤ ∆P B b (1 -z b,t ) -∆ min(W t , D min b )z b,
B max b b start b,t ≤ x b,t ∀b ∈ B, ∀t ∈ T (4.21)
The power purchased in the retail market at each time period t is the sum of the power bought for charging the batteries ( ∑ b∈B u B b,t ) and the power bought for consumption (u D t ), which is ensured by the following constraints:

u B b,t = (1 -z b,t ) min(B max b /∆ -x b,t /∆, P B b , P max -W t ) ∀b ∈ B, ∀t ∈ T (4.22) ∑ b∈B (x b,t+1 -x b,t ) = ∆ ∑ b∈B u B b,t + ∆u D t -∆W t ∀t ∈ T (4.23) x b,t+1 -x b,t ≥ ∆u B b,t -∆D max b z b,t ∀b ∈ B, ∀t ∈ T (4.24) x b,t+1 -x b,t ≤ ∆u B b,t ∀b ∈ B, ∀t ∈ T (4.25)
The power bought for charging each battery is min(P B b , P max ) when it is possible to buy energy (i.e., if z b,t = 0), if the capacity of the battery is not exceeded (see Constraints (4.22)). Note that several batteries can be used at the same time: some of them can be in discharge mode and others recharging. Constraints (4.24) together with Constraints (4.25) guarantee that the power bought to recharge a battery is related to the corresponding battery, preventing the exchange of power between two batteries (i.e., when the energy obtained from the discharge of one battery is used to recharge another).

Since no losses are considered, the energy balance of the batteries is ensured by Constraints (4.23).

Moreover, Constraints (4.23) impose a maximum cumulative discharge of all batteries at the same time period equal to the power demand W t .

The network capacity is modeled by Constraints (4.26).

∑ b∈B u B b,t + u D t ≤ P max ∀t ∈ T (4.26)
Furthermore, Constraints (4.27) guarantee that each battery will be used at most N b times over

MATHEMATICAL FORMULATIONS

the time horizon, while Constraints (4.28) express the limit conditions:

∑ t∈T b start b,t ≤ N b ∀b ∈ B (4.27) x b,t 1 = x b,t T +1 = B max b ∀b ∈ B (4.28)
Finally, the domains of the variables are:

u D t ∈ [0, W t ] ∀t ∈ T (4.29) u B b,t ∈ [0, P B b ], x b,t ∈ [B min b , B max b ], z b,t ∈ {0, 1}, b start b,t ∈ {0, 1} ∀b ∈ B,

Mathematical model linearizations

In this section, we present the linearization of the mathematical models (OMBSR-MINLP) and

(OMBSR-MINLP'), which have a single nonlinear constraint (i.e., Constraint (4.6) in the case of (OMBSR-MINLP'), and Constraint (4.22) in the case of (OMBSR-MINLP)) that is the same in both mathematical formulations.

Firstly, let us rewrite Constraints (4.6) (i.e., also Constraints 4.22) as follows:

u B b,t = (1 -z b,t ) min(B max b /∆ -x b,t /∆, P B b , P max -W t ) = min(B max b /∆ -x b,t /∆, min(P B b , P max -W t )) -min(B max b z b,t /∆ -x b,t z b,t /∆, min(P B b , P max -W t )z b,t ) (4.31)
For a product between a binary variable b i and a variable

f j ∈ [0, F max ],
u B b,t ≤ (1 -z b,t )(B max b /∆ -x b,t /∆) , u B b,t ≤ (1 -z b,t ) min(P B b , P max -W t ) (4.35) (B max b -x b,t ) -∆ min(P B b , P max -W t ) ≤ ∆M lin side b,t , min(P B b , P max -W t ) -(B max b /∆ -x b,t /∆) ≤ M (1 -lin side b,t ) (4.36) u B b,t ≥ (1 -z b,t )(B max b /∆ -x b,t /∆) -M (1 -z b,t )lin side b,t , u B b,t ≥ (1 -z b,t ) min(P B b , P max -W t ) -M (1 -z b,t )(1 -lin side b,t ) (4.37)
Note that, since u B b,t ∈ [0, P B b ], Constraints (4.37) can be replaced by:

u B b,t ≥ (1 -z b,t )(B max b /∆ -x b,t /∆) -M lin side b,t , u B b,t ≥ (1 -z b,t ) min(P B b , P max -W t ) -M (1 -lin side b,t ) (4.38)
Indeed, when z b,t = 0, (4.37) and ( 4 Firstly, let us prove that any feasible solution of (OM BSR-LP ) can be transformed into a feasible solution of (OM BSR ′ -LP ) as follows:

1 Note that we can rewrite the expression

∑ c∈Ct y b,c as ∑ c∈Ct|f =t y b,c + ∑ c∈C t-1 y b,c - ∑ c∈C t-1 |l=t-1 y b,c
. Rewriting such an expression we have that which is already satisfied in any solution of (OM BSR -LP ). We can conclude that Steps 1 to 5 produce a feasible solution for (OM BSR ′ -LP ) and that Constraints (4.2), (4.5) and ( 4.11) are directly satisfied.

∑ c∈Ct|f =t y b,c = ∑ c∈Ct y b,c - ∑ c∈C t-1 y b,c + ∑ c∈C t-1 |l=t-1 y b,c . Hence, the relation ∑ c∈Ct|f =t y b,c ≥ ∑ c∈Ct y b,c - ∑ c∈C t-1 y b,
Secondly, let us prove that any solution of (OM BSR ′ -LP ) can be transformed into a feasible solution of (OM BSR -LP ) as follows: Note that Constraints (4.17,4.18,4.23,4.24,4.25,4.26,4.28,4.32-4.38) The claimed result follows. □

Complexity analysis

In this section we present a complexity proof for OMBSR. We reduce the 3-Partition problem, which is a strongly NP-Complete problem, into a particular case of OMBSR.

Theorem 1 OMBSR is strongly NP-Hard.

Proof Let us consider an instance of the 3-Partition problem composed by a set A of 3m integers a 1 , . . . , a 3m and a bound B ∈ N such that B 4 < a i < B 2 , for all a i in A. Besides, let us consider that

∑ a i ∈A a i = mB.
The question is whether A can be partitioned into m triplets A 1 , . . . , A m , such that ∑ a i ∈A k a i = B for all A k , such that, if there exist m partitions A k such that for each one the sum of its elements is B, then each subset A k must contain exactly 3 elements because of B 4 < a i < B 2 . Now let us consider an OMBSR instance with a time horizon T composed by 2m time periods.

Moreover, let us consider a constant power demand W of B over the horizon and an energy price equal to 1 at the odd time periods and 0 at the even time periods, i.e., E = (1, 0, 1, 0, . . . , 1, 0). Then, let us consider that 3m batteries with different capacities such that

(B max b -B min b )/∆ ≥ D max b are installed such that B 4 < D min b ≤ D max b = a b < B 2 .
We also consider that

∑ b∈B D max b = mB.
The others instance parameters are:

• P max = 2B • P B b = B max b /∆, for all b in B • N b = 1, for all b in B
Let us consider a solution for such an instance which costs 0. In this case, the batteries are used to supply all the power consumption in the time periods that energy costs 1 and recharged when it costs 0, otherwise the total cost would be strictly greater than 0. Hence, the total energy used from the batteries over the horizon is mB. Since N b = 1, together with P max = 2B, if there exists a solution For small and simple instances with T < 4 and with a constant power demand for example, a similar proof can be obtained from a reduction of the Partition problem, which is NP-Complete. In this case, pseudo-polynomial time dynamic programming can be used to solve the problem.

Solving heuristics

In this section we present two heuristics for solving large-scale instances of the OMBSR problem.

In fact, since OMBSR is an NP-Hard problem, large-scale instances cannot be solved to optimality in polynomial time unless P is equal to N P .

Graph oriented approach

This section presents a graph-oriented temporal decomposition heuristic, refereed to as OMBSR-G-HEU, based on:

• The decomposition of each OMBSR problem into sub-problems that are individually solved to optimality;

• The selection of a subset of the solutions obtained for the sub-problems that respects the maximal number of battery uses N b , and that yields a solution to the initial OMBSR instance.

Two integral parameters γ and γ ′ (> 0) are considered in this heuristic: γ is the number of time periods in each sub-problem, and γ ′ is used to define the first time period of each sub-problem. More precisely, the heuristic is composed of four steps: and N b , we derive the formulation for each OMBSR i by considering T i and N ′ b instead. Then, an optimal solution S i for each OMBSR i is obtained by solving this formulation with a mixed-integer linear program solver.

3. Select a subset of solutions S i that gives a feasible solution for OMBSR:

(a) Construction of a solution conflict graph: A graph G = (V, E) is created, where each node v i in V represents the optimal solution S i of OMBSR i found at Step 2, with a weight ω v i equal to its value. An edge e = (v i , v j ) is added if any battery in the corresponding solution S i is used at a time period t ∈ T i ∩ T j and if any battery (not necessarily the same) is used in the solution S j at the same time period. Note that G is an interval graph. and for the following choice of parameters: γ = 48 and γ ′ = 24. Note that, the values of w of this instances is illustrated by the orange curve. The interpolation (i.e., the black curve) is shown for the sake of highlighting the periodicity of the data. A heuristic solution for this OMBSR instance is thus obtained by considering the battery usage in the solutions S 1 , S 4 and S 6 found for sub-problems OMBSR 1 , OMBSR 4 and OMBSR 6 , respectively.

Maximum weight budgeted independent set problem

The Maximum Weight Budgeted Independent Set problem (MWBIS) consists in selecting the independent set S * of a graph G = (V, E), with weights ω v , for v ∈ V and cost β v , for v ∈ V , that gives that highest total weight (i.e., ∑ v∈S * ω v ) and that respects a given budget B (i.e., ∑ v∈S * β v ≤ B). [START_REF] Kalra | Maximum weighted independent sets with a budget[END_REF] proposes an integer linear program to solve the MWBIS problem. For interval graphs, the MWBIS problem can be solved with a pseudo-polynomial time algorithm based on the Bellman's algorithm to compute the longest path of a direct acyclic graph. Indeed, an interval graph G J = (V J , E J ) can be described by the sequence J = {J 1 , . . . , J n } of its maximal cliques (see [START_REF] De Queiroz | On interval representations of graphs[END_REF] for the computation of J from G). A direct acyclic graph G ′ = (V ′ , A ′ ) can be obtained as follows:

1. For each vertex v i ∈ V J , create a corresponding one v ′ i in V ′ ;
2. For each maximal clique J i ∈ J , and for each v j ∈ J i , add an arc in A ′ from the vertex v ′ j ∈ V ′ corresponding to v j to all vertices v ′ k ∈ V ′ with weight ω v j and cost β v j such that the 4.4. SOLVING HEURISTICS corresponding vertices v k ∈ V J belongs to any sequence J k ∈ J , such that J i ≺ J k in J ;

3. Add two artificial vertices v ′ s and v ′ t in V ′ ;

4. Add an arc from v ′ s to each vertex v ′ i ∈ V ′ \ {v ′ s } with weight 0 and cost 0;

Add an arc from each vertex v

′ i ∈ V ′ \ {v ′ t , v ′ s } to v ′ t with weight ω v i and cost β v i ;
The computation of the maximal independent set of G J is equivalent to computing the longest path from s to v in G ′ . Indeed, by construction, any path in G ′ represents an independent set of G J . The computation of the longest path of a direct acyclic graph can be done in O(|V ′ | + |A ′ |) time using the Bellman's algorithm [START_REF] Dasgupta | Electricité: consommation, production, co2 et échanges[END_REF]. In the case of the MWBIS problem when a maximal budget B is given, a modification in the Bellman's algorithm can be done by storing at each vertex v ′ j ∈ V ′ the best known path from v ′ s to v ′ j with different weights up to B. Hence, such a modified version of the algorithm is pseudo polynomial, in space and in CPU time, with complexity

O(|B|(|V ′ | + |A ′ |)).
In our study, the budget B is bounded by the number of time periods T , which guarantees a polynomial complexity.

An extension of the MWBIS problem is to consider k-budgets, denoted as the Maximum Weight k-Budgeted Independent Set problem (MWkBIS). Formally, it consists in selecting the independent set S * of a graph G = (V, E), with weights ω v , for v ∈ V and k-cost K, defined as β k,v , for each v ∈ V, k ∈ K, that gives that highest total weight (i.e., ∑ v∈S * ω v ) and that respects the budgets B k for each k ∈ K (i.e., Since the number of budgets corresponds to the number of the batteries and that the values of B k are bounded by T , the algorithm is pseudo-polynomial. In this thesis, we chose to extend the formulation proposed by [START_REF] Kalra | Maximum weighted independent sets with a budget[END_REF] to consider k budgets (i.e., to consider multiple budgets N b ). Since the sites of instances considered in our work do not have a high number of batteries installed, this part of the problem can be solved efficiently with a conventional MILP solver.

We consider that the interval graph G = (V, E), the list J of maximal cliques (i.e., the intervals) of the topological increasing representation of G on the start time of the intervals, the weights ω v i and the solutions S i for all v i ∈ V are given, as well as the values of N b for all b ∈ B. Then, the following auxiliary parameters are considered:

SOLVING HEURISTICS

• β b,v i : the number of times that the battery b is used in the solution S i (i.e., the "cost" of selecting the node v i in the budget N b ).

• V j : set of nodes v i in the clique j ∈ J .

The following variables are considered:

• x v i ∈ {0, 1}: equal to 1 if the node v i is taken into the final solution, and to 0 otherwise. Finally, (MWkBIS-MILP) can be written as follows: max

∑ v i ∈V ω v i x v i s.t. ∑ v i ∈V j x v i ≤ 1 ∀j ∈ J (4.39) ∑ v i ∈V β b,v i x v i ≤ N b ∀b ∈ B (4.40) x v i ∈ {0, 1} ∀v i ∈ V (4.41)

Alternative conflict graph construction

The standard version of this heuristic considers that an edge is added between two nodes if at least one battery is used in the solution of the corresponding nodes as described at Step 3a. However, such an edge creation criteria can be modified by distinguishing which battery is used at each time period to create a conflict edge. Formally, an edge e = (v i , v j ) is added if a battery b in the corresponding solution S i is used at a time period t ∈ T i ∩ T j and if the same battery b is used in the solution S j at the same time period t. However, the computation of the Maximum Weighted Budgeted Independent Set at Step 4 can no longer be done in pseudo-polynomial time as presented in Section 4.4.1.1 because there is no guarantee that G is an interval graph anymore. will be added between solutions S1 and S2, because at time period 4, at least one battery is used in the solutions of both sub-problems (i.e., the battery 1 is recharging at time period 4 in S1 and the battery 2 is in discharge at the same time period in S2). Note that no battery is used in S3 and in S4. In fact, the energy prices are constant from time period 5 and using batteries is not profitable. Consequently, the solution of C1 is composed exclusively by S1, giving savings of 1.5e (Figure 4.3-b illustrates the power bought and the energy level of the batteries for C1). However, with the modified edge creation criteria (C2 in the example), the corresponding graph G has no edge because the batteries used in S1 and S2 are not the same one. Hence, the solution provided by OMBSR-G-HEU with C2 is composed by S1 and S2, giving savings of 2.0e (Figure 4.3-c illustrates the power bought and the energy level of the batteries for C2). Note that the optimal solution for this example is the same one as the solution obtained with C2. On the one hand, the solutions obtained with the modified edge creation criteria tends to generate more savings. On the other hand, there is no guarantee that the resulting graph G is an interval graph. is no longer an interval graph.

Relax-and-fix approach

This section presents a relax-and-fix heuristic (Suerie and Stadtler, 2003) for solving OMBSR based on:

• The partial relaxation of the binary variables of the mathematical model described in Section 4.2;

• The resolution of the resulting model in which the number of binary variables is small enough to be solved with a conventional MILP solver through a branch-and-bound method;

• The fixation of the values of a subset of variables from the optimal solution obtained in the previous step.

Such steps compose one iteration of the heuristic, which is executed several times as described in the following. The main idea is to define sets of variables, denoted as windows, that will be relaxed and fixed in each iteration.

The proposed heuristic designates the time horizon in three windows: f rozen, decision and relaxed ones. In the f rozen window, the values of the variables are fixed to the optimal values obtained in the previous iterations. In the decision one, the integrity constraints are observed. In the relaxed window the integrity constraints are relaxed. To this end, two integer parameters δ and δ ′ (0 < δ ′ ≤ δ) are considered in this heuristic: δ is the number of time periods of the decision window (i.e., for which the integrity of the binary variables is maintained), and δ ′ represents the scrolling window, in number of time periods, for which the values of the corresponding variables are fixed in each iteration.

SOLVING HEURISTICS

Let us denote as T f , T d and T r the set of time periods of the f rozen, decision and relaxed windows, respectively. Formally, for a given OMBSR instance composed of |T | time periods, and its mathematical model M, each iteration i of the heuristic is composed of four steps:

1. Definition of the sets T f , T d and T r :

T f = {1, . . . , δ ′ (i -1)} ∀i ≥ 2 or ∅ if i = 1, T d = {δ ′ (i -1) + 1, . . . , δ ′ (i -1) + δ} and T r = T \ (T f ∪ T d );
2. Relaxation of the integrality constraints in M in the relaxed window: for each t in T r (in the case of (OMBSR-MILP) all variables z b,t and b start b,t

for each b in B ∈ {0, 1});

3. Solve the model M;

4. Setting the values of a subset of variables in T d in M: For each binary variable with index t in {δ ′ (i -1) + 1, . . . , δ ′ (i -1) + δ ′ } (i.e., in the case of (OMBSR-MILP), all variables z b,t and b start b,t

for each b in B), fix the value of the variable to its optimal value obtained at Step 3.

Concerning the iterations of the heuristic, Steps 1 to 4 will be executed ⌈ T -δ δ ′ ⌉ + 1 times (i.e., for i ∈ {1, . . . , ⌈ T -δ δ ′ ⌉+1}. Note that in the first iteration the f rozen window does not exist (i.e., T f = ∅), and, in the last one, the relaxed one does not exist (i.e., T r = ∅). In the last iteration, if a feasible solution for M is found, it is also a feasible solution for the whole problem due to the fact that in each iteration Step 4 respects all the constraints of the model. One of the advantages of the proposed heuristic is that it is able to produce good upper bounds for the problem in a short running time. Note that the efficiency of this heuristic depends directly on the values of the parameters δ and δ ′ .

Numerical experiments

In order to assess the efficiency and relevance of our solving approaches for optimizing the savings that can be obtained from the demand-response mechanism, we performed some numerical experiments on realistic instances. Several sites with different consumption profiles and settings are considered, generated from internal data of the French telecommunications operator Orange. The energy costs are taken from public historic data of the French retail market.

Three solving approaches are considered. Firstly, the default branch and bound algorithm of the commercial solver CPLEX performed on the formulations (OMBSR-MILP) and (OMBSR-MILP'), that will be denoted by OMBSR-MILP and OMBSR-MILP', respectively. Secondly, the general heuristic presented in Section 4.4.1 parameterized by (γ, γ ′ ) ∈ {(48, 24), (36, 12), (24, 12)}, that will be denoted by OMBSR-G-HEU. Finally, the relax-and-fix heuristic presented in Section 4.4.2 parameterized by (δ, δ ′ ) ∈ {(48, 24), (24, 12)}, that will be denoted by OMBSR-RF-HEU. The arguments (essentially the periodical structure of energy costs and demand of our data) for choosing these parameters for the tested instances are given in Section 4.5.1.1. We observe that the recharging process of the batteries takes on average between 12 and 20 hours when they are discharged up to B min b . Hence considering δ = 48 allows explore different discharge levels in different periods of the day. The numerical experiments are organized as follows. Firstly, in Section 4.5.1, we describe the instances and the settings used in our tests. Then, in Section 4.5.2 we present the results of OMBSR instances solved using OMBSR-MILP, OMBSR-MILP', OMBSR-G-HEU and OMBSR-RF-HEU. Note that, in this section, we present and describe a synthetic table of results, grouped by the number of batteries and number of time periods. The complete numerical results are available in [START_REF] Silva | OMBSR extended results[END_REF]. In the following, we discuss the computational results and we analyse the economic impacts in Section 4.5.3.

Instances description

We based our testbed on 100 urban and rural sites from the fixed network of the French telecommunications operator Orange. The power consumption and the mean, or average value, of the power demand over the horizon, denoted by W ¯= ∑ t∈T Wt T

, is also given. Moreover, the power demand of 50 sites is faithfully generated considering the observed data without any random variation. In contrast, the power demand of 50 sites is generated with a randomness of 25% of the original observed data. Concerning the data related to the distributor, we consider the unit energy prices from the French distributor EDF, publicly available at data.gouv.fr (2020). Besides, the maximum amount of power that can be purchased per time period P max is established in a contract. In our tests, to guarantee that the value of P max is greater than the power demand W t at any time period t ∈ T , we set such a value to 3W ¯.

Moreover, we assume time horizons of length one, two or three weeks with time discretization of 60 minutes (i.e., ∆ = 1 and T ∈ {168, 336, 504}). The input values of the power demand, unit energy price, and reward over the time horizon, are taken as average observed values. Our tests were performed on 300 instances.

All tests were performed on a server computer with 4GB of RAM and 1 Intel Xeon 2.2GHz CPU.

The method used to solve the (OMBSR-MILP) and (OMBSR-MILP') formulations is the branchand-bound implemented in CPLEX 12.9, with default settings. The running time is limited to 30 minutes for each instance. We limited the running time to 30 minutes because no significant gains were observed when running some instances for 3 hours, i.e., for those instances, we observe solutions that give on average 0.114% more savings when the running time is extended. Moreover, the optimality gap decreases on average by 19% when the running time is set to 3 hours (i.e., it decreases on average from 50.84% when running time is set to 30 min to 40.53% with running time set to 3 hours).

Parameters tuning

The way the parameters values of OMBSR-HEU are set is based on the real observed data for the instances considered in our testbed. Firstly, we observed a daily periodicity in the energy prices and power demand over the time horizon. Figures 4.7 and 4.8 illustrate such a periodicity for a site over a week. We observe that the energy usually costs more in the afternoon which is also the period of the day with the highest power demand. In addition, the energy tends to cost less during the night following which is also the period where the power demand decreases. Hence, using batteries in the day and recharging them during the night appears to be the best strategy to reduce the total energy cost for the company. Secondly, by analyzing the properties of the batteries we observe that they can be used for 9 hours on average and they need about 17 hours on average to be fully recharged. Hence, a complete battery cycle takes 26 hours on average.

Finally, for the graph based heuristic we consider the parameters γ = 48 (we have that 26 < 48 < 24 + 26 = 50) and γ ′ = 24 due to the daily periodicity observed. The value of the parameter γ = 48 is chosen because a complete cycle can be done in any time period of the periodicity of 24 hours. As close γ is to 50, more flexibility on the use of the batteries is allowed. The same periodicity is observed for all sites over a week.

Numerical results

In this section we present the results concerning OMBSR instances solved with OMBSR-MILP, OMBSR-MILP', OMBSR-G-HEU and OMBSR-RF-HEU. A detailed version of the experiments is available in [START_REF] Silva | OMBSR extended results[END_REF]. The experimental analysis will be provided in the next section. with a warm-up, i.e., when the solution from OMBSR-RF-HEU is given to CPLEX as a starting solution.

In this table, each row stores the average of the results for a subset of instances, grouped by the number |B| of batteries installed in the site and by the number of weeks considered in the optimization. Column

NUMERICAL EXPERIMENTS

In this table, each row stores the average of the results for a subset of instances, grouped by the number |B| of batteries installed in the site and by the number of weeks considered in the optimization. Column W rand corresponds to the randomness variation in the power demand of instances. Column Stand.

Cost corresponds to the average of the standard cost, i.e., the cost when no battery is used, equal to

∑ t∈T E t W t .
Column W ˜reports the mean of W . Besides, the average running time, given in seconds, and the average reduction in the total energy cost, given in %, are provided in columns CPU Time and savings, respectively. In addition, column Final GAP reports the value of the average optimality gap, i.e., the relative gap between the value of the best integer solution obtained by CPLEX and the best lower bound computed. Column LR savings and GAP * at root reports the average savings achieved by the continuous relaxation, and the average optimality gap reached at the root of the branch and bound tree, respectively. Note that for some instances a feasible solution was not reached at the root of the branch and bound tree. Furthermore, columns Nb of Pairs, Nb of Var, Int Var and Nb of Const. report the mean number of pairs (f, l) in (OMBSR-MILP'), the mean number of variables, the mean percentage of integer variables and the mean number of constraints, respectively. Note that such tests were performed only for instances optimized over one week. For instances with two or three weeks the creation time takes more than 30 minutes.

Experimental analysis

In the following we analyse the results presented in the previous section.

We begin by focusing on the running time and observe a significant impact of the number of time periods and number of batteries installed on the performance of all algorithms. Indeed, we observe that the size of the problem increases as the number of batteries installed and the number of time periods increase.

Concerning OMBSR-MILP, optimal values are obtained only for 19 instances where sites have a single battery with a week time horizon, corresponding to 7.6% of all the tested instances. For all other instances, no optimality guarantee is observed within the CPU time limit. Moreover, the optimality gap observed is significant, varying from 33.8% on average for instances where the site is equipped with 2 batteries for a one-week time horizon, up to 79% on average for larger instances where the site Concerning OMBSR-G-HEU, all instances with one, two or three weeks time horizon are solved in less than 30 minutes. We also observe that the number of batteries installed and the number of time periods have an impact on the running time. Instances with 4 or 5 batteries with three-weeks time horizon require more computational effort because of the large number of sub-instances to be solved, which are also harder to solve because of the combinatorial aspect related to the use of the batteries installed. In addition, the parameters γ and γ ′ impact the running time of each sub-problem obtained and the number of sub-problems. In fact, with a small value of γ, the number of sub-problems increases but the running time required to solve each of one them decreases. Moreover, we observe that the running time grows linearly with the number of time periods and quadratically with the number of battery installed. Concerning γ ′ , the number of sub-problems to solve increases as γ ′ increases.

Concerning OMBSR-RF-HEU, 90% of all instances with one, two or three weeks time horizon tested are solved in less than 30 minutes. Only instances with three-weeks time horizon with 5 batteries could not be solved in 30 minutes. We also observe that the number of batteries installed and the number of time periods have an impact on the running time. Instances with 4 or 5 batteries and three-weeks time horizon require more computational effort because of the large number of iterations needed to be performed, as Step 2 is slower because of the combinatorial aspect related to the use of the batteries installed. In addition, the parameters δ and δ ′ impact the running time of each iteration and the number of iterations. We observe that the running time decreases as the values of δ and δ ′ decrease. In fact, with a small value of δ the number of iterations increases but the running time of each one decreases because of the small number of integer variables considered at Step 2. Moreover, the running time grows linearly with the number of time periods and quadratically with the number of batteries installed.

Finally, to confirm the relevance of the approaches proposed, we illustrate in Fig. 4.9 the profile of the best solution found by OMBSR-MILP in the case of Site 7, where 3 batteries are installed, and ). Firstly, we can observe that batteries can be used at different time periods. In this context, their first use and recharge are performed together, but, in the following, they are used independently from each other. Even during the same battery discharge, there can be different powers, such as in the second use of Battery-3. Moreover, a battery can be in discharge mode while another one is recharging (e.g., the third use of Battery-1 and Battery-3), and the impact on the maximal number of battery uses imposed (i.e., N b = 3) is observed for Battery-2, that stays a long time in rest mode for this reason. In this example, the energy bill is reduced by 2.70%, confirming the practical relevance of our approaches, and the large variety of battery uses illustrates the need for a fast decision-making tool.

We now focus on the economic aspects of the solutions, and observe a reduction in the energy bill for all solution approaches proposed, confirming that participating in the retail market can generate savings for the company. Furthermore, no substantial gain is observed by increasing the number of batteries installed in a site, since the sum of the powers of all batteries installed on the site is equivalent to W ¯, i.e., of battery uses and by the fact that the sum of the powers of all batteries installed is equivalent to the average of its power demand. Moreover, the impact of N b in the savings is observed in all solving methods. The number of times that each battery is used in any solution is exactly N b , independently of the solving method used.

Concerning the OMBSR-MILP results, the savings obtained by the best solution found are of 2.39% on average for instances with one, two or three weeks time horizon. Even for instances with 5 batteries, the savings are quite the same and the gap is the same on average, such as represented in Table 4.1.

Furthermore, we observe similar savings and final gaps on average for instances with a randomness in the power demand, for instances without randomness in the power demand and when an initial solution is given to CPLEX. However, when exploring instances having up to 24 weeks such as presented by Silva et al. (2022) for which results are available in [START_REF] Silva | OMBSR extended results[END_REF], we can observe that the savings obtained by the best solution found decrease significantly when the time horizon and the number of batteries installed increase. Such savings decrease from 2.48% to 0.26%, on average, for large instances with 24 weeks time horizon.

Concerning the OMBSR-MILP' results, the savings obtained by the best solution found are slightly smaller (2.28% on average) compared to the savings obtained by OMBSR-MILP. However, we can observe that the difference of savings obtained with OMBSR-MILP' and OMBSR-MILP grows with the number of batteries installed. In fact, there is no substantial gain, neither in CPU time nor in the savings, that justifies the use of OMBSR-MILP' instead of OMBSR-MILP.

Concerning OMBSR-G-HEU, the savings obtained are higher compared to the savings obtained with OMBSR-MILP as the number of batteries installed increases. For instances with a single battery installed (for which optimality guarantee is obtained with OMBSR-MILP), savings obtained using OMBSR-G-HEU are only 0.25% smaller on average for γ = 48 and γ ′ = 24, which seems acceptable for a heuristic that performs 120 times faster, on average, for these instances. In addition, the parameters γ and γ ′ impact the quality of the solutions obtained. We observe that large values of γ contributes to better savings, which is totally expected because, as γ becomes smaller, the algorithm starts losing opportunities of batteries usages that could give better savings. In our tests, the savings obtained with γ = 48 and γ ′ = 24 are larger (0.13% larger on average compared to γ = 36 and γ ′ = 12, and 0.45% larger on average compared to γ = 24 and γ ′ = 12), and the combination γ = 24 and γ ′ = 12 is more sensitive to variations in the power demand (we observe savings 0.12% larger with a randomness of 25%). To illustrate the impact of the parameters γ and γ ′ on the savings that can be obtained for an OMBSR instance, Figure 4.10 provides the solution for different values of those parameters. In this example, we consider a time horizon composed of 8 time periods and a constant power demand of 1kW.

In addition, only one battery is considered with D max = D min = P B = 0.5kW. In the first scenario (i.e., scenario S1 for γ = 4 and γ ′ = 4), only two sub-problems will be considered by OMBSR-G-HEU (i.e., from time periods 1 to 4 and from 5 to 8). In both sub-problems, the optimal solutions consist in not using the battery. Then, the saving obtained is 0. In the scenario 2 and 4 (i.e., scenario S2 for γ = 4 and γ ′ = 3 and scenario S4 for γ = 2 and γ ′ = 1), the sub-problems considered (i.e., from time periods 1 to 4, 4 to 7, 7 to 8 for S2 and from time periods 1 to 2, 2 to 3, 3 to 4, 4 to 5, 5 to 6, 6 to 7 and 7 to 8 for S4) allow to use the battery at time period 4 and recharge it at time period 5, giving savings of 0.5e in both cases. In the third scenario (i.e., scenario S3 for γ = 4 and γ ′ = 2), the sub-problems considered (i.e., from time periods 1 to 4, 3 to 6, 5 to 8 and 7 to 8) allow to use the battery at time periods 3 and 4 by recharging it at time periods 5 and 6, giving savings of 1e. We can observe in this example the impact of the energy prices, of the power demand and of the battery properties on the solution obtained for the values of the parameters γ and γ ′ that we consider. Indeed, for a given set of parameters γ and γ ′ , the solution obtained can be far from the optimal one in function of the energy prices, power demand and batteries properties. To illustrate that, if an instance has high power prices at the end of the time horizon of the sub-problems (i.e., scenario S2 of Figure 4.10), the gap from the solutions obtained to the optimal one depends mainly on the energy prices, and hence we can have potentially low savings. For this example, the gap from the optimal solution is (E 4 -E 5 )P B e, which 4.6. CONCLUSION corresponds to (1 -

(E 4 -E 5 )P B (E 3 +E 4 -E 5 -E 6 )P B )%.
Concerning OMBSR-RF-HEU, the savings obtained are higher compared to the savings obtained with OMBSR-MILP as the number of batteries installed increases. Moreover, for instances with a single battery installed (for which optimality guarantee is obtained with OMBSR-MILP), savings obtained using OMBSR-RF-HEU are only 0.31% smaller on average, which seems acceptable for a heuristic that performs 80 times faster, on average, for these instances. In addition, the parameters δ and δ ′ impact the quality of the solutions obtained. We observe that large values of δ contributes to better savings, which is totally expected. Comparing the results obtained with OMBSR-G-HEU and OMBSR-RF-HEU, we can observe that OMBSR-G-HEU gives better solutions (i.e., savings 0.15% larger on average) for the instances tested.

Moreover, we can observe that, even if both heuristics yield good savings, OMBSR-G-HEU performed 3 times faster on average than OMBSR-RF-HEU for the instances tested.

Conclusion

This chapter addresses the impact of managing multiple batteries. In particular, we have considered the OMBSR problem that consists in optimizing the management of a multi-battery energy storage system in order to reduce the total energy costs, by participating in the demand response mechanism performing exclusively peak-shavings. We proposed two mixed-integer linear programs, and any of their optimal solutions provides a strategy for using the batteries so as to reduce as much as possible the total energy cost. We have shown that the OMBSR problem is NP-Hard, and two heuristics are proposed to solve large-scale instances. Moreover, we have used these approaches to solve OMBSR on realistic instances.

As a result, we firstly observe that using batteries installed for backup to perform peak-shavings can generate savings. Concerning the solving approaches, we observe in particular that both mathematical models could achieve an optimality guarantee only for a small part of the instances within the time limit. However, even for instances without such an optimality guarantee, the best solution obtained already generates savings. The number of times that each battery can be used seems to be the parameter that has the greatest impact on those savings. Indeed, the number of times that each battery b is used in any solution is exactly N b , independently of the solving method used. In contrast, no substantial gain was observed by increasing the number of batteries available (since the sum of Chapter 5

Optimization of a multi-battery storage system to participate in the energy markets

In this chapter, we consider the complete problem of this thesis which is optimizing total energy costs of telecommunications sites using batteries installed for backup to participate in the energy market using proper battery management. We extend the problem defined in Chapter 3 to a multi site setting where the batteries are allowed to perform peak-shavings as well as load curtailments.

However, contrary to the problem treated in Chapter 4, each site is equipped with a single battery, which is the case of the French telecommunications operator Orange.

Formally, the problem treated in this chapter is the Optimization of a Multi-Battery Storage system in order to participate in the Energy market (referred to as OMBSE), in order to reduce the total energy cost for the company. The main issue is to respect the market rules and the safety usage rules while minimizing the net total energy cost by performing peak-shavings and load curtailments.

Concerning the scientific contributions, we formally define the problem and we present two mathematical programming models for OMBSE in Section 5.2. We also proof in Section 5.3 that the OMBSE problem is strongly NP-Hard, via a reduction from the 3-Partition problem. In the following, we propose two solving heuristics for the problem: firstly we present in Section 5.4 a bidimensional relax-and-fix based on the solving approach presented in Section 4.4, and then, in Section 5.5, a decomposition solving method based on a Lagrangian relaxation and on the subgradient method that integrates the approach proposed in Chapter 3. We also performed numerical experiments with real-5.1. PROBLEM STATEMENT

Problem statement

We consider a deterministic framework, extending to the one considered in Chapter 3 to a multi site setting composed by a set of telecommunication sites S, each equipped with a single battery. Each site s in S has a power demand W s,t , given in kW, for each time period t ∈ T , and the limit of power

P max s
, given in kW, that can be bought at any time period. The power cost E t is the same for all sites at each time period t ∈ T .

Concerning the battery assets, each site is equipped with a single battery. Since each site is equipped with only one battery, we denote by b s the battery installed at site s. Indeed, each battery b s of each site s ∈ S is defined by the parameters B min bs , B max bs , P B bs , D min bs andD max bs as described in Chapter 3, and by N bs as described in Chapter 4, and is subject to the same usage rules R1-R6, defined in Section 1.3.

Concerning the energy market, the same rules R7-R9 apply. In addition to these rules, the number of curtailments that can be performed over the horizon is limited by a given number N c imposed by the transmission system operator (RTE-Portal) (i.e., rule R10).

Since batteries from multiple sites will be used to perform the same load curtailment, the customer must reduce the total power bought from the distributor by P T O over all sites together (i.e., the maximum amount of power p max c can be purchased from the distributor considering all sites together at each time period during a load curtailment c). Hence, the value of ω c for a curtailment c, which starts at the time period f c and ends at the time period l c , is thus computed as follows:

ω c = ∑ s∈S ( ∑ lc t=fc W s,t + u s,fc-1 ) l c -f c + 2 (5.1)
Note that Equation (5.1) is valid for all sites, including the ones for which the battery installed is not used during a load curtailment (i.e., even if the battery of a site is recharging, the power bought by the corresponding site will be considered in the computation of ω c ). The computation of p max c is the same one as in Equation (3.2).

Recall that our goal is to use the batteries while respecting the electricity markets rules and keeping the network safe (i.e., respecting the battery safety usage rules), at minimal cost. As described in Chapter 3, the total amount of energy savings consists of two parts. The first part is provided by

MATHEMATICAL FORMULATION

the difference between the energy prices during a battery use and its recharge, and the second one by the reward paid the minimal reduction P T O during each load curtailment. Note that, differently from Chapter 3, the reward paid by the transmission system operator is not related to the total load reduction, but only to the power contractualized. The customer can reduce more than P T O if the difference of energy prices between the duration the curtailment and the recharge of the battery is profitable. The reward policy considered to compute this second part is the First Time Reward (FTR), which is the reward policy in the French context.

The problem stated above is referred to as OMBSE in the following, and any of its instances is fully described by the following parameters (some of which are vectors or sets): W , ∆, E, P max , S,

B min , B max , P B , D min , D max , N , ∆ min , ∆ max , P T O , R, N c
and the reward policy (represented by a boolean value). The same safety usage rules R1-R6 and energy market rules R7-R10, as the ones defined in Section 1.3, are taken into account.

Mathematical formulation

Mixed-integer nonlinear program

The formulation that models OMBSE described in this section is a mixed-integer nonlinear program that will be referred to as (OMBSE-MINLP). Similarly to (OBSC-MINLP), we will consider the same set C and we are looking for a set of curtailments (f c , l c , d c ) that can be performed without conflict, while minimizing the total energy cost. Hence, the same family of variables x, y, p max , u D and u B used in the model (OBSC-MILP) presented in Section 3.2.1 is considered. In addition, since the batteries can also be used to reduce the total energy cost by performing peak-shavings when they are not being used to perform load curtailments, the same families of variables z and b start used in the model (OMBSR-MILP') presented in Section 4.2.2 to compute the number of times that each battery is used are necessary.

Decision Variables

Firstly, a solution is determined by the values of the following variables:

-x bs,t ∈ [B min bs , B max bs ], ∀s ∈ S, ∀t ∈ T : amount of energy, in kWh, available in the battery b s of each site s at the beginning of each time period t. An additional variable x bs,t+1 represents the 5.2. MATHEMATICAL FORMULATION energy stock at the end of the planning horizon.

The following binary variables are used to control which curtailments are performed as described in Chapter 3:

-y c ∈ {0, 1}, ∀c ∈ C: equal to 1 if a curtailment c starting at time period f c and ending at time period l c is performed, and to 0 otherwise.

-p max c ≥ 0, ∀c ∈ C: maximum amount of power (in kW) that can be bought at each time period t ∈ {f c , . . . , l c }, if a curtailment c starting at time period f c and ending at time period l c is performed.

Note that variables z are related to peak-shavings, and variables y to the curtailments. Hence, the batteries can be used when no curtailments are performed (i.e., the case where the values of variables y are equal to 0 and the values of variables z for some batteries are set to 1). In the same vein, if a curtailment is performed (i.e., the value of some variable y is equal to 1), a subset of batteries must be in discharge mode (i.e., the values of variables z are equal to 1).

The following additional variables are used to control the state of each battery b s :

-z bs,t ∈ {0, 1}, ∀s ∈ S, ∀t ∈ T : equal to 1 if the battery installed at site s is in discharge mode at time period t, and to 0 otherwise; -b start bs,t ∈ {0, 1}, ∀s ∈ S, ∀t ∈ T : equal to 1 if the battery installed at site s starts being discharged at time period t, and to 0 otherwise.

Note that variables z and b start are necessary to compute how many times each battery is used, as in Chapter 4, because the batteries can also be used to perform peak-shavings.

To model the power bought at each time period t, the following variables are used:

-u D s,t ∈ [0, W s,t ]
, ∀s ∈ S, t ∈ T : power bought for the demand consumption of the site s at time period t (in kW); -u B bs,t ∈ [0, P B bs ], ∀s ∈ S, t ∈ T : power bought for the recharge of the battery installed at site s at time period t (in kW).

MATHEMATICAL FORMULATION

Note that, the total power load reduction d c after the curtailment c has been performed is given by the sum of the difference of p max c and the power bought at each site s at time t (i.e., u B bs,t + u D s,t ) for each t between the beginning of period f c and the end of period l c .

The objective function is defined as follows:

min ∑ t∈T E t ∑ s∈S (u B bs,t + u D s,t ) - ∑ c∈C y c R fc P T O (l c -f c + 1) (5.2)
The objective function is composed of two parts: the first one corresponds to the total energy cost spent on purchasing energy, and the second one to the reward received for each curtailment performed.

A solution is given by the energy stock of the batteries at each time period (the values of the x bs,t variables) and by the curtailments performed (the values of the y c variables).

The following constraints define the state of each battery at each time period t:

x bs,t -x bs,t+1 ≤ ∆D max bs z bs,t ∀s ∈ S, ∀t ∈ T (5.3)

-x bs,t + x bs,t+1 ≤ ∆P B bs (1 -z bs,t ) -∆D min bs z bs,t ∀s ∈ S, ∀t ∈ T (5.4)
Constraints (5.3) guarantee that, if the energy stock of a battery decreases, then the battery is in discharge mode, i.e., z bs,t = 1. Constraints (5.4) ensure that, if the energy stock of a battery increases, then this battery cannot be in discharge mode, i.e., z bs,t = 0. Moreover, Constraints (5.3) guarantee a maximum power discharge per time period of D max bs when the battery is in discharge mode.

In the same vein, Constraints (5.5) and (5.6) x bs,t+1 -x bs,t = ∆u B bs,t + ∆u D s,t -∆W s,t ∀s ∈ S, ∀t ∈ T (5.9)

W s,t (1 -z bs,t ) ≤ u D s,t
∀s ∈ S, ∀t ∈ T (5.10)

The power bought for charging each battery is min(P B bs , P max s -W s,t ) when it is possible to buy energy (i.e., if z bs,t = 0), if the capacity of the battery is not exceeded (see Constraints (5.8)). Note that several batteries can be used at the same time: some of them can be in discharge mode and others recharging. Since no losses are considered, the energy stock balance of each battery is ensured by Constraints (5.9). Moreover, Constraints (5.9) impose a maximum power discharge rate of the battery at the same time period equal to the power demand W s,t and Constraints (5.10) guarantee that if the battery is not used (i.e. z bs,t = 0), the power bought for consumption is equal to the power demand W s,t . In addition, together with Constraints (5.3) and ( 5.4), Constraints (5.8) and ( 5.9) ensure that the battery can have the same energy stock during two consecutive time periods only if the battery is fully charged, otherwise a minimal discharge of D min bs (if z bs,t = 1) or a recharge of u B bs,t

(if z bs,t = 0) is imposed. If a curtailment c = (f c , l c
) is being performed at a time period t, Constraints (5.11) guarantee that the total power bought from the market respects the limit p max c imposed on such a curtailment in each time period between f c and l c . The value of p max c is provided by Constraints (5.12). Constraints (5.13) guarantee that at most one curtailment is performed at each time period.

∑ s∈S (u D s,t + u B bs,t ) ≤ ∑ s∈S P max s (1 - ∑ c∈Ct y c ) + ∑ c∈Ct y c p max c ∀t ∈ T (5.11) p max c = max(0, ∑ s∈S ( ∑ lc t ′ =fc-1 W s,t ′ + x bs,fc /∆ -x bs,fc-1 /∆) l c -f c + 2 -P T O ) ∀c ∈ C (5.12) ∑ c∈Ct y c ≤ 1 ∀t ∈ T (5.13)
The network capacity is modeled by Constraints (5.14).

u B bs,t + u D s,t ≤ P max s ∀s ∈ S, ∀t ∈ T (5.14)

MATHEMATICAL FORMULATION

Furthermore, Constraints (5.15) guarantee that the battery of each site s will be used at most N bs times over the time horizon, while Constraint (5.16) limits the maximum number of curtailments that can be performed. In addition, Constraints (5.17) express the limit conditions. x bs,t 1 = x bs,t T +1 = B max bs ∀s ∈ S (5.17)

Finally, the domains of the variables are:

y c ∈ {0, 1}, p max c ∈ R + ∀c ∈ C (5.18) u D s,t ∈ [0, W s,t ], u B bs,t ∈ [0, P B bs ], x bs,t ∈ [B min bs , B max bs ], z bs,t ∈ {0, 1}, b start bs,t ∈ {0, 1} ∀s ∈ S, ∀t ∈ T (5.19)
The obtained model ( 5.2)-( 5.19) is non-linear. However, it can be linearized following the approach proposed by [START_REF] Mccormick | Computability of global solutions to factorable nonconvex programs: Part i-convex underestimating problems[END_REF]. The resulting linear model (referred to as (OMBSE-MILP))

is provided in Section 5.2.2.

Linearization of the mathematical model

The first non-linearity treated is between a binary and a float variable, linearized using McCormick strategy as described in Section 3.2.1.3. In the model (5.2)- (5.19), they correspond to the products

x bs,t y c and x bs,t z bs,t (with x bs,t ∈ [0, B max bs ]) in (5.8) and (5.11), respectively. We need to introduce two new families of variables: lin xy c bs,t for all c in C, s in S, t in {f c -1, f c } to linearize (5.11), and lin zx bs,t for all s in S and t in T to linearize (5.8). Note that the non-linearity corresponding to the product between the variables x and y cannot be rewritten as we did in Chapter 3 because the batteries can be used for peak-shavings. Indeed, the family of variables lin xy c bs,t is necessary.

The second non-linearity treated is the expression x = min(a, b) for a, b ∈ [M ′ , M ], such as described in Section 3.2.1.3, and present in (5.8) and (5.12). Hence, we introduce two new families of variables: lin sideU B bs,t for all s in S, t in T to linearize (5.8), and lin sidepcmax c for all c in C to linearize (5.12). In the case of (5.8), we have u B bs,t = (1 -z bs,t ) min(a, b), where a = B max bs /∆ -x bs,t /∆ and b = min(P B bs , P max s -W s,t ). In order to linearize this expression, we have to multiply all the terms a and b in (3.26) and (3.28) by 1 -z bs,t as we have done in Section 3.2.1.3.

MATHEMATICAL FORMULATION

In the case of (5.11), we can integrate the variable y c of the multiplication y c p max c into (5.12) by rewriting p max c as max(0,

∑ s∈S (yc ∑ lc t ′ =fc-1 W s,t ′ +ycx bs,fc /∆-ycx bs,fc-1 /∆) lc-fc+2
-y c P T O ). Hence, we have that Finally, the complete linear version of OMBSE-MINLP (referred to (OM BSE -M ILP )) can be rewritten as follows:

p max c = max(a, b), where a = 0, b = ∑ s∈S (yc ∑ lc t ′ =fc-1 W s,t ′ +ycx bs,fc /∆-ycx bs,fc-1 /∆) lc-fc+2
min ∑ t∈T E t ∑ s∈S (u B bs,t + u D s,t ) - ∑ c∈C y c R fc P T O (l c -f c + 1)
x bs,t -x bs,t+1 ≤ ∆D max bs z bs,t ∀s ∈ S, ∀t ∈ T (5.20)

-x bs,t + x bs,t+1 ≤ ∆P B bs (1 -z bs,t ) -∆D min bs z bs,t ∀s ∈ S, ∀t ∈ T (5.21) b start bs,t ≥ z bs,t -z bs,t-1 ∀s ∈ S, ∀t ∈ T \{1} (5.22) b start bs,t 1 = z bs,
-W s,t ) -(B max bs /∆ -x bs,t /∆) ≤ M (1 -lin sideU B bs,t ) ∀s ∈ S, ∀t ∈ T (5.30) x bs,t+1 -x bs,t = ∆u B bs,t + ∆u D s,t -∆W s,t ∀s ∈ S, ∀t ∈ T (5.31) W s,t (1 -z bs,t ) ≤ u D s,t ∀s ∈ S, ∀t ∈ T (5.32) ∑ s∈S (u D s,t + u B bs,t ) ≤ ∑ s∈S P max s (1 - ∑ c∈Ct y c ) + ∑ c∈Ct p max c ∀t ∈ T (5.33) p max c ≥ 0 ∀c ∈ C (5.34) p max c ≥ ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 -y c P T O ∀c ∈ C (5.35) 5.2. MATHEMATICAL FORMULATION - ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 + y c P T O ≤ (M -M ′ )lin sidepcmax c ∀c ∈ C (5.36) ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 -y c P T O ≤ (M -M ′ )(1 -lin sidepcmax c ) ∀c ∈ C (5.37) p max c ≤ (M -M ′ )(1 -lin sidepcmax c ) ∀c ∈ C (5.38) p max c ≤ ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 -y c P T O + (M -M ′ )lin sidepcmax c ∀c ∈ C (5.39) ∑ c∈Ct y c ≤ 1 ∀t ∈ T (5.40) u B bs,t + u D s,t ≤ P max
lin xy c bs,t ≤ x bs,t ∀c ∈ C, ∀s ∈ S, ∀t ∈ {f c -1, f c } (5.46) lin xy c bs,t ≥ 0 ∀c ∈ C, ∀s ∈ S, ∀t ∈ {f c -1, f c } (5.
y c ∈ {0, 1}, p max c ∈ R + ∀c ∈ C (5.53) u D s,t ∈ [0, W s,t ], u B bs,t ∈ [0, P B bs ], x bs,t ∈ [B min bs , B max bs ], z bs,t ∈ {0, 1}, b start bs,t ∈ {0, 1} (5

Complexity analysis

In this section we present a complexity proof for OMBSE. We reduce the 3-Partition problem, which is a strongly NP-Complete problem, into a particular case of OMBSE.

Theorem 2 OMBSE is strongly NP-Hard even with constant energy prices and power demand.

Proof Let us consider an instance of the 3-Partition problem composed by a set A of 3m integers a 1 , . . . , a 3m and a bound B ∈ N such that B 4 < a i < B 2 , for all a i in A. Besides, let us consider that

∑ a i ∈A a i = mB. The question is whether A can be partitioned into m triplets A 1 , . . . , A m , such that ∑ a i ∈A k a i = B for all A k .
Note that, if there exist m partitions A k such that for each one the sum of its elements is B, then each subset A k must contain exactly 3 elements because of

• P max s = 2B for each s ∈ S • P B bs = B max bs /∆, for all s in S • N bs = 1, for all s in S • N c = m • ∆ min = ∆ max = 1 • R = {E c , 0, 0, 0, 0, 0} |m| • P T O = B

BIDIMENSIONAL RELAX-AND-FIX HEURISTIC

Let us consider a solution for such an instance which costs

∑ s∈S,t∈T E t W s,t -mP T O E c .
In this case, since the energy prices E t are constant, the batteries are used to perform m curtailments starting at time periods where the reward prices are equal to E c , otherwise the total cost would be strictly greater than , each battery can be in discharge for at most one time period with a power discharge rate of D max bs . Furthermore, if m curtailments are performed, at least mB are discharged from the batteries. Note that, since

∑ s∈S D max bs = mB,
exactly 3 batteries are used to perform each curtailment, otherwise at least one curtailment would not be performed. In the same vein, if a battery starts being discharged before the curtailment to increase the value of p max c , at least 4 batteries would be needed to perform the curtailment. Hence, at most m-1 curtailment could be performed. Then, if there exists a solution with cost ∑ s∈S,t∈T E t W s,t -mP T O E c , m curtailments are performed for which exactly three batteries are used to perform each one.

Hence, the set of batteries used to perform each curtailment gives us a solution to an instance of the 3-Partition problem (where each integer a bs is equal to D max bs ). Similarly, from a 3-Partition problem solution, a solution of cost ∑ s∈S,t∈T E t W s,t -mP T O E c for the associated OMBSE instance can be constructed using each battery once to perform curtailments starting at the time periods where the reward price is equal to E c . Then, OMBSE is by reduction a strongly NP-Hard problem.

The OMBSE problem remains weakly NP-Hard even for small instances when T ≤ 4, by a similar reduction from the Partition Problem which is weakly NP-Complete. □

Bidimensional relax-and-fix heuristic

In this section we present a bidimensional relax-and-fix heuristic for OMBSE, for which a model M is considered, obtained by relaxing the integrity constraints on a subset of variables of the model.

Let us define the four windows considered in the approach that group the variables of M:

• Frozen window: variables that have their values fixed;

• Decision window: variables for which all constraints are preserved;

• Relaxed window: variables for which all constraints are relaxed.

In addition, we consider:

BIDIMENSIONAL RELAX-AND-FIX HEURISTIC

• Fixing window: variables that have their values fixed at the end of each iteration;

Firstly, as proposed in Chapter 4, we apply a decomposition based on the time horizon. We consider a decision window composed by δ time time periods and a fixing window of δ ′ time time periods. Secondly, to improve the computational efficiency of the approach, we also propose a decomposition based on the number of sites. Indeed, the windows will be defined not only by the parameters δ time and δ ′ time , but also by δ site and δ ′ site , defined as the following:

• δ time : number of time periods of the decision window;

• δ ′ time : number of time periods of each iteration;

• δ site : number of sites of the decision window;

• δ ′ site : number of sites of the decision window for which variables will be fixed at each iteration.

The time periods (resp. the sites) are partitioned into the subsets

T f , T d , T d ¯, T r (resp. S f , S d , S d ¯, S r )
representing the variables in the frozen, decision, fixing and relaxed windows, respectively.

BIDIMENSIONAL RELAX-AND-FIX HEURISTIC

The complete bidimensional relax-and-fix heuristic used in our tests is formally described as follows: Note that the number of iterations of the heuristic is Proof To ensure that we always return a feasible solution for the problem, two main aspects must be analyzed: the feasibility of the curtailments that can be performed (i.e.,if Constraints (5.11)-( 5.13), (5.16), and (5.18) are respected) and the feasibility of each battery management until the end of the Concerning the battery management, the only case where no feasible solution could be reached is when the battery cannot be fully recharged until the end of the time horizon considering its initial state at the beginning of the decision window of the last iteration. Indeed, if the number of time periods in the decision window (i.e. the value of δ time ) is large enough to fully recharge the battery until the time period T , there is always a solution that consists only of fully recharging the battery.

for t start from 1 to T -δ time with step δ ′ time do • T f ← {1, . . . , t start -1} • T d ← {t start , . . . , t start + δ time } • T d ¯← {t start , . . . , t start + δ ′ time } • T r ← {t start + 1, . . . , T } for s start from 1 to S -δ site with step δ ′ site do • S f ← {1, . . . , s start -1} • S d ←
|T |-(δ time -δ ′ time ) δ ′ time |S|-(δ site -δ ′ site ) δ ′ site .
Formally, δ time must be larger than max(⌈ B max bs /∆-B min bs /∆ min(P B bs ,P max s -max(W )) ⌉), ∀s ∈ S (if it is the case, the battery can always be fully charged until the time period t T ).

Concerning the curtailments (i.e., variables y and p max c ), their values are fixed only for curtailments that end at the end of the time horizon T d ¯. Since the variables corresponding to the batteries management of all sites are already fixed (i.e., variables x, z, u D , u B and b start ), the values of variables y are fixed respecting Constraints (5.11)-(5.13), (5.16), and (5.18).

Finally, we have that a feasible solution that respects the battery management (i.e., related to Constraints (5.3)-(5.10), (5.14)-(5.15), (5.17), and (5.19)) and the curtailments performed (i.e., related 5.5. LAGRANGIAN RELAXATION BASED SOLVING METHOD to Constraints (5.11)-(5.13), (5.16), and (5.18)) is always reached, the heuristic always returns a feasible solution for the model (5.3)-(5.19). □

The definition of δ time greater or equal to max(⌈ B max bs /∆-B min bs /∆ min(P B bs ,P max s -max(W )) ⌉), ∀s ∈ S is considered in the numerical experiments presented in Section 5.6.

Lagrangian relaxation based solving method

Decomposition-based computational methods have been widely used to solve many large-scale optimization problems, including mixed-integer linear programming problems and combinatorial optimization problems. The key idea is usually to relax certain constraints (refereed to as hard constraints) to make the relaxed problems relatively easier to solve in order to obtain approximations or bounds for the original problem.

Lagrangian relaxation

A commonly used method is the Lagrangian relaxation where easy sub-problems are solved several times, and a penalty related to the relaxed constraints is considered in the objective function of each sub-problem. Such penalties are known as Lagrangian multipliers and are updated at each iteration.

Let us consider the following optimization problem:

Z * = min c ⊤ x (5.58) s.t. Ax ≤ b (5.59)
Dx ≤ e (5.60)

x ∈ N 0 (5.61) where Constraints (5.59) make the problem harder to solve (i.e., the problem (5.58) subject to Constraints (5.60) and ( 5.61) can be solved in polynomial time). Let us also denote by λ ≥ 0 the Lagrangian multipliers (also refereed to as dual variables) associated with Constraints (5.59). By relaxing Constraints (5.59), the obtained Lagrangian problem is the following: for a solution x, then we have that x is an optimal solution for the problem (5.62)- (5.64). The key aspect of the algorithm is to find good upper and lower bounds. Such a relaxation can be used in a model that is linear or not. In our case, we consider the model (OM BSE -M ILP ). One algorithm that is commonly used is the Subgradient Algorithm, which is explained in next section.

Mathematical model decomposition

In the case of (OM BSE -M IN LP ), Constraints (5.11) and ( 5.12) will be relaxed. In addition, we can rewrite Constraints (5.12) and (5.11) as a single constraint and relax the formulation with only one set of Lagrangian multipliers: λ 1 t ≥ 0 for all t ∈ T . Hence, the nonlinear version of the Lagrangian optimization problem (refereed to as (OM BSE N L )) can be written as follows:

∑ lc t ′ =fc-1 W s,t ′ + x bs,fc /∆ -x bs,fc-1 /∆) l c -f c + 2 -P T O ) ] s.t.
Constraints (5.3-5.10), (5.13-5.19)

λ 1 t ≥ 0 ∀t ∈ T (5.65)
Note that such a relaxation can also be applied to (OM BSE -M ILP ) in Constraints (5.33-5.39) and (5.44-5.47), which is the model considered in our tests. In this case, the Lagrangian multipliers are following ones:

• λ 1,1 t for each t in T for Constraints (5.33);

• λ 1,2 c for each c in C for Constraints (5.35);

• λ 1,3 c for each c in C for Constraints (5.36);

• λ 1,4 c for each c in C for Constraints (5.37);

• λ 1,5 c for each c in C for Constraints (5.38);

• λ 1,6 c for each c in C for Constraints (5.39);

• λ 1,7 c,s,t for each c in C, s in S and t in {f c -1, f c } for Constraints (5.44);

• λ 1,8 c,s,t for each c in C, s in S and t in {f c -1, f c } for Constraints (5.45);

• λ Constraints (5.20-5.32), (5.40-5.43), (5.48-5.57) (5.69) In this thesis, we chose the linear Lagrangian decomposition (OM BSR L ) because the sub-problems obtained can be solved efficiently by reusing the approaches proposed in Chapter 3.

/∆) l c -f c + 2 -y c P T O ) + ∑ c∈C λ 1,3 c (- ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 + y c P T O -(M -M ′ )lin sidepcmax c ) + ∑ c∈C λ 1,4 c ( ∑ s∈S (y c ∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1 /∆) l c -f c + 2 -y c P T O -(M -M ′ )(1 -lin sidepcmax c )) + ∑ c∈C λ 1,5 c (p max c -(M -M ′ )(1 -lin sidepcmax c )) + ∑ c∈C λ 1,
λ 1,1 t ≥ 0 ∀t ∈ T (5.67) λ 1,2 c ≥ 0, λ 1,3 c ≥ 0, λ 1,4 c ≥ 0, λ 1,5 c ≥ 0, λ 1,6 c ≥ 0 ∀c ∈ C (5.68) λ 1,7 c,s,t ≥ 0, λ 1,8 c,s,t ≥ 0, λ 1,9 c,s,t ≥ 0 ∀c ∈ C, ∀s ∈ S, ∀t ∈ {f c -1, f c }

The subgradient optimization

The subgradient method is an algorithm for minimizing a non-differentiable convex function, and is very similar to the regular gradient method for differentiable functions [START_REF] Shor | Minimization methods for non-differentiable functions[END_REF]. The subgradient method is much slower than Newton's method, but it is much simpler and can be applied to a much larger variety of problems.

By combining the subgradient method with primal or dual decomposition techniques, it is sometimes possible to develop a simple algorithm for a problem. Such a use is well explored by [START_REF] Bertsekas | Preconditioned conjugate gradient method[END_REF], which is a good reference on the subgradient method combined with primal or dual decomposition.

More precisely, when updating the values of λ, the goal is to maximize the lower bound (i.e., the value of Z LB ). Hence, we are solving the following problem:

max λ>0 Z D (λ)
We use a subgradient optimization method relying on the following scheme:

λ k+1 = max{λ k + t k (Ax k -b), 0}
where t k > 0 is a step size. The most popular choice of the step size t k is:

t k = θ k (Z U B -Z D (λ k )) ||Ax k -b|| 2
where Z U B is the best upper bound known and θ k ∈ (0, 2[ [START_REF] Boyd | Subgradient methods[END_REF]. The value of θ k can be fixed for all iterations or it can vary in each iteration depending on the progress of the algorithm.

LAGRANGIAN RELAXATION BASED SOLVING METHOD

The general scheme of the subgradient algorithm is as follows:

• Initialization // initial structures, Lagrangian multipliers, step-size, θ, . . . In order to compute the lower bound at each iteration of the subgradient method, the relaxed problem (OM BSE L ) has to be solved to optimality. Fortunately, such a Lagrangian relaxation of the formulation has a particular structure that allows us to solve it optimally in O(T 2 ) time.

LAGRANGIAN RELAXATION BASED SOLVING METHOD

Firstly, let us rewrite the objective function (5.66) by isolating each family of variables as follows:

min ∑ t∈T (E t + λ 1,1 t ) ∑ t∈T (u B bs,t + u D s,t ) (5.70a) + ∑ c∈C y c ( -R fc P T O (l c -f c + 1) + lc ∑ t=fc λ 1,1 t ∑ s∈S P max s + P T O (-λ 1,2 c + λ 1,3 c -λ 1,4 c + λ 1,6 c ) + ∑ s∈S,t∈{fc-1,fc} B max bs /∆(-λ 1,7 c,s,t + λ 1,8 c,s,t ) + ((λ 1,2 c -λ 1,3 c + λ 1,4 c -λ 1,6 c ) ∑ s∈S lc ∑ t=fc-1 W s,t l c -f c + 2 ) )
(5.70b)

+ ∑ c∈C p max c ( - lc ∑ t=fc λ 1,1 t -λ 1,2 c + λ 1,5 c + λ 1,6 c )
(5.70c)

+ ∑ c∈C ∑ s∈S lin xy c bs,fc /∆ ( λ 1,2 c -λ 1,3 c + λ 1,4 c -λ 1,6 c l c -f c + 2 + λ 1,7 c,s,fc -λ 1,8 c,s,fc + λ 1,9 c,s,fc
)

(5.70d)

+ ∑ c∈C ∑ s∈S lin xy c bs,fc-1 /∆ ( -λ 1,2 c + λ 1,3 c -λ 1,4 c + λ 1,6 c l c -f c + 2 + λ 1,7 c,s,fc-1 -λ 1,8 c,s,fc-1 + λ 1,9 c,s,fc-1
)

(5.70e)

+ ∑ c∈C ∑ s∈S lin xy c bs,fc+1 /∆ ( λ 1,7 c,s,fc+1 -λ 1,8 c,s,fc+1 + λ 1,9 c,s,fc+1
)

(5.70f) (5.70h)

+ ∑ c∈C lin sidepcmax c (M -M ′ )(-λ 1,3 c + λ 1,4 c + λ 1,5 c -λ 1,
- ∑ t∈T ,s∈S λ 1,1 t P max s + ∑ c∈C (M -M ′ )(-λ 1,4 c -λ 1,5 c ) - ∑ c∈C,s∈S,t∈{fc-1,fc} λ 1,8 c,s,t B max bs /∆ (5.70i)
Looking closely at this objective function, we can observe clearly that the whole problem can be solved decomposed. Formally, we can split the whole problem into five sub-problems:

1. Sub-problem 1: min (5.70a) + (5.70h)

s.t.
Constraints (5.20 -5.32), (5.41 -5.42), (5.48 -5.52), and (5.55) This sub-problem, concerning the variables x bs,t , u B bs,t , u D s,t , z bs,t , b start bs,t , lin xz bs,t , and lin sideU B bs,t for each t ∈ T , s ∈ S, and x bs,T +1 for each s ∈ S, corresponds to solving the peak-shaving problem (i.e., formally the DSM problem) for each site s ∈ S with the energy prices equal to E t + λ 1,1 t 5.5. LAGRANGIAN RELAXATION BASED SOLVING METHOD (i.e., (5.70a)) and with an additional penalty in the energy stock of the batteries (5.70h). In fact, such a sub-problem for each site s considering a single battery can be solved with the algorithm presented in Chapter 3 with some adaptations.

Essentially, for each site s, the algorithm must be initialized with the following parameters:

• R t = [0 |T | ] • ∆ min = 1 • ∆ max = ⌊ B max
bs /∆ D min bs ⌋ (or large enough)

• P T O = 0 • ω c = P max s • E t = E t + λ 1,1 t • Number of rest time periods=0
and the following modifications in GOA are needed:

• since the battery discharges at each time period during each curtailment c = (f c , l c , d c ) enumerated are known, the penalty from (5.70h) must be considered at each time period t during the curtailment to compute the gain.

• for each arc a linking two curtailments c 1 = (f c 1 , l c 1 , d c 1 ), and c 2 = (f c 2 , l c 2 , d c 2 ), the penalty from (5.70h) must be considered for each time period t ∈ {l c 1 + 1, . . . , f c 2 -1} considering that the battery will stay fully charged in this interval The complexity of the algorithm proposed is O(T 6 ). Since each site s can be treated separately and since there is no correlation between the curtailments enumerated (i.e., ω c = P max s ), a parallelization is allowed. (c) compute the MWBIS with for which the budget is number of nodes with the remaining curtailments considering -g(c).

•
(d) the optimal value of this sub-problem is the one given by the algorithm multiplied by -1.

(e) the value of each variable y c is equal to 1 if the corresponding curtailment is selected by (MWBIS), and to 0 otherwise. • For each c ∈ C, set lin sidepcmax c = 1 if the coefficient of the variable in (5.70g) is negative, and lin sidepcmax c = 0 otherwise.

Note that Equation (5.70i) is constant and can be computed independently.

Lagrangian heuristic

In order to compute a feasible solution for the problem at each iteration of the subgradient method, which also gives an upper bound for the value of the optimal solution, a Lagrangian heuristic is used.

Firstly, the relaxed solution obtained by solving the sub-problems satisfies all the Constraints (5.20-5.33), (5.41), (5.42) The second step consists in computing the values of variables y, for which Constraints (5.34-5.40), (5.43)-(5.47), (5.53),(5.56), and (5.57) are relaxed, implying that the solution obtained by solving the sub-problems may not satisfy the original constraints. Hence, we aim to select a subset of curtailments that can be performed (i.e., to fix the values of variables y), i.e., that satisfies Constraints (5.34-5.40), (5.43)-( 5.47), (5.53), (5.56), and (5.57) which is satisfies batteries safety usage rules (i.e., values of variables x, u B , u D , z and b start obtained by solving the sub-problems), and that gives the highest revenue.

The Lagrangian heuristic proposed runs in O(T 2 ) time, as described in the following steps:

• keep the values of the variables x bs,t , u B bs,t , u D s,t , z bs,t and b start bs,t in the optimal solution obtained ; • compute a MWBIS with a budget equal to N c with the remaining curtailments (i.e., the ones for which the value of y c is not fixed yet), considering the values of g c . Then, for each c, set the value of the variable y c to 1 if the corresponding curtailment is in the MWBIS with a budget equal to N c , and to 0 otherwise. Note that the values of all y c computed in this way satisfy Constraints (5.34-5.40), (5.43)-(5.47), (5.53),(5.56), and (5.57);

• for each c = (f c , l c ) ∈ C,
• The value of the complete feasible solution is given by the following expression:

Bounds improvements

A key aspect of the Lagrangian relaxation is to ensure a good gap between the upper and lower bounds. The difference between them gives us an optimality gap. If both bounds are equal, we have the guarantee that the feasible solution is an optimal solution of the problem.

Lower bound improvement

When analyzing the lower bound, the step size is a key point for its good improvement. On the one hand, if the step size is too large, the lower bound value will vary between two intervals and, in the general context, will not increase. On the other hand, if the step size is too small, it will tend to increase slowly. Therefore, more iterations are needed to increase the value of the lower bound.

We observe (see Figure 5.2) a periodicity in the values of the lower bound because the value of the step size is too large. Indeed, at each iteration, the algorithm computes a subgradient to update the Lagrangian multipliers and updates them using the value of the step size. However, as the step size is too big, in the next iteration, the algorithm tends to rectify the Lagrangian multipliers with a direction that is opposite to the one computed in the previous iteration. Hence, the values of the Lagrangian multipliers, and hence the value of the lower bound, do not converge.

One strategy to improve lower bounds is to adapt the step size dynamically during execution. One of the best-known methods for performing such an adaptation is to consider a step size of c/ √ k in each iteration k, where c is a constant. Another way to update the step size is per every Y iterations, where Y is a constant. Y = 10). In this example, we still see the periodicity of the interval between each 10 iterations and the impact of updating the step size after 10 iterations. Updating the step size values at each iteration could potentially increase the value of the best lower reached (purple line), and hence, improve the optimality gap. However, it requires a fine tuning of the constant c used to compute the step size.

Upper bound improvement

When analyzing the upper bound, the Lagrangian heuristic is the key point for its good improvement. On the one hand, if the heuristic is not able to compute good feasible solutions, the ones reached will be far from a potential optimal solution, and thus the gap between upper and lower bounds increases. On the other hand, if the heuristic gives a near optimal solution to the problem, it may require too much time and resources. the Lagrangian relaxation after 50 iterations for a small instance with 2 sites. For this example, the solution (b) obtained with the subgradient costs 4% more than the solution (a) obtained with CPLEX. Note that the batteries uses in the two solutions are quite similar for this example, and both solutions perform 10 curtailments each, 4 of which in the same periods. These similarities indicate that the Lagrangian heuristic can give good solutions from the structural point of view. However, improvements can still be done concerning the periods where curtailments are performed. Looking more closely at solution (a), 5 curtailments start at one of the 15 time periods that yield the greatest rewards, compared to only 1 in solution (b).

One proposed improvement (refereed to as Init) is a better way to initialize the Lagrangian mul-

LAGRANGIAN RELAXATION BASED SOLVING METHOD

tipliers λ 1,1 t in order to induce the battery discharges, and thus curtailments that could start at the periods of highest rewards. Formally, the improvement proposed, applied in the initialization procedure of Algorithm 2, can be described as follows:

• Enumerate all pairs (f, l) for f, l ∈ T , l -f + 1 ≥ ∆ min , l -f + 1 ≤ ∆ max . The set of such pairs will be refereed to as C + .

• Create a conflict graph G = (V, E) where each node v ∈ V corresponds to a pair c ∈ C + , and there is an edge e = (v 1 , v 2 ) between v 1 and v 2 if there exists a temporal conflict between

c 1 = (f 1 , l 1 ) and c 2 = (f 2 , l 2 ) (i.e., if {f 1 , . . . , l 1 } ∩ {f 2 , . . . , l 2 } ̸ = ∅).
• Compute a MWBIS with a budget equal to N c , considering as weight of each vertex v i the value

w(v i ) = R f i P T O (l i -f i + 1)
. Note that G is an interval graph, and hence such a computation can be done efficiently with the algorithm proposed in Section 4.4.1. Let us define the set of vertices in the solution as V + .

• For each v i ∈ V + , update the Lagrangian multipliers by setting λ 1,1 t = E t for each t ∈ {f i , . . . , l i }, and 0 otherwise. Note that we increase artificially the interest of performing peak-shavings during the time periods f i to l i , that allows load curtailments to be performed. However, the value of the lower bound is drastically affected, and hence it takes many more iterations to reach the same lower bound of Figure 5.3. In the example of Figure 5.6, the best lower bound reached after 50 iterations (purple line) is smaller than the one obtained previously. A second proposed improvement is to reset all Lagrange multipliers to zero at the end of the first iteration (see Algorithm 3), since in our tests the best upper bound is always reached at the first iteration.

Finally, the complete Lagrangian based method used in our tests is formally described as follows:

NUMERICAL RESULTS

instances and the settings used in our experiments. Then, in Section 5.6.2 we present the results of OMBSE instances solved using OMBSE-MILP, OMBSE-HEU, and OMBSE-LAG. We discuss the computational results and we analyze the economic aspects of the solutions obtained in Section 5.6.3.

Instances description

We based our testbed on urban and rural sites similar to the site considered in Chapter 4 for which a random variation of 25% is considered in some sites. In addition, we assume a weekly time horizon with time discretization ∆ = 1 2 (i.e., 30 minutes), which implies that T = 336. Such a time discretization is the one considered by the transmission system operator that imposes the minimal duration of 30 minutes, i.e., 1 time period in our tests.

Each site is equipped with one battery, whose main properties are provided in what follows. The autonomy of each battery varies between 20 and 60 time periods. Besides, two types of batteries are installed: GEL and AGM, for which the recharge power rate P B bs is as follows:

1. P B bs = 1.95% of B max bs /∆ for GEL batteries;

2. P B bs = 3.34% of B max bs /∆ for AGM batteries.

In addition, the minimal power discharge D min bs is 10% of D max bs which is different for each battery b s in all instances. Finally, the value of B min bs is 50% of the battery energy stock capacity B max bs , and each battery cannot be used more than 2 times per day (i.e., N bs = 14) RTE-Portal.

Concerning the data related to the distributor, we consider the unit prices from the French distributor EDF, publicly available at data.gouv.fr (2020). Besides, the maximum amount of power P max s that can be purchased per time period is established by contract for each site. In our tests, to guarantee that the value of P max s of each site s is greater than the power demand W s,t at any time period t ∈ T , we set such a value to 3W ¯s.

Concerning the data related to the transmission system operator, we consider rewards paid by the French operator RTE, whose values are publicly available (see RTE-Portal). Besides, the minimum and maximum curtailment duration are defined by contract and are 1 2 and 2 hours (i.e., ∆ min = 1 and ∆ max = 4 because we consider ∆ = 1/2), respectively. Similarly, the contractualized power In addition, to simplify the writing, we present the time discretization ∆ in minutes. The input values of the power demand, unit cost of energy, and reward over the time horizon, are taken as average observed values. Our tests were performed on 240 instances.

P T O considered
All tests were performed on a server computer with 4GB of RAM and 1 Intel Xeon 2.2GHz

CPU. The method used to solve (OMBSE-MILP) formulation is the branch-and-bound implemented in CPLEX 12.9, with default settings. The running time is limited to 1 hour for each instance. The number of iterations of the Lagrangian relaxation is limited to 50. No improvements on the bounds and on the solutions were observed considering more iterations in preliminary tests with some instances.

We also limit the CPLEX CPU time to solve each intermediate model at each iteration of OMBSE-HEU to 3 minutes.

Numerical results

In this section we present the results for OMBSE instances solved with OMBSE-MILP, OMBSE-HEU and OMBSE-LAG. The analysis of the results is presented in Section 5.6.3. Cost corresponds to the average of the standard cost, i.e., the cost when no batteries are used, equal to ∑ t∈T ,s∈S E t W s,t , while column sol stores the mean of the solution values, given in monetary unit, obtained with OMBSE-HEU. Besides, the average reduction in the total energy cost, given in %, and the average running time, given in 5.6. NUMERICAL RESULTS lower bound given by CPLEX is exactly the optimal value of the continuous relaxation, and the best upper bound (i.e., value of a feasible solution) is the standard solution when no batteries are used.

In addition, the optimality gap found at the root of the branch and bound tree is higher than the final optimality gap obtained (it varies from 11% for instances with 2 sites, to 2016% for instances with 100 sites and P T O = 100% of D ¯max ), which shows that CPLEX is able to improve the bounds over the iterations. We also observe that the randomness in the power demand has no impact on the performance of the algorithm. Furthermore, the number of variables grows linearly in the number of sites, and about 43% of those variables are binary ones, which makes the branch and bound method implemented in CPLEX slower.

In the following, we analyze the results obtained with OMBSE-HEU, based on the best heuristic proposed in Chapter 4. However, it does not work as well as OMBSE-HEU requires too much running time. We observe that CPLEX is not able to solve to optimality the model partially relaxed obtained at each iteration of the algorithm. This implies that each iteration of the algorithm takes at least 3 minutes. Hence, we could observe that, even for small instances composed of 2 sites, OMBSE-HEU takes about 3 hours. Consequently, we tested only instances with up to 4 sites.

Concerning the results obtained with OMBSE-LAG, we observe firstly that much less CPU time is required than for OMBSE-MILP and OMBSE-HEU, and that this time increases linearly in function of the number of sites of the instance. This is to be expected because of the fact that the Lagrangian heuristic runs in polynomial time, and that each site corresponds to one sub-problem to be solved at each iteration. But, even for small instances composed of 2 sites, the subgradient algorithm does not give an optimality guarantee (i.e., the lower and upper bounds obtained by OMBSE-LAG do not converge to the same value). However, we observe optimality gaps smaller than with OMBSE-MILP, varying from 2.5%, for small instances, to 19% for instances with 100 sites, against optimality gaps varying from 2.5% to 49% for the same size of instances with OMBSE-MILP. Another important aspect is that there is no dependence between the sub-problems, which allows them to be solved separately and in parallel.

In our tests, we consider only one CPU, but the algorithm performance could be increased by solving the sub-problems in parallel.

We now focus on the economic aspects of the solutions, and observe a reduction in the energy bill for all solving approaches proposed, confirming that participating in the energy market can generate savings for the company. Furthermore, we observe similar gains whether the power demand is ran-5.6. NUMERICAL RESULTS domized or not, because of the fact that the batteries properties and the number of load curtailments that can be performed are the aspects that limit the most the savings that can be generated. Indeed, the number of load curtailments performed in any solution obtained (except when CPLEX gives the standard one) is exactly N c , independently of the solving method.

Concerning OMBSE-MILP, the values of best solutions found give on average savings of 11% for instances with at most 10 sites, with an optimality gap of 3.1% on average for such instances. However, for larger instances, savings generated by the best solution obtained decrease significantly. In some cases, for instances with 100 sites, the solution obtained does not give savings. We observe that the value of P T O impacts directly the savings obtained, which is to be expected because of the fact that the reward received per curtailment depends on the power contractualized P T O . However, if the value of P T O is too high, this implies that all the batteries must be used to perform each load curtailment.

This reduces the possibility of use of the batteries for peak-shaving, as well as the number of possible load curtailments that can be performed. In our tests, we observe that having a P T O equal to 75% of the total power asset yields savings at most 11% higher. Furthermore, we observe similar savings and final gaps on average for instances with a randomness in the power demand and for instances without such a randomness.

Concerning OMBSE-HEU, the savings obtained are similar to the ones obtained with OMBSE-MILP for small instances. Such a reduction is 12.3% on average for the instances tested. However, even for small instances, OMBSE-HEU requires much more CPU time (3600 seconds with OMBSE-MILP against 13700 seconds on average with OMBSE-HEU). However, even for the instances tested, we observe that adjusting the values of δ time and δ ′ time to 36 and 12, respectively, allows us to obtain solutions with better savings (1% higher on average compared to δ time and δ ′ time equal to 24 and 12, respectively).

Concerning OMBSE-LAG, we observe that it runs faster and gives better solutions than OMBSE-MILP and OMBSE-HEU. The savings obtained vary from 11.5% on average, for instances with P T O =25% of D ˜max and 100 sites, to 40.2% on average, when P T O =100% of D ˜max and there are 5 sites. In addition, the optimality gap obtained with OMBSE-LAG increases with the value of P T O , but is still smaller than the ones obtained with OMBSE-MILP. However, unlike OMBSE-MILP, the savings obtained tend to be larger when P T O is equal to 100% of the power asset. Analyzing the results, we observe that the solutions obtained with OMBSE-LAG tend to perform the maximal number of curtailments possible and a small number of peak-shavings. Hence, the savings obtained come mainly from the rewards received by performing curtailments. Furthermore, comparing the lower bounds of OMBSE-MILP and OMBSE-LAG, we observe that the second method gives better lower bounds, and, consequently, better optimality gaps. In short, having solutions with a quality guarantee as good as the solution itself is fundamental to use such methods in a production environment.

To illustrate the impact of the parameter P T O on the savings and optimality gap, Figure 5.7a illustrates the savings, given in %, for OMBSE-MILP and OMBSE-LAG, and Figure 5.7b illustrates the optimality gap, given in %, for the same methods. Note that, as OMBSE-MILP requires too much CPU time and only few tests were performed, there is not enough data to integrate in these figures. We can observe that the savings obtained with OMBSE-MILP decrease when P T O =100% of D ˜max , which is not the case with OMBSE-LAG. In addition, we can observe that the optimality gap increases as the value of P T O increases in both methods, but OMBSE-LAG gives smaller gaps than OMBSE-MILP.

To illustrate the impact of the number of sites on the savings and optimality gap given by OMBSE-MILP and OMBSE-LAG, Figure 5.8a illustrates the savings, given in %, for OMBSE-MILP and OMBSE-LAG, and Figure 5.8b illustrates the optimality gap, given in %, for the same methods, in function of the number of sites on the instances. Firstly, we can observe that the cost reductions obtained with OMBSE-LAG are always higher than the ones obtained with OMBSE-MILP, even for small instances, when P T O is higher than 50%. In addition, OMBSE-MILP is not able to find other solution than the standard one given to CPLEX as starting solution for instances with 50 sites or more. In fact, the best solution obtained with OMBSE-MILP in these cases are the standard ones, i.e., when batteries are not used to perform peak-shavings or load curtailments. Furthermore, savings obtained with OMBSE-LAG stay quite constant as the number of sites increases, which gives a perspective of savings for instances even larger than 100 sites. Secondly, concerning the optimality gap for OMBSE-LAG and OMBSE-MILP, we can observe that the ones obtained with OMBSE-MILP increase between instances with 0 and 50 sites.

For larger instances, such gaps stabilize because of the fact that the optimal value of the continuous relaxation (i.e., the best lower bound given by CPLEX for such cases) also stabilizes compared to the standard solution. Concerning the optimality gaps obtained with OMBSE-LAG, they are much smaller than the ones obtained with OMBSE-MILP, and tend to increase slowly as the number of sites increases.

Conclusion

This chapter addresses the OMBSE problem, that consists in optimizing the total energy cost using batteries installed for backup to participate in the energy markets via a proper battery management.

We propose a mixed-integer linear program whose solutions provide a strategy for using the batteries so as to reduce the total energy cost. We have shown that the OMBSE problem is strongly NP-Hard, and two heuristics are proposed: the first one is based on the relax-and-fix strategy already explored in Chapter 4, and the second one is based on a Lagrangian relaxation which allows to decompose the problem into sub-problems which are easier to solve. Moreover, we have used these approaches to solve the OMBSE problem on realistic instances.

As a result, we firstly observe that using batteries installed for backup in the balancing mechanism may generate savings. Concerning the solving approaches, we observe in particular that the 5.7. CONCLUSION mathematical model solved with a branch and bound algorithm could not achieve an optimality guarantee for any instance within the time limit, even for the small ones. However, even without such an optimality guarantee, the best solution obtained already generates savings. The number of times that each battery can be used and the number of load curtailments that can be performed seem to be the parameters that have the greatest impact on those savings. In contrast, no reduction in the electricity bill compared to the standard value was observed by increasing the number of sites of the instances. Concerning the heuristic OMBSE-HEU, it gives solutions with savings similar to the ones obtained with OMBSE-MILP, but requires much more CPU time. From a practical point of view, its use in a production environment is not feasible. Concerning OMBSE-LAG, the results obtained proved its economical relevance, by providing better solutions compared to the best ones obtained with OMBSE-MILP or OMBSE-HEU, and with better optimality gaps. Furthermore, we observe that the power contractualized P T O has an important impact on the solutions obtained: with higher values, the solutions yield more savings, but if it is too high (i.e., P T O =100% of D ¯max ), it can limit the use of batteries to perform peak-shavings. From a theoretical point of view, OMBSE-LAG reuses the algorithms proposed in Chapters 3 and 4, which allows us to solve large-scale instances faster while keeping good quality of the solutions obtained.

Concerning the performance of our algorithms, we observe that the number of sites is the parameter that impacts the most the solving time. We consider a time limit of 1 hour for solving each instance, and, in this aspect, the Lagrangian heuristic OMBSE-LAG proves to be computationally efficient, while we observe that the solving time for the mixed-integer linear program proposed and the bidimensional relax-and-fix heuristic increases fast. From a practical point of view, the use of OMBSE-LAG is feasible in a production context due to the fact that its sub-problems can be solved separately and in parallel.

From a research perspective, we observed that the best feasible solution obtained with OMBSE-LAG is obtained in the first iterations and is not improved over the iterations. Exploring other Lagrangian heuristics to improve the search for feasible solutions in the Lagrangian relaxation at each iteration of the subgradient method is fundamental to obtain solutions better than the ones already obtained.

Furthermore, the problem treated in this chapter can be extended to a scenario where sites are equipped with multiple batteries. The solving approaches proposed can be adapted and are still valid.

Chapter 6

Conclusion and Perspectives

Conclusion

This Ph.D. thesis explored different possibilities for using batteries of a telecommunications operator primarily used as backup in energy markets. More precisely, we explored the use of such batteries to perform peak-shavings, but also to perform load curtailments in order to reduce the total energy cost for the company. First, we identified different challenges related to the use of batteries in different contexts that needed a deeper analysis to better understand the difficulties as well as the opportunities. Next, these challenges were investigated individually, and each time exact and heuristic methods were proposed. Finally, the complete problem with all the rules and possibilities of battery use was explored and solving methods based on the obtained results were designed.

For each one of the corresponding optimization problems, we have designed:

• For the OBSC problem:

-A mathematical model considering the constraints of the French curtailment market and the safety usage rules in the batteries;

-An exact polynomial time algorithm based on graph theory to solve two variants, and that can also be used as a heuristic.

• For the OMBSR problem:

-Two mixed-integer linear programs: one based on the enumeration of all possibilities of batteries use, and a second one without enumeration;

6.1. CONCLUSION -The proof that OMBSR is strongly NP-Hard;

-Two heuristics based on different aspects for OMBSR: one heuristic based on graph theory inspired by the properties of the realistic tested instances, and a second heuristic based on the relax-and-fix approach, that gives better results for the general case.

• For the OMBSE problem:

-A mixed-integer linear program;

-The proof that OMBSE is strongly NP-Hard;

-A Lagrangian based approach that reuses the algorithms proposed for sub-problems of OBSC;

-A bidimensional relax-and-fix heuristic;

In order to assess the efficiency and relevance of the models and algorithms proposed, several numerical experiments were performed on realistic instances, generated from public energy costs and data related to the curtailment market, as well as internal data from the French telecommunications operator Orange.

In the first case study, i.e. the OBSC problem, we observed that participating in the curtailment market generates large savings for the company. We also identified which rules make the problem difficult to solve, and we observed that the methods proposed to solve the variants of the problem that are polynomial are also economically suitable when used as heuristics for the OBSC problem.

In the second case study, i.e., the OMBSR problem, we analyzed the impact of managing multiple batteries when they are used exclusively to perform peak-shavings. We have observed that increasing the number of batteries installed makes the problem difficult to solve. In fact, we prove that it is strongly NP-Hard. The proposed mathematical models are unable to solve realistic instances when using a standard MILP solver, and the proposed heuristics proved to be economically and algorithmically efficient when the number of installed batteries increases.

In the third case study, i.e., the OMBSE problem, we returned to the initial problem of this thesis where batteries can be used to perform both peak-shavings and load curtailments in a multibattery setting. We observed that using the batteries generates reductions in the energy bill and is economically profitable for the company. We also observed that the proposed mathematical model is 6.2. RESEARCH PERSPECTIVES not able to solve realistic instances to optimality with a standard MILP solver. Hence, by applying the Lagrangian relaxation to the proposed model, and using the subgradient algorithm along with the methods proposed in Chapter 3 to solve the sub-problems, it proved to be computationally and economically efficient to solve realistic instances. Concerning the bidimensional relax-and-fix heuristic, it did not prove to be efficient in solving the OMBSE problem because each iteration remains difficult to solve, requiring long computation times.

We can conclude that the use of batteries installed for backup of a telecommunications operator in the energy market is economically profitable. If these batteries are used to perform peak-shavings and load curtailments, the gains obtained can be considerably high. Moreover, even if the batteries are used only for peak-shaving, the gains that can be obtained already represent an important value for the company.

Research Perspectives

Scientific Perspectives

During this thesis, several aspects were addressed and some of them require further research.

From a theoretical point of view, the complexity of the problem addressed in Chapter 3 concerning the management of a battery that is used to perform curtailments is still an open issue. Only two polynomial variants have been identified.

In the same vein, several solving methods have been proposed for the different problems addressed that strongly depend on the setup parameters. Exploring in detail such parameters, as well as identifying the best values of these parameters for specific classes of problems, is of fundamental importance to obtain better results and computational performance.

In Chapters 4 and 5, heuristics based on the relax-and-fix technique and Lagrangean decomposition were proposed. However, other solving methods can be applied to the problem addressed in this thesis.

Dynamic programming in particular cases, alternative heuristics and nonlinear programs could be used.

Another perspective of research is the scenario where sites are equipped with multiple batteries.

In fact, Chapter 5 treats the problem considering sites equipped with a single battery because it is the current case at Orange France. However, data-centers and central base stations are frequently equipped with a pool of batteries that could also be used in the energy markets, but they are not considered 6.2. RESEARCH PERSPECTIVES in this thesis. Along the same lines, the possibility of installing batteries, and thus considering a set-up installation cost, to improve the ability to perform peak-shavings and load curtailments is also a perspective of future research.

We describe some possible extensions in the following section.

Industrial Perspectives

During the course of this thesis some questions and opportunities have emerged, leading to three perspectives of future works to explore the use of batteries of a telecommunications operator in the energy market.

Firstly, sharing batteries between neighboring base stations is a topic discussed internally in the company, for which research is ongoing [START_REF] Foucault | 400vdc remote powering as an alternative for power needs in new fixed and radio access networks[END_REF]. In this context, adding to the problem the decision of which base stations need to have a battery to supply neighboring stations is a challenge to be explored and that can generate considerable cost savings for the company. Once a battery is shared, the efficiency of sending power between two stations must be considered. Appendix A reports an in-depth analysis of sending power from one station to the other considering physical aspects in the power transmission.

The second perspective is related to the use of lithium batteries, also installed for backup, to participate in the energy markets. Lithium batteries are more efficient, more flexible in their use and better able to withstand different temperatures. After several conversations with the expert team of Orange France, we report in Appendix B an analysis of such a type of batteries and the changes to be made in our models and algorithms to integrate them.

The third research perspective is related to the integration of renewable energy together with batteries to perform peak-shavings and load curtailments. A large-scale integration of solar panels and wind turbines changes significantly the net power load patterns of production and consumption, requiring complex management systems [START_REF] Luo | Overview of current development in electrical energy storage technologies and the application potential in power system operation[END_REF][START_REF] Shaker | Impacts of large-scale wind and solar power integration on california's net electrical load[END_REF]. Internally at Orange, the use of solar panels and wind turbines is a subject of studies for the evolution of the energy network of the base stations [START_REF] Marquet | Sollan-dimsol r d project, solar and renewable energy in france telecom[END_REF]. Indeed, maintaining the stability and reliability of power network, together with the battery safety usage rules in order to participate in the energy market, is a real challenge that needs further research.

List of Publications

In terms of scientific publications, the following ones were produced as part of this thesis:

• Article in refereed journals:

- [START_REF] Dang | The energy web: Concept and challenges to overcome to make large scale renewable and distributed energy resources a true reality[END_REF][START_REF] Koutsopoulos | Optimal energy storage control policies for the smart power grid[END_REF]. Dans ce contexte, les batteries peuvent être utilisées de différentes manières dans le but de réduire les coûts de production et de transport, de réduire la consommation d'énergie et d'augmenter la fiabilité du réseau lorsqu'elles sont utilisées comme système de secours. Plus précisément, l'utilisation de batteries comme système de secours en cas de coupure de courant est courante dans les réseaux de télécommunications, car ils fournissent des services critiques et doivent rester en permanence en ligne. [START_REF] Kiehne | Batteries in power supplies for the new telecommunication services[END_REF]. Ces batteries sont utilisées en conjonction avec des antennes et d'autres équipements, et des règles strictes de sécurité d'utilisation doivent être prises en compte afin de garantir qu'elles soient toujours disponibles en cas de panne de courant.. En outre, l'opérateur (entreprise) de télécommunications pourrait utiliser ces batteries afin de participer au marché de l'électricité à condition que le réseau soit suffisamment fiable et que les règles de sécurité d'utilisation soient respectées. En effet, puisque le prix de l'énergie varie dans le temps, les batteries peuvent être utilisées pour éviter d'acheter de l'énergie lorsque ce prix est élevé, ce que l'on appelle le mécanisme de réponse à la demande. [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF]. The batteries will then be recharged when the energy price is low. Les batteries seront ensuite rechargées lorsque le prix de l'énergie est bas. La production et la demande d'énergie définissent les prix de l'énergie sur une journée, qui doivent être payés pour acheter de l'énergie sur un marché. Un tel marché de l'électricité est connu sous le nom de marché de détail, et le mécanisme de réponse à la demande a été largement étudié au cours de la dernière décennie (Torriti, 2015;[START_REF] Johnson | Energy peak shaving with local storage[END_REF][START_REF] Mishra | Smartcharge: Cutting the electricity bill in smart homes with energy storage[END_REF][START_REF] Labidi | Smart grid-aware radio engineering in 5G mobile networks[END_REF]

Positionnement et principales contributions

Dans cette section, nous présentons les principaux défis abordés dans cette thèse et le plan notre recherche.

7.4.1 Optimiser les coûts de l'énergie en utilisant des batteries sur le marché de l'énergie

Le problème principal abordé dans cette thèse est l'optimisation des coûts totaux de l'énergie en utilisant des batteries installées à l'origine pour le secours dans les stations de base de télécommunications afin de participer aux marchés de l'énergie, avec l'aide d'une gestion appropriée des batteries.

Dans ce contexte, les batteries sont utilisées pour participer au marché de détail en adaptant la consommation d'énergie du réseau en fonction des prix de l'énergie, mais aussi pour effectuer des réductions de charge, qui aident à maintenir l'équilibre du réseau, en échange d'une récompense financière. Notre objectif est de réduire les dépenses énergétiques opérationnelles totales de l'entreprise tout en maximisant les récompenses reçues du marché d'effacement. Actuellement, les batteries sont déjà utilisées pour participer aux marchés de l'énergie, mais aucune stratégie d'optimisation n'est explorée.

Le problème d'optimisation en question doit tenir compte de certaines règles contractuelles et des limites physiques des batteries. Ces règles, résumées dans la Section 7.3, qui seront présentés formellement de manière plus détaillée dans les Sections 7. 5, 7.6, et 7.7, peuvent être classées en trois groupes distincts, comme suit:

POSITIONNEMENT ET PRINCIPALES CONTRIBUTIONS

• Règles de sécurité d'utilisation R1-R6

• Règle du marché de détail R7.

• Règles du marché d'effacements R8-R10.

Principaux défis

Nous avons identifié trois défis majeurs qui rendent le problème potentiellement difficile à résoudre.

Impact des règles d'utilisation de la sécurité

En ce qui concerne l'impact des règles d'utilisation de la sécurité sur la gestion d'un seul système de stockage d'énergie par batterie (BESS), certaines études connexes les abordent individuellement [START_REF] Daryanian | Optimal demand-side response to electricity spot prices for storage-type customers[END_REF][START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF][START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF]. Plus précisément, [START_REF] Alaperä | Usage of telecommunication base station batteries in demand response for frequency containment disturbance reserve: Motivation, background and pilot results[END_REF] prend en compte certains aspects physiques, tels qu'un taux de décharge maximal, un taux de recharge constant et un nombre maximal de cycles, tandis que [START_REF] Bovera | Economic opportunities for demand response by data centers within the new italian ancillary service market[END_REF] il considère le nombre maximum de cycles que la batterie peut effectuer. En ce qui concerne les règles telles que recharger les batteries immédiatement après chaque utilisation avec un taux de puissance constant et imposer une puissance de décharge minimale aux batteries, aucune étude antérieure ne les a abordées.

Par conséquent, l'impact de ces règles sur la gestion des batteries n'est pas connu, ce qui nécessite une analyse et une étude plus approfondies.

Impact des règles du marché d'effacement

Certaines études ont déjà abordé partiellement les règles du marché d'effacement dans d'autres contextes [START_REF] Zhang | An adjustable robust optimization approach to scheduling of continuous industrial processes providing interruptible load[END_REF][START_REF] Lan | Integrated resources planning in microgrids considering interruptible loads and shiftable loads[END_REF][START_REF] Mkireb | Robust optimization of demand response power bids for drinking water systems[END_REF]. En outre, l'utilisation de batteries pour effectuer des réductions de charge a été traitée dans certaines études [START_REF] Zakeri | Economics of energy storage in the german electricity and reserve markets[END_REF][START_REF] Nasrolahpour | A bilevel model for participation of a storage system in energy and reserve markets[END_REF][START_REF] Schillemans | Strategic participation of merchant energy storage in joint energy-reserve and balancing markets[END_REF]. Cependant, aucune étude précédente n'a abordé ces règles dans le scénario où les batteries soumises à des règles d'utilisation de sécurité sont utilisées pour effectuer des réductions de charge. Par conséquent, l'impact de ces règles sur la gestion des batteries n'est pas connu, ce qui nécessite une analyse et une étude plus approfondies.

POSITIONNEMENT ET PRINCIPALES CONTRIBUTIONS

Impact de la gestion multi-batteries

Un autre défi est la gestion optimale d'un système de stockage d'énergie à batteries multiples (MBESS), nécessitant des stratégies de contrôle plus efficaces. Dans ce contexte, des études récentes proposent différentes méthodes pour traiter efficacement la dimensionnalité : [START_REF] Babazadeh | A new control scheme in a multi-battery management system for expanding microgrids[END_REF][START_REF] Zhu | Control-limited adaptive dynamic programming for multibattery energy storage systems[END_REF][START_REF] Fan | Distributed equalisation strategy for multibattery energy storage systems[END_REF]. Dans notre cas, nous considérons un MBESS pour lequel les règles d'utilisation de la sécurité doivent être considérées, ce qu'aucune étude précédente n'a abordé. Par conséquent, l'impact de ces règles dans la gestion d'un MBESS n'est pas connu, ce qui nécessite une analyse et une étude plus approfondie.

Aperçu de la recherche et principales contributions

Une fois les principaux défis identifiés, nous traçons les grandes lignes de notre recherche pour explorer l'impact de chacun d'entre eux. Les principales contributions de cette deuxième partie sont :

• La proposition de deux programmes linéaires en nombres entiers mixtes pour OMBSR;

• La preuve que OMBSR est NP-Hard;

• La proposition de deux heuristiques économiquement et computationnellement efficaces basées sur différents aspects pour les instances OMBSR à grande échelle : une heuristique basée sur la théorie des graphes inspirée par les propriétés des instances réalistes testées; et une seconde heuristique basée sur l'approche relax-and-fix qui donne de meilleurs résultats pour le cas général;

• La proposition d'une réduction du Maximum Weight Budgeted Independent Set Problem sur les graphes d'intervalles en Longest Budgeted Path Problem sur les graphes acycliques directs, et d'un algorithme en temps pseudo-polynomial pour le résoudre;

• Une évaluation expérimentale des gains économiques liés à l'utilisation de batteries installées pour la sauvegarde sur le marché de détail pour l'opérateur de télécommunications.

En termes de publications scientifiques, un article a été présenté dans une conférence internationale (Silva et al., 2020b) et publié dans une revue internationale (Silva et al., 2022). En outre, un article a été présenté lors d'une conférence nationale ((Silva et al., 2021b)).

Le problème d'optimisation complet

Enfin, une fois que nous avons compris l'impact des règles du marché d'effacement R8-R10 et de la croissance du nombre de batteries dont l'utilisation doit respecter les règles de sécurité d'utilisation R1-R6, nous abordons tous les aspects dans un seul problème. Dans ce contexte, nous considérons plusieurs sites, chacun équipé d'une seule batterie dont l'utilisation doit respecter les règles de sécurité d'utilisation pour participer au marché de l'énergie en effectuant des écrêtements de pointe et des effacements. L'ensemble du problème est appelé Optimisation d'un système de stockage multi-batteries participant au marché de l'énergie (référencé comme OMBSE), et est présenté dans la section 7.7.

Les principales contributions de cette troisième partie sont :

• La proposition d'un programme linéaire en nombres entiers mixtes pour OMBSE;

• La preuve que OMBSE est NP-Hard;

• Décompositions du modèle proposé basées sur la technique de relaxation lagrangienne;

• La proposition d'une méthode de sous-gradient pour résoudre le modèle relaxé en réutilisant les algorithmes proposés pour les sous-problèmes d'OBSC;

• La proposition d'une heuristique bidimensionnelle de relaxation et de correction qui peut également être utilisée pour résoudre des instances à grande échelle;

• Une quantification des gains économiques et opérationnels liés à l'utilisation des batteries installées en secours sur les marchés de l'énergie pour l'opérateur de télécommunications. A chaque période de temps t, nous supposons que la récompense R t (donnée en unités monétaires), qui sera reçue par l'opérateur de télécommunications de la part du gestionnaire de réseau de transport variantes du problème général qui peuvent être classées en deux grandes familles de problèmes. La première considère le cas où les niveaux de décharge possibles de la batterie sont discrets (et seront appelés OBSC-D). Habituellement, les systèmes de mesure utilisés pour surveiller la charge de la batterie ont des limitations techniques qui empêchent de considérer des niveaux de décharge continus.

Ceci induit une discrétisation des niveaux de décharge qui dépend de la précision de ces systèmes. Les variantes correspondantes considèrent les niveaux de rejet donnés en pourcentage de B max .

Deuxièmement, des règles d'ingénierie supplémentaires peuvent également être imposées sur l'utilisation de la batterie pour améliorer sa durée de vie. Un exemple est le cas où la batterie doit rester en mode repos pendant au moins une période de temps après sa recharge complète. La deuxième famille de variantes étudiée dans ce travail considère précisément que la batterie doit nécessairement être au repos pendant au moins un nombre de temps déterminé après chaque recharge complète (et sera appelée OBSC-R). Cette hypothèse peut être imposée en pratique pour s'assurer, par exemple, que la batterie est bien chargée avant d'être réutilisée, même si le taux de recharge réel n'est pas P B (c'est-à-dire n'est pas un taux de puissance constant).

Dans de telles variantes, l'impact de la corrélation temporelle entre deux effacements de charge induits par le calcul de ω c (voir Equation 7.1), peut être traité plus facilement. Grâce à cela, ils peuvent être résolus en temps polynomial. De plus, étant donné que toute solution pour l'une de ces variantes est également une solution réalisable pour OBSC, un tel algorithme peut également être utilisé comme méthode heuristique pour résoudre OBSC.

Résultats expérimentaux

En tant que méthode de résolution, a programme linéaire à nombre entier mixte (appelé OBSC-MILP) Pour chacun des problèmes d'optimisation correspondants, nous avons conçu:

est
• Pour le problème OBSC :

-Un modèle mathématique tenant compte des contraintes du marché français de l'effacement et des règles de sécurité d'usage dans les batteries;

-Un algorithme de temps polynomial exact basé sur la théorie des graphes pour résoudre deux variantes, et qui peut également être utilisé comme heuristique.

• Pour le problème OMBSR :

-Deux programmes linéaires en nombres entiers mixtes : un basé sur l'énumération de toutes les possibilités d'utilisation des batteries, et un second sans énumération;

-La preuve que OMBSR est fortement NP-difficile;

-Deux heuristiques basées sur des aspects différents pour OMBSR : une basée sur la théorie des graphes inspirée des propriétés des instances réalistes testées, et une seconde heuristique basée sur l'approche relax-and-fix, qui donne de meilleurs résultats pour le cas général. In the context of batteries, if a power from a battery is sent over a long distance, a transformer is needed at the start and end points. The battery itself has a voltage limit imposed by the electrolysis process, requiring such an additional equipment. Therefore, batteries are usually installed close to the customer, eliminating the need for a transformer, which reduces the operational cost.

A.2. TRANSMISSION IN TELECOMMUNICATIONS NETWORKS

Examples of transmission loss

Let us consider a power plant that must send 5kW from a start point to an end point which are l = 1km away and connected by a copper wire. The copper line has a material constant ρ of 0.017Ω mm 2 m and a cross-section of A = 10mm 2 [START_REF] Bird | Electrical Principles and technology for engineering[END_REF]. The voltage for the transmission is 1kV and the current (I) for transmission is 5000(W ) 1000(V ) = 5A.

We can also compute the total resistance R of the wire as R = ρ * l A = 0.017Ω mm 2 m * 1000m 10mm 2 = 1.7Ω. Hence, we have a total resistance of 1.7Ω per km of copper line considering a cross-section of 10mm 2 .

Finally, we are able to compute the total transmission power loss considering a current of 5A. The total power loss P is computed as P = I 2 R, where I is the current and R the line resistance. This implies that we have a power loss of P = 25 * 1.7 = 42.5W , corresponding to 0.85% of 5kW.

Battery power transmission

Let us consider a typical AGM battery as a power source with a current of 19A and a voltage of 55V. The battery releases 1045W of power in one hour at its maximum power capacity. However, with a resistance of 1.7Ω per km, 613W will be lost in transmission over 1km, corresponding to 58.7% of the total power sent. An alternative would be to either increase the wire diameter or reduce the current.

Considering a scenario where the same 1045W are transmitted in 5 hours instead of 1 hour (i.e., 3.8A current), 24.54W (2.34%) would be lost in such a transmission. We can also consider another scenario where these 1045W are sent with 19A current to the customer 20 meters away. In this context, the line resistance is 0.034Ω and the power lost in such transmission is 12.2W , corresponding to 1.17% loss.

If a transformer is installed together with the battery for power transmission, the transmission losses are reduced. Let us consider a transformer where the voltage is transformed from 12V to 220V, implying a reduction in current from 19A to 4.75A. In this case, to send the same 1045W in one hour over a distance of 1km, approximately 38.4W will be lost, representing about 3.67%. This example illustrates the importance of a transformer in electric power transmission.

A.2 Transmission in telecommunications networks

The network reliability of telecommunications sites has been improved over the years, allowing to reduce the number of backup devices in sites of some regions [START_REF] Foucault | 400vdc remote powering as an alternative for power needs in new fixed and radio access networks[END_REF]. In this context, (2016) present remote power solutions, called Remote Feeding Telecom (RFT), with shared power plants, as well as the physical and economic impacts on power transmission. In this context, base stations equipped with a RFT system are connected to sites without an energy storage asset and have the ability to send data and power over hybrid cables.

Energy assets sharing

In telecommunications context, the energy assets sharing between sites is desirable for future networks, especially with the 5G network deployment. However, considering a battery that sends 1kW thought a 2.5mm 2 wire to another site 800 meters away, the power loss will be about 10%. For sites close to each other, and such that the transmission loss is smaller than 25% considering the battery installed, the power sharing of energy assets can be allowed. Figure (A.1) illustrates the grid of energy assets sharing between the Orange France sites considering a power transmission loss up to 25%, which covers the whole French territory, and for which a large number of power sharing is possible. In this context, some of the sites will be central power stations with direct connections with remote power stations without a battery asset. The power transmission between sites is traditionally performed through a copper wire of 2.5mm 2 with resistivity of 1.7 × 10 -8 Ohm-meter [START_REF] Foucault | 400vdc remote powering as an alternative for power needs in new fixed and radio access networks[END_REF].

Perspectives of research

The use of hybrid fiber-coaxial cables that can transport data and optical energy to powering electric or electronic devices remotely, formally called Power Over Fiber (PoF), has recently become a new subject of research [START_REF] Rosolem | Power-over-fiber applications for telecommunications and for electric utilities[END_REF]. The main interest of this technology is that besides the advantages of optical fibers such as immunity to electromagnetic interference and electrical insulation, the PoF eliminates the use of metallic cable, which improves the reliability and the security of the system. At Orange France, the use of the PoF technology is under study, as it seems to be the reality in next years. Consequently, the possibility of sharing batteries between sites requires future research to integrate such aspects in the models and solving approaches proposed in this thesis.

Isaías FARIA SILVA Smart grid and optimization of flexible network interactions with energy markets Résumé :

L'utilisation de batteries de secours en cas de coupure de courant est fréquente dans les réseaux de télécommunications, car ils fournissent des services critiques et doivent rester en ligne en permanence. Ces batteries sont utilisées en conjonction avec des antennes et d'autres équipements, et des règles strictes de sécurité d'utilisation doivent être prises en compte afin de garantir qu'elles soient toujours disponibles en cas de coupure de courant. En outre, l'opérateur de télécommunications pourrait utiliser ces batteries afin de participer au marché de l'électricité à condition que le réseau soit suffisamment fiable et que les règles de sécurité d'utilisation soient respectées. En effet, puisque le prix de l'énergie varie dans le temps, les batteries peuvent être utilisées pour éviter d'acheter de l'énergie lorsque ce prix est élevé, et être rechargées lorsque le prix de l'énergie est plus bas, un comportement appelé stratégie d'écrêtement des pointes (peak-shaving en anglais). Une deuxième façon rentable pour une entreprise d'utiliser ses batteries est d'effectuer des effacements de charge. En effet, lorsque la demande d'électricité d'un pays est supérieure à la production, le gestionnaire du réseau de transport doit prendre des mesures afin de stabiliser le réseau, par exemple en demandant aux centrales électriques de produire davantage d'énergie. Un autre moyen est de demander aux consommateurs intensifs en énergie de réduire leur consommation pendant une période donnée (on dit alors qu'ils effectuent un effacement de charge), en leur offrant une récompense en échange. Dans cette thèse, nous considérons le problème de l'optimisation des coûts totaux de l'énergie en utilisant des batteries installées pour la sauvegarde afin de participer au marché de l'énergie en effectuant des écrêtements de pointe et des effacements de charge, avec l'aide d'une gestion appropriée des batteries. Notre objectif est de réduire les dépenses totales d'exploitation de l'énergie pour l'entreprise, et de maximiser les récompenses reçues en effectuant des effacements de charge. Une étude de l'architecture du marché de l'électricité en France est d'abord menée pour comprendre les mécanismes de flexibilité de la demande et comment les contraintes opérationnelles dans l'utilisation des batteries d'un opérateur de télécommunications interagissent avec le marché de l'énergie. Nous avons identifié différents défis qui ont été explorés individuellement pour mieux comprendre les caractéristiques du problème d'optimisation sous-jacent et ainsi développer des méthodes de résolution plus efficaces. Pour chacun d'entre eux, des programmes linéaires en nombres entiers mixtes et des heuristiques sont ensuite proposés pour résoudre le problème correspondant. Après avoir exploré et compris les défis individuels, nous avons proposé des programmes linéaires en nombres entiers mixtes et des heuristiques pour le problème principal de cette thèse, que nous prouvons être NP-Dur, en incorporant les prix de l'énergie du marché et la disponibilité des batteries. Enfin, des simulations basées sur des données réalistes provenant de l'opérateur de télécommunications français Orange montrent la pertinence des modèles et de l'heuristique proposés : ceux-ci se montrent efficaces en termes de calcul pour résoudre des instances à grande échelle, et des économies et des revenus significatifs peuvent être générés grâce aux politiques optimisées de gestion du stockage d'énergie à plusieurs batteries. Isaías FARIA SILVA Smart grid and optimization of flexible network interactions with energy markets Abstract : The use of batteries as backup in case of power outages is common in telecommunications networks, since they provide critical services and need to keep their services always online. These batteries are used in conjunction with antennas and other equipment, and strict safety usage rules must be considered in order to guarantee that they are always available in case of a power outage. Besides, the telecommunications operator could use these batteries in order to participate in the electricity market provided that the grid is reliable enough, as long as the safety usage rules are respected. Indeed, since the energy price varies over time, batteries can be used to avoid buying energy when this price is high, and recharged when the energy price is low, a behavior that will be denoted as a peak-shaving strategy. A second profitable way for a company to use its batteries is by performing load curtailments. Indeed, when the power demand of a country is greater than the production, the Transmission System Operator must take steps in order to stabilize the grid such as ask power plants to produce more energy. Another way is to ask energy-intensive consumers to reduce their consumption during a given time period (in which case they are said to perform a load curtailment), by offering them a reward in exchange. In this thesis, we consider the problem of optimizing the total energy costs using batteries installed for backup in order to participate in the energy market by performing peak-shaving and load curtailments, with the help of a proper batteries management. Our goal is to reduce the total energy operational expenses for the company, and maximize the rewards received by performing load curtailments. A study of the electricity market architecture in France is conducted to understand the demand, flexibility mechanisms and how the operational constraints in the use of batteries of a telecommunications operator interact with the energy market. We identified different challenges that were investigated individually to better understand the characteristics of the underlying optimization problem and thus to develop more efficient solving methods. For each one, mixed-integer linear programs and heuristics are then proposed to solve the related problem. Once we investigated and understood the individual challenges, we proposed mixed-integer linear programs and heuristics for the main problem of this thesis, which we prove to be NP-Hard, incorporating market energy prices and the availability of batteries. Finally, simulations based on realistic data from the French telecommunications operator Orange show the relevance of the models and heuristic proposed: these prove to be computationally efficient in solving large scale instances, resulting in significant savings and revenue through the optimized multi-battery energy storage management policies.

Keywords: Recherche Opérationnelle, Système de Stockage d'Energie à Plusieurs Batteries, Mécanisme de Réponse à la Demande, Effacement de la Charge, Programmation Linéaire en Nombres Entiers Mixtes, Algorithmes de Graphes, Réseaux de Télécommunications.

  electricity market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 General functioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1.2 Energy production, transmission and distribution . . . . . . . . . . . 1.1.2 Electricity commerce and pricing definition . . . . . . . . . . . . . . . . . . . . CONTENTS 2.4.2 Exploring the multi-battery system management in the context of the retail market 2.4.3 Optimizing the complete optimization problem . . . . . . . . . . . . . . . . . . 3 Optimization of a single battery storage system to participate in the curtailment market 3.1 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.2 Practical variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Solving approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Mathematical models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1.1 Mixed-integer nonlinear programming formulation . . . . . . . . . . . 3.2.1.2 Mixed-integer programming formulation for the practical variants . . 3.2.1.3 Linearization of the mathematical model . . . . . . . . . . . . . . . . 3.2.2 Variants solving approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2.1 Graph-oriented algorithm for a discrete discharge levels . . . . . . . . 3.2.2.2 Computation of the discrete discharge levels for particular cases . . . 3.2.2.3 Proof of Proposition 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Numerical experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Instances description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Experimental analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Optimization of a multi-battery storage system to participate in the retail market 4.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Mathematical formulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Mixed-integer nonlinear program based on enumeration of batteries cycles . . 4.2.2 Alternative mixed-integer nonlinear program . . . . . . . . . . . . . . . . . . . 4.2.3 Mathematical model linearizations . . . . . . . . . . . . . . . . . . . . . . . . . CONTENTS 5.5.3 Bounds improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5.3.1 Lower bound improvement . . . . . . . . . . . . . . . . . . . . . . . . 5.5.3.2 Upper bound improvement . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.1 Instances description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.2 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6.3 Experimental analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Conclusion and Perspectives 6.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Research Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Scientific Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Industrial Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of Publications Bibliography Short French version of this thesis List of appendices A Power transmission between base stations A.1 Transmission loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Transmission in telecommunications networks . . . . . . . . . . . . . . . . . . . . . . . B Lithium batteries in telecommunications B.1 Recharging process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTENTS List of Figures 1 Electricity markets agents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 General schema of power generation, transmission and distribution. . . . . . . . . . . . 1.2 The French transmission grid. December 2019. source (Ferriere, 2020). . . . . . . . . . 1.3 General schema of actions taken by RTE in case of a power outage. Source: www.servicesrte.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Electrochemical cell scheme. Source: www.science.org.au . . . . . . . . . . . . . . . . . 2.1 Major challenges and problems treated in this thesis, and some related works. . . . . . 3.1 (a) Battery usage to perform a curtailment; (b) Battery power during recharge. . . . . 3.2 Illustration of the marginal gain of a curtailment c starting at time period 2 and ending at time period 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Power demand over the first week of the considered month for the site "S4". . . . . . . 3.4 Illustration of an optimal solution for the OBSC instance S4 with ∆ = 60. . . . . . . . 3.5 Results obtained by solving OBSC using different battery discharge discretizations for the instance S1 with FTR reward policy. . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Decomposition of an OMBSR instance over a week (i.e., T = 168) into sub-problems OMBSR 1 to OMBSR 6 , assuming γ = 48 and γ ′ = 24. The curves represent the power demand observed (orange line) and the interpolation (black line). In this instance, N b = 3, ∀b ∈ B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LIST OF FIGURES 4.2 Example of a conflict graph associated with the decomposition of the OMBSR instance presented in Fig. 4.1, where N b = 3, ∀b ∈ B, and of the resulting MWkBIS solution. . . 4.3 Illustration of the edge creation criteria for OMBSR-G-HEU with γ = 4 and γ ′ = 2 for a given instance with 2 identical batteries. . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Illustration of the impact of the edge creation criteria on the chordal properties of the graph G created by OMBSR-G-HEU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Illustration of the three windows obtained from Steps 1 and 2 of the relax-and-fix procedure on iterations i and i+1 of an instance containing 168 time periods, considering δ = 48 and δ ′ = 24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Power demand over a week of two instances generated from data of a given site. . . . . 4.7 Power demand of a site over a week. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Energy prices of a site over a week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Illustration of the best solution found by OMBSR-MILP for an OMBSR instance with 3 batteries with a week time horizon. a) Energy stock in each battery, and b) Power demand and power bought over the time horizon. . . . . . . . . . . . . . . . . . . . . . 4.10 Illustration of the best solution found by OMBSR-G-HEU for different values of γ and γ ′ for an OMBSR instance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Illustration of bidimensional relax-and-fix heuristic windows. . . . . . . . . . . . . . . 5.2 Example of the evolution of the bounds considering a fixed step size . . . . . . . . . . 5.3 Example of the evolution of the bounds considering a dynamic updated step-size of 1/ √ k after 10 iterations, where k is the number of the iteration. . . . . . . . . . . . . 5.4 Solutions obtained with (a) CPLEX solving the (OM BSE -M ILP ) model, and (b) with the Lagrangian relaxation for an instance with 2 sites managed over a week. . . . 5.5 Solution obtained with the Lagrangian relaxation using Lagrangian start for an instance with 2 sites managed over a week. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Example of the evolution of the bounds considering the Lagrangian relaxation with Init. 5.7 Results obtained by solving OMBSE instances with OMBSE-MILP and OMBSE-LAG. . . .

  electricity market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 General functioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 Electricity commerce and pricing definition . . . . . . . . . . . . . . . . . . . . 1.1.3 The grid stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Energy storage assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Battery assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Batteries in telecommunications . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Summary of rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  the energy costs by using batteries in the energy market . . . . . . . . . . 2.2 Major challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Research outline and major contributions . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Exploring the curtailment market rules in a single battery context . . . . . . . 2.4.2 Exploring the multi-battery system management in the context of the retail market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 Optimizing the complete optimization problem . . . . . . . . . . . . . . . . . .

  Figure 2.1 -Major challenges and problems treated in this thesis, and some related works.

Content 3 . 1

 31 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 3.1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 3.1.2 Practical variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.2 Solving approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.2.1 Mathematical models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.2.2 Variants solving approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 3.3 Numerical experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.3.1 Instances description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3.3.2 Experimental analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Figure 3

 3 Figure 3.1 -(a) Battery usage to perform a curtailment; (b) Battery power during recharge.

  C: maximum amount of power in kW that can be bought at each time period t ∈ {f c , . . . , l c }, if a curtailment c starting at time period f c and ending at time period l c is performed.

3 .Figure 3

 33 Figure 3.2 -Illustration of the marginal gain of a curtailment c starting at time period 2 and ending at time period 3.

  Proposition 1. Conversely, let us consider any path from v s to v t in G, of length λ: such a path is composed of triples (f c , l c , d c ), which are equivalent to pairs (y c , d c ), and such pairs belong to F opt as defined in Proposition 1, by definition of the arcs in G.

  If we denote by D c the set of all possible values of d c for a given curtailment c, we have D = ⋃ c D c . Property 2 There exists an optimal solution of OBSC-R such that, for each curtailment c performed, the value of d c belongs to a known discrete subset D c such that |D c | = O(T ).

  over all the d c 's and d c -'s that satisfy the range conditions of Proposition 1. Indeed, in this case, the value of d c -is irrelevant, as p max c is computed by setting u fc-1 = W fc-1 in Equation (3.1), and hence one may choose d c -= 0 for instance. From Proposition 1, for each c performed and each value t B c ∈ {l c + 1, . . . , T }, the value of any solution ((y c ) c∈C , (d c ) c∈C ) ∈ F opt where d c = d t B

  at most one plus the number of segments of the functions f B c and f S c , which are at most T -l c and l c -f c + 1, respectively. Therefore, for a given curtailment c starting at period f c and ending at period l c (and using the fact that here, by assumption, p max c depends only on y c , i.e., on f c and l c ), one can use the function f G c in order to compute all the candidate values d c in D c (keeping only the value d c that minimizes the objective function, if several of these values yield the same value

  addition to the bound constraints on d c j . Moreover, in this case, the running time of the algorithm based on the computation of a longest path in a DAG is O(T 4 (max c |D c |) 2 ), which yields O(T 6 ).

Finally

  , we illustrate the computation of the set D c on the example of Figure 3.2, where the curtailment c that is considered starts at the beginning of time period 2 and ends at the end of the same time period, and where we consider the values t B c ∈ {3, 4} (here, t B c cannot be larger than 4). In this particular case, we simply have D c = {d break 2 }, because d break 2 gives the highest economic gain for d c both in the first and in the second segments of f G c .

  57) Note that, once the values of the variables y c are known, so are the ones of the variables z t (and vice-versa), thanks to Constraints (3.5). Similarly, once the values of the variables d c are known, so are the ones of the variables p max c , thanks to Constraints (3.15) and the fact that, from Property 1 and Lemma 1, the value of p max c for each c ∈ C can be computed from the values of the variables d c only.

  f G c of the values d c ′ of the variables d c ′ for all c ′ ∈ C. More precisely, for each curtailment c with y c = 1, d c -and d c are the only ones needed to express f G c , where c -is the curtailment with y c -= 1 that directly precedes c in the solution. Moreover, for each c, whenever the computation of p max c only depends on the values y c ′ (see also Section 3.2.2.2), and not on the values d c ′ , for all c ′ ∈ C, f G c is a continuous piecewise linear function of d c only.

  3.70) To simplify the writing, let us define d min as the lower bound imposed on d c , computed as d min = ∑ lc t=fc d min t , and d max as the upper bound, computed as d max = min( ∑ lc t=fc d max t , B max -B min ).

  is a function of d c and d c -, that we will simply denote by f S c (d c , d c -), where c -is the curtailment with y c -= 1 that directly precedes c in the optimal solution. Note that the dependence in d c is linear, but the one in d c - is not, as d c -is implicitly used in the computation of p max c , which in turn is used in the computation of d min t for each t ∈ {f c , . . . , l c }. However, in the case where the computation of the variables p max c only depends on the values y c themselves, things are different. Indeed, in this case, all terms in Equation (3.72) are constant, except the term

  for each c. Intuitively, for any curtailment c such that y c = 1, the value of f G c gives the best total economic gain associated with c. Moreover, as we have discussed throughout the proof, we must have((y c ) c∈C , (d c ) c∈C ) ∈ F opt .In particular, for each c, d c must belong to ]∆ ∑ t B c -1 t=lc+1 min(P B , P max -W t ), ∆ ∑ t B c t=lc+1 min(P B , P max -W t )] because of the function f B c , and to [d min , d max ] because of the function f S c . Conversely, for any ((y c ) c∈C , (d c ) c∈C ) ∈ F opt , we have also shown how to compute ((x t ) t , (u D t ) t , (u B t ) t ) ∈ F * c (y, d). In other words, we have essentially proved that F * = F opt , which, together with the computation of f G c (d c , d c -), implies the first part of the proposition. Recall that, if the computation of the values of the variables p max c only depends on the valuesy c themselves, then f S c (d c , d c -) = f S c (d c ), and hence we havef G c (d c ) = f S c (d c ) -f B c (d c )for each c. Moreover, in this case, since f B c and f S c are continuous piecewise linear functions of d c , f G c is also a continuous piecewise linear function for d c in such a range[START_REF] Edelsbrunner | The upper envelope of piecewise linear functions: Algorithms and applications[END_REF]). The subtraction of two piecewise linear functions can be done in linear time in function of the number of parts of each function[START_REF] Edelsbrunner | The upper envelope of piecewise linear functions: Algorithms and applications[END_REF]); this number is at most T -l c for f B c and at most l c -f c + 1 for f S c , and hence f G c can be computed in O(T ) time. □3.3. NUMERICAL EXPERIMENTS

Figure 3 . 3 -

 33 Figure 3.3 -Power demand over the first week of the considered month for the site "S4".

Figure 3 . 4 -

 34 Figure 3.4 -Illustration of an optimal solution for the OBSC instance S4 with ∆ = 60.

Figure 3 . 5 -

 35 Figure 3.5 -Results obtained by solving OBSC using different battery discharge discretizations for the instance S1 with FTR reward policy.

  Concerning the battery assets, the site is equipped with a set B of batteries. Each battery b ∈ B is defined by the parameters B min b , B max b , P B b , D min b , and D max b as described in Chapter 3, and is subject

  x b,t ∈ [B min b , B max b ], ∀b ∈ B, ∀t ∈ T : amount of energy available in each battery b at the beginning of each time period t, in kWh. An additional variable x b,T +1 represents the energy available at the end of the planning horizon. The following additional binary variables are used to control which discharge intervals are performed: -y b,c , ∀c ∈ C, ∀b ∈ B: equal to 1 if the battery b is discharged during the time interval c = [f, l],

  we can apply the Mc-Cormick strategy as described in Section 3.2.1.3. The non-linearities of this type in Constraints (4.31) (i.e., corresponding to Constraints 4.6 and to Constraints 4.22) are the products x b,t z b,t , with x b,t ∈ [0, B max b ] for b in B, t in T . We define the new family of variables lin xz b,t , ∀b ∈ B, ∀t ∈ T and the related constraints: lin xz b,t ≤ z b,t B max b ∀b ∈ B, ∀t ∈ T (4.32) lin xz b,t ≤ x b,t ∀b ∈ B, ∀t ∈ T (4.33) lin xz b,t ≥ x b,t -(1 -z b,t )B max b ∀b ∈ B, ∀t ∈ T (4.34) 4.2. MATHEMATICAL FORMULATIONS Furthermore, to linearize x = min(a, b) for a, b ∈ [M ′ , M ], we introduce a binary variable y ∈ {0, 1} as described in Section 3.2.1.3. In our case, we have the new family of binary variables lin side b,t for all t in T and b in B to linearize the min in Constraints (4.31) (i.e., corresponding to Constraints 4.6 and to Constraints 4.22). We have u B b,t = (1 -z b,t ) min(a, b), where a = B max b /∆ -x b,t /∆ and b = min(P B b , P max -W t ). In order to linearize this expression, we first multiply all the terms a and b in (3.26) and (3.28) by 1 -z b,t . Hence, we derive the following constraints, where M ′ = 0 and M = max(P max , B max b /∆) :

Proposition 4

 4 .38) are equivalent, and, when z b,t = 1, Constraints (4.5) together with Constraints (4.8) and u B b,t ∈ [0, P B b ] ensure that u B b,t = 0. The continuous relaxation of (OM BSR -M ILP ) and (OM BSR -M ILP ′ ) have the same optimal value. Proof To prove that the solutions sets of these continuous relaxation are equivalent, we present two functions to transform any solution of the continuous relaxation version of (OM BSR -M ILP ), denoted by (OM BSR -LP ), into a feasible solution of the continuous relaxation of (OM BSR -M ILP ′ ), denoted by (OM BSR ′ -LP ), and vice-versa.

∑

  c∈Ct y ¯b,c = z b,t and ∑ c∈Ct|f =t y ¯b,c = b start b,t .

  ∑ c∈Ct y ¯b,c = z b,t and ∑ c∈Ct|f =t y ¯b,c = b start b,t

  1. x b,t ← x ¯b,t , for each b ∈ B and t ∈ T ; 2. z b,t ← z ¯b,t , for each b ∈ B and t ∈ T ; 3. u B b,t ← u ¯B b,t , for each b ∈ B and t ∈ T ; 4. u D t ← u ¯D t , for each t ∈ T ; 5. b start b,t ← ∑ c∈Ct|t=f y b,c for each b ∈ B and t ∈ T .

∑

  t∈T b start b,t . Moreover, from Constraints (4.2), we have that z b,t = ∑ c∈Ct y b,c for each t ∈ T . Then, by performing an elementary operation between two constraints (i.e., for each b,subtracting (4.2) for t -1 from Constraints (4.2) for t), we have that z b,t -z b,t-1 = ∑ c∈Ct y b,c . Hence, the relation z b,t -z b,t-1 = ∑ c∈Ct y b,cis valid, and Constraints (4.19) and (4.20) are satisfied.Such transformations are valid and the transformed solutions are equivalent because the batteries are used at the same time periods and with same discharge (resp. recharge) power levels as the original 4.3. COMPLEXITY ANALYSIS solutions. Consequently, the power bought for consumption and recharge at each time periods are the same which gives the same solution value, i.e., savings.

4. 4 .

 4 SOLVING HEURISTICS with cost 0, all the 3m batteries are used once and, more precisely, 3 batteries are used at odd time periods with a discharge of D max b . In addition, if all batteries are used, each one is used during one time period. Hence, the set of batteries used at each odd time period gives us a solution to an instance of the 3-Partition problem where the integers a b are equivalent to D max b . Similarly, from a 3-Partition problem solution, a solution of cost 0 for the associated OMBSR instance can be constructed. Then, OMBSR is by reduction a strongly NP-Hard problem.□

  of the OMBSR problem into sub-problems: We construct ⌈T /γ ′ ⌉-1 sub-problems OMBSR i for i in {1, . . . , (⌈T /γ ′ ⌉-1)}, each one being defined over a reduced time horizon T i of γ time periods starting at a time period multiple of γ ′ , i.e., T i = {((i -1)γ ′ + 1), . . . , ((i -1)γ ′ + γ)} and with at most N ′ b = ⌈N b γ/T ⌉ battery uses.2. Resolution of each OMBSR i sub-problem: From the (OMBSR-MILP) formulation based on T

  Figure 4.1 -Decomposition of an OMBSR instance over a week (i.e., T = 168) into subproblems OMBSR 1 to OMBSR 6 , assuming γ = 48 and γ ′ = 24. The curves represent the power demand observed (orange line) and the interpolation (black line). In this instance, N b = 3, ∀b ∈ B.

Figure 4 .

 4 Figure 4.2 -Example of a conflict graph associated with the decomposition of the OMBSR instance presented in Fig. 4.1, where N b = 3, ∀b ∈ B, and of the resulting MWkBIS solution.

  ∑ v∈S * β k,v ≤ B k for each k ∈ K). The same reduction from the Maximal Independent Set (MIS) of an interval graph to the computation of the longest path of a DAG can be done and the Bellman's algorithm can be adapted to support k-budgets with complexity O(|B| |K| (|V | + |A|)).

Figure 4 .

 4 Figure 4.3 illustrates the impact of such a modification in the edge creation criteria. In the example illustrated the site is equipped with two identical batteries b 1 and b 2 . In addition, we consider a constant power demand over the time horizon of 1kW and the parameters γ = 4 and γ ′ = 2. Based on these parameters, 4 sub-problems will be considered: OMBSR 1 , OMBSR 2 , OMBSR 3 and OMBSR 4 with solutions S1, S2, S3 and S4, respectively (see. Hence, the graph G created in OMBSR-G-HEU is composed by 4 nodes. For the standard edge creation criteria (C1 in the example), an edge

Figure 4 . 3 -

 43 Figure 4.3 -Illustration of the edge creation criteria for OMBSR-G-HEU with γ = 4 and γ ′ = 2 for a given instance with 2 identical batteries.

Figure 4 .Figure 4 . 4 -

 444 Figure 4.4 -Illustration of the impact of the edge creation criteria on the chordal properties of the graph G created by OMBSR-G-HEU.

Figure 4 .

 4 Figure 4.5 illustrates the three windows of the model obtained from Steps 1 and 2 of the relax-andfix procedure for two consecutive iterations i and i + 1. In this example the time horizon is composed of 168 time periods and the parameter values are δ = 48 and δ ′ = 24. The frozen window at Step 3 in iteration i is composed by 24 time periods for which the optimal values of the variables previously computed are fixed. The decision window is composed by 48 time periods and the relaxed window by 96 time periods. Note that at Step 4 of iteration i, the values of the first δ ′ time periods of the decision window are fixed at their optimal values obtained at Step 3. In the iteration i + 1, the frozen window at Step 3 is then composed by 48 time periods.

Figure 4 . 5 -

 45 Figure 4.5 -Illustration of the three windows obtained from Steps 1 and 2 of the relax-and-fix procedure on iterations i and i + 1 of an instance containing 168 time periods, considering δ = 48 and δ ′ = 24.

  Power demand generated with a randomness of 25% of the observed data.

Figure 4 . 6 -

 46 Figure 4.6 -Power demand over a week of two instances generated from data of a given site.

Figure 4 .

 4 Figure 4.6 illustrates the power demand of two instances based on the data of a given site: Figure 4.6a illustrates the power demand of an instance faithfully generated from original data, and Figure 4.6b the power demand with a randomness of 25%. Each site is equipped with at most 5 batteries, whose main properties are provided in what follows.The autonomy of the batteries varies between 20 and 60 hours. Besides, two types of batteries are installed (GEL and AGM), the recharge power rate P B b being dependent of each type:

4. 5 .

 5 NUMERICAL EXPERIMENTS In addition, the minimal power discharge D min b is 10% of D max b , which is different for each battery b. Finally, the value of B min b is 50% of the battery energy stock capacity, and each battery cannot be used more than 144 times over a year. More precisely, the value of N b considered in our tests is 3 times the number of weeks.

Figure 4 . 7 -

 47 Figure 4.7 -Power demand of a site over a week.

Figure 4 . 8 -

 48 Figure 4.8 -Energy prices of a site over a week .

4. 5 .

 5 NUMERICAL EXPERIMENTS the branch and bound method for some instances. Indeed, the values of Column Final GAP can be higher than the values of Column GAP * at root because harder instances are not considered to compute the value of Column GAP * at root. In fact, for instances with two-weeks time horizon, the model takes too much time to be created because of the computation of the set C t . We can observe that the number of variables and constraints increases much faster in (OM BSR -M ILP ′ ) than in the (OM BSR -M ILP ) model.

Figure 4 .

 4 Figure 4.9 -Illustration of the best solution found by OMBSR-MILP for an OMBSR instance with 3 batteries with a week time horizon. a) Energy stock in each battery, and b) Power demand and power bought over the time horizon.

  ∑ b∈B D max b ≈ W ¯. Indeed, the savings obtained are mainly limited by the maximal number 4.5. NUMERICAL EXPERIMENTS

Figure 4 .

 4 Figure 4.10 -Illustration of the best solution found by OMBSR-G-HEU for different values of γ and γ ′ for an OMBSR instance.

-

  y c P T O . We can then use similar equations used to linearize the expression x = min(a, b) in Section 3.2.1.3 to linearize the expression x = max(a, b), where M = ∑ s∈S max t∈T W s,t and M ′ = -P T O .

  ≤ y c B max bs ∀c ∈ C, ∀s ∈ S, ∀t ∈ {f c -1, f c } (5.44) lin xy c bs,t ≥ x bs,t -(1 -y c )B max bs ∀c ∈ C, ∀s ∈ S, ∀t ∈ {f c -1, f c } (5.45)

B 4 <

 4 a i < B 2 . Now let us consider an OMBSE instance with a time horizon T composed by 6m time periods. Moreover, let us consider that 3m sites equipped with different capacities D max bs = a b = B max bs /∆ -B min bs /∆ are installed such that B 4 < D min bs ≤ D max bs = a b < B 2 . Then, let us consider a constant power demand W = B over the horizon for each site and a constant energy price E c , i.e., E = E |T | c . We also consider that ∑ s∈S D max bs = mB. The others instance parameters are:

  ∑ s∈S,t∈T E t W s,t -mP T O E c . Since each battery can be used once, together with the properties D max bs = B max bs /∆ -B min bs /∆ and B 4 < D min bs ≤ D max bs < B 2

Figure 5 .

 5 Figure 5.1 illustrates the windows and the related variables for an instance composed by 7 sites managed over a week. We can observe that the decision window scrolls over the time horizon and over the sites for variables x, z, u D , u B and b start , and over the time horizon for variables y.

Figure 5 .

 5 Figure 5.1 -Illustration of bidimensional relax-and-fix heuristic windows.

5. 5 .

 5 LAGRANGIAN RELAXATION BASED SOLVING METHOD Z D (λ) = min c ⊤ x + λ ⊤ (Ax -b) since the values of the multipliers λ are positive, if Constraints (5.59) are not satisfied, it becomes a penalization in the objective function (5.62). Furthermore, it is well known that Z D gives a lower bound, refereed to as W LB , for (5.62)-(5.64) (i.e. Z D ≤ Z * ) for any λ > 0. In the same vein, any solution x that satisfies Constraints (5.59)-(5.61), refereed to as Z U B (x), yields an upper bound for (5.62)-(5.64) (i.e. Z * ≤ Z U B ). If Z D (λ) = Z U B (x)

  Replace the computation of the longest path in the DAG G created by the computation of the Maximum Weighted Budgeted Independent Set (MWBIS) of the interval graph G ′ obtained from G, using the modification of the Bellman's algorithm proposed in Section 4.4.1.1. The budget is the value of N b .

  40) and (5.43) y c ∈ {0, 1}, ∀c ∈ C This sub-problem, concerning the variables y c for each c ∈ C, corresponds to selecting the most profitable curtailments based on their coefficients imposed by the objective function (5.70b). Such a sub-problem can be translated into the Maximum Weighted Budgeted Independent Set (MWBIS) of an interval graph, such as described in Section 3.2.2.1, using the modification of the Bellman's algorithm proposed in Section 4.4.1.1 with the budget set to N c . The complete algorithm to solve the second sub-problem is the following: (a) for each curtailment c ∈ C, set the gain g(c), is the coefficient defined in (5.70b) for each variable y c . (b) for each curtailment c ∈ C, if g(c) is greater than or equal to zero, set y c = 0.

  s,t )], ∀c ∈ C This sub-problem, concerning the variables p max c for each c ∈ C, can be solved in linear time as follows: 5.5. LAGRANGIAN RELAXATION BASED SOLVING METHOD • For each c ∈ C, set p max c = ∑ s∈S max(W s,t ) if the coefficient of the variable in (5.70c) is negative, andp max c ∈ [0, B max bs ], c ∈ C, s ∈ S, t ∈ {f c -1, f c }This sub-problem, concerning the variables lin xy c bs,t for each c ∈ C, s ∈ S, t ∈ {f c -1, f c }, can be solved in linear time as follows:• For each c ∈ C, s ∈ S, t ∈ {f c -1, f c }, setlin xy c bs,t = B max bs if the coefficient of the variable in (5.70d), (5.70e) or (5.70f) is negative, and lin xy c bs,t = 0 otherwise. c ∈ {0, 1}, ∀c ∈ C This sub-problem, concerning the variables lin sidepcmax c for each c ∈ C, can be solved in linear time as follows:

  compute the value of ω c and the value of p max c from the values of the power demand W s and from the power bought u D s + u B bs for each site s ∈ S at time period f c -1. Then, set y c = 0 if there exists at least one time period t ∈ {f c , l c } such that ∑ s∈S (u B bs,t + u D s,t ) > p max c ; • for each c = (f c , l c ) ∈ C such that the corresponding variable y c was not fixed to 0 in the previous step, set the economic gain of the curtailment to g c = R fc P T O (l c -f c + 1);

  Figure 5.2 -Example of the evolution of the bounds considering a fixed step size

Figure 5 .Figure 5 . 3 -

 553 Figure 5.3 -Example of the evolution of the bounds considering a dynamic updated step-size of 1/ √ k after 10 iterations, where k is the number of the iteration.

Figure 5 .

 5 Figure 5.4 illustrates the solutions obtained with CPLEX solving (OM BSE -M ILP ) and with

5. 5 .Figure 5 . 4 -

 554 Figure 5.4 -Solutions obtained with (a) CPLEX solving the (OM BSE -M ILP ) model, and (b) with the Lagrangian relaxation for an instance with 2 sites managed over a week.

Figure 5 .

 5 Figure 5.5 illustrates a solution obtained with the Lagrangian relaxation using the Lagrangian multipliers initialization for the same instance used in Figure 5.4. Firstly, the solution obtained costs only 1% more than the one obtained in Figure 5.4-a, which corresponds to a reduction of 75% of the gap obtained in solution illustrated in Figure 5.4-b (i.e., a reduction from 4% to 1%). Moreover, 7 of the 10 curtailments performed are also present in the solution of Figure 5.4-a. In addition, 5 curtailments start at one of the 15 time periods that yield the greatest rewards.

Figure 5 . 5 -

 55 Figure 5.5 -Solution obtained with the Lagrangian relaxation using Lagrangian start for an instance with 2 sites managed over a week.

Figure 5 . 6 -

 56 Figure 5.6 -Example of the evolution of the bounds considering the Lagrangian relaxation with Init.

  varies in function of the sum of the maximum powers of all sites together. In other 5.6. NUMERICAL RESULTS words, P T O ∈ {25%, 50%, 75%, 100%} of ∑ s∈S D max bs (denoted as D ˜max ). Moreover, no more than 10 curtailments are allowed over a week (i.e., N c = 10).

Figure 5 . 7 -

 57 Figure 5.7 -Results obtained by solving OMBSE instances with OMBSE-MILP and OMBSE-LAG.

Figure 5 .

 5 Figure 5.8 -Results obtained by solving OMBSE instances with OMBSE-MILP and OMBSE-LAG.

7. 4 . 4 •

 44 Exploration des règles du marché de l'écrêtement dans un contexte de batterie unique Dans la première partie de cette thèse, nous explorons exclusivement l'impact des règles du marché d'effacement R8-R9 ainsi que des règles d'utilisation de sécurité R1R5, sans considérer l'aspect multibatteries. Dans ce contexte, nous considérons un problème avec un seul site et une seule batterie afin de comprendre exactement l'impact des règles du marché d'effacement sur la gestion des batteries, et d'analyser l'impact sur les méthodes de résolution. Ce problème s'appelle Optimisation d'un système de stockage par batterie utilisé par une entreprise pour participer au marché d'effacement (appelé OBSC), et est présenté dans la Section 7.5. Les principales contributions de cette première partie sont : • Modélisation des contraintes du marché français d'effacement et des règles d'utilisation de la sécurité dans les batteries de l'opérateur français de télécommunications Orange sous forme d'équations linéaires; • L'analyse du problème étudié afin d'identifier les aspects qui rendent le problème plus difficile à résoudre; 7.4. POSITIONNEMENT ET PRINCIPALES CONTRIBUTIONS • Identification de deux variantes pratiques qui peuvent être résolues à l'optimal en temps polynomial; La proposition d'un algorithme exact polynomial, basé sur la théorie des graphes pour résoudre les variantes, et qui peut également être utilisé comme une heuristique pour OBSC. Le problème peut en fait être réduit au calcul du plus long chemin dans un graphe orienté sans cycle; • Une évaluation expérimentale des gains économiques liés à l'utilisation d'une batterie installée en secours sur le marché de la réduction des émissions pour l'opérateur de télécommunications avec des instances réalistes. En termes de publications scientifiques, deux articles ont été publiés dans des conférences internationales dans le cadre de cette première étude : Silva et al. (2019a), et Silva et al. (2020a). En outre, deux articles ont été présentés dans des conférences nationales : Silva et al. (2020c), et Silva et al. (2019b).

7. 4 . 5

 45 Explorer la gestion des systèmes multi-batteries dans le contexte du marché de détail Dans la deuxième partie de cette thèse, nous explorons exclusivement l'impact de la gestion de plusieurs batteries ensemble sous les règles d'utilisation de sécurité R1-R6, sans considérer les effacements. Dans ce contexte, nous considérons un seul site équipé de plusieurs batteries qui ne sont utilisées que pour participer au marché de détail, et les effacements ne sont pas autorisées. Ce problème est appelé Optimisation d'un système de stockage multi-batteries afin de participer au marché de détail (appelé OMBSR), et est présenté dans la section 7.6.

7. 5 .

 5 OPTIMISATION D'UN SYST ÈME DE STOCKAGE AVEC UNE BATTERIE POUR PARTICIPER AU MARCH É D'EFFACEMENT.lorsque la batterie est en mode de décharge (c'est-à-dire la règle R4). De plus, la batterie a un taux de puissance maximal, noté D max et donné en kW, qu'elle peut libérer en raison des limitations de courant et de tension (c'est-à-dire la règle R5). Notez que D min ∈ [0, D max ], et que la demande de puissance W t est supposée être supérieure à D min à n'importe quelle période t de l'horizon. La batterie doit également être entièrement chargée au début et à la fin de l'horizon de planification (c'est-à-dire la règle R3).

(

  TO) pour chaque unité d'énergie non achetée au distributeur pendant cette période, à condition qu'elle fasse partie d'un effacement, est connue. Chaque effacement a une durée minimale (resp. maximale) ∆ min (resp. ∆ max ), donnée comme un nombre de périodes, qui doit être respectée (c'est-à-dire la règle R8). En outre, pendant chaque période d'effacement, l'opérateur de télécommunications doit réduire la puissance achetée au distributeur d'au moins une valeur donnée P T O en kW. En conséquence, pour chaque effacement c, une quantité maximale de puissance p max c (en kW) peut être achetée au distributeur à chaque période couverte par c (c'est-à-dire la règle R9). Le mode de calcul de ce montant est imposé par l'OT selon le pays. En France, le calcul de p max c est basé sur la consommation réelle d'électricité immédiatement avant l'effacement et sur la consommation prévue pendant l'effacement. Ce paramètre est considéré dans notre étude. Considérons un effacement c, qui commence à la période f c (première période) et se termine à la période l c (dernière période).Considérons également u t comme la puissance achetée au distributeur à chaque période de temps t (en kW). Afin de calculer p max c pour un c donné, une valeur de référence ω c , qui prend en compte la puissance moyenne appelée lors de l'effacement et la puissance u t achetée à la période t juste avant le début de la réduction c (c'est-à-dire t = f c -1), est nécessaire. Une telle valeur de référence est calculée comme suit :ω c = ∑ lc t=fc W t + u fc-1 l c -f c + 2 (7.1)Notez que la valeur de u fc-1 peut dépendre de la réduction effectuée avant c.Une fois la puissance de référence ω c connue, p max c est alors calculé comme suit:p max c = max(0, ω c -P T O ) (7.2)Rappelons que notre objectif est de gérer l'utilisation de la batterie tout en respectant à la fois la 7.5. OPTIMISATION D'UN SYST ÈME DE STOCKAGE AVEC UNE BATTERIE POUR PARTICIPER AU MARCH É D'EFFACEMENT.

  proposé et résolu le problème OBSC à l'aide d'un solveur standard, et chacune de ses solutions optimales fournit une stratégie d'utilisation la batterie à un coût optimal. Concernant les variantes, nous avons prouvé qu'elles étaient polynomiales en fournissant un algorithme orienté graphes efficace (appelé OBSC-GOA) pour les résoudre.En conséquence, nous avons observé que participer au marché d'effacement génère de grandes économies (88% avec FTR et 105% avec OTR en moyenne), réduisant ainsi l'OPEX énergétique de l'entreprise, et prouvant la prémisse de cette étude. Une série de tests sur des instances réalistes provenant du contexte français a été réalisée, afin d'analyser le modèle mathématique ainsi que les 7.8. CONCLUSION ET PERSPECTIVES augmente rapidement. D'un point de vue pratique, l'utilisation de OMBSE-LAG est faisable dans un contexte de production du fait que ses sous-problèmes peuvent être résolus séparément et en parallèle.Cette thèse a exploré différentes possibilités d'utilisation des batteries d'un opérateur de télécommunications principalement utilisées comme sauvegarde sur les marchés de l'énergie. Plus précisément, nous avons exploré l'utilisation de telles batteries pour effectuer des écrêtements de pointe, mais aussi pour effectuer des effacements de charge afin de réduire le coût énergétique total de l'entreprise. Premièrement, nous avons identifié différents défis liés à l'utilisation des batteries dans différents contextes qui nécessitaient une analyse plus approfondie pour mieux comprendre les difficultés ainsi que les opportunités. Ensuite, ces défis ont été étudiés individuellement, et à chaque fois des méthodes exactes et heuristiques ont été proposées. Enfin, le problème complet avec toutes les règles et possibilités d'utilisation de la batterie a été exploré et des méthodes de résolution basées sur les résultats obtenus ont été conçues.

-

  Un programme linéaire en nombres entiers mixtes ; -La preuve que OMBSE est fortement NP-Dur; -Une approche basée sur la relaxation lagrangienne qui réutilise les algorithmes proposés pour les sous-problèmes d'OBSC ; -Une heuristique bidimensionnelle relax-and-fix; Afin d'évaluer l'efficacité et la pertinence des modèles et algorithmes proposés, plusieurs expérimentations numériques ont été réalisées sur des instances réalistes, générées à partir des coûts publics de l'énergie et des données liées au marché de l'effacement, ainsi que des données internes de l'opérateur de télécommunications français Orange. On peut conclure que l'utilisation des batteries installées en secours d'un opérateur de télécommunications sur le marché de l'énergie est économiquement rentable. Si ces batteries sont utilisées pour effectuer des écrêtages et des effacements de charge, les gains obtenus peuvent être considérablement élevés. De plus, même si les batteries ne sont utilisées que pour l'écrêtement des pics, les gains qui peuvent être obtenus représentent déjà une valeur importante pour l'entreprise. 7.8.2 Perspectives de recherche 7.8.2.1 Perspectives scientifiques Au cours de cette thèse, plusieurs aspects ont été abordés et certains d'entre eux nécessitent des recherches plus approfondies. D'un point de vue théorique, la complexité du problème abordé dans la Section 7.5 concernant la gestion d'une batterie qui est utilisée pour effectuer des effacements est encore un problème ouvert. Seuls deux variants polynomiaux ont été identifiés. Dans la même veine, plusieurs méthodes de résolution ont été proposées pour les différents problèmes abordés qui dépendent fortement des paramètres de configuration. L'exploration en détail de ces paramètres, ainsi que l'identification des meilleures valeurs de ces paramètres pour des classes de problèmes spécifiques, sont d'une importance fondamentale pour obtenir de meilleurs résultats et performances de calcul. Dans les sections 7.6 et 7.7, des heuristiques basées sur la technique relax-and-fix et la décom-A.1. TRANSMISSION LOSS such an increase of voltage is called the Transformer. Every power plant uses a transformer to increase the voltage level before transmission for long distances.

  Figure A.1 -Power sharing grid considering transmission losses up to 25%

Figure

  Figure A.2 illustrates a possible case where batteries are shared between sites: sites in orange are

Figure A. 2 -

 2 Figure A.2 -Energy power sharing schema

  Mots-clés: Recherche Opérationnelle, Système de Stockage d'Energie de Multiples Batteries, Mécanisme de Réponse à la Demande, Effacements d'Energie, Programmation Linéaire en Nombres Entiers Mixtes, Algorithmes de Graphes, Réseaux de Télécommunications.

  one can use Bellman's algorithm to compute a longest path from v s to v t in linear time (e.g., see Dasgupta et al. (2008)), i.e., in time O(|V | + |A|), which is O(T 4 |D| 2 ) in our case. Furthermore, given a longest path from v s to any vertex v in G, one can obtain a path from v s

  min(P B , P max -W t ) is a constant, and hence f B c is a linear function of d c . The same holds for any t such that l c + 1 ≤ t ≤ T . Furthermore, the union of the intervals SOLVING APPROACHES fact a piecewise linear function of d c , that we will simply denote by f B c (d c ). We can even show that f B c (d c ) is continuous with respect to d c . B , P max -W t )] on the one hand, and that d c ∈ [∆ B , P max -W t )] on the other hand:

	[∆ [∆	∑ t-1 t=lc+1 min(P ∑ t ∑ t t=lc+1 min(P B , P max -W t ) for some t, which implies that d c ∈ t=lc+1 min(P Indeed, assume that d c = ∆ ∑ t-1 t=lc+1 min(P B , P max -W t ), ∆ ∑ t t=lc+1 min(P ∑ t t=lc+1 min(P B , P max -W t ), ∆ ∑ t+1 t=lc+1 min(P

B , P max -W t ), ∆ B , P max -W t )] for l c + 1 ≤ t ≤ T covers all the possible values of d c , as l c + 1 ≤ t B c ≤ T . As a consequence, since all parts of f B c are linear, f B c is in 3.2.

  and (3.12), we obtain that W t -D max ≤ u D t ≤ min(p max for all time periods during curtailment c. Therefore, from Constraints (3.8) and (3.10), we derive that x t -x t+1 ≥ ∆ max(min(W t , D min ), W t -p max Let us define such a lower bound on x t -x t+1 for each time period t ∈ {f c , . . . , l c } as d min t . In addition, from Constraints (3.6), (3.12) and (3.10), we derive that x t -x t+1 ≤ ∆ min(W t , D max ). Let us define such an upper bound on x t -x t+1 for each time period t ∈ {f c , . . . , l c } as d max

	c	, W t ) and
	that u B t = 0

c

).

t .

  Thus, d c must belong to the interval [ Since d c belongs to such an interval, we have from Constraints (3.64) that x lc+1 = B max -d c ≥ B min . Hence, for each t ∈ {f c , . . . , l c }, since d min .65) are always satisfied for each time period t ∈ {f c , . . . , l c + 1}, and can be relaxed if the value of d c belongs to such an interval.Moreover, if we consider an optimal solution x ′ to the problem obtained by relaxing Constraints (3.64) while considering that x fc -x lc+1 = ∑ lc t=fc (x t -x t+1 ) = d c , a solution x of same value that respects Constraints (3.64) can be obtained as follows:

	∑ lc t=fc d min t , min(	∑ lc t=fc d max t	,
	B max -B min )].

t > 0, the value of x t is also greater than B min from Constraints

(3.63)

. Similarly, for each t ∈ {f c + 1, . . . , l c + 1}, since d min t > 0 and x fc = B max from Constraints

(3.64)

, the value of x t is smaller than B max from Constraints

(3.63)

. Thus,

3.2. SOLVING APPROACHES

Constraints

(3

  as desired. Consequently, by setting ∆ t = x t -x t+1 for all t ∈ {f c , . . . , l c }, we obtain the following equivalent L represents the time period t ∈ {f c , . . . , l c } for which G ′ t is the largest. An optimal solution for this problem can be obtained by defining∆ t i = d min t i + δ t i for all t i ∈ L, where δ t i ≥ 0. Intuitively, the values of ∆ t i are set to d max t iin the order defined by L. However, Constraint (3.68) imposes a total amount of d c , and hence this will be possible up to a given time period t k for which δ t k = d c -

	problem:
		lc
	max	∑	G ′ t ∆ t
		t=fc
	s.t.
		∑	∆ t = d c	(3.68)
	t∈{fc,...,lc}
	∆ t ∈ [d min t , d max
				∑ t j ∈L|j≥k d min t j -

t ] ∀t ∈ {f c , . . . , l c } (3.69) This problem can be solved in polynomial time using a greedy algorithm that considers a list L of time periods t ordered decreasingly by G ′ t . In particular, in such a list, t 1 ∈ ∑ t j ∈L|j<k d max t j ,

  which implies that min(d c , d min + .2. SOLVING APPROACHES When t i = t i * , we have d c ≥ d min + ∑ t j ∈L|j<i * (d max t j -d min t j ) and d c ≤ d min + ∑ t j ∈L|j≤i * (d max t j -d min t j ), i.e., d c -d min -

	∑ t j ∈L|j<i * (d max t j	-d min t j ) ≤ d max t i * -d min t i * . Hence, from Equation (3.70), we have
		∑ t j ∈L|j<i
	(d max t j -d min t j )) = d min +

∑

t j ∈L|j<i (d max t j -d min t j ). Moreover, we have that

d c ≥ d min + ∑ t j ∈L|j<i * (d max t jd min t j ) ≥ d min + ∑ t j ∈L|j≤i (d max t j -d min t j ), since i ≤ i * -1, which implies that d c -d min -∑ t j ∈L|j<i (d max t jd min t j ) ≥ d max t i -d min t i .

Then, from Equation (3.70), we have

∆ t i = x t i -x t i +1 = d min t i +d max t i -d min t i = d max t i .

3

  a linear function of d c , and the same holds for any t i * ∈ L. Furthermore, the union of the intervals [d min + )] for all t i * ∈ L covers all the possibles values of d c in the range [d min , d max ]. As a consequence, since all parts of the function max ((xt)t,(u D

			∑ t i ∈L|i<i * (d max t i	-
	d min t i ), d min +	∑ t i ∈L|i≤i * (d max t i	-d min t i t )t,(u B t )t)∈F * c (y,d)

Table 3

 3 .1. The mean, or average value, of the power demand over the horizon, denoted

	by W ¯= ∑ t∈T Wt T

Table 3 .

 3 1 -Sites characteristics

	Site B max P B D max W S1
		39.26 2.34 5.38 3.93
	S2	2.35 0.14 0.64 0.47
	S3	9.11 0.59 2.49 1.82
	S4 106.33 6.38 14.50 10.63
	S5	6.05 0.35 1.64 1.21
	S6	5.39 0.22 1.48 1.08
	S7	6.66 0.4 1.81 1.33
	S8	26.36 0.81 3.60 2.64
	S9	8.64 0.52 2.36 1.73
	S10	9.33 0.56 2.51 1.87

Table 3 .

 3 3 -Average of savings obtained for different reward policies and problems.

	Reward Policy	OBSC-MILP* OBSC-D-5 OBSC-D-1 OBSC-R
	FTR	105%	105%	108%	101%
	OTR	88%	96%	99%	93%
			* Instances solved to optimality

  c is valid for any t ∈ T and is equivalent to Constraints (4.19) when

Table 4 .

 4 1 shows the numerical results concerning OMBSR instances solved with OMBSR-MILP. In this table, each row stores the average of the results for a subset of instances, grouped by the number |B| of batteries installed in the site and by the number of weeks considered. Column W rand corresponds to the randomness variation in the power demand of instances. Column Stand. Cost corresponds to the average of the standard cost, i.e., the cost when no battery is used, equal to ∑ t∈T E t W t . Column W ˜and P B ˜report the mean of W and P B , respectively. Besides, the average running time, given in seconds, and the average reduction in the total energy cost, given in %, are provided in columns CPU Time and savings. In addition, column Final GAP reports the average optimality gap, i.e., the relative gap between the value of the best integer solution obtained by CPLEX and the best lower bound computed. Column LR savings and GAP at root reports the average savings achieved by the continuous relaxation, and the average optimality gap reached at the root of the branch and bound 4.5. NUMERICAL EXPERIMENTS tree, respectively. Furthermore, columns Nb of Var, Int Var and Nb of Const. report the mean number of variables, the mean percentage of integer variables and the mean number of constraints,

	respectively.
						Table 4.1 -OMBSR-MILP results
	W rand	weeks |B|	Stand. Cost	W (kW)	P B (kW)	CPU Time (s)	Final GAP savings	LR savings	GAP at root	Nb of Var	Int Var	Nb of Const.
	0%	1	1	634.6 = C	3.74	0.78	341	0.1%	2.45%	4.08%	69%	1176 43%	2523
	0%	1	2	585.1 = C	3.45	0.39	1 800 33.8%	2.50%	4.19%	107%	2184 46%	4710
	0%	1	3	585.3 = C	3.45	0.23	1 800 41.7%	2.41%	4.02%	134%	3192 47%	6897
	0%	1	4	713.2 = C	4.20	0.22	1 800 49.9%	2.30%	3.99%	144%	4200 48%	9084
	0%	1	5	507.4 = C	2.99	0.14	1 800 54.3%	2.44%	4.27%	180%	5208 48% 11271
	0%	2	1 1 269.8 = C	3.74	0.78	1 800 36.3%	2.48%	4.23%	127%	2352 43%	5043
	0%	2	2 1 169.9 = C	3.45	0.39	1 800 52.8%	2.51%	4.35%	132%	4368 46%	9414
	0%	2	3 1 169.5 = C	3.44	0.23	1 800 64.6%	2.31%	4.17%	163%	6384 47% 13785
	0%	2	4 1 426.5 = C	4.20	0.22	1 800 68.2%	2.26%	4.13%	165%	8400 48% 18156
	0%	2	5 1 017.6 = C	3.00	0.14	1 800 73.8%	2.35%	4.42%	183% 10416 48% 22527
	0%	3	1 1 904.8 = C	3.74	0.78	1 800 47.2%	2.48%	4.28%	126%	3528 43%	7563
	0%	3	2 1 752.8 = C	3.44	0.39	1 800 65.0%	2.45%	4.40%	142%	6552 46% 14118
	0%	3	3 1 753.7 = C	3.44	0.23	1 800 70.2%	2.31%	4.22%	172%	9576 47% 20673
	0%	3	4 2 140.0 = C	4.20	0.22	1 800 72.4%	2.26%	4.18%	181% 12600 48% 27228
	0%	3	5 1 527.6 = C	3.00	0.14	1 800 79.0%	2.34%	4.46%	239% 15624 48% 33783
	25%	1	1	634.6 = C	3.74	0.78	1 560 39.5%	2.28%	3.98%	116%	1176 43%	2523
	25%	1	2	585.1 = C	3.45	0.39	1 459 35.1%	2.53%	4.33%	142%	2184 46%	4710
	25%	1	3	585.3 = C	3.45	0.23	1 483 39.3%	2.51%	4.28%	161%	3192 47%	6897
	25%	1	4	713.2 = C	4.20	0.22	1 545 36.3%	2.30%	3.90%	137%	4200 48%	9084
	25%	1	5	507.4 = C	2.99	0.14	1 800 50.4%	2.52%	4.37%	195%	5208 48% 11271
	25%	2	1 1 269.8 = C	3.74	0.78	1 800 64.8%	2.23%	4.12%	114%	2352 43%	5043
	25%	2	2 1 169.9 = C	3.45	0.39	1 800 62.3%	2.45%	4.49%	210%	4368 46%	9414
	25%	2	3 1 169.5 = C	3.44	0.23	1 800 64.3%	2.43%	4.44%	159%	6384 47% 13785
	25%	2	4 1 426.5 = C	4.20	0.22	1 800 63.7%	2.21%	4.05%	167%	8400 48% 18156
	25%	2	5 1 017.6 = C	3.00	0.14	1 800 72.0%	2.41%	4.52%	174% 10416 48% 22527

Table 4 .

 4

	W rand	weeks	|B|	Stand. Cost	W (kW)	CPU Time (s)	Final GAP	savings	CPU Time Warmed (s)	Final GAP Warmed	savings Warmed
	0%	1	1	634.6 = C	3.74	341	0.1%	2.45%	618	0.5%	2.45%
	0%	1	2	585.1 = C	3.45	1 800	33.8%	2.50%	1 800	33.0%	2.50%
	0%	1	3	585.3 = C	3.45	1 800	41.7%	2.41%	1 800	41.7%	2.40%
	0%	1	4	713.2 = C	4.20	1 800	49.9%	2.30%	1 800	52.0%	2.28%
	0%	1	5	507.4 = C	2.99	1 800	54.3%	2.44%	1 800	54.4%	2.43%
	0%	2	1	1 269.8 = C	3.74	1 800	36.3%	2.48%	1 800	37.0%	2.48%
	0%	2	2	1 169.9 = C	3.45	1 800	52.8%	2.51%	1 800	57.3%	2.44%
	0%	2	3	1 169.5 = C	3.44	1 800	64.6%	2.31%	1 800	65.1%	2.31%
	0%	2	4	1 426.5 = C	4.20	1 800	68.2%	2.26%	1 800	74.5%	2.18%
	0%	2	5	1 017.6 = C	3.00	1 800	73.8%	2.35%	1 800	73.1%	2.37%

2 -OMBSR-MILP with a warm-up results

Table 4 .

 4 2 stores the numerical results concerning the OMBSR instances solved with OMBSR-MILP

Table 4 . 4 -

 44 OMBSR-G-HEU numerical results

	W rand	weeks	|B|	Stand. Cost	W (kW)	(48.24) CPU Time (s)	(48.24) savings	(36.12) CPU Time (s)	(36.12) savings	(24.12) CPU Time (s)	(24.12) savings
	0%	1	1	634.6 = C	3.74	2	2.19%	3	2.07%		1.60%
	0%	1	2	585.1 = C	3.45	8	2.44%	6	2.24%		1.96%
	0%	1	3	585.3 = C	3.45	41	2.36%	15	2.14%		1.86%
	0%	1	4	713.2 = C	4.20	193	2.29%	59	2.11%		1.85%
	0%	1	5	507.4 = C	2.99	252	2.45%	125	2.24%		2.04%
	0%	2	1	1 269.8 = C	3.74	4	2.23%	6	2.12%		1.69%
	0%	2	2	1 169.9 = C	3.45	16	2.41%	13	2.27%		1.97%
	0%	2	3	1 169.5 = C	3.44	81	2.36%	30	2.18%		1.88%
	0%	2	4	1 426.5 = C	4.20	390	2.29%	119	2.14%		1.87%
	0%	2	5	1 017.6 = C	3.00	520	2.44%	229	2.29%		2.05%
	0%	3	1	1 904.8 = C	3.74	7	2.22%	8	2.21%		1.70%
	0%	3	2	1 752.8 = C	3.44	25	2.41%	20	2.36%		1.96%
	0%	3	3	1 753.7 = C	3.44	123	2.36%	48	2.27%		1.89%
	0%	3	4	2 140.0 = C	4.20	580	2.29%	196	2.22%		1.86%
	0%	3	5	1 527.6 = C	3.00	791	2.44%	375	2.38%		2.05%
	25%	1	1	634.6 = C	3.74	125	2.25%	81	2.09%		1.79%
	25%	1	2	585.1 = C	3.45	81	2.43%	27	2.27%		1.97%
	25%	1	3	585.3 = C	3.45	163	2.48%	73	2.22%		1.83%
	25%	1	4	713.2 = C	4.20	81	2.18%	27	2.02%		1.71%
	25%	1	5	507.4 = C	2.99	173	2.48%	65	2.32%		2.08%
	25%	2	1	1 269.8 = C	3.74	260	2.23%	158	2.11%		1.82%
	25%	2	2	1 169.9 = C	3.45	173	2.44%	55	2.29%		2.02%
	25%	2	3	1 169.5 = C	3.44	343	2.45%	130	2.27%		1.92%
	25%	2	4	1 426.5 = C	4.20	170	2.19%	54	2.05%		1.73%

Table 4 .

 4

						4 continued from previous page
	W rand	weeks	|B|	Stand. Cost	W (kW)	(48.24) CPU Time (s)	(48.24) savings	(36.12) CPU Time (s)	(36.12) savings	(24.12) CPU Time (s)	(24.12) savings
	25%	2	5	1 017.6 = C	3.00	352	2.48%	129	2.34%	26	2.10%
	25%	3	1	1 904.8 = C	3.74	397	2.23%	254	2.18%	26	1.82%
	25%	3	2	1 752.8 = C	3.44	265	2.45%	92	2.39%	26	2.03%
	25%	3	3	1 753.7 = C	3.44	514	2.46%	211	2.37%	37	1.95%
	25%	3	4	2 140.0 = C	4.20	262	2.17%	90	2.14%	21	1.75%
	25%	3	5	1 527.6 = C	3.00	548	2.47%	210	2.43%	39	2.10%

Table 4 .

 4 4 stores the numerical results concerning the OMBSR instances solved with OMBSR-G-HEU considering the parameters (γ, γ ′ ) ∈ {(48, 24), (36, 12), (24, 12)}. In this table, each row stores the average of the results for a subset of instances, grouped by the number |B| of batteries installed in the site and by the number of weeks considered in the optimization. Column W rand corresponds to the randomness variation in the power demand of instances. Column Stand. Cost corresponds to the average of the standard cost, i.e., the cost when no battery is used, equal to ∑ Besides, the average running time, given in seconds, and the average reduction in the total energy cost, given in %, are provided in columns CPU Time and savings for each pair of values (δ, δ ′ ) considered, respectively.

				Table 4.5 -OMBSR-RF-HEU numerical results
	W rand	weeks |B|	Stand. Cost	W (kW)	(48.24) CPU Time (s)	(48.24) savings	(24.12) CPU Time (s)	(24.12) savings
	0%	1	1	634.6 = C	3.74	4	2.14%	2	2.02%
	0%	1	2	585.1 = C	3.45	76	2.22%	7	2.18%
	0%	1	3	585.3 = C	3.45	340	2.13%	17	1.99%
	0%	1	4	713.2 = C	4.20	792	2.10%	89	1.96%

t∈T E t W t . Column W reports the mean of W . Besides, the average running time, given in seconds, and the average reduction in the total energy cost, given in %, are provided in columns CPU Time and savings for each pair of values (γ, γ ′ ) considered, respectively. Table 4.5 stores the numerical results concerning the OMBSR instances solved with OMBSR-RF-HEU considering the parameters (δ, δ ′ ) ∈ {(48, 24), (24, 12)}. In this table, each row stores the average of the results for a subset of instances, grouped by the number |B| of batteries installed in the site and by the number of weeks considered in the optimization. Column W rand corresponds to the randomness variation in the power demand of instances. Column Stand. Cost corresponds to the average of the standard cost, i.e., the cost when no battery is used, equal to ∑ t∈T E t W t . Column W ˜reports the mean of W ¯.

  ensure that b start bs,t = 1 if the battery of the site s starts being discharged at time period t.

	5.2. MATHEMATICAL FORMULATION
	which is ensured by the following constraints:
	u B bs,t = (1 -z bs,t ) min(B max bs /∆ -x bs,t /∆, P B bs , P max s	-W s,t )	∀s ∈ S, ∀t ∈ T (5.8)
	b start bs,t ≥ z bs,t -z bs,t-1	∀s ∈ S, ∀t ∈ T \{1} (5.5)
	b start bs,t 1 = z bs,t 1	∀s ∈ S	(5.6)
	Constraints (5.7) guarantee that the battery of each site s can start being discharged only if it is fully
	charged (and hence together with Constraints (5.8) that the battery starts being recharged immediately
	after each use, up to its maximum capacity):
	B max bs b start bs,t ≤ x bs,t		∀s ∈ S, ∀t ∈ T (5.7)
		∑	s∈S u D s,t ) of all sites,

The power purchased in the retail market at each time period t is the sum of the power bought for charging the batteries ( ∑ s∈S u B bs,t ) and the power bought for consumption (

  {s start , . . . , s start + δ site } • S d ¯← {s start , . . . , s start + δ ′ site } • S r ← {s start + 1, . . . , S} • Construct a model M t start ,s start , such that the variables: -x bs,t , z bs,t , b start bs,t , u D s,t , u B bs,t are fixed for all t ∈ T f , s ∈ S and for all t∈ T d ¯, s ∈ S f ; -y c , p max c are fixed for all c ∈ C t , t ∈ T f ; -z bs,t , b start bs,t ∈ {0, 1} for all t ∈ T d , s ∈ S d ; -y c ∈ {0, 1} for all c ∈ C t , t ∈ T d ; -z bs,t , b start bs,t ∈ [0, 1] for all t ∈ T r , s ∈ S, for all t ∈ T d \ T d ¯, s ∈ S f , and for all t ∈ T d , s ∈ S r ; -y c ∈ [0, 1] for all c ∈ C t , t ∈ T r . • Solve M t start ,s start • Fix the variables x bs,t , z bs,t , b start bs,t , u D s,t , u B bs,t for all t ∈ T d ¯, s ∈ S d ¯to the obtained optimal values end • Fix the variables y c , p max c for all c ∈ C t , t ∈ T d ¯such that l c is smaller than or equal to the last time period of T d ¯to the obtained optimal values end return variables x bs,t , z bs,t , b

	start bs,t , u D s,t , u B bs,t , y c , p max c
	Algorithm 1: Bidimensional relax-and-fix heuristic

  1,9 c,s,t for each c in C, s in S and t in {f c -1, f c } for Constraints(5.46); Note that Constraints (5.34) and(5.47) are not relaxed since they are not linking constraints between different sites and can be solved separately in the sub-problems of each site. Finally, the linear version of the Lagrangian optimization problem applied to (OM BSE -M ILP ) (refereed to as (OM BSE L ))

	5.5. LAGRANGIAN RELAXATION BASED SOLVING METHOD
	min	∑	E t	∑	(u B bs,t + u D t ) -	∑	y c R fc P T O (l c -f c + 1)
			t∈T		s∈S				c∈C
	+	∑	λ 1,1 t (	∑	(u D s,t + u B bs,t ) -	∑	P max s	(1 -	∑	y c ) -	∑	p max c	)
		t∈T		s∈S				s∈S			c∈Ct	c∈Ct
	+	∑	λ 1,2 c (-p max c	+	∑ s∈S (y c	∑ lc t ′ =fc-1 W s,t ′ + lin xy c bs,fc /∆ -lin xy c bs,fc-1
		c∈C
	can be written as follows:

  for each t ∈ T and s ∈ S, and x bs,T +1 for each s ∈ S. Hence, the values of such variables are maintained in the Lagrangian heuristic.

	5.5. LAGRANGIAN RELAXATION BASED SOLVING METHOD
	and b start bs,t
	, (5.48)-(5.52), and (5.54)-(5.55) related to the variables x bs,t , u B bs,t , u D s,t , z bs,t

Table 5

 5

	.1 -OMBSE-MILP results

Table 5 .

 5 2 stores the numerical results concerning the OMBSE instances solved with OMBSE-HEU using the parameters (δ time , δ ′ time ) ∈ {(36, 12), (24, 12)}, and (δ site , δ ′ site ) = (1, 1). In this table, each row stores the average of the results for a subset of instances, grouped by the number |S| of sites of the instances, and by the values of δ time and δ ′ time . Column Stand.

  . Ce mécanisme est basé sur les changements dans la consommation d'électricité des clients finaux par rapport à leurs habitudes de consommation normales, en réponse aux variations des prix de l'énergie dans le temps.Récemment, une autre façon rentable pour une entreprise d'utiliser ses batteries, est apparue. Il n'est pas possible d'acheter plus de P max kW au distributeur sur une période donnée; R8 -La durée de chaque réduction effectuée est limitée par des périodes de temps de ∆ min et ∆ max ;

	7.4. POSITIONNEMENT ET PRINCIPALES CONTRIBUTIONS
	R7 -R9 -p max c	kW peuvent être achetés au distributeur pendant l'effacement c s'il est effectué;
	R10 -Le nombre d'effacements qui peuvent être effectuées sur l'horizon temporel est limité à N c .
	Notez que les règles R1-R6 concernent les règles d'utilisation de la sécurité, et les règles R7-R10 au
	marché de l'énergie. En Section 7.5, uniquement les règles R1-R5, et R7-R9 sont considérées, tandis
	que seules les règles R1-R7 sont considérés dans la Section 7.6. En section 7.7, toutes les règles R1-R10
	sont pris en compte.
	Depuis 2016, l'opérateur de télécommunications français Orange France utilise les batteries de ses sta-
	tions de base installées pour la sauvegarde afin d'ajuster la consommation électrique et d'effectuer des
	réductions de charge par le biais du mécanisme de réponse à la demande appelé Notification d'échange
	de blocs (NEBEF). (RTE-Portal, 2020). Dans ce contexte, Orange France interagit directement avec
	la TO grâce à sa grande capacité de flexibilité de la charge en participant au marché d'effacement via le
	mécanisme NEBEF. Pour ce faire, elle utilise ses batteries pour lesquelles des règles strictes de sécurité
	d'utilisation doivent de toute façon être respectées. Cependant, aucune stratégie d'optimisation dans
	une telle utilisation n'est prise en compte.

ACKNOWLEDGEMENT

B.1. RECHARGING PROCESS

direction of Mrs. Safia Kedad-Sidhoum and of Mr. Cédric

NUMERICAL EXPERIMENTS

W rand corresponds to the randomness variation in the power demand of instances. Column Stand.

Cost corresponds to the average of the standard cost, i.e., the cost when no battery is used, equal to

Column W ˜reports the mean of W . Besides, the average running time, given in seconds, and the average reduction in the total energy cost, given in %, when (OMBSR-MILP) is solved without a warm-up are provided in columns CPU Time and savings. In addition, column Final GAP reports the value of the average optimality gap, i.e., the relative gap between the value of the best integer solution obtained by CPLEX and the best lower bound computed, when (OMBSR-MILP) is solved without a warm-up. Column CPU Time Warmed, Final GAP Warmed and savings Warmed report the mean CPU time, given in seconds, the mean optimality gap and the mean savings obtained when (OMBSR-MILP) is solved with a warm-up, respectively. Note that columns CPU Time and Final GAP are the same ones presented in Table 4.1.

NUMERICAL EXPERIMENTS

is equipped with 5 batteries for a three-week time horizon. However, the best solution found gives a reduction in the energy bill (2.38% on average) even for the instances with no optimality guarantee.

In addition, the optimality gap found at the root of the branch and bound tree is higher than the final optimality gap obtained (153% and 54%, respectively), which shows that CPLEX is able to improve the bounds over the iterations. We observe that 57.9% of instances solved to optimality have a well defined periodicity, i.e., with no randomness in the power demand. In addition, the average gap for those instances is smaller compared to instances with power randomness of 25% (47.6% and 52.8% for instances with one or two weeks, respectively). Hence, OMBSR-MILP tends to perform slightly better for instances with no randomness in the power demand. In spite of the fact that the number of variables and constraints grows linearly with the number of time periods, even for instances with a single battery installed for which we can use the algorithm proposed in Chapter 3 to solve in polynomial time, OMBSR-MILP cannot reach an optimality guarantee within the CPU time limit for instances with a single battery for a two-week time horizon or more.

Supplementary results are displayed in Table 4.2 for OMBSR-MILP when an initial solution is given to CPLEX. In these tests, we set the initial solution as the solution obtained from OMBSR-RF-HEU.

We aim to analyze if CPLEX is able to obtain a first feasible solution or to converge to an optimal solution. We tested only instances with one and two weeks time horizon with randomness of 0%, for a total of 100 instances. We observe that the final solution obtained by CPLEX when an initial solution is given is better than the ones with no initial solution for 48% of the instances tested. The solutions obtained are 1.48% better on average. However, no optimality guarantee is obtained for any instance tested that is not solved to optimality with no initial solution.

Concerning OMBSR-MILP', only instances with one-week time horizon are tested. In this context, optimal values are obtained only for 14 instances where the site has a single battery installed, corresponding to 14% of all instances tested. For all other instances, no optimality guarantee is observed within the CPU time limit. Moreover, the optimality gap observed is significant, varying from 1.5% on average for some instances where the site is equipped with a single battery, up to 1250% on average for larger instances where the site is equipped with 5 batteries. However, the best solution found gives a reduction in the energy bill (2.29% on average) even for the instances with no optimality guarantee.

In addition, the optimality gap found at the root of the branch and bound tree is higher than the final optimality gap obtained reached. However, no feasible solution is obtained at the beginning of 4.6. CONCLUSION the powers D max of all batteries is equivalent to the average power demand), the time horizon or the average power demand, i.e., the value of W ¯. However, the use of multiple batteries is desirable for safety reasons and to increase the lifetime of the batteries. Concerning the heuristics, the results obtained proved their economical relevance, by providing better solutions compared to the best ones obtained by the mixed-integer linear programs on large-scale instances. Furthermore, OMBSR-G-HEU proved to be more efficient for instances with a well defined periodicity in the power demand and prices, while OMBSR-RF-HEU proved to be more efficient for the general case.

Concerning the performance of our algorithms, we observe that the number of batteries installed and the time horizon are the parameters that have the most impact on the solving time. We consider a time limit of 30 minutes for solving each instance, and, in this aspect, the heuristics proved to be computationally efficient, while we observe that the solving time for the mixed-integer linear programs proposed increases fast.

In the following, we will explore the management of multiple batteries that are used to perform load curtailments, and reuse some of the algorithms and methods proposed in this chapter to develop fast solving approaches. Local search approaches could also be used to solve instances with periodicity in the data (for instance, in the power demand), such as the ones that we have considered.

NUMERICAL RESULTS

• Init // initial structures, Lagrangian multipliers, step-size, θ, . . .

Numerical results

In order to assess the efficiency and relevance of our solving approaches for the OMBSE problem, we performed some numerical experiments on realistic instances. Several instances composed by many sites with different consumption profiles and settings are considered, generated from internal data of the French telecommunications operator Orange. The energy costs are taken from public historic data of the French retail market (RTE-Portal).

The three solving approaches presented are considered. Firstly, the default branch and bound algorithm of the commercial solver CPLEX performed on the formulation (OMBSE-MILP), that is denoted by OMBSE-MILP. Secondly, the general relax-and-fix heuristic presented in Section 5.4 parameterized by (δ time , δ ′ time ) ∈ {(36, 12), (24, 12)}, and (δ site , δ ′ site ) = (1, 1), that is denoted by OMBSE-HEU. The arguments (essentially the periodicity of energy costs and demand of our data) for choosing these parameters δ time and δ ′ time , for the instances tested are the sames as the ones presented in Chapter 4. Finally, the Lagrangian decomposition method with the subgradient method presented in Section 5.5 and with the improvements, that is denoted by OMBSE-LAG.

The numerical experiments are organized as follows. Firstly, in Section 5.6.1, we describe the 5.6. NUMERICAL RESULTS Column Lin Relax reports the mean of the optimal value of the continuous relaxation of (OM BSE -M ILP ). Columns sol and reduc store the mean of the solution value in monetary units, and the average reduction in the total energy cost, given in %, respectively. Besides, the average optimality gap, i.e., the value of the relative gap between the value of the best integer solution obtained by CPLEX and the best lower bound computed, given in %, and the average relative gap reached at the root of the branch and bound tree, given in %, are provided in columns Opt. GAP and GAT at root. Column CPU Time provides the average running time given in seconds. In addition, columns Nb of Var and % of bin var report the mean number 5.6. NUMERICAL RESULTS seconds, are provided in columns reduc and CPU Time. Furthermore, column Nb of It reports the mean number of iterations of the algorithm. Note that only small instances (i.e., instances with up to 4 sites) were solved with OMBSE-HEU because of the high CPU Time necessary.

Concerning the results obtained with OMBSE-LAG, Table 5.3 stores these results, grouped by the number |S| of sites of the instances, and by the power contractualized P T O . Note that the results for both types of power demand W (i.e., observed or randomized) are grouped because the results are similar for both cases. Column Stand. Cost corresponds to the average of the standard cost, i.e., the cost when no batteries are used, equal to ∑ t∈T ,s∈S E t W s,t . Besides, Columns Sub LB and Sub UB, report the mean value of the best lower and upper bounds obtained with OMBSE-LAG, given in monetary units, respectively. In addition, the average running time, given in seconds, is provided in column CPU Time. Furthermore, columns sol and reduc store the mean of the solution values in monetary units, and the average reduction in the total energy cost, given in %, respectively.

Experimental analysis

In the following we analyze the results presented in the previous section.

We begin by focusing on the running times and observe a significant impact of the number of sites on the performance of all algorithms. Indeed, we observe that the size of the problem increases in function of the number of sites, and that the problem becomes harder to solve because of the combinatorial aspects and dependence of the sites (i.e., when batteries of multiple sites are used together to perform a load curtailment).

Concerning OMBSE-MILP, for all instances, including the ones with only 2 sites, no optimality guarantee is observed within the CPU time limit. Moreover, the optimality gap observed is significant, varying from 2.5% on average for instances composed of 2 sites, up to 49% on average for larger instances composed of 100 sites. We observe that the value of the best solution found gives a reduction in the energy bill of 12.8% on average for small and medium instances. However, for large instances composed of 100 sites, the best feasible solution given by CPLEX does not use the batteries (i.e. it is the standard one). We observe that the mixed-integer linear formulation proposed has a continuous relaxation quite good, when compared to the standard cost. The relative gap between both values for the instances tested is in average about 50% for instances with 100 sites, and in average 17% for small instances. This implies that, in the worst scenario (that happens for large instances), the best La politique de récompense et la capacité de la batterie semblent être les paramètres qui ont le plus d'impact sur ces économies potentielles. Concernant les variantes résolues avec l'algorithme orienté graphes OBSC-GOA, toutes les instances ont été résolues à l'optimalité, et les résultats que nous avons obtenus ont prouvé la pertinence économique de telles variantes (seulement 2,5% pire que les solutions optimales d'OBSC en moyenne pour les instances pour lesquelles la garantie d'optimalité est atteinte), en fournissant de bonnes solutions approchées au problème général, et donc en étant de bonnes et rapides heuristiques pour le résoudre.

Concernant les performances de nos algorithmes, nous avons observé que pour les instances de notre banc de test, la valeur de la discrétisation temporelle et la politique de récompense sont les paramètres qui ont le plus d'impact sur le temps de résolution. Nous avons considéré une limite de temps de 15 minutes pour résoudre chaque instance, et, dans cet aspect, OBSC-GOA s'est avéré efficace du point de vue informatique, tandis que nous avons observé que le temps de résolution de OBSC-MILP augmente rapidement lorsque certains paramètres augmentent.

Une fois que l'on a bien compris l'impact des coupures sur la gestion des batteries, les problèmes qui rendent cette gestion plus complexe, et comment les résoudre, nous pouvons utiliser les connaissances acquises dans la gestion d'un actif énergétique composé de plusieurs batteries. Notez que, par souci de clarté, les règles R6 et R10 n'ont pas été prises en compte dans ce chapitre car elles sont plus pertinentes lorsque plusieurs batteries sont utilisées pour éviter qu'une batterie ne soit utilisée beaucoup plus que d'autres. De plus, les approches de résolution proposées restent valables avec des modifications mineures.

Optimisation d'un système de stockage multi-batteries pour participer au marché de détail

Formellement, le problème traité dans ce chapitre est l'optimisation d'un système de stockage multi-batteries participant au marché de détail (appelé OMBSR), afin de réduire le coût total de l'énergie pour l'entreprise. L'enjeu principal est de gérer plusieurs batteries tout en respectant les Appendix A

Power transmission between base stations

In this appendix we introduce the possibility of performing power transfer between sites in the context of telecommunications. Some essential elements such as transmission losses and equipment needed to perform the transfer are presented. In fact, energy is produced in power plants (nuclear, gas, hydroelectric, solar, etc.) and has to be sent to the customers location. Thus, the electrical power is transferred via transmission wires over the country, and such a transfer is subject to the resistivity of the wires, causing losses.

A.1 Transmission loss

Concerning the transmission loss, when an electron travels through a wire or other conductor material it encounters resistance, i.e., an hindrance to the flow of electrons. Such a resistance appears due to collisions of the electrons with fixed atoms within the conducting material. In this context, each conductor material has its own resistivity (i.e., the conducting ability of a material measured in Ohm per meter). Most of the wires are made of copper which has a low resistivity (1.7 × 10 -8 Ohm-meter)

and low production cost compared to silver (1.59 × 10 -8 Ohm-meter) or gold (2.2 × 10 -8 Ohm-meter) [START_REF] Bird | Electrical Principles and technology for engineering[END_REF]. Hence, the longer the wire, the more resistance there will be, causing high losses.

To reduce transmission losses while maintaining the same power transmission rate, the current is frequently reduced as much as possible and the voltage is increased. On the one hand, current reduction means a smaller number of electrons traveling at the same point of the conductor at the same time, reducing the friction. On the other hand, voltage increasing means a higher differential power that pressures groups of electrons to travel "more frequently". The equipment responsible for Appendix B

Lithium batteries in telecommunications

In this appendix we introduce the use of lithium batteries in the telecommunications context. Some essential elements such as the recharging profile and the efficiency are presented.

In this thesis, we only considered GEL or AGM batteries in our tests. However, batteries of different technologies, such as lithium, are increasingly present in our daily lives. In the telecommunications context it is no different, and several applications using lithium batteries have been proposed thanks to the advantages of this technology [START_REF] Eaves | Lithium-ion batteries for telecom applications[END_REF]. Lithium batteries are more efficient, more flexible in their use and better able to withstand different temperatures.

In this context, the team of experts from the French telecommunications company Orange has explored the use of lithium batteries in base stations for backup. Consequently, it is important to consider this type of batteries, and its rules and limits of use, in the models and algorithms proposed in this thesis.

B.1 Recharging process

After several conversations with the expert team, we have concluded that the safety usage rules R1, R3-R6 summarized in Section 1.3 are still valid for lithium batteries. Concerning the rule R2, the battery must still be recharged with a constant power rate P B , up to its maximal capacity B max , but its recharge can be delayed. Indeed, lithium batteries do not need to be recharged immediately after each discharge for physical reasons, but delaying the recharging of the battery induces a risk to the company since they are installed for backup purposes. However, delaying the recharge of some batteries for some periods of time can increase the gains significantly since the recharge can benefit B.1. RECHARGING PROCESS from better power purchase prices.

Considering that the maximal delay of recharge of a battery b is given by ∆ R , the rule R2 can be rewritten as follows:

R2' -The battery must start being recharged at most ∆ R time periods after each discharge with a constant power rate P B , given in kW, up to its maximal capacity B max , given in kWh;

To integrate these rules in the models proposed, we must change the constraints that define the values of variables u B bs,t in the models proposed. Hence, for a given battery b s in a site s, the following new family of variables will be considered:

• q bs,t ∈ {0, 1}, ∀t ∈ T : equal to 0 if the recharge start of the battery b s is delayed (i.e., the value of the variable u B bs,t is equal to 0), and to 1 otherwise (i.e., the value of the variable u B bs,t takes the values defined in R2).

Note that variables z act on the activation of constraints of recharge (see Constraints (B.1) and B.2) below).

In addition, the constraints that define the values of variables u B bs,t must be replaced by the following constraints: u B bs,t = (1 -z bs,t )q bs,t min(B max bs /∆ -x bs,t /∆, P B bs , P max s -W s,t ) ∀t ∈ T (B.1) q bs,t-1 ≤ q bs,t + z bs,t ∀t ∈ T (B.2)

z bs,t ′ + q bs,t ≥ 1 ∀t ∈ T (B.3)

Note that Constraints B.1 and B.2 guarantee partially the rule R2' because the maximal delay ∆ R to start the recharge is not guaranteed. Hence, Constraints B.3 imposes that the recharging process starts at most ∆ R time periods after the battery discharge.

Note that two new non-linearities are introduced in Constraints B.1, namely the product between two binary variables z and x, that can be easily linearized, and the product between the variables q and x, that can be treated with the McCormick strategy [START_REF] Mccormick | Computability of global solutions to factorable nonconvex programs: Part i-convex underestimating problems[END_REF]. Concerning the graph oriented approach proposed in Chapter 3, the number of nodes in the graph used to compute the longest path will increase by a factor of ∆ R .