Andy Philpott

David Woodruff

Scott Moura

for accepting to sit on my thesis jury. Surely, the souvenir of Andy sharing his excitement about risk averse equilibrium on the ski slopes of Norway is one of the best memory of this thesis. David, you might not remember, but we had a short discussion after your tutorial at ICSP XV, that triggered my motivation for the EMSx benchmark. Scott, it's a pity that I could not visit you at eCAL due to the pandemics! I'm sure that it would have been an enlightening experience.

Au sein du jury, je remercie d'abord Marianne Akian d'avoir accepté le rôle de rapporteur pour cette thèse. Je remercie aussi Jean-Baptiste Hiriart-Urruty et Nadia Oudjane d'avoir accepté d'être examinateurs, et de l'intérêt qu'ils ont bien voulu porter à mes travaux.

Bien souvent quand je parle du contenu de cette thèse, je dis "nous", et on me demande "mais... vous êtes plusieurs à faire ta thèse ?". Et bien oui ! Je remercie chaleureusement Michel De Lara pour son encadrement de thèse, ainsi que Jean-Philippe Chancelier et Pierre Carpentier pour leur suivi continu, leurs relectures attentives, et leurs précieux conseils. Je remercie également Claude Le Pape et Peter Pflaum, qui sont à l'origine de cette thèse chez Schneider, et qui m'ont grandement aidé à démarrer la thèse, surtout dans ses dimensions applicatives. Du côté d'Efficacity, j'ai beaucoup bénéficié du compagnonnage de Tristan Rigaut, qui, avec François Pacaud, avaient déjà bien préparé le terrain avant mon arrivée. Tout deux ont été disponibles tout au long de la thèse et m'ont donné de généreux conseils à des moments opportuns. Je remercie aussi Eric Peirano pour nos échanges sur le monde de la recherche et sur le paysage énergétique français.

Au-delà de la dimension purement scientifique de cette thèse, je remercie l'ensemble des collègues d'Efficacity avec lesquels j'ai pu passer des moments de convivialité, bien au-delà de la salle de convivialité. De même, je suis reconnaissant envers les autres doctorants et chercheurs du CERMICS pour nos discussions et nos quelques sorties échangées. Comme tous, je n'aurais rien pu faire sans Isabelle Simunic et ses collègues du secrétariat.

Au-delà même du cadre de la thèse, je dois beaucoup à ma famille, depuis toujours, mais notamment pour cet épisode de confinement qui reste finalement un heureux souvenir. Je dois aussi énormément à toutes celles et tous ceux avec qui on rigole bien, tous les amis de Rouen, de Paris et d'ailleurs. Depuis le début de la thèse, jusqu'à la "dernière ligne droite" 1 , j'avais vraiment besoin de vous pour m'évader ! Enfin, je remercie Mathilde pour l'inexistante forêt près de chez elle, et pour tout le bonheur qu'on y trouve.

1 Expression à bannir.

Résumé

L'insertion des énergies renouvelables dans les réseaux électriques est un défi majeur de la transition énergétique. Cependant, avec les sources d'énergie renouvelable viennent aussi de nouveaux problèmes d'ingénierie, notamment dus à leur comportement aléatoire. Dans cette thèse, nous étudions comment des techniques issues de l'optimisation convexe et stochastique peuvent être appliquées, et étendues, pour résoudre certains de ces problèmes. Le document est organisé en deux parties.

Dans la première partie, Optimisation convexe et stochastique pour intégrer l'énergie électrique renouvelable, nous nous concentrons sur des techniques pour concevoir et évaluer des algorithmes de pilotage de micro-réseaux électriques. Nous commençons avec un benchmark de méthodes issues du contrôle optimal, appliquées au pilotage d'un micro-réseau alliant production et consommation d'énergie. Nous montrons que les méthodes conçues à partir de la programmation dynamique stochastique permettent des gains importants, sur la base de simulations sur une large collection de données de terrain. Ensuite, dans un chapitre plus théorique, nous étudions la différentiabilité des fonctions valeur paramétriques, introduites pour la résolution de problèmes d'optimisation stochastique à plusieurs pas de temps, et paramétrées par une décision amont. Enfin, nous appliquons les résultats obtenus au pilotage d'une centrale photovoltaïque soumise à des règles d'engagement de puissance la veille. Nous obtenons des gains conséquents par rapport aux autres méthodes de la littérature consacrées au même problème.

Dans la seconde partie, Méthodes numériques en convexité généralisée, nous étudions les applications potentielles des fonctions de couplages dites "one-sided linear" -une classe de couplages qui comprend la forme bilinéaire employée en optimisation convexe (au sens classique). Nous commençons par étendre l'algorithme de mirror descent. Ensuite, nous nous intéressons à l'exemple particulier du couplage Capra (constant along primal rays) et calculons des formes explicites du Capra sous-différentiel de la pseudo-norme 0 . Enfin, nous discutons des difficultés rencontrées pour appliquer la Capra convexité à la résolution de problèmes d'optimisation parcimonieux. Bien que nous ne résolvions pas directement des problèmes d'ingénierie liés à la gestion de l'énergie, notre contribution réside en un nouveau point de vue original sur l'optimisation parcimonieuse, omniprésente en statistique et en traitement du signal en grande dimension, et qui concerne donc un vaste champ d'applications.

iii Abstract Inserting renewable power systems in the electric grid is a key challenge of the energy transition. However, such systems introduce new engineering problems, due to the erratic behavior of renewable energy sources. In this thesis, we study how techniques from convex and stochastic optimization can be applied, and extended, to address some of these problems. The manuscript is divided in two parts.

In the first part, Convex and stochastic optimization for renewable power systems, we focus on techniques for designing and assessing energy management systems. We start with a benchmark of optimal control methods for managing a prosumer microgrid, and we highlight, on a large testbed, the potential gains of methods based on stochastic dynamic programming. Then, in a more theoretical chapter, we investigate the differentiability properties of parametric value functions, introduced for solving a class of multistage stochastic optimization problems parametrized by an upstream decision. Lastly, we apply our previous results to the management of a photovoltaic power plant constrained by day-ahead commitment rules. We showcase significant gains compared to state-of-the-art techniques.

In the second part, Numerical methods in generalized convexity, we study potential applications of the so-called one-sided linear couplings -a class that encompasses the Fenchel coupling of (standard) convex analysis. We start by extending the mirror descent algorithm. Then, turning to the Capra (constant along primal rays) coupling as a particular case, we provide explicit formulations for the Capra subdifferential of the 0 pseudonorm. Lastly, we discuss the difficulties that arise when trying to use Capra convexity to solve sparse optimization problems. Although we do not directly address energy problems, we contribute to an original viewpoint on sparse optimization, whose applications in statistics and signal processing have a huge impact on all engineering fields.

Introduction

Introduction

Version française

Contexte

Le groupe d'experts intergouvernemental sur l'évolution du climat (GIEC) appelle à réduire urgemment l'intensité carbone de l'énergie électrique, tout en augmentant la part de l'électricité dans notre consommation globale d'énergie.

De récentes études ont confirmé la faisabilité technique et économique de ces objectifs, tant en France [START_REF] Shirizadeh | Low-carbon options for the French power sector: What role for renewables, nuclear energy and carbon capture and storage?[END_REF], qu'aux États-Unis [START_REF] Phadke | Plummeting Solar, Wind and Battery Costs can Accelerate our Clean Electricity Future; Goldman School of Public Policy[END_REF]. Dans ces deux exemples, les auteurs anticipent une forte hausse de la production d'électricité renouvelable, atteignant jusqu'à 70% du mix électrique en France d'ici 2050, et 90% aux États-Unis d'ici 2035. Cette transition est déjà en route, et pose de nouveaux défis d'ingénierie pour accompagner la transformation nécessaire des réseaux électriques. Nous rappelons brièvement l'organisation de ces réseaux, et introduisons certains des défis clefs rencontrés dans leur mutation s'inscrivant dans les recommandations du GIEC. Nous renvoyons à [47, Appendix B] pour une présentation succinte de l'infrastructure électrique, et à [START_REF] Gilbert | Renewable and efficient electric power systems[END_REF] pour une introduction plus complète. Traditionnellement, les réseaux électriques relient deux types d'agents: des producteurs et des consommateurs. Les producteurs correspondent à des unités de production, convertissant une source d'énergie primaire (typiquement du charbon, du gaz, du nucléaire, du solaire) en puissance électrique, acheminée aux consommateurs domestiques et industriels. Une contrainte majeure dans la gestion du réseau électrique est d'assurer en permanence l'équilibre entre la production et la consommation sur le réseau. Cet équilibre est déjà fragile aujourd'hui, dans le contexte standard comportant de larges unités de production centralisées, du fait des incertitudes dans le comportement des consommateurs. Dans les années à venir, le maintien de cet équilibre sera encore plus délicat, tandis que les incertitudes vont croître des deux côtés. D'une part, la consommation électrique est amenée à augmenter, avec des usages nouveaux, comme par exemple celui des voitures électriques, augmentant les instabilités sur le réseaux. D'autre part, de nouvelles incertitudes sont attendues du côté des producteurs, avec l'augmentation de la part de l'énergie issue de sources renouvelables. En effet, pour une centrale renouvelable, par exemple photovoltaïque ou éolienne, la production de puissance dépend directement des conditions météorologiques, qui restent difficiles à prévoir. Ainsi, les spécialistes des réseaux électriques préconisent de nombreux changements pour augmenter la flexibilité et la pilotabilité des composants des réseaux [START_REF] Kassakian | The Future of the Electric Grid: An Interdisciplinary MIT Study[END_REF][START_REF] Phadke | Plummeting Solar, Wind and Battery Costs can Accelerate our Clean Electricity Future; Goldman School of Public Policy[END_REF][START_REF] Shirizadeh | Low-carbon options for the French power sector: What role for renewables, nuclear energy and carbon capture and storage?[END_REF]. En particulier, les marchés de l'énergie sont en cours de transformation pour accueillir plus de flexibilité dans la production et la consommation d'énergie [START_REF] Meeus | The evolution of electricity markets in Europe[END_REF], et des systèmes de Contents stockage sont en cours de déploiement pour faire face aux saisonnalités dans la production des centrales renouvelables [START_REF] Luo | Overview of current development in electrical energy storage technologies and the application potential in power system operation[END_REF].

En parallèle, la transition énergétique des réseaux électriques coïncide avec une transition numérique, propulsant la plupart des secteurs industriels dans l'ère du Big Data. La quantité massive de données collectée sur les réseaux électriques permet le développement d'algorithmes de pilotage visant à limiter les risques de panne et les coûts de fonctionnement. Dans le développement d'algorithmes de pilotage pour des systèmes complexes, une approche standard consiste à formuler un problème d'optimisation, dont les variables et les contraintes correspondent à une représentation physique du système piloté, et dont la fonction objectif mesure les performances à maximiser (ou, de manière équivalente, les coûts à minimiser). L'optimisation est une branche des mathématiques dont les applications ont déjà transformé de nombreuses industries. Déjà à l'ère préindustrielle, Monge avait formulé le problème rencontré en génie civil du terrassement optimal en déblais et remblais comme un problème d'optimisation, dans son célèbre2 article [START_REF] Gaspard Monge | Mémoire sur la théorie des déblais et des remblais[END_REF]. Plus tard, au milieu du 20ème siècle, le développement de la programmation linéaire, initiée indépendamment par Kantorovitch en URSS, et par Dantzig aux États-Unis, a révolutionné les problèmes d'ordonnancement rencontrés dans les applications militaires et industrielles [START_REF] Dantzig | Reminiscences about the origins of linear programming[END_REF]. Dans les décennies suivantes, le spectre des problèmes d'optimisation dont une solution numérique est considérée atteignable en un temps raisonnable s'est très largement étendu. Cette évolution, notamment due au développement des ordinateurs modernes, trouve ses bases mathématiques dans les avancées majeures de la théorie de l'optimisation convexe, avec les travaux précurseurs de Fenchel, Moreau et Rockafellar [START_REF] Hiriart-Urruty | Convex analysis and optimization in the past 50 years: some snapshots[END_REF]. A la fin du 20ème siècle, Rockafellar conclut que "la grande fracture en optimisation n'est pas entre linéarité et non-linéarité, mais entre convexité et non-convexité"3 [START_REF] Rockafellar | Lagrange multipliers and optimality[END_REF]. Simultanément au cours du 20ème siècle, le besoin de modéliser les incertitudes dans les problèmes appliqués à conduit au développement de l'optimisation stochastique. L'optimisation stochastique s'inscrit à l'intersection entre l'optimisation et les probabilités, et vise à formuler et résoudre des problèmes pour lesquels "l'objectif est de prendre une décision qui donnera de bonnes performances moyennes"4 [START_REF] Shapiro | A tutorial on stochastic programming[END_REF]. Aujourd'hui, les techniques de l'optimisation convexe et stochastique sont très largement utilisées pour la conception d'algorithmes de pilotage pour des systèmes complexes, et jouent ainsi un rôle essentiel dans les défis industriels et sociétaux du 21ème siècle [START_REF] Lamnabhi-Lagarrigue | Systems & control for the future of humanity, research agenda: Current and future roles, impact and grand challenges[END_REF].

C'est dans ce contexte qu'Efficacity, un institut pour la transition énergétique, l'entreprise Schneider Electric, et le laboratoire CERMICS de l'École des Ponts ont identifié des intérêts communs dans les techniques d'optimisation convexe et stochastique, et dans leurs applications à la gestion de l'énergie électrique renouvelable. La collaboration entre ces trois organismes est à l'origine de cette thèse, supervisée par Michel De Lara, avec la contribution de Jean-Philippe Chancelier et de Pierre Carpentier.

Contents

Organisation de la thèse et contributions

La thèse est organisée en deux parties indépendantes Nous détaillons le contenu de chaque partie et soulignons les contributions apportées.

Partie I: optimisation convexe et stochastique pour intégrer l'énergie électrique renouvelable Dans cette thèse, nous nous concentrons sur des applications aux réseaux électriques à l'échelle locale. Nous adoptons la définition d'un micro-réseau électrique donnée dans [START_REF] Daniel | Trends in microgrid control[END_REF], selon laquelle un tel système est composé de générateurs électriques locaux, de points de consommations, et d'unités de stockage, tous reliés au réseau amont par un unique point de connexion. Deux types d'algorithmes de pilotage sont généralement considérés pour ces systèmes. D'une part, un contrôleur primaire réagit aux variations de puissance à une échelle fine (typiquement de l'ordre de 10 -3 secondes), en prenant des décisions sur la base de mesures de tension et de courant pour atteindre les objectifs fixés par un contrôleur secondaire. D'autre part, ce contrôleur secondaire agit à une échelle de temps plus large (typiquement de l'ordre de la minute), et vise à piloter le système afin de respecter des critères de performances établis lors de sa conception. Les critères de performance classiques sont la sécurité du réseau et la rentabilité économique. C'est ce contrôleur secondaire qui est appelé communément energy management system (EMS) en anglais. Nous renvoyons à nouveau à [START_REF] Daniel | Trends in microgrid control[END_REF] pour une revue détaillée sur les contrôleurs hiérarchiques.

Nous étudions comment des techniques de l'optimisation convexe et stochastique peuvent être appliquées, et étendues, pour concevoir des contrôleurs pour les micro-réseaux électriques. En particulier, nous considérons des EMS conçus à partir de techniques issues du contrôle optimal multi-étape [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF] et, en particulier, de la programmation dynamique stochastique [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF][START_REF] Shapiro | Lectures on Stochastic Programming: Modeling and Theory[END_REF][START_REF] Carpentier | Stochastic multi-stage optimization[END_REF]. En ce qui concerne l'optimisation convexe, nous nous intéressons tout particulièrement aux notions de différentiabilité pour des fonctions marginales convexes. Notre intérêt pour ces fonctions est motivé par le rôle central des fonctions marginales dans la formulation des équations de la programmation dynamique, telles qu'introduites par Bellman [START_REF] Bellman | On the theory of dynamic programming[END_REF]. Nous identifions le cadre convexe comme le mieux adapté à la propagation de gradients (ou de sous-gradients) de fonctions marginales de proche en proche, suivant le principe de la programmation dynamique. Nous renvoyons à [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF] pour une introduction aux fonctions marginales, et à [START_REF] Rockafellar | Variational analysis[END_REF]5,[START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF] pour une introduction à l'optimisation et l'analyse convexe.

La Partie I contient trois chapitres. Nous détaillons maintenant le contenu et les contributions de chaque chapitre.

Chapitre 1. Nous commençons par un benchmark des méthodes de contrôle optimal pour piloter un système acteur du réseau en tant que producteur et consommateur. L'originalité de ce benchmark, dénommé EMSx, est triple. Premièrement, ce benchmark s'appuie sur une large base de données de consommation et de production photovoltaïque, contenant des données historiques d'observation et de prévision collectées par Schneider Electric sur 70 sites industriels. Deuxièmement, EMSx introduit des indicateurs clefs et un protocole Contents expérimental détaillé pour mesurer la performance d'un EMS sur cette large base de données. Troisièmement, EMSx est accompagné d'un logiciel qui simplifie l'évaluation de nouveaux algorithmes. Pour assurer la reproductibilité des expériences conduites dans ce benchmark, tous ses composants sont en accès libre. Notre principal constat est que les EMS conçus à partir de méthodes issues de la programmation dynamique stochastique induisent des gains significatifs par rapport aux autres méthodes classiques. Ce chapitre correspond à un article [START_REF] Le Franc | EMSx: a numerical benchmark for energy management systems[END_REF] publié dans la revue Energy Systems.

Chapitre 2. Ensuite, dans un chapitre plus théorique, nous introduisons une classe de problèmes d'optimisation stochastique multi-étapes paramétrés par une décision amont. S'appuyant à nouveau sur la programmation dynamique stochastique, nous introduisons des fonctions valeur paramétriques pour résoudre ces problèmes, et nous étudions leur différentiabilité par rapport au paramètre amont. Sous des hypothèses de convexité et de différentiabilité, nous étendons les équations de Bellman usuelles au calcul des gradients de ces fonctions valeur paramétriques de proche en proche. Dans le cas où nous perdons notre hypothèse de différentiabilité, nous proposons deux méthodes d'approximation. Dans la première méthode, nous utilisons l'enveloppe de Moreau pour introduire des sous-approximations régulières des fonctions valeur paramétriques, dont nous pouvons calculer les gradients. Dans la deuxième méthode, nous utilisons l'algorithme SDDP (Stochastic Dual Dynamic Programming) [START_REF] Pereira | Multi-stage stochastic optimization applied to energy planning[END_REF] pour introduire des sous-approximations polyhédrales des fonctions valeur paramétriques, dont nous pouvons calculer des sous-gradients. Nous commentons aussi les garanties de convergence pour les deux méthodes d'approximation. Chapitre 3. Enfin, nous appliquons nos précédents résultats au pilotage d'une centrale photovoltaïque, soumise à des règles d'annonce d'engagement de puissance la veille, dans le contexte des zones non-interconnectées (ZNI) en France [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF]. Nous conduisons deux expériences, correspondant à deux contributions distinctes. Dans notre première expérience, nous formulons un problème d'optimisation d'optimisation stochastique paramétrique inspiré du contexte des ZNI. Nous utilisons ce problème pour mesurer la performance des deux méthodes d'approximation développées au Chapitre 2, dans le cas où l'hypothèse de différentiabilité n'est pas valide. Nous observons que les deux méthodes sont bien adaptées à la résolution du problème, et nous commentons leur performance en terme de temps de calcul. Dans notre seconde expérience, nous nous inspirons de l'approche du Chapitre 1 pour définir un benchmark dédié à l'évaluation de contrôleurs consacrés au pilotage de centrales solaires, soumises au règles des ZNI françaises. Dans cette expérience, un contrôleur prend séquentiellement des décisions la veille et dans l'intervalle des journées de pilotage, sur un horizon d'un an. Nous proposons des contrôleurs inspirés par nos travaux du Chapitre 1 et du Chapitre 2, et obtenons des gains importants par rapport aux autres méthodes proposées dans la littérature.

Contents

Partie II: méthodes numériques en convexité généralisée Nous étudions les applications potentielles de la sous-différentiabilité en convexité généralisée, une théorie qui englobe le contexte convexe classique de la Partie II. Nous considérons des fonctions de couplage générales, qui jouent le rôle du produit scalaire dans la théorie classique de la convexité pour lier un espace primal et un espace dual. Avec ces fonctions de couplage, les notions usuelles de conjuguée de Fenchel, de convexité et de sous-différentiel sont naturellement étendues [START_REF] Singer | Abstract convex analysis[END_REF][START_REF] Enrique | Generalized Convex Duality and its Economic Applicatons[END_REF][START_REF] Alexander | Abstract convexity and global optimization[END_REF]. Bien sûr, tous les couplages ne permettent pas de retrouver l'ensemble des résultats de l'analyse convexe, et ne sont pas nécessairement liés à des problèmes d'optimisation pertinents. Nous choisissons d'explorer les propriétés d'une classe de couplages dits "one-sided linear" (OSL), motivés par une récente série de travaux introduisant le cas particulier du couplage Capra (constant along primal rays) [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF][START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF][START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF][START_REF] Chancelier | Orthant-Strictly Monotonic Norms, Graded Sequences and Generalized Top-k and k-Support Norms for Sparse Optimization[END_REF]. En particulier, avec un choix adapté de norme ambiante utilisée dans la définition du couplage Capra, la pseudo-norme 0 -qui compte le nombre de composantes non nulles d'un vecteur -est une fonction Capra-convexe.

Notre travail est motivé par la perspective d'établir de nouvelles méthodes numériques pour l'optimisation parcimonieuse, fondées sur les récentes avancées sur la théorie de la Capra-convexité. Comme mentionné précédemment, le flux de données massif collecté sur les systèmes industriels tels que les réseaux électriques permet d'améliorer le pilotage et l'analyse de ces systèmes complexes. Cependant, la manipulation de telles quantités de données nécessite d'importantes puissances de calculs, tandis que bien souvent, un petit nombre de variables suffit à capturer l'essence d'un phénomène physique. En bref, "les avantages de la parcimonie sont l'interpretabilité du modèle calibré et la maniabilité informatique"5 [START_REF] Hastie | Statistical learning with sparsity: the lasso and generalizations[END_REF]. Pour ces raisons, l'optimisation parcimonieuse est un domaine de recherche très actif, avec des applications dans tous les domaines de l'ingénierie, dont les systèmes énergétiques [START_REF] Dörfler | Sparse and optimal wide-area damping control in power networks[END_REF][START_REF] Pham | Sparse optimization models with robust sketching and applications[END_REF][START_REF] Ferrari | Forecasting energy commodity prices: A large global dataset sparse approach[END_REF].

La Partie II contient trois chapitres. Nous détaillons maintenant le contenu et les contributions de chaque chapitre.

Chapitre 4. Nous commençons par quelques rappels sur les conjugaisons de Fenchel-Moreau généralisées, induites par une fonction de couplage. En particulier, nous rappelons et prouvons quelques propriétés de ces conjuguées obtenues avec les couplages OSL. Ces résultats sont présentés comme des extensions de résultats classiques d'analyse convexe. Par la suite, nous généralisons la notion de divergence de Bregman pour des couplages OSL, une première étape avant d'étendre aussi l'algorithme dit de "mirror descent" [START_REF] Semenovivc | Problem complexity and method efficiency in optimization[END_REF] avec des couplages OSL. Cette contribution introduit un nouvel élément dans le paysage algorithmique de la convexité généralisée, dominé jusqu'alors par l'algorithme des angles sécants [START_REF] Andramonov | Cutting angle methods in global optimization[END_REF]. Nous soulignons les liens entre la formulation originale de l'algorithme dans le cadre convexe usuel et le notre.

Contents

Chapitre 5. Ensuite, considérant le cas particulier du couplage Capra, nous présentons des formulations explicites pour le Capra sous-différentiel de la pseudonorme 0 . Nous étendons aussi des résultats précédents en montrant que pour les normes ambiantes p et des valeurs de p ∈ {1, ∞}, le couplage Capra induit n'est pas adapté à l'étude de la pseudo-norme 0 , qui n'est pas Capra-convexe. Nous concluons ce chapitre par des visualisations du Capra sous-différentiel de

Contents

English version

Context

The intergovernmental panel on climate change (IPCC) calls urgently for the reduction of the carbon intensity of electric power, while improving the share of final energy consumption provided by electricity [START_REF] Rogelj | Mitigation pathways compatible with 1.5 C in the context of sustainable development[END_REF]. Recent studies have confirmed the technical and economical feasibility of decarbonization in the electric grid, in France [START_REF] Shirizadeh | Low-carbon options for the French power sector: What role for renewables, nuclear energy and carbon capture and storage?[END_REF], and in the United Sates [START_REF] Phadke | Plummeting Solar, Wind and Battery Costs can Accelerate our Clean Electricity Future; Goldman School of Public Policy[END_REF]. In both cases, the authors foresee a high penetration of renewable power generators in the grid, to increase the share of carbon-free electricity up to 70% by 2050 in France, and up to 90% by 2035 in the US. This transformation is already happening, and introduces new engineering challenges to reshape the power grid landscape accordingly. We briefly introduce the standard organization of electric grids, and some of the challenges met in its ongoing mutation to follow the recommendations of the IPCC experts. We refer to [START_REF] Kassakian | The Future of the Electric Grid: An Interdisciplinary MIT Study[END_REF]Appendix B] for basic notions on electric power systems, and to [START_REF] Gilbert | Renewable and efficient electric power systems[END_REF] for a more complete introduction to the subject.

Traditional grids connect two types of agents: producers and consumers. Producers correspond to generating units which convert primary energy (typically coal, gas, nuclear or renewables) into electric power, which is delivered to domestic and industrial consumers (often called "loads" of the network). A major constraint in the management of the power grid is to keep the supply and the demand well balanced on the network at all time. This task is already difficult for a standard power grid with large and centralized fuel-based power plants due to the high uncertainty in the load, which corresponds to everyday electric power usages in the network. In the coming years, maintaining the grid balance is expected to become even more challenging as uncertainties are growing from both sides. On the one hand, electric power consumption is expected to increase, with new sorts of usage such as electric vehicles, that induce additional load instabilities. On the second hand, as the share of renewable energy sources increases in power networks, novel uncertainties arise on the production side. Indeed, for renewable units such as solar panels and wind turbines, power production mostly relies on weather conditions, and is difficult to forecast. Therefore, grid experts advocate various changes to improve flexibility in power grid management [START_REF] Kassakian | The Future of the Electric Grid: An Interdisciplinary MIT Study[END_REF][START_REF] Phadke | Plummeting Solar, Wind and Battery Costs can Accelerate our Clean Electricity Future; Goldman School of Public Policy[END_REF][START_REF] Shirizadeh | Low-carbon options for the French power sector: What role for renewables, nuclear energy and carbon capture and storage?[END_REF]. In particular, energy markets are being adapted to cope with flexible power supply and demand [START_REF] Meeus | The evolution of electricity markets in Europe[END_REF], and energy storage systems are being deployed to face seasonalities in the production curves of renewable units [START_REF] Luo | Overview of current development in electrical energy storage technologies and the application potential in power system operation[END_REF].

On top of that, the transition towards renewable power grids is synchronized with a shift of all major industries in a Big Data era. The large volume of data collected on power systems allows the design of fine controllers to lower risks of failure and management costs. A standard approach in controller design for complex systems is to formulate an optimization problem, with variables and constraints describing a physical representation of the system, and an objective function measuring the performance to be maximized (or equivalently, the cost to be minimized). Optimization is a branch of mathematics whose applications have already transformed many industrial fields. As early as in the prequel of the industrial revolution, Monge had formalized the problem of earthworks as an Contents optimization problem in his famous 6 article [START_REF] Gaspard Monge | Mémoire sur la théorie des déblais et des remblais[END_REF]. Later, in the mid-20th century, the development of linear programming, initiated independently by Kantorovich in the USSR, and by Dantzig in the US, has revolutionized planning problems arising in military and industrial applications [START_REF] Dantzig | Reminiscences about the origins of linear programming[END_REF]. In the following decades, the spectrum of numerically tractable optimization problems has greatly expanded. This expansion, partly due to the development of modern computers, takes its mathematical roots in the major progress in convex optimization, mainly composed of the work of Fenchel, Moreau and Rockafellar [START_REF] Hiriart-Urruty | Convex analysis and optimization in the past 50 years: some snapshots[END_REF]. At the end of the 20th century, Rockafellar concludes that "the great watershed in optimization isn't between linearity and nonlinearity, but convexity and nonconvexity" [START_REF] Rockafellar | Lagrange multipliers and optimality[END_REF]. In parallel to the development of convex optimization, the need to model uncertainties in applied problems has led to the emergence of stochastic programming. Stochastic programming lies at the intersection between optimization and probability, and intends to formulate and solve problems where "the objective is to come up with a decision that will perform well on average" [START_REF] Shapiro | A tutorial on stochastic programming[END_REF]. As of today, all the aforementioned progresses in convex and stochastic optimization strongly support algorithms developed for the control of complex systems, and thus play an essential role in critical industrial and societal challenges met in the 21st century [START_REF] Lamnabhi-Lagarrigue | Systems & control for the future of humanity, research agenda: Current and future roles, impact and grand challenges[END_REF].

It is in this context that Efficacity, a French institute for the energy transition, the company Schneider Electric, and the CERMICS laboratory at École des Ponts have identified common interests in techniques from convex and stochastic optimization, applied to the management of renewable power systems. The collaboration between all three organizations is at the origin of this PhD thesis, supervised by Michel De Lara, and with supervising contributions of Jean-Philippe Chancelier and Pierre Carpentier.

Organization of the thesis and contributions

The thesis is organized in two parts that read independently. We detail the organization of both parts and highlight the contributions of each chapter.

Part I: convex and stochastic optimization for renewable power systems

In this thesis, we concentrate on applications to power systems at the microgrid scale. Following [START_REF] Daniel | Trends in microgrid control[END_REF], our definition of an electric microgrid designates electric networks composed with local electric power units, loads, and energy storage devices, sharing a single point of connection with the global grid. Two types of controllers are usually deployed to manage such systems. A primary controller reacts to variations of power at the finest scale (e.g. at the order of magnitude of 10 -3 seconds), taking decisions based on voltage and current measures to meet targets set by the secondary controller. A secondary controller operates at a larger time scale (about a few minutes), and aims at managing the microgrid while respecting the main performance criteria set when designing the Contents system. The most common criteria include security of the network and economic profitability. It is this secondary controller that is commonly called an energy management system (EMS). We refer again to [START_REF] Daniel | Trends in microgrid control[END_REF] for a detailed review on hierarchical microgrid control.

We study how techniques from convex and stochastic optimization can be applied, and extended, for designing and assessing controllers for electric microgrids. In particular, we consider EMS design techniques based on multistage optimal control methods [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF] and, specifically, on stochastic dynamic programming [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF][START_REF] Shapiro | Lectures on Stochastic Programming: Modeling and Theory[END_REF][START_REF] Carpentier | Stochastic multi-stage optimization[END_REF]. Concerning convex optimization, we pay a special attention to differentiability notions for convex marginal functions. Our interest in marginal functions is motivated by their central role in the formulation of the dynamic programming equations, as introduced by Bellman [START_REF] Bellman | On the theory of dynamic programming[END_REF]. We identify the convex case as the most favorable context to propagate gradients (or subgradients) of marginal functions by backward induction, following the dynamic programming principle. We refer to [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF] for background notions on marginal functions, and to [START_REF] Rockafellar | Variational analysis[END_REF]5,[START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF] for background notions of convex analysis and optimization.

Part I contains three chapters. We now detail the content and the contributions of each chapter.

Chapter 1. We start with a benchmark of optimal control methods for managing a prosumer microgrid -which, from the global grid's viewpoint, acts both as a producer and a consumer, hence the term prosumer. The originality of this benchmark, called the EMSx benchmark, is threefold. First, it is based on a large dataset of load and photovoltaic data, containing both historical observations and forecasts, collected by Schneider Electric on 70 industrial sites. Second, the EMSx benchmark introduces key metrics and a detailed experimental protocol for assessing the performance of an EMS on this large dataset. Third, the EMSx benchmark is packaged in a software that simplifies the evaluation of new controllers. For the sake of reproducibility, all components of the benchmark are detailed and made publicly available. Our main finding is that microgrid controller methods based on stochastic dynamic programming return significant gains compared with other standard control methods. This chapter corresponds to a journal article [START_REF] Le Franc | EMSx: a numerical benchmark for energy management systems[END_REF] published in Energy Systems.

Chapter 2. Then, in a more theoretical chapter, we introduce a class of multistage stochastic optimization problems parameterized by an upstream decision. Building again on the framework of stochastic dynamic programming, we introduce parametric value functions for solving such problems, and we investigate their differentiability properties with respect to the upstream decision parameter. Under convexity and differentiability assumptions, we extend the standard Bellman equations to compute the gradients of these parametric value functions by backward induction. In the case where we lose the differentiability assumption, we propose two approximation methods. In the first method, we use the Moreau envelope to introduce smooth lower approximations of the parametric value functions, for which we can compute gradients. In the second method, we use the stochastic dual dynamic programming (SDDP) algorithm [START_REF] Pereira | Multi-stage stochastic optimization applied to energy planning[END_REF] to introduce polyhedral lower approximations of the parametric value functions, for Contents which we can compute subgradients. We also discuss the convergence properties of both approximation schemes.

Chapter 3. Lastly, we apply our previous results to the management of a photovoltaic power plant constrained by day-ahead commitment rules, in the context of non-interconnected zones (NIZ) in France [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF]. We perform two experiments, corresponding to two different contributions. In our first experiment, we formulate a parametric multistage stochastic optimization problem inspired by the NIZ context. We use this problem to attest the performance of the two approximation methods developed in Chapter 2, to address problems where we lose our differentiability assumption on parametric value functions. We find that both methods can be used successfully to solve the problem, and discuss the performance of both methods in term of computing time. In our second experiment, we mimic the approach of Chapter 1 to define a benchmark problem whose purpose is to assess controllers for a power plant managed under the French NIZ regulatory rules. In this experiment, a controller takes sequential day-ahead and intraday decisions, over the horizon of one year. We propose controllers inspired by our previous work in Chapter 1 and Chapter 2, and we showcase significant gains over state-of-the-art techniques.

Part II: numerical methods in generalized convexity

We study the potential applications of subdifferentiability in general convex analysis, a theory which encompasses the standard convex setting of Part I. We consider general coupling functions, which play the role of the scalar product in standard convexity to pair a primal space with a dual space. With any coupling function, the usual notions of Fenchel conjugacy, convexity and subdifferential extend naturally [START_REF] Singer | Abstract convex analysis[END_REF][START_REF] Enrique | Generalized Convex Duality and its Economic Applicatons[END_REF][START_REF] Alexander | Abstract convexity and global optimization[END_REF]. Of course, all couplings do not allow a straightforward extension of the powerful results of standard convex analysis, and might not be related to relevant optimization problems. We choose to explore the properties of the class of so-called one sided linear (OSL) couplings, motivated by a recent series of work introducing the Capra (constant along primal rays) coupling [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF][START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF][START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF][START_REF] Chancelier | Orthant-Strictly Monotonic Norms, Graded Sequences and Generalized Top-k and k-Support Norms for Sparse Optimization[END_REF]. In particular, it was shown that, under a suitable choice of source norm, involved in the definition of the Capra coupling, the 0 pseudonorm -that counts the nonzero coordinates of a vector -is a Capra-convex function.

The applications that drive our work in this second part lay in the possibility to derive new numerical methods in sparse optimization, based on the recent advances of Capra-convexity. As stated earlier, the huge flow of data collected in industrial systems such as power grids allows to improve the control and analysis of these systems. However, tremendous amounts of data require intense computing facilities to be manipulated, while most often, only a small number of variables are sufficient to capture the essence of a physical phenomenon. In short, "the advantages of sparsity are interpretation of the fitted model and computational convenience" [START_REF] Hastie | Statistical learning with sparsity: the lasso and generalizations[END_REF]. Therefore, sparse optimization is a highly active research field, with applications in all engineering domains, including in power systems [START_REF] Dörfler | Sparse and optimal wide-area damping control in power networks[END_REF][START_REF] Pham | Sparse optimization models with robust sketching and applications[END_REF][START_REF] Ferrari | Forecasting energy commodity prices: A large global dataset sparse approach[END_REF].

Contents

Part II contains three chapters. We now detail the content and the contributions of each chapter.

Chapter 4. We start with background notions on general Fenchel-Moreau conjugacies induced by coupling functions. In particular, we review and prove some properties of these conjugacies that arise with OSL couplings, that let us retrieve well-known results of the usual convex case. Next, we generalize the notion of Bregman divergence with OSL couplings, a first step before we also extend the mirror descent algorithm [START_REF] Semenovivc | Problem complexity and method efficiency in optimization[END_REF] with OSL couplings. This contribution is an original new step in the algorithmic toolbox of general convexity, dominated so far by the cutting angle algorithm [START_REF] Andramonov | Cutting angle methods in global optimization[END_REF]. We also highlight bridges between the original formulation of mirror descent in the usual convex case and ours.

Chapter 5. Then, turning to the Capra coupling as a particular case, we provide explicit formulations for the Capra-subdifferential of the 0 pseudonorm. We also extend previous results by showing that when using the p norms with p ∈ {1, ∞} as source norms in the definition of the Capra coupling, the 0 pseudonorm is not Capra-convex. We conclude this chapter with visualizations of the Capra-subdifferential of 0 , and with comparisons to other notions of generalized subdifferentials of the 0 pseudonorm. Chapter 6. Lastly, we explore perspectives in the application of the results of Chapter 4 and Chapter 5 to sparse optimization problems. We observe the unexpected generalized convexity properties of two families of sparse optimization problems, obtained with OSL couplings. This opens the door to the application of the results of the previous chapters. Overall, although we do not address directly energy problems, we contribute to an original viewpoint on sparse optimization, and point to interesting future research tracks.

Part I

Convex and stochastic optimization for renewable power systems

Chapter 1

EMSx: a numerical benchmark for energy management systems

Introduction

Inserting renewable energy in the electric grid is a key challenge of the energy transition. As renewable power units are often coupled with a storage system and envisaged at a local scale (where the demand is more erratic than at a global scale), this makes the management of such electric microgrids delicate.

In this chapter, we concentrate on Energy Management Systems (EMS), a high level layer of hierarchical control, responsible for operating electric microgrids while optimizing security and economic criteria [START_REF] Daniel | Trends in microgrid control[END_REF].

The design of an EMS for the optimal management of a storage system supporting renewable energy integration is a well-known challenge. Most approaches are based on the mathematical theory of multistage deterministic and stochastic optimization, and the relevance of a microgrid control method is usually assessed on a representative validation setup. A comparative study of EMS design techniques was conducted in [START_REF] Rigaut | Stochastic optimization of braking energy storage and ventilation in a subway station[END_REF], which includes Model Predictive Control (MPC, [START_REF] Garcia | Model predictive control: theory and practice-A survey[END_REF][START_REF] Bertsekas | Dynamic programming and suboptimal control: A survey from ADP to MPC[END_REF]), Open Loop Feedback Control (OLFC, [10, Vol. 1, §6.2], sometimes referred to as stochastic MPC) and Stochastic Dynamic Programming (SDP [START_REF] Bertsekas | Dynamic Programming and Optimal Control: Approximate Dynamic Programming[END_REF][START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF]). Although providing a large benchmark of control methods, [START_REF] Rigaut | Stochastic optimization of braking energy storage and ventilation in a subway station[END_REF] assesses management strategies on a very specific example, the control of a braking energy storage system in a subway station. Another example of highly specific EMS assessment result is found in [START_REF] Oliver | Optimal control of a residential microgrid[END_REF], where the authors apply MPC for operating a very detailed residential microgrid configuration, mixing thermal and electric energy storage, and providing models for every electric device accounting for a shiftable load in a standard Swiss household. Due to the specificity of the case studies, it is not clear that the conclusions of such works can be generalized, and that they can help researchers and practitioners willing to deploy an EMS for a new context, with new data.

Novel microgrid controller techniques are published regularly, making it even harder to establish an up-to-date benchmark. In [START_REF] Hafiz | Real-time Stochastic Optimization of Energy Storage Management using Rolling Horizon Forecasts for Residential PV Applications[END_REF], the authors propose an innovative EMS architecture which combines Recurrent Neural Networks [START_REF] Gers | Learning precise timing with LSTM recurrent networks[END_REF] with Stochastic Dual Dynamic Programming [START_REF] Shapiro | Analysis of stochastic dual dynamic programming method[END_REF] for managing solar panels coupled with a battery. They compare their EMS against a heuristic approach on residential data collected by a research organization which provides free access to its data for academic purposes. However, their simulation relies on a commercialized real-time simulator -which may improve the realism of the assessment method, but complicates the reproduction of the testbed. A similar microgrid application is considered in [START_REF] Benjamin Heymann | A stochastic continuous time model for microgrid energy management[END_REF], where the authors also operate a battery for photovoltaic power integration in a novel framework, modeling the electric load by a stochastic differential equation. They rely on real datawhose access is not documented -from an experimental site in Chile, and implement their simulation on an open source numerical solver. The same initiative was taken in [START_REF] Haessig | Computing an optimal control policy for an energy storage[END_REF], where the authors make their implementation of SDP publicly available, so that their comparison with a heuristic method for the design of an EMS could be extended to other data and other techniques.

It is in that context that we introduce the EMSx benchmark, composed of three constituents -a dataset, a mathematical framework, and a simulation software -and designed for the purpose of assessing electric microgrid The first component of the EMSx benchmark is a new dataset reporting a wide range of contrasted microgrid situations. For these data, we rely on samples collected by the Schneider Electric (SE) company on 70 industrial sites. SE develops and commercializes microgrid controllers, and is interested in challenging its current practices with state-of-the art optimization methods developed in the academic world. In this context, SE puts together a dataset which allows benchmarking different energy management methods in various situations. This dataset contains photovoltaic and electric load profiles, detailing both historical observations and forecasts, which let us closely reproduce the online information available to an EMS.

The second component of the EMSx benchmark is a mathematical framework for the assessment of electric microgrid control techniques and algorithms. This framework consists of the mathematical description of a microgrid architecture -made of one resource, one battery, one load -and of an economic criterion that depends on how the battery is managed. Indeed, as we focus on photovoltaic units integrated in local power networks -with uncertainties arising both from the electric load and from the photovoltaic power generation -introducing an energy storage system can help to reduce the energy bill. The battery is managed by means of a microgrid controller, for which we propose a precise mathematical definition and a score to measure its aggregated performance, on the one hand across the uncertainties unique to a site, on the other hand across the different sites of the dataset.

The third component of the EMSx benchmark is the EMSx benchmark software, that we have developed and implemented as a Julia [START_REF] Bezanson | Julia: A fast dynamic language for technical computing[END_REF] package. This software makes possible the simulation and assessment of a large range of controllers on the testbed defined by our dataset and our mathematical framework.

We believe that our benchmark is well-suited for assessing the performance of a large class of control techniques, and we illustrate our claim by measuring the performance of a selection of controllers -derived from MPC, OLFC, SDP, and from an extended state formulation of a plain SDP controller that models uncertainties with an auto-regressive process (SDP-AR , [87, §3.1.1] and [START_REF] Lohndorf | Modeling time-dependent randomness in stochastic dual dynamic programming[END_REF]). All in all, EMSx stands out by providing open access to our simulation data and software, permitting to benchmark microgrid controllers on simulation data representative of a large panel of industrial microgrid cases, within a clear and detailed mathematical framework. This chapter is structured as follows. We introduce the EMSx benchmark dataset in Sect. 1.2, the EMSx benchmark mathematical framework in Sect. 1.3 -by providing a microgrid simulation model, a definition of a microgrid controller and a score -and the EMSx benchmark EMSx.jl package in Sect. 1.4. In Sect. 1.5, we detail two main classes of mathematical techniques to design microgrid controllers, and we provide the numerical results obtained with the EMSx benchmark. The Appendix 1.A gathers additional material on the numerical experiments of Sect. 1.5.

Chapter 1. EMSx: a numerical benchmark for energy management systems

The EMSx benchmark dataset

We present the Schneider Electric (SE) dataset which offers a large collection of field data for studying the management of electric microgrids. The dataset is publicly available at URL https://github.com/adrien-le-franc/EMSx.jl.

In §1.2.1, we present generalities about Schneider Electric's 70 sites. Then, we detail the content of the dataset by focusing on historical observations in §1.2.2 and on historical forecasts in §1.2.3. Finally, in §1.2.4, we illustrate how the 70 sites differ in terms of "predictability".

Generalities about Schneider Electric's 70 sites

Indeed, SE has collected a large database of load profiles on real operated microgrids deployed on a various collection of 70 industrial sites, mainly located in Europe and in the United States (for data privacy reasons, SE does not provide specific information on the origin of the sites).

Each site is documented with parameters and time series data. We denote the set of sites by I (hence |I| = 70). On each site i ∈ I, we provide battery parameters (c i , l i , ρ i c , ρ i d ) (see the storage dynamics part in §1.3.1 below). Regarding time series, the database contains historical observations and historical forecasts of the energy demand and of photovoltaic generation for each site. For this latter, however, SE has selected a single photovoltaic profile from a site located in South Central United States, and has then rescaled this profile for each site of the database, taking care to restore the balance between the energy generation and the load profile. This special treatment of photovoltaic generation is due to the lack of detailed historical meteorological data for most of the sites, which is an impediment to compute accurate photovoltaic forecasts.

We sample the continuous time every 15 minutes, giving, for each site i ∈ I, a time index t ∈ {1, 2, . . . , θ i -1, θ i }, up to the horizon θ i (with at least one year of historical observations and forecasts per site). Every time interval [t, t+1[ corresponds to 15 minutes.

Historical observations

We have measures of the photovoltaic generation g t and of the energy demand d t over the last 15 minutes, providing vectors of historical observations for each site i ∈ I:

g i = (g i 1 , . . . , g i θ i ) ∈ R θ i , ∀i ∈ I , (1.1a
)

d i = (d i 1 , . . . , d i θ i ) ∈ R θ i , ∀i ∈ I . (1.1b)
We provide examples of observed daily chronicles for photovoltaic generation in Figure 1.1a, and for energy demand in Figure 1.1b.

∈ I ĝi = (ĝ i 1 , . . . , ĝi θ i ) ∈ R 96×θ i , ∀i ∈ I , (1.3a) di = ( di 1 , . . . , di θ i ) ∈ R 96×θ i , ∀i ∈ I . (1.3b)
The forecasting method employed by Schneider Electric combines auto-regressive models with random forests, and is inspired by the top-level methods used in GEFCom2014 [START_REF] Hong | Probabilistic energy forecasting: Global energy forecasting competition 2014 and beyond[END_REF]. By combining the chronicles (1.1) of historical observations with the chronicles (1.3) of historical forecasts, we can thus closely reproduce the information available to an online microgrid controller operating a real site.

Illustrating how sites differ in terms of predictability

The dataset covers a large spectrum of situations regarding variability and predictability. To assess the predictability of the data at a given site i ∈ I, we first introduce the historical net demand observations

z i t = d i t -g i t ∈ R , ∀t ∈ {1, . . . , θ i } , ∀i ∈ I , (1.4a)
deduced from (1.1), and the historical net demand forecasts

ẑi t = di t -ĝi t ∈ R 96 , ∀t ∈ {1, . . . , θ i } , ∀i ∈ I , (1.4b)
Chapter 1. EMSx: a numerical benchmark for energy management systems deduced from (1.3). Second, we normalize the historical net demand observations by

zi t = z i t -z i z i -z i ∈ [0, 1] , ∀t ∈ {1, . . . , θ i } , ∀i ∈ I , (1.5a)
where

z i = max 1≤t≤θ i {z i t } , ∀i ∈ I , z i = min 1≤t≤θ i {z i t } , ∀i ∈ I , (1.5b)
and we apply the same transformation to the components ẑi t,t+1 , . . . , ẑi t,t+96 of the historical net demand forecasts, yielding

zi t,t+k = ẑi t,t+k -z i z i -z i ∈ R , ∀k ∈ {1, . . . , 96} , ∀t ∈ {1, . . . , θ i } , ∀i ∈ I . (1.6)
Thus normalized, predictability can be compared across the pool of sites. Third, we define the Root Mean Square Error (RMSE) of the site i ∈ I by

RMSE i = 1 96 × θ i θ i t=1 96 k=1 zi t,t+k -zi t+k 2 .
(1.7)

The diversity of the forecast error over the pool of 70 sites is shown in Figure 1.2. Here, we ranked sites in increasing order of RMSE. We observe that the error is quite stable in the wide flat central part of sites distribution, except for the first 20% (with low forecast error) and for the last 20% (with high forecast error) of the sites. Thus, our dataset represents a diverse pool of microgrids, offering thus the possibility to assess the performance of microgrid management techniques on a large range of realistic industrial applications.

Microgrid control model

We consider an electric microgrid composed of a photovoltaic power unit, an electric load and an energy storage system. We assume that all components of the microgrid share a single point of connection with the global grid. At this point, electric power can be imported or exported so as to satisfy the electric power demand (total load) at all times. We provide a schematic model of such a system in Figure 1.3. We now introduce some notation. We represent the mathematical control of a microgrid over a finite number of discrete time steps t ∈ {0, 1, 2, . . . , T -1, T }, where unit steps are spaced by ∆ t = 15 minutes. We denote a time interval between two decisions by [t, t+1[, and not by [t, t+1], to indicate that a decision is taken at the beginning of the time interval [t, t+1[, and that a new one will be taken at the beginning of the time interval [t+1, t+2[, and that these two consecutive intervals do not overlap. Storage dynamics. The storage system is assumed to be a lithium-ion battery (or a container of aggregated batteries), characterized by the coefficients (c, l, ρ c , ρ d ) referring respectively to the battery's capacity (kWh), maximum Chapter 1. EMSx: a numerical benchmark for energy management systems load (kW), charge and discharge efficiency coefficients. The state of charge, at the beginning of the time interval [t, t+1[, is denoted by

x t ∈ [0, 1] .
(1.8a)

The decision u t , taken at the beginning of every time interval [t, t+1[, accounts for the energy charged (u t ≥ 0) or discharged (u t ≤ 0) during the time interval [t, t+1[. The dynamics of the state of charge is given by

x t+1 = f (x t , u t ) , ∀t ∈ {0, . . . , T -1} , (1.8b)
where the dynamics f is given by

f (x, u) = x + ρ c c u + - 1 ρ d c u -, ∀(x, u) ∈ [0, 1] × R , (1.8c)
with u + = max(0, u) and u -= max(0, -u) .

Constraints. Constraints of the form

u t ∈ U(x t ) , ∀t ∈ {0, . . . , T -1} (1.9a)
restrict decisions u t to the admissibility set (related to some of the battery parameters (c, l, ρ c , ρ d ) by means of the dynamics f in (1.8))

U(x) = u ∈ R u ≤ u ≤ u and 0 ≤ f (x, u) ≤ 1 , (1.9b)
where u = l × ∆ t and u = -l × ∆ t are the bounds on the energy that can be exchanged with the battery during a 15-minutes interval.

Uncertainties. For the purpose of defining the management costs, we introduce the uncertainties

w t = (g t , d t ) ∈ R 2 ,
L(u 0 , . . . , u T -1 , w 1 , . . . , w T ) = T -1 t=0 L t (u t , w t+1 ) .
(1.11c)

In conclusion, we have introduced a dynamical system with dynamics (1.8), constraints (1.9) and a cost structure (1.11).

Microgrid controller

A microgrid controller is a mathematical device that, given some information at time t, yields a decision u t . We now detail the structure of the controllers that we will consider. For this purpose, we introduce chronicles and management cost.

Partial chronicles. At the beginning of the time interval [t, t+1[, we may use all the past observations and past forecasts to make a decision u t . For practical computational reasons, we have chosen to restrict this information to the partial observations

(
φ t (x t , h t ) ∈ U(x t ) , ∀(x t , h t ) ∈ [0, 1] × H , (1.13b)
where the constraint set U(x t ) ⊂ R is defined in (1.9b).

Management cost of a controller along a partial chronicle on a given site. All dynamics (1.8), constraints (1.9) and cost structure (1.11) depend on parameters relative to a site. Therefore, on a given site i ∈ I, we denote by f i the dynamics of the battery in (1.8) and by U i the set-valued mapping defining the constraints as described in (1.9b), as they depend on the local parameters

(c i , l i , ρ i c , ρ i d ).
We also denote by L i t the stage cost in (1.11a) -as it depends on the energy tariff (p +,i t , p -,i t ) which could possibly be local -and by L i the total operating cost in (1.11c), as it depends on dynamics f i , set-valued mappings U i and stage costs L i t . Besides battery parameters and energy tariffs, sites differ from each other in their historical data. For instance, the RMSE of the historical forecasts (Figure 1.2) varies across the pool of sites. Therefore, controllers in (1.13) may differ accordingly. This is why we denote by φ i a controller for the site i ∈ I.

The application of a controller φ i in (1.13) along a partial chronicle h ∈ H T in (1.12e) yields the management cost

J i (φ i , h) = T -1 t=0 L i t (u i t , w t+1 ) , (1.14a)
where, for all t ∈ {0, . . . , T -1}, the uncertainty w t+1 is a component of h t+1 , and the sequence (u i 0 , . . . , u i T -1 ) of controls is given by

x i 0 = 0 , (1.14b)
x i t+1 = f i (x i t , u i t ) , (1.14c)
u i t = φ i t (x i t , h t ) . (1.14d)
The management cost J i (φ i , h) will serve the assessment of the controller φ i in §1.3.3.

Designing and assessing a controller on a given site

We consider a given site i ∈ I. We outline how to design and assess a controller φ i as in (1.13).

Data partitioning. We have split the database in periods of one week ranging from Monday 00:00 to Sunday 23:45, each week containing thus T = 672 = 7 × 24×4 time steps. With this, the database is now organized as a subset D i ⊂ H T of chronicles, where H has been defined in (1.12).

The EMSx benchmark mathematical formulation

Then, we partition the chronicles in the data set D i in two disjoint subsets, C i for calibration (training, in-sample) and S i for simulation (testing, out-ofsample):

C i ∪ S i = D i ⊂ H T , C i ∩ S i = ∅ . (1.15)
For the EMSx benchmark, we select randomly 40% of the weeks for simulation and let the other 60% be available for calibration.

Calibration data. The calibration data in C i is available for the design of microgrid controllers as in (1.13). The design can result from any sort of technique (see examples in §1.5.1 and in §1.5.2 below).

Simulation data. On top of the weekly periods, every simulation chronicle in S i is augmented with the data of the Sunday before the period starts, following our definition (1.12e). Therefore, when simulating a microgrid controller, 24 hours of past history data is always available to the decision-maker. Simulation chronicles serve for testing only; as such, they cannot be employed for the design of a controller.

Parameters. Additionally, we have the battery parameters (c i , l i , ρ i c , ρ i d ) (that have been adapted by Schneider Electric for the EMSx benchmark). For computing the management cost in (1.14), we use the energy tariff and time of use

(p + t , p - t )
, in e/kWh, from the French electricity provider Électricité de France (EDF); it is the same for all sites. At the beginning of any simulation, we assume the battery to be empty (i.e. x 0 = 0), and we do not impose any final cost (which is consistent with the expression L i of the total operating cost in (1.11c)).

Lower bound for the management cost. For any controller φ i as in (1.13) and any partial chronicle h ∈ H T in (1.12e), the management cost J i (φ i , h) in (1.14) always has the so-called "anticipative" lower bound J i (h), computed as the minimum of (1.14a) under the same constraints, initial state (1.14b) and dynamics (1.14c), but where the last constraint u t = φ i t (x t , h t ) in (1.14d) is now enlarged as u t = ψ i t (x t , h), for all t ∈ {0, . . . , T -1}, for any ψ i t : [0, 1]×H T → R. This gives a lower bound, because the minimization is done over "anticipative" control laws ψ i t : [0, 1]×H T → R, which encompass any controller φ i as in (1.13). Therefore, we easily get for any controller φ i , as in (1.13), that we have Therefore, we shift the management cost of controller φ i over a chronicle h ∈ S i by subtracting the management cost of a dummy controller φ d such that φ d t = 0, for t ∈ {0, . . . , T -1}. This dummy zero policy φ d gives us a baseline operating cost, the one that we would get when the microgrid is not equipped with an EMS and a battery. After the shift, we define the gain of controller φ i by the following expression

J i (h) ≤ J i (φ i , h) , ∀h ∈ S i . ( 1
G i (φ i ) = 1 |S i | h∈S i J i (φ d , h) -J i (φ i , h) , (1.17)
which expresses the average gain of introducing φ i in site i, over the baseline case of a dummy controller that does not use the battery. The lower bound for the management cost in (1.16) provides a natural upper bound for the gain

G i = 1 |S i | h∈S i J i (φ d , h) -J i (h) , (1.18a)
where

G i (φ i ) ≤ G i . (1.18b)
In order to ease the performance analysis of a controller-design technique over an aggregated group of sites from I, we scale the gain of φ i with the upper bound G i , and we define the performance score

G i (φ i ) = G i (φ i ) G i . (1.19)
The higher the score, the higher the gain allowed by the controller φ i . A controller φ i that improves on the dummy controller φ d gives a score in [0, 1], else the score is negative.

Assessing a controller-design technique

Controller-design technique. In addition to assessing a given controller, we also aim at assessing a design technique for controllers. We provide examples of design techniques in §1.5.1 and in §1.5.2. In particular, when the same design technique is used across all sites, we will consider a collection {φ i } i∈I of controllers derived from the application of a single design technique, but adapted to each site i ∈ I.

Performance score of a collection of controllers. For a given collection {φ i } i∈I of controllers, one per site, we average the performance score (1.19) over sites, yielding the performance score (of a collection {φ i } i∈I of controllers)

G φ i i∈I = 1 |I| i∈I G i (φ i ) .
(1.20)

The EMSx benchmark software

When the controllers φ i in the collection {φ i } i∈I have been designed by the same technique, the score G {φ i } i∈I in (1.20) is a proxy to measure the performance of a controller-design technique over a large range of situations, both in time of the year and in type of microgrid. It permits an immediate interpretation for practitioners interested in deploying a technique to design controllers on real microgrids. The higher the score, the higher the gain allowed by the technique. We have developed a software, called EMSx.jl, to ease the numerical assessment of controllers in the context of the EMSx benchmark. Our first goal is to provide an efficient and fast computing tool for running every simulation loop. We have chosen the Julia language, as it is a perfect candidate for processing the large amount of data made available in the EMSx benchmark dataset. In particular, Julia makes it simple to distribute the simulation loop on several CPU cores, which enables us to release the EMSx.jl package with parallel computing options. Moreover, Julia meets our second expectation, namely that our simulation software should be flexible enough to easily implement a large range of controllers as defined in §1.3.2. We illustrate such flexibility in Sect. 1.5, where we outline the numerical results obtained with EMSx.jl for various controller design techniques.

What the EMSx.jl software package does

Given a site i ∈ I, a controller φ i in (1.13) and a partial chronicle h ∈ H T in (1.12e) (in practice, h ∈ S i , the simulation chronicles in (1.15)), the EMSx.jl software returns the sequence of states of charge of the battery, the stagewise costs, and, above all, the management cost J i (φ i , h) in (1.14) and the corresponding computing time. To this end, a EMSx.jl user must provide the implementation of her controller φ i in Julia code following an API that we briefly describe now.

Figure 1.4 illustrates how the dummy controller φ d t = 0, t ∈ {0, . . . , T -1} can be implemented and tested in a few lines of code. First, we define a new Chapter 1. EMSx: a numerical benchmark for energy management systems type for our controller, named DummyController, as a subtype of a built-in EMSx.jl type, named AbstractController (line 3). Then, we implement the body of the compute_control function (in Julia jargon, method ) for the new specialized DummyController type (line 5). In the given example, the body is reduced to a simple zero expression, as we have to implement a method which always returns zero. Eventually, we create an instance of a DummyController (line 8) and launch the simulation over all simulation chronicles (line 10) passing the created instance as argument. Battery parameters (c, l, ρ c , ρ d ) (referred to as metadata, line 13) and energy tariff (p + , p -) (line 12) can be changed by the user to run a custom simulation. § ¤ 1 using EMSx We can implement more complex examples by using the information object given in the input arguments of the compute_control function. Figure 1.5 displays the fields of the Information type, an EMSx.jl built-in type. An instance of this type gives access to the running time step t ∈ {0, . . . , T -1} (line 2), to the state of charge x t in (1.8a) (line 3), and to the content of the partial observations-forecasts h t in (1.12) (line 4-7). This online information allows us to define a controller φ as in (1.13). Besides, the Information type has fields providing access to the energy price (p + , p -) (line 8), to the battery parameters (c, l, ρ c , ρ d ) (line 9) and to the site reference i ∈ I (line 10), which let us define a specific controller φ i for the site i ∈ I. All-in-all, beyond our toy example of Figure 1.4, line 5-6, the information object in the input argument of the compute_control function enables the implementation of more sophisticated controllers, such as the ones that we introduce and evaluate in §1.5. As an example of using the Information type, a controller that empties half of the battery would be implemented as in Figure 1 The code of EMSx.jl and more illustrative controller examples are publicly available at https://github.com/adrien-le-franc/EMSx.jl.

Numerical experiments

To illustrate how we can use the EMSx controller benchmark of Sect. 1.3, we present several controllers and provide their scores. These controllers φ all share the same structure: for any step t ∈ {0, . . . , T -1}, the quantity φ t (x t , h t ) in (1.13) is not given by an analytical formula, but as the solution of a reference optimization problem. Controller-design techniques differ according to the nature of this latter problem, which is solved at every step t ∈ {0, . . . , T -1}, that is, online ("on the fly") as a function of the current available quantities (x t , h t ), namely state of charge of the battery and couples of observations-forecasts up to time t (see (1.12e)) A comprehensive overview of such techniques and algorithms is given in [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF].

Before we start, we introduce some terminology. First, we define a scenario as a sequence {w t } t∈T of uncertainties w t = (g t , d t ) as in (1.10), and where T ⊆ {1, . . . , T }. Second, we stress the difference between open-loop and closedloop solutions and optimization problems. In an intertemporal optimization problem, one may look either for solutions that are only functions of time (openloop), or for solutions that are functions of time and of other variables that are available up to this time (closed-loop). Therefore, an optimization problem is said to be open-loop (resp. closed-loop) when its solutions are open-loop (resp. closed-loop). We refer to [17, §1.1.3] for a discussion about the difference between open-loop and closed-loop controls.

Chapter 1. EMSx: a numerical benchmark for energy management systems In §1.5.1, we present a class of so-called lookahead methods where the reference optimization problem is multistage open-loop. In contrast, in §1.5.2, we present a class of so-called cost-to-go methods where the reference optimization problem, solved online, is one-stage but depends on cost-to-go functions which, themselves, are the output of closed-loop optimization problems which are computed offline. In §1.5.3, we comment on the results obtained when applying the controllers above on the EMSx controller benchmark.

Controllers obtained by lookahead methods

In lookahead methods, one solves, for every step t ∈ {0, . . . , T -1}, a reference multistage ("looking ahead" from the current step t) optimization problem which is open-loop, be it deterministic (MPC) or stochastic (OLFC). Stochastic (scenario-based) lookahead methods are limited by the exponential growth of the computing time with respect to the number of scenarios.

Model Predictive Control

The Model Predictive Control (MPC) method is one of the most famous lookahead techniques [10, Vol.1, §6.1]. The MPC method mainly exploits the forecast data. It yields a controller φ MPC = (φ MPC 0 , . . . , φ MPC T -1 ) by solving a sequence of multistage deterministic optimization problems over a fixed1 horizon H (in the numerical application, H = 96) When used in simulation, only the simulation (testing) chronicles in S i in the partition (1.15) are used in the reference optimization problem (1.21), and not the calibration (training) chronicles in C i ; moreover, only a subvector (of available forecasted values) of the whole vector (1.12) of partial observationsforecasts is used, namely ( ŵt,t+1 , . . . , ŵt,t+H-1 ).

               u * t ∈
Due to the mathematical expressions of the dynamics (1.8), of the constraints (1.9) and of the cost function (1.11), the multistage deterministic optimization problem (1.21) formulates here as a linear program.

Open Loop Feedback Control

The Open Loop Feedback Control (OLFC) method belongs to the family of online lookahead methods and its approach is similar to MPC, but for a stochastic ) σ∈S , together with their probabilities (π σ t ) σ∈S . These scenarios and their probabilities are built from two sources: on the one hand, from the subvector ( ŵt,t+1 , . . . , ŵt,t+H-1 ) of available forecasted values given in the whole vector (1.12) of partial observations-forecasts in the simulation (testing) chronicles in S i in (1.15); on the other hand, from partial observationsforecasts in the calibration (training) chronicles in C i in (1.15), from which we calibrate a scenario generation model. In the forthcoming numerical experiments in §1.5.3, we generate scenarios by modeling the deviations from the net demand 24-hour forecast as a Markov chain. We detail our scenario generation method in the Appendix ( §1.A.1). In numerical implementations, the number of samples used varies between 10, 50 or 100 scenarios.

Controllers obtained by cost-to-go methods

In cost-to-go methods, one solves online, for every step t ∈ {0, . . . , T -1}, a reference single stage stochastic optimization problem, which itself depends on cost-to-go functions, computed offline. These functions are called cost-to-go because, ideally, they map any state of the system to the optimal, over strategies (closed-loop), expected future cost from a given time step to the final horizon. The Stochastic Dynamic Programming (SDP) method is the most famous of cost-to-go computation techniques [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF]. Cost-to-go methods are limited by the exponential growth of the computing time with respect to the dimension of the state space. In SDP methods, we use random variables, defined on an abstract probability space (Ω, F, P), and designed by bold capital letters like W.

Stochastic Dynamic Programming

Whereas MPC and OLFC are based on an open-loop reference optimization problem, Stochastic Dynamic Programming is based on a closed-loop reference optimization problem, like in (1.24).

Chapter 1. EMSx: a numerical benchmark for energy management systems • In the offline phase of the SDP algorithm, one computes a sequence of so-called value functions (V t ) t=0,1,...,T -1,T by the Bellman (or dynamic programming) equation, backward for t ∈ {0, . . . , T -1},

V T (x) = 0 , V t (x) = min u∈U (x) σ∈S off π off,σ t+1 L t (u, w off,σ t+1 ) + V t+1 f (x, u) .
(1.23a)

• In the online phase of the SDP algorithm, one computes

     u * t ∈ arg min u∈U (xt) σ∈S on π on,σ t+1 L t (u, w on,σ t+1 ) + V t+1 f (x t , u) φ SDP t (x t , h t ) = u * t .
(1.23b)

The reference optimization problem (1.23a)-(1.23b) is stochastic because of the scenarios (w off,σ t+1 ) σ∈S off , together with their probabilities (π off,σ t+1 ) σ∈S off , and of the scenarios (w on,σ t+1 ) σ∈S on , together with their probabilities (π on,σ t+1 ) σ∈S on . The scenarios indexed by σ ∈ S off , and their probabilities, are built exclusively from partial observations-forecasts in the calibration (training) chronicles in C i , in (1.15). The scenarios indexed by σ ∈ S on , and their probabilities, could additionally integrate partial observations-forecasts in the simulation (testing) chronicles in S i in (1.15). The reader will find details of our scenario generation method in Appendix §1.A.2.

The reference optimization problem (1.23a)-(1.23b) is closed-loop because, under proper assumptions, it provides the optimal solution to the following multistage stochastic optimization problem (where the minimum is over strategies ψ which depend both on time and on past uncertainties as in (1.24d))

min ψ E T -1 t=0 L t (U t , W t+1 ) , (1.24a)
X t+1 = f (X t , U t ) , ∀t ∈ {0, . . . , T -1} , (1.24b)
X 0 = x 0 , (1.24c)
U t = ψ t (W 0 , . . . , W t ) , ∀t ∈ {0, . . . , T -1} , (1.24d) U t ∈ U(X t ) , ∀t ∈ {0, . . . , T -1} . (1.24e)
Problem (1.24) is optimally solved by the Bellman equation (1.23a) in the case where the random variables (W 0 , . . . , W T ) (noise process) are stagewise independent [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Carpentier | Stochastic multi-stage optimization[END_REF].

SDP-AR

To account for possible stagewise dependence in the uncertainties (noise process in (1.24)), one can extend the state space with the observations of the i-th net demand lags z t-i = d t-i -g t-i , i = 1, . . . , k. This gives a new state xt -which is a compression of the information given by (x t , h t ) -and new elements of a model, like in §1.

= (x t , z t , . . . , z t-k+1 ) ∈ [0, 1] × R k , xt+1 = ft (x, u t , t+1 ) , ft (x t , u t , t+1 ) = f (x t , u t ) j=0,...,k-1 α j t z t-j + β t + t+1 z t , . . . , z t-k+2 , Ũ(x t ) = U(x t ) , Lt (x t , u t , t+1 ) = L t (u t , j=0,...,k-1 α j t z t-j + β t + t+1 ) .
The coefficients α 0 t , . . . , α k-1 t and the additive terms β t are the elements of an auto-regressive model of order k (noted AR(k))

Z t+1 = j=0,...,k-1 α j t Z t-j + β t + t+1 , ∀t ∈ {0, . . . , T -1} ,
for the net demand process Z. When the error process is assumed to be stagewise independent, the following algorithm provides an optimal solution to the multistage stochastic optimization problem (1.24).

• In the offline phase of the SDP-AR algorithm, one computes a sequence of new value functions ( Ṽt ) t=0,...,T , backward for t ∈ {0, . . . , T -1}, by

ṼT (x) = 0 , Ṽt (x) = min u∈ Ũ (x) σ∈S off π off,σ t+1 Lt (x, u, off,σ t+1 ) + Ṽt+1 ft (x, u, off,σ t+1 ) . (1.26a)
• In the online phase of the SDP-AR algorithm, one computes

     u * t ∈ arg min u∈ Ũ (xt) σ∈S on π on,σ t+1 Lt (x t , u, on,σ t+1 ) + Ṽt+1 ft (x t , u, on,σ t+1 ) φ SDP-AR t (x t , h t ) = u * t .
(1.26b)

Using EMSx to compare controller-design techniques

We now comment the results obtained when applying the controller-design techniques introduced in §1.5.1 and in §1.5.2 to the EMSx benchmark. Numerical experiments were run on an Intel Core Processor of 2.5 GHz with 22 GB RAM. We used the LP solver CPLEX 12.9 for MPC, OLFC and to compute the lower bounds J i (h), h ∈ S i , i ∈ I, in (1.16). We have summarized our results in Table 1.1.

Our goal is to illustrate how EMSx enables a fine comparison of controllerdesign techniques. First, we focus on lookahead methods in §1.5.3, second, we turn to cost-to-go methods in §1.5.3, and finally, we give a comparative analysis Chapter 1. EMSx: a numerical benchmark for energy management systems of the winner control techniques from both family of methods in §1.5.3. We conclude that, among our pool of candidate techniques, SDP-AR stands out as the best microgrid control method on the EMSx benchmark.

In what follows, we organize the discussion around three points: i) performance scores (1.20) (second column of Table 1.1); ii) (relative) gains2 (1.17) disaggregated per site (Figures 1.6 and 1.7); iii) CPU time performances. Regarding CPU time, we report the online time (fourth column of Table 1.1) as the average computing time required to yield a single control u t , and the offline time (third column of Table 1.1) as the average computing time that is to be spent prior to the simulation step for solving the online control problems defined in (1.21), (1.22) 1.1: Scores (second column, the higher the better) G φ i i∈I in (1.20) and time performances (third and fourth column, the lower the better) for collections φ i i∈I of controllers φ i designed with techniques (first column) from §1.5.1 and §1.5.2 on the EMSx benchmark. The symbol -indicates an irrelevant item

Lookahead methods

First, we examine performance scores (second column of Table 1.1). Whereas MPC uses a single scenario (the forecast), OLFC uses multiple scenarios; this helps OLFC improving the average score of MPC from 0.487 to 0.513. As expected, increasing the number of scenarios from 10 to 50 improves the score of OLFC. However, the performance remains stagnant when pushing up to 100 scenarios, with a slight decrease of OLFC-100 to 0.510. We expect that the improvement between MPC and OLFC should be sensitive to the scenario generation method employed. With our method, the progress of OLFC is modest. Second, we turn to appraise the gains disaggregated per site. In Figures 1.6 and 1.7, we display the gains per site G i (φ i ) in (1.17). We omitted OLFC-10 and OLFC-100 to improve readability, given that these methods perform slightly worse than OLFC-50. We observe that OLFC-50 returns slightly higher gains than MPC for 58 out of 70 sites. We conclude that the stochastic approach of 1.5. Numerical experiments OLFC makes it a slightly more accurate microgrid controller-design technique than MPC.

Third, we discuss the computing time. Lookahead methods advantageously do not include an offline stage (third column of Table 1.1). However, except for MPC, they require a rather long online computing time (fourth column of Table 1.1), with an order of magnitude between 10 -4 and 10 -1 seconds per call to the controller, for they call a LP solver at each time step. We observe that OLFC is at least about ten times slower than MPC. As expected, the more we add sample scenarios, the longer the OLFC computing time. We observe that improving the amount of scenarios from 50 to 100 doubles the online time. Even though the online time of OLFC-100 is still reasonable for a field implementation of a microgrid controller, it took us about 46 hours to run the simulation over the 2474 simulation weeks. Despite the much longer computing time, OLFC-100 did not return higher gains than OLFC-50. For this reason, we did not consider more than 100 generated scenarios. First, we examine performance scores (second column of Table 1.1). We see that a plain SDP controller yields scores jumping to 0.691. The results of SDP can be improved up to 0.794 in the SDP-AR formulation. However, We observe that the gain from extending the lag of an AR(1) model to an AR(2) model is almost null. Therefore, we do not report the gains of SDP-AR (2) in Third, we discuss the computing time. Cost-to-go methods display fast online times (fourth column of Table 1.1), with an order of magnitude between 10 -3 and 10 -4 seconds per call to the controller. However, cost-to-go methods require offline CPU time (third column of Table 1.1) for computing value functions. The complexity of SDP is well known for growing exponentially with the state space, which is well illustrated by our results: from SDP to SDP-AR (1) to SDP-AR (2), we add one dimension to the state space at each improvement of the method, which multiplies by a factor of 10 the offline time. Given the low improvement of gain from SDP-AR (1) to SDP-AR (2), we find the offline time of the latter method dissuasive. Finally, SDP-AR (1) appear as the best trade-off between computing time and cost performance.

Cost-to-go methods

A comparison between lookahead and cost-to-go methods

We now discuss the comparative performances of OLFC-50 and SDP-AR (1). Both techniques represent the best candidate of its family of method.

Cost performance. First, we examine performance scores (second column of Table 1.1). The main observation is that the performance score of SDP-AR (1) is more than 50% higher than the one of OLFC-50 (second column of Table 1.1).

Second, we turn to appraise the gains disaggregated per site. The observed aggregated dominance is confirmed when looking closer at the per site performances in Figures 1.6 and 1.7. Indeed, we see that SDP-AR (1) outperforms OLFC-50 for 68 of the total pool of 70 sites. Even more, these two figures reveal that lookahead methods lag behind cost-to-go ones for almost all sites, and that the gap can be significant on a few outlying sites. The underperformance of OLFC-50 on these sites explains the score gaps of Table 1.1.

Third, we discuss the relationship between the cost performances of both techniques and the predictability of the sites, measured by the RMSE (1.7). For this purpose, we comment and detail Figure 1.8. We immediately observe that, for SDP-AR (1), there is no strong link between cost performance and predictability. Regarding OLFC-50, a statistical analysis reveals that the correlation between the RMSE value and the OLFC-50 score is moderate, with a Pearson correlation coefficient of -0.54 (the lower the RMSE, the higher the score). For most of the sites, the RMSE explains very little of the performance of OLFC-50, to the point that OLFC-50 performs poorly on some sites with low RMSE values (and thus high forecast accuracy). Now, we focus on a few number of sites that appear as outliers: Site 33 and Site 59 (the two circles at the far right), and Site 48 (the circle at the top left). OLFC-50 achieves its highest scores 0.965 on Site 33 and 0.910 on Site 59, which both have very regular and easily predictable load profiles, and its worse score -0.340 on Site 48, the least predictable site of the pool, with a RMSE of 0.17. Notice that this negative score of -0.340 means that OLFC-50 performs worse on average than Chapter 1. EMSx: a numerical benchmark for energy management systems the dummy controller φ d . In contrast, we observe that SDP-AR (1) scores 0.566 on Site 48, which highlights the robustness of the cost-to-go methods for the management of a microgrid in a highly unpredictable context.

Computing time performance. Second, we discuss the computing time. On the one hand, regarding offline time, SDP-AR (1) cannot do better than OLFC-50, obviously, but the average offline time of SDP-AR (1) (38.1 seconds) is reasonable for a field implementation of a microgrid controller. On the other hand, regarding online time, OLFC-50 is not as good as SDP-AR (1) -with an average online time of OLFC-50 about 100 times longer than the one of SDP-AR (1) -but its order of magnitude (10 -2 seconds) remains acceptable. Thus, all in all, computing time is not a discriminating point between the two techniques.

Conclusion

We have introduced EMSx, an Energy Management System benchmark to compare electric microgrid controllers, hence controller-design techniques. EMSx is made of three key components. The dataset provided by Schneider Electric ensures a diverse pool of realistic microgrids with photovoltaic power integration. The mathematical framework is explicit. The simulation code is accessible in the EMSx.jl package, designed to welcome various sorts of control algorithms. All components of the benchmark are publicly available, so that other researchers willing to test controllers on EMSx may reproduce experiments easily.

1.A. Appendix

Regarding our numerical results, we observe a gap between cost-to-go methods and lookahead methods. The SDP-AR (1) controller-design technique stands out as the best trade-off between cost optimality and computing time performance. However, there is a range of possible improvements to explore. Among interesting directions, other scenario generation techniques could be tested to see how does the OLFC controller reacts. Beyond plain score improvements, enriching contributions could arise from the reduction of the computing time, or from changing the performance metrics (for instance with the use of risk measures), and from further comparative analysis of methods, especially to better explain the gap between lookahead and cost-to-go methods. We are also looking forward to controllers inspired from other research fields than multistage deterministic or stochastic optimization, including heuristics, robust optimization and reinforcement learning.

1.A Appendix

1.A.1 Generation of scenarios for the Open Loop Feedback Control algorithm

Our scenario generation method is inspired by [START_REF] Staid | Generating short-term probabilistic wind power scenarios via nonparametric forecast error density estimators[END_REF][START_REF] David | Constructing probabilistic scenarios for wide-area solar power generation[END_REF], which address such generation for so-called day-ahead energy management problems. We use a simplified model for tractable generation adapted to dynamical control. Since uncertainties w t = (g t , d t ) are directly plugged in the cost (1.11a) as the net demand z t = d t -g t , we compress the generation of scenarios (w σ t,t+1 , . . . , w σ t,t+96 ) ∈ R 2×96 in (1.22) to the generation of net demand scenarios (z σ t,t+1 , . . . , z σ t,t+96 ) ∈ R 96 . Following the original methods, we choose day part separators to reduce the 96 dimensional vector to a few skeleton points for scenario construction (intermediate values are linearly interpolated). We choose to concentrate on the forecast error at t+15 minutes, t+1 hour, t+2 hours, t+4 hours, t+12 hours and t+24 hours, so that our model only samples values of z σ t,t+j for j ∈ {1, 4, 8, 16, 48, 96}. We select 10 relevant values of the net demand error at each separator j ∈ {1, 4, 8, 16, 48, 96} by applying the K-means algorithm [32, §13] on the historical error z i t+j -ẑi t,t+j , combining the historical observations (1.1) and forecasts (1.3) of the calibration data of the Site i ∈ I considered. Then, we compute 10×10 transition matrices for the error between consecutive separators. With this model, we are able to sample net demand scenarios (z σ t,t+1 , . . . , z σ t,t+96 ) given a single value forecast and to compute their probabilities π σ t . Separate probability distributions of the initial error at t+1 are calibrated depending on the time of the day, and on whether the initial time step t corresponds to a week day or a weekend day. We alleviate computing costs by reusing transition matrices regardless of the initial value of t. However we calibrate separate matrices for week days and weekend days. Figure 1.9 provides examples of scenarios generated with our method.

1.A.2 Generation of scenarios for the SDP and SDP-AR algorithms

For SDP methods, we choose to discretize each dimension of the state space in 10 values, whereas the control space is restricted to 20 values and the noise space to 10 values. Since uncertainties w t = (g t , d t ) are directly plugged in the cost (1.11a) as the net demand z t = d t -g t , we compress the calibration of the distributions of (W 1 , . . . , W T ) to the calibration of the distributions of (Z 1 , . . . , Z T ).

We use the K-means algorithm to fit discrete probabilities π off,σ t+1 , π on,σ t+1 on the historical observations (g i , d i ) (1.1) of the calibration data of the Site i ∈ I considered. These discrete distributions serve the computation of expectations in (1.23a)-(1.23b). While we could leverage the data available on the fly in the online phase, we use the same probability distributions in the offline phase and in the online phase. Separate distributions (of Z t ) are calibrated depending on the time of the day and on whether the time step t+1 corresponds to a week day or a weekend day. We compute one value function per site for the horizon of one week. In the SDP-AR formulation, we calibrate the AR(k) models using least squares regression and calibrate distributions of the residual error ( t ) with the same approach as for Z t .

Introduction

We consider optimization problems where an upstream decision is made in the first place, which stands for a parameter for a downstream multistage stochastic optimization problem. Our work is motivated by applications in the field of energy planning, where such decision structures arise naturally. As a typical example, the regulatory rules considered in [START_REF] Team-Drives | Impact of regulatory rules on economic performance of PV power plants[END_REF][START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF][START_REF] Pflaum | Battery sizing for PV power plants under regulations using randomized algorithms[END_REF] impose the following Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization production planning to renewable power units: every operating day, a daily commitment profile should be submitted day-ahead to announce the upcoming power production, then, during the intraday management phase, the delivered power is compared with the commitment profile, and penalties are charged to the producer if the two profiles differ significantly. Using the terminology introduced above, the engagement profile is an upstream (day-ahead) decision which stands for a parameter for the downstream (intraday) management of the power unit.

In this chapter, we propose a standard formulation for parametric multistage stochastic optimization problems where the parameter is typically made of subvectors of identical size, representing one decision per time interval. In this context, when the value of the parameter is fixed, Stochastic Dynamic Programming (see e.g. [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF]) provides us with an efficient method to compute the value of the downstream problem. On top of that, we investigate on the possibility to compute efficiently additional first-order information, e.g. gradients or subgradients of the value function with respect to the parameter, when these objects exist. Our end goal is to formulate first-order oracles which let us enter the world of (primal) first-order optimization methods (see [START_REF] Beck | First-order methods in optimization[END_REF] for a recent survey). Although we review the differentiability properties of a value function in a general context, our analysis conducts us to focus on problems where the value of the downstream problem is convex with respect to the parameter.

Of course, the interest in such kinds of problems is not new. The reference textbook of Bonnans and Shapiro [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF] gathers numerous results on the value function of a parameterized optimization problem. In the context of multistage stochastic programming, the sensitivity analysis of the value of a downstream problem with respect to some model parameters has been already studied in [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF][START_REF] Guigues | Duality and sensitivity analysis of multistage linear stochastic programs[END_REF][START_REF] Terça | Envelope Theorems for Multistage Linear Stochastic Optimization[END_REF]. However, these works mainly focus on the computation of directional derivatives, in the case where the stage cost functions of the problem are affine, whereas we are interested in estimating gradients or subgradients in the general convex case. In this direction, the stochastic dual dynamic programming algorithm (SDDP), introduced by Pereira and Pinto [START_REF] Pereira | Multi-stage stochastic optimization applied to energy planning[END_REF], and analyzed further by Shapiro [START_REF] Shapiro | Analysis of stochastic dual dynamic programming method[END_REF] and Philpott [START_REF] Philpott | On the convergence of stochastic dual dynamic programming and related methods[END_REF][START_REF] Girardeau | On the convergence of decomposition methods for multistage stochastic convex programs[END_REF], is well-known for offering the possibility to evaluate a subgradient of the value functions of a multistage convex problem as a solution of a paired dual problem. We study the applicability of the SDDP algorithm to our problem, while bearing in mind that a plain application of the method to our context might be challenging, since it requires to model the parameter as an additional state variable, which increases considerably the dimension of the state space. Indeed, since we consider parameters aggregating one decision per time interval of the downstream multistage problem, the dimension of the state space grows linearly with the horizon of the downstream problem. Therefore, we explore new directions. We review the properties of a convex marginal function and study the relationship between two consecutive value functions of the downstream multistage problem, which are binded by the Bellman equations. In the case where the value functions are convex and differentiable, our analysis results in a numerical method for computing a gradient of the value function of the downstream problem with respect to the parameter chosen at the upstream stage. This strategy does not require to model the 2.2. Parametric multistage stochastic optimization problems parameter as a state, and allows us to consider larger parameter scales. In the case where the value functions are convex but nondifferentiable, we propose two methods, one that approximates the original nonsmooth problem with regularized value functions defined with the Moreau envelope of the stage costs, and a second one based on the SDDP algorithm.

The chapter is organized as follows. First, we introduce the definition of a parametric multistage optimization problem in §2.2. Second, we review the variational properties of a marginal function in §2.3. Then, we introduce a method to compute the gradient of differentiable convex value functions with respect to their parameter argument in §2.4. Finally, in the nonsmooth case, we introduce lower smooth and lower polyhedral approximate value functions in §2.5, for which we can efficiently compute, respectively, the gradients and some subgradients. We also prove two convergence results showing that such approximations can guarantee a high accuracy. This chapter is mainly dedicated to theoretical considerations. Contextual problems in energy planning and numerical applications are postponed to Chapter 3.

Notations

We introduce mathematical notations. Let (Ω, F, P) be a probability space. We use bold capital letters, e.g. Z, to denote random variables, and denote by σ(Z) the σ-algebra on Ω generated by the random variable Z. Besides, for a topological space X, we denote by B(X) its Borel σ-field. We introduce the extended real line R = [-∞, +∞], and we denote R + = [0, +∞[ and R * + = ]0, +∞[.

Parametric multistage stochastic optimization problems

First, in §2.2.1, we introduce a standard formulation for the class of parametric multistage stochastic optimization problems discussed in the introduction. Second, in §2.2.2, we introduce parametric value functions and the stochastic dynamic programming method for solving such problems.

Problem formulation

We are interested in solving problems of the form

min p∈P Φ(p) , (2.1a)
Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization in the case where the objective function Φ in (2.1a) is the value of the following parametric multistage stochastic optimization problem:

Φ(p) = inf U 0 ,...,U T -1 E T -1 t=0 L t (X t , U t , W t+1 , p t ) + K(X T , p T ) , (2.1b)
X 0 = x 0 , (2.1c
)

X t+1 = f t (X t , U t , W t+1 ) , ∀t ∈ 0, T -1 , (2.1d)
U t ∈ U t (X t , p t ) , ∀t ∈ 0, T -1 , (2.1e) σ(U t ) ⊆ σ(W 1 , . . . , W t ) , ∀t ∈ 0, T -1 . (2.1f)
We now comment on all terms in Problem (2.1). We consider a discrete time span

0, T = {0, 1, . . . , T -1, T } , (2.2)
with horizon T ∈ N * . Concerning the upstream problem (2.1a), the variable

p = {p t } t∈ 0,T ∈ R np×(T +1) , (2.3a)
where n p ∈ N * , is a parameter, or upstream decision, which is decomposed stagewise in subparameters

p t ∈ R np , ∀t ∈ 0, T , (2.3b)
by the coordinatewise projections

proj t : R np×(T +1) → R np : p → p t , ∀t ∈ 0, T , (2.3c)
and may be chosen in the parameter set

P ⊆ R np×(T +1) . (2.4)
The parameter p in (2.3a) affects the multistage Problem (2.1b)-(2.1f). Concerning the downstream problem (2.1b)-(2.1f), we introduce the random variables

X t : (Ω, F, P) → R nx , B(R nx ) , ∀t ∈ 0, T , (2.5a)
U t : (Ω, F, P) → R nu , B(R nu ) , ∀t ∈ 0, T -1 , (2.5b)
W t : (Ω, F, P) → R nw , B(R nw ) , ∀t ∈ 1, T , (2.5c
U t : R nx × R np ⇒ R nu , ∀t ∈ 0, T -1 , (2.6)
and by the nonanticipativity constraints

σ(U t ) ⊆ σ(W 1 , . . . , W t ) , ∀t ∈ 0, T -1 . (2.7)
The state variables are initialized by x 0 ∈ R nx and evolve in (2.1d) according to the dynamics

f t : R nx × R nu × R nw → R nx , ∀t ∈ 0, T -1 . (2.8)
Last, the criterion to be minimized in (2.1b) is the expected value of the sum of the parametric stage costs

L t : R nx × R nu × R nw × R np → R , ∀t ∈ 0, T -1 , (2.9a)
with a parametric final cost

K : R nx × R np → R . (2.9b) Remark 2.2.1
The formulation of the nonanticipativity constraint in (2.7) corresponds to problems which formulate naturally in the decision-hazard information structure. In particular, the first decision is deterministic, with σ(U 0 ) = {∅, Ω}. This formulation is well-adapted to the kind of application problems which we consider, as we elaborate in Chapter 3.

Parametric value functions

In this work, we are interested in efficient numerical algorithms to solve Problem (2.1). For this reason, we make the following assumption on the data of Problem (2.1).

V T (x, p) = K(x, p T ) , ∀(x, p) ∈ R nx × R np×(T +1) , (2.10a) V t (x, p) = inf u∈Ut(x,pt) E L t (x, u, W t+1 , p t ) + V t+1 f t (x, u, W t+1 ), p , (2.10b) ∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 .
When

Φ(p) = V 0 (x 0 , p) , ∀p ∈ R np×(T +1) . (2.11)
We refer to Bertsekas [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF] and Puterman [START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF] for a comprehensive presentation of the Stochastic Dynamic Programming method. Moreover, when the noise variables in the sequence {W t } t∈ 1,T in (2.5c) have a finite support, we are able to compute accurately the expectations in (2.10b), which explains why the discrete white noise Assumption 2.2.2 is rather standard in works oriented toward numerical applications (see e.g. [START_REF] Vincent Leclère | Exact converging bounds for stochastic dual dynamic programming via Fenchel duality[END_REF][START_REF] Philpott | On the convergence of stochastic dual dynamic programming and related methods[END_REF][START_REF] Pacaud | Distributed Multistage Optimization of Large-Scale Microgrids under Stochasticity[END_REF]). We introduce some additional terminology. The name "value function" refers to the definition of V t in (2.10b) as the infimum of a certain criterion. Indeed, functions defined in such a way are usually called "value functions" (in a broader sense than the one we give here in the context of Dynamic Programming), or "marginal functions". We use the latter terminology to design any function defined as the value of an optimization problem to avoid confusion with the value functions {V t } t∈ 0,T in (2.10). Marginal functions have specific properties which we study later in §2.3. In order to ease the application of the results of §2.3 to the parametric value functions {V t } t∈ 0,T -1 defined in (2.10b), we introduce the (parametric) Q-functions

Q t (x, u, p) = E L t (x, u, W t+1 , p t ) + V t+1 f t (x, u, W t+1 ), p , (2.12a)
∀(x, u, p) ∈ R nx × R nu × R np×(T +1) , ∀t ∈ 0, T -1 ,
so that the parametric value functions {V t } t∈ 0,T -1 formulate explicitly as marginal functions:

V t (x, p) = inf u∈Ut(x,pt) Q t (x, u, p) , (2.12b) ∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 .
For the same reason, we also introduce the (possibly empty) solution sets

U * t (x, p) = arg min u∈Ut(x,pt) Q t (x, u, p) , (2.13)
∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 .

Background on marginal functions

We review some well-known results regarding the variational properties of a marginal function. Most of the results which we state here are taken from the textbooks of Rockafellar and Wets [START_REF] Rockafellar | Variational analysis[END_REF], Bauschke and Combettes [5], Bonnans and Shapiro [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF], and from the lecture notes (in French) of Gilbert [START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF].

Throughout our review, we comment on the applications of these results to (parametric) multistage stochastic programming. Let (X, Y) and (U, V) be two pairs of primal and dual vector spaces. Each pair is endowed with its own bilinear form, which we both denote by • , • (the 2.3. Background on marginal functions one we refer to is always clear from context). We consider an extended real valued bivariate function

Ψ : X × U → R , (2.14a)
and we define the marginal function

ψ(x) = inf u∈U Ψ(x, u) , ∀x ∈ X , (2.14b)
with the constraint set

U ⊆ U , (2.14c)
together with the (possibly empty) solution set

U * (x) = arg min u∈U Ψ(x, u) , ∀x ∈ X . (2.14d)
Note that, in the case where the feasible u ∈ U constraining the infimum in the definition of the marginal function in (2.14b) are delimited by a set-valued mapping U : X ⇒ U, we can reformulate

inf u∈U (x) Ψ(x, u) = inf u∈U Ψ(x, u) + δ gr(U ) (x, u) , ∀x ∈ X , (2.15)
where

gr(U ) = (x, u) ∈ X × U u ∈ U (x) (2.16)
is the graph of set-valued mapping U and

δ gr(U ) (x, u) = 0 if (x, u) ∈ gr(U ) , +∞ else , (2.17)
is the indicator function of the set gr(U ). Therefore, our formulation for marginal functions in (2.14a)-(2.14b) covers a large spectrum of situations, including the parametric value functions {V t } t∈ 0,T in (2.10). We start with a result which gives a condition for the marginal function ψ in (2.14b) to be lower semicontinuous (lsc) and for the solution sets U * (x), x ∈ X, in (2.14d) to be nonempty. Theorem 2.3.1 (see [5], Lemma 1.30) Let X and U be two Hausdorff spaces, let Ψ : X × U → R be the bivariate function in (2.14a), and let the constraint set U ⊆ U in (2.14c) be compact. If the bivariate function Ψ is lower semicontinuous, then the marginal function ψ defined by

ψ(x) = inf u∈U Ψ(x, u) , ∀x ∈ X , (2.18)
in (2.14b) is lower semicontinuous, and for all x ∈ X, the infimum in (2.18) is attained.

Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization

The following example is an illustration of Theorem 2.3.1.

Example 2.3.2 (from [START_REF] Dh | On the continuity of the maximum in parametric linear programming[END_REF], §2) Let the marginal function

ψ(x) = min u∈R 2 -u 2 , s.t.      u 1 + xu 2 ≥ 1 , u 1 + u 2 ≤ 1 , u 1 , u 2 ≥ 0 , ∀x ∈ R . (2.19a)
We introduce the lsc bivariate function Ψ(x, u) = -u 2 +δ {u 1 +xu 2 ≥1} (x, u), defined on R × R 2 , and the compact constraint set U = u ∈ R 2 + u 1 + u 2 ≤ 1 , so that the marginal function in (2.19a) formulates as ψ = min u∈U Ψ(•, u). In view of Theorem 2.3.1, the marginal function ψ is lsc. Indeed, we have that

ψ(x) = 0 if x < 1 , -1 if x ≥ 1 . (2.19b)
The marginal function ψ introduced in Example 2.3.2 reveals that, even when the function ψ is defined with smooth data as in (2.19a), it might be noncontinuous, as observed in (2.19b). Therefore, the notion of Fréchet differentiability is too strong to study the local variations of a marginal function. Instead, we review the main properties of the directional derivatives in §2.3.1, and of the subdifferential in §2.3.2, which are more adapted to the context of marginal functions. We also discuss the strong connection between the subdifferential of a marginal function and the solutions of a suitable dual problem in §2.3.3, and mention further first order information results on marginal functions in §2.3.4.

Directional derivatives

We recall that when X is a real normed vector space, the directional derivative of a function f : X → R is defined, at x ∈ X and for a direction d ∈ X, by

f (x; d) = lim ε→0 + f (x + εd) -f (x) ε ∈ R , (2.20)
when this limit exists. Under stronger regularity assumptions than the ones of Theorem 2.3.1, the next result enforces the local Lipschitz continuity of the marginal function ψ in (2.14b) and yields its directional derivatives. This result is known as Danskin's Theorem, a proof of which can be found in [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF]Theorem 4.13]. We follow the formulation given in [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF]Theorem 4.3], which we find more convenient for practical considerations.

Theorem 2.3.3 (Danskin) Let X be the Euclidean space R n , where n ∈ N * , and U be a topological space, let the constraint set U ⊆ U in (2.14c) be nonempty and compact, and let the bivariate function Ψ : X × U → R in (2.14a) take finite values over the set X × U. If Ψ(•, u) is Fréchet differentiable for every u ∈ U, and ∇ x Ψ is continuous on X × U, then the marginal function ψ defined by

ψ(x) = inf u∈U Ψ(x, u) , ∀x ∈ X , (2.21a
ψ (x; d) = inf u * ∈U * (x) d , ∇ x Ψ(x, u * ) , ∀x ∈ X , ∀d ∈ X . (2.21b)
Moreover, if the solution set U * (x) in (2.14d) is a singleton {u * }, the marginal function ψ is Fréchet differentiable at x and

∇ψ(x) = ∇ x Ψ(x, u * ) . (2.21c)
Danskin's Theorem 2.3.3 has been used extensively for computing the sensitivity of the value of a marginal function ψ at a point x ∈ X with respect to perturbations of x in some directions of interest d ∈ X. In the multistage stochastic programming literature, such applications are investigated in [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF][START_REF] Guigues | Duality and sensitivity analysis of multistage linear stochastic programs[END_REF][START_REF] Terça | Envelope Theorems for Multistage Linear Stochastic Optimization[END_REF]. All three references focus on the linear case, i.e. when the cost function and the constraints of the problem are affine. The authors are mainly concerned with the sensitivity of the optimal value of a parameterized problem with respect to some scalar model parameters, which they obtain by estimating directional derivatives. In [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF], the authors further argue that, since Theorem 2.3.3 tells us that the marginal function ψ in (2.14b) is locally Lipschitz continuous, by Rademacher's Theorem, it is Fréchet differentiable almost everywhere. A similar conclusion is drawn in [START_REF] Terça | Envelope Theorems for Multistage Linear Stochastic Optimization[END_REF], and formulas to compute the gradient ∇ψ when ψ is differentiable are given in both references. However, regarding our intention to apply first-order optimization methods, if the marginal function ψ in (2.14b) is not differentiable everywhere, we need to gain additional first order information at the points of nondifferentiability of ψ. Indeed, employing smooth optimization methods to minimize nondifferentiable functions can yield suboptimal solutions, even in the convex case, as illustrated by the example discussed in [6, § 8.1.2].

Subdifferential

We recall that when the space X is paired with its dual space Y by a bilinear form

• , • , the subdifferential ∂f (x) ⊆ Y of a function f : X → R is defined, at x ∈ X, by y ∈ ∂f (x) ⇐⇒ f (x) ≥ f (x) + x -x , y , ∀x ∈ X . (2.22)
In order to state the next results in their most compact formulation and to ease notations in the following discussion, we adopt the unconstrained formulation for the marginal function

ψ(x) = inf u∈U Ψ(x, u) , ∀x ∈ X , (2.23a)
and thus the unconstrained formulation for the solution set

U * (x) = arg min u∈U Ψ(x, u) , ∀x ∈ X . (2.23b)
Since the bivariate function Ψ in (2.14a) takes values in R, we can formulate equivalently the constraint u ∈ U in (2.14b) by setting Ψ(•, u) = +∞ for u / ∈ U, so that we remain in the same framework as the one introduced in (2.14a)-(2.14d).

We start by presenting a theorem which displays the relationship between the subdifferential of the marginal function ψ in (2.23a) and the subdifferential of the bivariate function Ψ in (2.14a). Similar or extended formulations of the following result can be found in [START_REF] Rockafellar | Variational Analysis[END_REF]Theorem 10.13], in [5,Theorem 16.71] with more details on the handling of constraints, and in [START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF]Proposition 3.75].

Theorem 2.3.4 (inspired from [START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF], Proposition 3.75) Let X and U be two real Hilbert spaces, let Y be the dual space of X (therefore also a Hilbert space, identified with X), let Ψ : X × U → R be the bivariate function in (2.14a), and let ψ : X → R be the marginal function defined by

ψ(x) = inf u∈U Ψ(x, u) , ∀x ∈ X , (2.24a) in (2.23a). If at x ∈ X, the solution set U * (x) in (2.23b
) is not empty, then for any u * ∈ U * (x), the subdifferential of ψ at x is given by

∂ψ(x) = y ∈ Y (y, 0) ∈ ∂Ψ(x, u * ) . (2.24b)
Proof. Let x ∈ X and u * ∈ U * (x) be given. By definition of the subdifferential,

y ∈ ∂ψ(x) ⇐⇒ ψ(x) ≥ ψ(x) + x -x , y , ∀x ∈ X , ⇐⇒ inf u∈U Ψ(x, u) ≥ Ψ(x, u * ) + x -x , y , ∀x ∈ X , (by definition of ψ) ⇐⇒ Ψ(x, u) ≥ Ψ(x, u * ) + x -x , y , ∀(x, u) ∈ X × U , ⇐⇒ (y, 0) ∈ ∂Ψ(x, u * ) .
(by definition of the subdifferential)

This ends the proof.

Compared with Danskin's Theorem 2.3.3, the above result does not require the full knowledge of the solution set U * (x) in (2.14d) at x ∈ X. Indeed, as we illustrate in Example 2.3.5, the set ∂ψ(x) in (2.24b) does not depend on the choice of the minimizer u * ∈ U * (x), even when the subdifferential of the bivariate function Ψ in (2.14a) is not constant over {x} × U * (x).

Example 2.3.5 (from [START_REF] Charles | Fragments d'Optimisation Différentiable -Théories et Algorithmes[END_REF], Remarques 3.76) Consider the bivariate function Ψ(x, u) = max{0, |u| -1} defined on R 2 , and the marginal function

ψ = inf u∈R Ψ(•, u) = 0. For any x ∈ R, we have that U * (x) = [-1, 1], ∂Ψ(x, u * ) =      {(0, 0)} if u * ∈] -1, 1[ , {0} × [0, 1] if u * = 1 , {0} × [-1, 0] if u * = -1 , (2.25
)

and ∂ψ(x) = {0} = y ∈ Y (y, 0) ∈ ∂Ψ(x, u * ) , ∀u * ∈ U * (x) . 50

Background on marginal functions

We now introduce the partial subdifferential ∂ x Ψ of the bivariate function Ψ in (2.14a), defined, at (x, ū) ∈ X × U, by

∂ x Ψ(x, ū) = ∂Ψ(•, ū)(x) .
(2.26)

In
(x) ⊆ proj X (∂Ψ(x, u * )) ⊆ ∂ x Ψ(x, u * ) . (2.

27)

Proof. From Theorem 2.3.4, if y ∈ ∂ψ(x) and u * ∈ U * (x), then (y, 0) ∈ ∂Ψ(x, u * ) hence y ∈ proj X (∂Ψ(x, u * )), which proves the left inclusion in (2.27). We now turn to the right inclusion.

If y ∈ proj X (∂Ψ(x, u * )), there exists v ∈ U such that (y, v) ∈ ∂Ψ(x, u * ), hence Ψ(x, u) ≥ Ψ(x, u * ) + x -x , y + u -u * , v , ∀(x, u) ∈ X × U. If we take u = u * , Ψ(x, u * ) ≥ Ψ(x, u * ) + x -x , y , ∀x ∈ X, hence y ∈ ∂ x Ψ(x, u * ).
We provide two examples to stress that the inclusions in (2.27) might be strict.

Example 2.3.7 Let Ψ(x, u) = max{-x, -u} be defined on R 2 . The marginal function ψ in (2.23a) is such that, for x ∈ R, ψ(x) = -x, ∂ψ(x) = {-1} and U * (x) = u ∈ R u ≥ x . Taking u * = x, from [45, §D Example 3.4], ∂Ψ(x, u * ) is the convex hull co{(0, -1), (-1, 0)}, so that proj X (∂Ψ(x, u * )) = [-1, 0] = ∂ψ(x) = {-1}.
(2.23a) is ψ = δ [-1,1] , and, if x = 0, u * = 1 is in U * (x), with ∂Ψ(0, 1) = N B (0, 1) = {0}×R + , and ∂ x Ψ(0, 1) = ∂δ B (•, 1)(0) = ∂δ {0} (0) = R , so that proj X (∂Ψ(x, u * )) = {0} = ∂ x Ψ(x, u * ) = R.
In Examples 2.3.7 and 2.3.8, we see that, at x ∈ X, computing an optimal solution u * ∈ U * (x) and a dual element y in ∂Ψ(x, u * ) or in ∂ x Ψ(x, u * ) does not give us automatically a subgradient element of ∂ψ(x). However, in the convex differentiable case, we have a stronger result. We recall that, if the bivariate function Ψ in (2.14a) is jointly convex in (x, u), then the marginal function ψ in (2.23a) is convex (see [START_REF] Rockafellar | Variational analysis[END_REF]Proposition 2.22]), and that the notions of Fréchet and Gateaux differentiability coincide for convex, proper, lsc functions when the space X is a finite dimensional real Hilbert space (see [5,Corollary 17.43]). The following result is also a consequence of Theorem 2.3.4.

Corollary 2.3.9 Under the assumptions of Theorem 2.3.4, let us assume further that the space X is finite-dimensional, that the bivariate function Ψ is convex, proper, lsc, and that Ψ(•, u) is differentiable for every u ∈ proj U (dom(Ψ)).

If at x ∈ X, ψ(x) is finite and the solution set U * (x) is nonempty, then ψ is differentiable at x, and we have that

∇ψ(x) = ∇ x Ψ(x, u * ) , ∀u * ∈ U * (x) .
(2.28)

Proof. Since Ψ is convex, so is the marginal function ψ. First, we prove that ψ is subdifferentiable. By definition of the marginal function in (2.23a), we have that

ψ = inf u∈U Ψ(•, u) ≤ Ψ(•, u * ), ∀u * ∈ U * (x). Given that Ψ(x, u * ) = ψ(x) is finite and that Ψ(•, u * ) is (Fréchet) differentiable, hence continuous, dom(Ψ(•, u * )) = X,
and therefore dom(ψ) = X. If ψ is improper and convex, it must be equal to -∞ over int(dom(ψ)) = X [82, Exercice 2.5], which does not hold since ψ(x) > -∞. We deduce that ψ is proper. Thus, ψ is convex, finite valued and X is finite dimensional, so that ψ is continuous [5,Corollary 8.40], hence subdifferentiable [5, Proposition 16.17] over X. Second, we prove the differentiability of ψ. Let y ∈ ∂ψ(x), from Theorem 2.3.4, for any u * ∈ U * (x), (y, 0) ∈ ∂Ψ(x, u * ) hence, from Corollary 2.3.6, y ∈ ∂ x Ψ(x, u * ), so that y = ∇ x Ψ(x, u * ), hence ∂ψ(x) is a singleton. Since X is finite dimensional, ψ is proper, convex, lsc (in fact, continuous), and ∂ψ(x) is a singleton, we obtain that ψ is differentiable at x and ∇ψ(x) = ∇ x Ψ(x, u * ) [5, Proposition 17.45].

Dual problem

In the same context as in §2.3.2, we recall that when the space X is paired with a dual space Y by a bilinear form

• , • , the conjugate function f : Y → R of a function f : X → R is defined, at y ∈ Y, by f (y) = sup x∈X x , y -f (x) .
(2.29)

We introduce a result which highlights the relationship between the subdifferential of the marginal function ψ in (2.23a), defined as the optimal value of a primal optimization problem, and the solutions of a suitable dual problem. Analogous results can be found in [START_REF] Rockafellar | Variational analysis[END_REF]Theorem 11.39], [5,Proposition 19.14] and [START_REF] Bonnans | Perturbation analysis of optimization problems[END_REF]Theorem 2.142].

Theorem 2.3.10 (see [START_REF] Shapiro | Lectures on Stochastic Programming: Modeling and Theory[END_REF], Theorem 7.9) Let X and U be two Euclidean spaces R n and R m , where (n, m) ∈ N * 2 . Let Ψ : X × U → R be the bivariate function in (2.14a) and let ψ : X → R be the marginal function in (2.23a) defined, for x ∈ X, as the value of the primal problem min u∈U Ψ(x, u) .

(2.30a)

Let us consider the dual problem of (2.30a), given by max y∈Y

x , y -Ψ (y, 0) .

(2.30b) 52

Background on marginal functions

If the function Ψ is convex, then the marginal function ψ is subdifferentiable at x iff both ψ is lsc at x and the dual problem (2.30b) possesses an optimal solution. In such a case, we have that

∂ψ(x) = arg max y∈Y x , y -Ψ (y, 0) . (2.30c)
Considering a multistage stochastic optimization problem, its value functions are connected between time steps t and t+1 by marginalization operations, as in the Bellman equations (2.10). Under convexity assumptions, the SDDP algorithm exploits the result of Theorem 2.3.10 to compute subgradients of the value functions. These subgradients allow us to deduce a collection of affine minorants to build polyhedral lower approximate value functions, as originally introduced in [START_REF] Pereira | Multi-stage stochastic optimization applied to energy planning[END_REF]]. We provide an example which introduces the key mechanism which lets us compute a subgradient of a value function in the SDDP algorithm.

Example 2.3.11 Let X and U be two Euclidean spaces R n and R m , where (n, m) ∈ N * 2 . Let the marginal function ψ = inf u∈U Ψ(•, u) be defined with a convex real valued bivariate function Ψ : X × U → R and a convex nonempty compact set U ⊆ R m . For x ∈ X, we introduce the primal Problem

min x∈X u∈U Ψ(x, u) s.t. x = x .
(2.31)

If the function Ψ and the set U are e.g. linear, polyhedral or quadratic, we can use a numerical solver to compute ψ(x) as the value of (2.31) and ȳ ∈ Y as a Lagrange multiplier of the constraint x = x in (2.31).

We show that we have ȳ ∈ ∂f (x). For this purpose, we introduce the Lagrangian

L(x, u, y) = Ψ(x, u) + x -x , y , ∀(x, u, y) ∈ X × U × Y , (2.32)
of the primal problem (2.31), and we compute

inf x∈X u∈U L(x, u, y) = x , y + inf x∈X u∈U Ψ(x, u) -x , y , (2.33a) = x , y -sup x∈X u∈U x , y -Ψ(x, u) , (2.33b) = x , y -(Ψ + δ U ) (y, 0) , (2.33c) so that the dual problem of (2.31) is max y∈Y x , y -(Ψ + δ U ) (y, 0) . (2.34) From Theorem 2.3.1, the marginal function ψ = inf u∈U Ψ(•, u) + δ U (u) is lsc.
It follows that if ȳ is an optimal Lagrange multiplier of the constraint x = x in (2.31), hence a solution of the dual problem (2.34), then in view of Theorem 2.3.10, we have ȳ ∈ ∂f (x).

Further first order information results

Other lines of work exploring the variational properties of marginal functions include extended definitions of the subdifferential that we introduced in (2.22). Indeed, this definition and the results introduced in §2.3.2 mostly make sense for convex marginal functions. In a more general context, Mordukhovich, Nam, and Yen [START_REF] Mordukhovich | Subgradients of marginal functions in parametric mathematical programming[END_REF] study the properties of the Fréchet and limiting subdifferentials, and derive exact expressions and overestimates of these subdifferentials for marginal functions, in the spirit of Theorem 2.3.4 and Corollary 2.3.6.

Last, when trying to optimize a nonsmooth and nonconvex marginal function, we can still refer to the notion of descent direction, which we recall in the next definition.

Definition 2.3.12 Let X be a vector space, let f : X → R be an extended real valued function, let x ∈ X and let d ∈ X. We say that d is a descent direction of f at x if there exists α ∈ R * + such that

f (x + dε) < f (x) , ∀ε ∈]0, α[ . (2.35)
The next result establishes a relationship between the descent directions of the bivariate function Ψ in (2.14a) and the ones of the marginal function ψ in (2.14b). It is not found in the references cited in this section, but could have interesting algorithmic implications.

Proposition 2.3.13 Let X and U be two vector spaces, let Ψ : X × U → R be the bivariate function in (2.14a), and let ψ : X → R be the corresponding marginal function in (2.23a). If at x ∈ X the solution set U * (x) in (2.23b) is nonempty, and if, for u * ∈ U * (x), d ∈ X is a descent direction of the function Ψ(•, u * ) at x, then d is a descent direction of the marginal function ψ at x.

Proof. Since d is a descent direction of Ψ(•, u * ) at x, from Definition 2.3.12, there exists α ∈ R * + such that Ψ(x + dε, u * ) < Ψ(x, u * ) for ε ∈]0, α[. Let us take ε ∈]0, α[, from the definition of the marginal function ψ in (2.23a), we have that

ψ(x + dε) = inf u∈U Ψ(x + dε, u) , ≤ Ψ(x + dε, u * ) , < Ψ(x, u * ) , (d is a descent direction of Ψ(•, u * ) at x) = ψ(x) , (from u * ∈ U * (x))
and therefore d is a descent direction of the marginal function ψ at x.

Convex differentiable parametric value functions

We recall that the properties of the objective function Φ : R np×(T +1) → R in (2.1a) are inherited from those of the parametric value functions {V t } t∈ 0,T defined in (2.10) through Φ = V 0 (x 0 , •) in (2.11), under the discrete white noise 2.4. Convex differentiable parametric value functions Assumption 2.2.2. Our review of the variational properties of marginal functions in §2.3 reveals that in the case where the functions {V t } t∈ 0,T are convex and differentiable, we can compute the gradient ∇ p V t based on the knowledge of ∇ p V t+1 by application of Corollary 2.3.9, when the required assumptions are fulfilled.

First, we formulate some assumptions which guarantee the convexity of the parametric value functions {V t } t∈ 0,T in §2.4.1. Second, we provide sufficient conditions for the gradients {∇ p V t } t∈ 0,T to be well-defined, and introduce a method to compute such gradients by backward induction in §2.4.2. In other words, from the viewpoint of Problem (2.1), we provide sufficient requirements for the objective function Φ to be convex and differentiable, and a method to compute its gradient.

Convex value functions

We make some assumptions on the data of Problem (2.1) in order to guarantee that the parametric value functions {V t } t∈ 0,T in (2.10), and thus the objective function Φ in (2.1a) are convex, proper, lsc. Before enumerating assumptions, we introduce a definition of feasibility adapted to the context of Problem (2.1). This definition can be interpreted as a weaker formulation of the key concept of relatively complete recourse as introduced for multistage stochastic optimization problems in [START_REF] Girardeau | On the convergence of decomposition methods for multistage stochastic convex programs[END_REF][START_REF] Vincent Leclère | Exact converging bounds for stochastic dual dynamic programming via Fenchel duality[END_REF]. Definition 2.4.1 We say that the data of the the parametric value functions {V t } t∈ 0,T defined in (2.10) satisfy the feasibility assumption if

∀t ∈ 0, T -1 , ∃(x, p) ∈ R nx × R np×(T +1) , ∃u ∈ U t (x, p t ) , (2.36)
s.t.    P (x, u, W t+1 , p t ) ∈ dom(L t ) = 1 , P f t (x, u, W t+1 ), p ∈ dom(V t+1 ) = 1 .
Also, we recall that, following the terminology of Bonnans and Shapiro [14, §2.3], the domain, the range and the graph of a set-valued mapping U t : R nx × R np ⇒ R nu as in (2.6), for any t ∈ 0, T -1 , are defined as, respectively,

dom(U t ) = (x, p t ) ∈ R nx × R np U t (x, p t ) = ∅ , (2.37a) range(U t ) = u ∈ R nu ∃(x, p t ) ∈ R nx × R np s.t. u ∈ U t (x, p t ) , (2.37b
) Proof. We proceed by backward induction. Since V T = K, from Assumption 2.4.2, the function V T is convex, proper, lsc. Let t ∈ 0, T -1 and assume that the function V t+1 is convex, proper, lsc. First, let us consider the Q-function Q t in (2.12). The function f t is affine in (x, u) and the function V t+1 is convex lsc in (x, p). Besides, for w ∈ R nw , the function (x, u, p) → L t (x, u, w, p t ) is convex lsc, and, from Assumption 2.2.2, the expectation in (2.12a) is a finite sum, so that, finally, the function Q t is convex lsc. Moreover, since the functions L t and V t+1 are proper, Q t > -∞, and, from the feasibility assumption defined in Definition 2.4.1, which holds under Assumption 2.4.2, the function Q t has a nonempty domain, hence it is proper.

gr(U t ) = (x, u, p t ) ∈ R nx × R nu × R np u ∈ U t (x, p t ) . ( 2
Second, we turn to the properties of the value function V t , using that, from (2.12b), for (x, p) ∈ R nx × R np×(T +1) ,

V t (x, p) = inf u∈Ut(x,pt) Q t (x, u, p) = inf u∈range(Ut) Q t (
(x, p) ∈ R nx × R np×(T +1
) and u ∈ U t (x, p t ) such that Q t (x, u, p) < +∞, so that V t (x, p) < +∞, which proves that the function V t is proper. Therefore, the value function V t is convex, proper, lsc. This ends the proof.

Gradient of a convex differentiable parametric value function

We now provide further assumptions on the data of Problem (2.1) to enforce the differentiability of Φ, from the differentiability of the parametric value functions {V t } t∈ 0,T in (2.10). In our main result, we also introduce a Bellman-like backward recursion to compute the gradients {∇ p V t } t∈ 0,T , and thus the gradient ∇Φ.

∇ p V T (x, p) = ∇ p K(x, pT ) , ∀(x, p) ∈ dom(V T ) , (2.39a)
and, at stage t ∈ 0, T -1 , for (x, p) ∈ dom(V t ), the solution set U * t (x, pt ) defined in (2.13) is nonempty, and, for any u * ∈ U * t (x, pt ),

∇ p V t (x, p) = E ∇ p L t (x, u * , W t+1 , pt ) + ∇ p V t+1 f t (x, u * , W t+1 ), p . (2.39b)
Proof. We proceed by backward induction. Since V T = K, the function V T is differentiable with respect to p and ∇ p V T = ∇ p K over its domain. Let t ∈ 0, T -1 and assume that the function V t+1 is differentiable with respect to p. By application of Corollary 2.3.9, we prove the differentiability property of the marginal function V t in (2.12b) which, under Assumption 2.4.4, formulates as

V t (x, p) = inf u∈Ut(x) Q t (x, u, p) , ∀(x, p) ∈ R nx × R np×(T +1) .
(2.40)

First, let us consider the Q-function Q t in (2.12). Under Assumptions 2.2.2 and 2.4.2, we deduce from Proposition 2.4.3 that the function Q t is convex, lsc and proper, so that we can consider

(x, u, p) ∈ R nx × R nu × R np×(T +1) such that Q t (x, u, p) is finite. As Q t (x, u, p) is
finite, in view of the discrete white noise Assumption 2.2.2, for all w in the support of W t+1 , the functions V t+1 (f t (x, u, w), •) and p → L t (x, u, w, p t ) are finite and hence differentiable at p. As a consequence, since the expectation in (2.12a) is a finite sum, the function

Q t (x, u, •) is differentiable at p.
Second, we prove the differentiability of the value function V t with respect to p, by application of Corollary 2.3.9. We already know that the function Q t is convex, proper, lsc, and has the required differentiability property. Let (x, p) ∈ dom(V t ). We know that the Q-function Q t is lsc and, from Assumptions 2.4.2 and 2.4.4, the set U t (x) is compact and constant with respect to the subparameter p t , so that, in view of Theorem 2.3.1, the infimum in (2.40) is attained. Since moreover V t (x, p) is finite, the solution set U * t (x, pt ) is nonempty, and, since R nx is finite-dimensional, from Corollary 2.3.9, the function V t (x, •) is differentiable at p, and we have that

∇ p V t (x, p) = ∇ p E L t (x, u * , W t+1 , pt ) + V t+1 f t (x, u * , W t+1 ), p .
Finally, from Assumption 2.2.2, the expectation above is a finite sum, so that we can invert the gradient and the expectation, and retrieve formula (2.39b).

Convex nondifferentiable parametric value functions

We introduce two methods to handle cases where the parametric value functions {V t } t∈ 0,T in (2.10) are convex but nondifferentiable. In such cases, the smoothness Assumption 2.4.4 does not hold, which prevents us from using Theorem 2.4.5. In §2.5.1, we introduce lower smooth approximations of the original value functions, for which we can compute the gradients by backward induction, as in Theorem 2.4.5. Then in §2.5.2, we introduce lower polyhedral approximations of the original value functions, for which we can compute subgradients with the SDDP algorithm. In both cases, we give convergence guarantees of the approximate value functions to the original ones.

Lower smooth approximation

We are going to introduce lower smooth approximations of the value functions {V t } t∈ 0,T defined in (2.10), under some further assumptions on the parameter set P in (2.4) representing the constraints of Problem (2.1). To this end, we introduce coordinatewise parameter sets

P t = proj t (P) ⊆ R np , ∀t ∈ 0, T , (2.41)
with the coordinatewise projections proj t in (2.3c).

Assumption 2.5.1 (parameter set) We assume that 1. the parameter set P in (2.4) is nonempty, convex and compact, 2. for all t ∈ 0, T -1 , the domain of the set-valued mapping U t in (2.6) is such that dom(U t ) ⊆ R nx × P t .

We have not made any assumption on the parameter set P in (2.4) so far, since we are mostly concerned with the differentiability properties of the objective function Φ in (2.1a). However, asking for P to be nonempty, convex and compact seems reasonable in order to guarantee the existence of a solution of Problem (2.1). The second hypothesis of Assumption 2.5.1 is meant to make sure that the intersection of domain of the objective function Φ in (2.1a) and the parameter set P is nonempty.

Problem reformulation. We start by introducing a reformulation of Problem (2.1). Our goal is to move all sources of nondifferentiability with respect to the parameter p in (2.3a) to a new cost function. In view of the smoothness Assumption 2.4.4 required in Theorem 2.4.5, nondifferentiability might arise directly from the cost functions {L t } t∈ 0,T -1 and K in (2.9), or from the constraints induced by the set-valued mappings {U t } t∈ 0,T -1 in (2.6), as in Example 2.3.2. Besides, we also find useful to move the constraint induced by the set P in (2.4) to the new cost functions to benefit from its compactness later, in Lemma 2.5.5. We introduce new parametric admissibility sets {U t } t∈ 0,T -1 as in (2.6), defined as

U t (x, p t ) = range(U t ) , ∀(x, p t ) ∈ R nx × R np , ∀t ∈ 0, T -1 , (2.42)
which are constant valued with respect to the variables (x, p t ). We also introduce new parametric stage costs {L t } t∈ 0,T -1 and a new parametric final cost K as in (2.9), defined as

L t (x, u, w, p t ) = L t (x, u, w, p t ) + δ gr(Ut) (x, u, p t ) + δ Pt (p t ) , (2.43a)
∀(x, u, w, p t ) ∈ R nx × R nu × R nw × R np , ∀t ∈ 0, T -1 , K (x, p T ) = K(x, p T ) + δ P T (p T ) , ∀(x, p T ) ∈ R nx × R np . (2.43b)
Finally, we define new parametric value functions V t t∈ 0,T as in (2.10), given by

V T (x, p) = K (x, p T ) , ∀(x, p) ∈ R nx × R np×(T +1) , (2.44a)
V t (x, p) = inf u∈U t (x,pt) E L t (x, u, W t+1 , p t ) + V t+1 f t (x, u, W t+1 ), p , (2.44b)
∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 ,
together with new Q-functions Q t t∈ 0,T -1 as in (2.12a), given by

Q t (x, u, p) = E L t (x, u, W t+1 , p t ) + V t+1 f t (x, u, W t+1 ), p , (2.45)
∀(x, u, p) ∈ R nx × R nu × R np×(T +1) , ∀t ∈ 0, T -1 .
The following proposition explicits the relationship between the value functions {V t } t∈ 0,T in (2.44) and the original ones {V t } t∈ 0,T in (2.10).

Proposition 2.5.2 Let {V t } t∈ 0,T be the original value functions defined in (2.10), let {V t } t∈ 0,T be the value functions defined in (2.44), and let {P t } t∈ 0,T be the coordinatewise parameter sets in (2.41). For t ∈ 0, T , we have that

V t (x, p) = V t (x, p) if x ∈ R nx , p i ∈ P i , ∀i ∈ t, T , +∞ else . ( 2

.46)

Proof. We proceed by backward induction. From the definitions of V T in (2.10) and K in (2.43), when (x, p) is such that p T ∈ P T , we have that V T (x, p) = K(x, p T ) = K (x, p T ). In the case where p T / ∈ P T , the result follows from δ P T (p T ) = +∞. Let t ∈ 0, T -1 , and assume that (2.46) holds at stage t + 1. Let (x, p) be such that Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization p i ∈ P i for i ∈ t, T . From the definition of the parametric value function V t in (2.12), Under further assumptions, we obtain the following lemma. • the cost functions {L t } t∈ 0,T -1 in (2.43a) are jointly convex and lsc in their state, control and subparameter arguments, and are proper, and the final cost K in (2.43b) is convex, proper, lsc,

V t (x, p) = inf u∈Ut(x,pt) Q t (x, u, p) , = inf u∈range(Ut) Q t (
• the set-valued mappings {U t } t∈ 0,T -1 in (2.42) are closed, convex, have nonempty domains and compact ranges,

• the value functions {V t } t∈ 0,T in (2.10) and the Q-functions {Q t } t∈ 0,T in (2.45) are convex, proper, lsc.

Proof. We consider t ∈ 0, T -1 .

• From the feasibility assumption guaranteed by Assumption 2.4.2, there exists (x, p) ∈ R nx × R np×(T +1) and u ∈ U t (x, p t ) ⊆ U t (x) such that

P (x, u, W t+1 , p t ) ∈ dom(L t ) = P f t (x, u, W t+1 ), p ∈ dom(V t+1 ) = 1 .
Moreover, we have that δ gr(Ut) (x, u, p t ) = 0, and, from Assumption 2.5.1, p ∈ P hence δ Pt (p t ) = 0. It follows that P (x, u, W t+1 , p t ) ∈ dom(L t ) = 1, from the definition of L t in (2.43), and

P f t (x, u, W t+1 ), p ∈ dom(V t+1 ) = 1, since dom(V t+1 ) ⊇ dom(V t+1 ) ∩ (R nx × P), from Proposition 2.5.2.
• The function proj t in (2.3c) is linear and, from Assumption 2.5.1, the set P is nonempty, convex and compact, therefore the set P t in (2.41) is nonempty, convex and compact, hence closed. It follows that the function (x, u, w, p t ) → δ Pt (p t ) is convex, proper, lsc. Then, under Assumption 2.4.2, the set gr(U t ) is closed and convex, and is nonempty since the set-valued mapping U t has a nonempty domain. It follows that the function (x, u, w, p t ) → δ gr(Ut) (x, u, p t ) is convex, proper, lsc. From the properties of the function L t in Assumptions 2.4.2, we deduce that the cost function L t in (2.43a) is jointly convex and lsc in its state, control and subparameter arguments, and that L t > -∞. Then, it follows from the feasibility assumption as in Definition 2.4.1, satisfied by the data of {V t } t∈ 0,T , that dom(L t ) = ∅, and finally that L t is proper. The proof for K is analogous.

• By definition of U t in (2.42) and by definition of the graph in (2.37), we have that gr(U t ) = R nx × range(U t ) × R np . Under Assumption 2.4.2, the set range(U t ) is compact, hence closed, and the set gr(U t ) is convex, so that range(U t ) = proj R nu gr(U t ) is convex. It follows that the set gr(U t ) is closed and convex, so that the set-valued mapping U t is closed and convex. Moreover, from Assumption 2.4.2, the domain of U t is nonempty, hence so is the set range(U t ), therefore, following the definitions in (2.37), we have that dom(U t ) = R nx × R np is nonempty, and range(U t ) = range(U t ) is compact.

• The fact that the functions {V t } t∈ 0,T and {Q t } t∈ 0,T are proper, convex, lsc follows from Proposition 2.4.3, using the other results of Lemma 2.5.3 here above.

Smoothing cost functions via the

f µ : R n → R , z → inf z ∈R n f (z ) + 1 2µ ||z -z || 2 2 . (2.47)
We refer to [82, Chapter 1, §G] and [5, Chapter 12, §4] for a review of the properties of the Moreau envelope. Given values of (x, u, w) ∈ R nx × R nu × R nw and a regularization parameter µ ∈ R * + , we introduce the Moreau envelopes {L µ t (x, u, w, •)} t∈ 0,T -1 and K µ (x, •) of the parametric cost functions {L t } t∈ 0,T -1 and K in (2.43), with respect to the subparameter p t in (2.3b), defined as

L µ t (x, u, w, p t ) = inf p t ∈R np L t (x, u, w, p t ) + 1 2µ ||p t -p t || 2 2 , (2.48a) ∀t ∈ 0, T -1 , ∀p t ∈ R np , K µ (x, p T ) = inf p T ∈R np K (x, p T ) + 1 2µ ||p T -p T || 2 2 , ∀p T ∈ R np . (2.48b)
The cost functions {L µ t } t∈ 0,T -1 and K µ in (2.48) have more regularity properties than the original ones in (2.9), as we prove in the following Lemma. • the cost functions {L µ t } t∈ 0,T -1 in (2.48a) are jointly convex and lsc in their state, control and subparameter arguments, and are proper, and the final cost

K µ in (2.48b) is convex, proper, lsc,
• the cost functions {L µ t } t∈ 0,T -1 and K µ in (2.48) are differentiable with respect to their subparameter argument p t in (2.3b).

Proof. Let t ∈ 0, T -1 . We recall that under Assumptions 2.2.2, 2.4.2 and 2.5.1, we can apply Lemma 2.5.3. However, since we are only concerned with the properties of the cost functions, we do not need the discrete white noise Assumption 2.2.2 here since it does not affect the properties of the cost functions.

• From Lemma 2.5.3, the function (x, u, w, p t , p t ) → L t (x, u, w, p t ) + Lower smooth value functions. We are now ready to introduce the lower smooth parametric value functions. For a regularization parameter µ ∈ R * + , we define

V µ T (x, p) = K µ (x, p T ) , ∀(x, p) ∈ R nx × R np×(T +1) , (2.49a)
V µ t (x, p) = inf u∈range(Ut) E L µ t (x, u, W t+1 , p t ) + V µ t+1 f t (x, u, W t+1 ), p , ∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 .
(2.49b)

The lower smooth parametric value functions { V µ t } t∈ 0,T have several interesting properties, which we gather in Proposition 2.5.6. Proposition 2.5.6 Let µ ∈ R * + be a regularization parameter, and let { V µ t } t∈ 0,T be the lower smooth parametric value functions defined in (2.49). Under the discrete white noise Assumption 2.2.2, the convex multistage problem Assumption 2.4.2 and the parameter set Assumption 2.5.1, the functions { V µ t } t∈ 0,T • provide lower bounds on the parametric value functions {V t } t∈ 0,T defined in (2.10) over R nx × P, that is,

V µ t (x, p) ≤ V t (x, p) , ∀(x, p) ∈ R nx × P , ∀t ∈ 0, T , (2.50)
• are convex, proper, lsc,

• are differentiable with respect to their parameter argument, and their gradients can be computed by the backward induction (2.39).

Proof.

• From a basic property of the Moreau envelope (see [5,Proposition 12.9]), we have that L µ t ≤ L t , ∀t ∈ 0, T -1 , and K µ ≤ K .

(2.51)

Convex nondifferentiable parametric value functions

Then, we easily prove by backward induction that Convergence properties. Finally, we prove some convergence properties of the lower smooth parametric value functions { V µ t } t∈ 0,T defined in (2.49), which show that they are suitable candidates to approximate the original value functions {V t } t∈ 0,T in (2.10) for solving Problem (2.1). We refer to the definition of pointwise convergence in [82, §7.A] and to the definition of epiconvergence in [82, §7.B].

V µ t (x, p) ≤ V t (x, p) , ∀(x, p) ∈ R nx × R np×(T +1) , ∀t ∈ 0, T , = V t (x, p) , ∀(x, p) ∈ R nx × P , ∀t ∈ 0, T . (
Proposition 2.5.7 Let {µ n } n∈N ∈ (R * + ) N be a nonincreasing sequence such that lim n→+∞ µ n = 0, let { V µn t } t∈ 0,T ,n∈N be lower smooth parametric value functions as defined in (2.49), and let {V t } t∈ 0,T be the parametric value functions defined in (2.44). Under the discrete white noise Assumption 2.2.2, the convex multistage problem Assumption 2.4.2 and the parameter set Assumption 2.5.1, we have both the pointwise convergence and the epiconvergence

V µn t p ----→ n→+∞ V t , and V µn t e ----→ n→+∞ V t , ∀t ∈ 0, T .
(2.52)

Proof.

First, we proceed by backward induction to prove, for t ∈ 0, T , the statement

V µn t p -----→ n→+∞ V t , and V µn t ≤ V µ n+1 t , ∀n ∈ N . (2.53)
We start by proving (2.53) at stage T . Let n ∈ N, from (2.49a), V µn T = K µn , where for x ∈ R nx , K µn (x, •) is defined in (2.48b) as the Moreau envelope of K (x, •). From Lemma 2.5.3, K is convex, proper, lsc, so that either K (x, •) = +∞ , in which case V µn T (x, •) = K µn (x, •) = +∞; or K (x, •) is convex, proper and lsc, in which case V µn T (x, •) = K µn (x, •) converges pointwise to K (x, •) and is a nondecreasing sequence, from the properties of the Moreau envelope (see [5,Proposition 12.33]). This proves (2.53) at stage T .

Next, let t ∈ 0, T -1 , we suppose that (2.53) holds at stage t+1. Let n ∈ N and (x, u, p) ∈ R nx × R nu × R np×(T +1) , we define the lower smooth Q-function

Q µn t (x, u, p) = E L µn t (x, u, W t+1 , p t ) + V µn t+1 f t (x, u, W t+1 ), p + δ range(Ut) (u) .
As a first step, we show that the sequence of functions { Q µn t (x, •, p)} n∈N epiconverges to Q t (x, •, p) + δ range(Ut) , with Q t defined in (2.45)

Q µn t (x, •, p) = V µn t (x, p) -----→ n→+∞ inf u∈range(Ut) Q t (x, •, p) = V t (x, p) . Moreover V µn t ≤ V µ n+1 t
, since { Q µn t (x, •, p)} n∈N is nondecreasing. We conclude that (2.53) holds, which ends the backward induction proof.

Second, the sequence { V µn t } n∈N is nondecreasing, and from Proposition 2.5.6, each function V µn t is lsc, so that from [82, Proposition 7.4(d)], we have the epiconvergence

V µn t e -----→ n→+∞ sup n∈N lsc V µn t = sup n∈N V µn t = V t ,
where the last equality follows from the pointwise convergence of the nondecreasing sequence { V µn t } n∈N to V t . This ends the proof.

As a consequence, we obtain the following corollary.

Corollary 2.5.8 Under the assumptions of Proposition 2.5.7, let x 0 be the initial state in (2.1c) and let Φ * = inf p∈P Φ(p) be the optimal value of Problem (2.1), we have that

inf p∈P V µn 0 (x 0 , p) ≤ Φ * , ∀n ∈ N , and inf p∈P V µn 0 (x 0 , p) ----→ n→+∞ Φ * . ( 2
V µn 0 (x 0 , p) -----→ n→+∞ inf p∈P V 0 (x 0 , p) = Φ * . Then for n ∈ N, inf p∈P V µn 0 (x 0 , p) ≤ Φ * follows from V µn 0 ≤ V µ n+1 0
as shown in the proof of Proposition 2.5.7.

Lower polyhedral approximation

As an alternative approach to the lower smooth approximation method of §2.5.1, we are going to introduce lower polyhedral approximations of the value functions {V t } t∈ 0,T defined in (2.10).

Problem reformulation. Similar to the approach of §2.5.1, we reformulate Problem (2.1) in order to fit it into the framework of the SDDP algorithm. We adopt a state extension to model explicitly the parameter p in (2.3a) as a state variable, redefining the state variables as

x t = x t p ∈ R nx × R np×(T +1) , ∀t ∈ 0, T , (2.55a)
which evolves according to the new dynamics

x 0 = x 0 p , (2.55b
)

x t+1 = f t (x t , u t , w t+1 ) , ∀t ∈ 0, T -1 , (2.55c)
where, for t ∈ 0, T -1 ,

f t (x , u, w) = f t (x, u, w) p , ∀(x , u, w) ∈ R nx × R np×(T +1) × R nu × R nw .
(2.55d) We also redefine the admissibility sets as

U t (x ) = U t (x, p t ) , ∀x ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 , (2.56)
and the cost functions as

L t (x , u, w) = L t (x, u, w, p t ) , (2.57a) ∀(x , u, w) ∈ R nx × R np×(T +1) × R nu × R nw , ∀t ∈ 0, T -1 , K (x ) = K(x, p T ) , ∀x ∈ R nx × R np×(T +1) . (2.57b)
Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization

With our new notations, the objective function Φ in (2.1a) is equivalently given, for p ∈ R np×(T +1) , by

Φ(p) = inf U 0 ,...,U T -1 E T -1 t=0 L t (X t , U t , W t+1 ) + K (X T ) , (2.58a)
X 0 = x 0 p , (2.58b
)

X t+1 = f t (X t , U t , W t+1 ) , ∀t ∈ 0, T -1 , (2.58c)
U t ∈ U t (X t ) , ∀t ∈ 0, T -1 , (2.58d) σ(U t ) ⊆ σ(W 1 , . . . , W t ) , ∀t ∈ 0, T -1 . (2.58e)
Again, under the discrete white noise Assumption 2.2.2, Problem (2.58a)-(2.58e) is solved by Dynamic Programming, with the value functions V t t∈ 0,T defined as

V T (x ) = K (x ) , ∀x ∈ R nx × R np×(T +1) , (2.59a
)

V t (x ) = inf u∈U t (x ) E L t (x , u, W t+1 ) + V t+1 f t (x , u, W t+1 ) , (2.59b) ∀x ∈ R nx × R np×(T +1) , ∀t ∈ 0, T -1 .
The SDDP algorithm. The SDDP algorithm runs a sequence of k ∈ N * forward and backward passes, in order to compute polyhedral lower approximations {V k t } t∈ 0,T of the value functions V t t∈ 0,T in (2.59), where k ∈ 1, k . We briefly recall the computation performed during the forward and backward passes of the algorithm. We assume that after k ∈ 1, k passes, we have a polyhedral lower approximation {V k t } t∈ 0,T . Forward pass: we sample randomly a scenario (w k 1 , . . . , w k T ) ∈ R nw T , and compute (forward in time) a state trajectory (x k 0 , . . . ,

x k T ) ∈ R nx × R np×(T +1) T +1 with, for t ∈ 0, T -1 , x k t+1 = f t (x k t , u k t , w k t+1 )
, where the decision u k t is made based on the last polyhedral lower approximation V k t+1 as

u k t ∈ arg min u∈U t (x k t ) E L t (x k t , u, W t+1 ) + V k t+1 f t (x k t , u, W t+1 ) . ( 2

.60)

Backward pass: we compute (backward in time) new affine functions along the state trajectory (x k T -1 , . . . , x k 0 ). Knowing an updated lower approximation V k+1 t+1 , we solve , so that we improve our polyhedral approximation with a new affine minorant, defining

β k+1 t = min x ,u E L t (x , u, W t+1 ) + V k+1 t+1 f t (x , u, W t+1 ) , (2.61a) u ∈ U t (x k t ) , (2.61b) x = x k t , (2.61c
V k+1 t = sup V k t , β k+1 t + • -x k t , α k+1 t .
(2.62)

Numerical properties. We recall some practical and theoretical aspects of the SDDP algorithm that motivate its use in our case to estimate subgradients of the objective function Φ in (2.1a).

The SDDP algorithm was first introduced in [START_REF] Pereira | Multi-stage stochastic optimization applied to energy planning[END_REF], and then further investigated in [START_REF] Shapiro | Analysis of stochastic dual dynamic programming method[END_REF]. A proof of convergence of the SDDP algorithm is given in [37, Theorem 3.1], under conditions that mirror the discrete white noise Assumption 2.2.2 and the convex multistage problem Assumption 2.4.2, but for problems formulated in the hazard-decision framework. However, as explained in [START_REF] Street | Assessing the cost of the Hazard-Decision simplification in multistage stochastic hydrothermal scheduling[END_REF], problems stated in decision-hazard can be reformulated to fit the former decision scheme, so that the above mentioned convergence result applies in our case. Therefore, the more forward and backward passes we run, the more accurate the polyhedral lower approximations {V k t } t∈ 0,T in (2.62) of the value functions {V t } t∈ 0,T in (2.59). We refer to [START_REF] Lan | Complexity of stochastic dual dynamic programming[END_REF] for an analysis of the convergence rate of the SDDP algorithm relatively to the number of forward-backward passes performed and to the dimension of the components of the problem to be solved.

Besides its convergence property, another appealing factor of the SDDP algorithm is that once the lower polyhedral approximations {V k t } t∈ 0,T are considered to be sufficiently accurate, after k ∈ N * iterations, we can easily compute elements in the subdifferential of V k 0 by solving Problem (2.61). For example, in the case where the convex cost function L t in (2.57a) is polyhedral, Problem (2.61) is efficiently solved by a linear programming solver. If the approximation error between V k 0 and V 0 is bounded by some accuracy parameter ε ∈ R + , this procedure allows us to evaluate an ε-subgradient of the objective function Φ in (2.1a), as we show in the following proposition. We introduce the coordinatewise projection

Π : R nx × R np×(T +1) → R np×(T +1) : (x, p) → p , (2.63)
and we recall that the ε-subdifferential

∂ ε f (x) ⊆ R n , n ∈ N * , of a function f : R n → R, at x ∈ R n , is defined by y ∈ ∂ ε f (x) ⇐⇒ f (x) ≥ f (x) + x -x , y -ε , ∀x ∈ R n .
(2.64) Proposition 2.5.9 Let x 0 = (x 0 , p) ∈ R nx × R np×(T +1) . Suppose that after k ∈ N * forward-backward passes of the SDDP algorithm, the approximation error at x 0 of the value function V 0 in (2.59) by the lower polyhedral approximation V k 0 in (2.62) is bounded by ε ∈ R + , in the sense that

V 0 (x 0 ) -V k 0 (x 0 ) ≤ ε . (2.65a)
Chapter 2. Differentiability of parametric value functions in multistage stochastic optimization

Then, if we compute φ = V k 0 (x 0 , p) and q ∈ ∂V k 0 (x 0 , p) , we have that

|Φ(p) -φ| ≤ ε , (2.65b) Π(q) ∈ ∂ ε Φ(p) . ( 2

.65c)

Proof. First, from (2.58), and by definition of the value functions {V t } t∈ 0,T in (2.59), we have that Φ(p) = V 0 (x 0 , p) , hence |Φ(p) -φ| = V 0 ((x 0 , p)) -V k 0 ((x 0 , p)) ≤ ε . Second, we have that

q ∈ ∂V k 0 (x 0 , p) ⇐⇒ V k 0 (x, p) ≥ V k 0 (x 0 , p) + (x, p) -(x 0 , p) , q , ∀(x, p) ∈ R nx × R np×(T +1) , =⇒ V k 0 (x 0 , p) ≥ V k 0 (x 0 , p) + p -p , Π(q) , ∀p ∈ R np×(T +1) , (taking x = x 0 ) =⇒ V 0 (x 0 , p) ≥ V k 0 (x 0 , p) + p -p , Π(q) , ∀p ∈ R np×(T +1) , (since V 0 ≥ V k 0 ) =⇒ V 0 (x 0 , p) ≥ V 0 (x 0 , p) + p -p , Π(q) -ε , ∀p ∈ R np×(T +1) , (from (2.65a)) =⇒ Π(q) ∈ ∂ ε Φ(p) , since Φ(p) = V 0 (x 0 , p) , ∀p ∈ R np×(T +1)
, and by definition of the ε-subdifferential in (2.64).

Conclusion

We have studied the differentiability properties of a class of parametric multistage stochastic optimization problems. Our main finding is that, under smoothness and convexity assumptions, we manage to compute the gradient of the value function of the problem with respect to the parameter by backward induction. This inductive computing method can be interpreted as an extension of the Bellman equation to the gradient of the stagewise value functions with respect to the parameter. Therefore, it benefits from the strengths and the weaknesses of dynamic programming. In particular, its complexity increases drastically with the dimension of the state space.

In the case where the smoothness assumption breaks, we have proposed two methods. In the first method, we approximate the original parametric value functions by smooth lower approximations that have enough regularity properties to compute their gradient by backward induction, as in the first place. One advantage of this method is that the regularization parameter involved can be taken as small as required for the approximation to be tight. In the second method, we approximate the original parametric value functions by polyhedral lower approximations, using the SDDP algorithm. This second method has the disadvantage to increase considerably the state space, as it introduces a new state variable including the parameter. Besides, the accuracy of these approximations is ruled by the complexity of the SDDP algorithm, meaning that 2.6. Conclusion the higher the desired accuracy, the longer the computation time. Nevertheless, the SDDP algorithm remains numerically efficient on higher dimensional state spaces that standard dynamic programming, so that this second methods seems also competitive.

In the following Chapter 3, we explore the numerical applications of our results to the management of a solar power plant where day-ahead open-loop decisions are taken, standing for a parameter to the downstream multistage management problem.

Chapter 3

Day-ahead and intraday co-optimization of a renewable power plant with storage capacity

Introduction

Renewable energy units are progressively integrated in electric grids, as they offer an attractive solution to lower the carbon intensity of electric power.

In particular, photovoltaic and wind units are extensively developed in noninterconnected zones (NIZ), which are isolated from national or regional power grids and therefore heavily depend on fossil fuel to generate electric power. Integrating a large amount of solar or wind energy in the grid requires to smooth Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity the production curve of such renewable units, typically perturbed by the uncertainties in the weather forecast, so as to ease power load scheduling at the grid scale. In this chapter, we study the case of a photovoltaic power plant equipped with an energy storage system deployed in the French non-interconnected zones, which experience a high penetration of renewable power in their grid. To achieve this, the French energy regulatory authority has set up a production planning [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF] for the management of a solar unit, organized as follows: every operating day, a daily commitment profile is submitted day-ahead to announce the upcoming power production; then, during the intraday management phase, the delivered power is compared with the engagement profile, and penalties are charged to the producer if the two profiles diverge significantly.

The application problem that motivates us has already fueled previous research works, see for example [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF][START_REF] Damour | Economic Performance Optimization of a PV-BESS Power Generator: A Case Study La Reunion Island[END_REF][START_REF] Pflaum | Battery sizing for PV power plants under regulations using randomized algorithms[END_REF], but few of them model the management of the solar plant within the stochastic optimization framework. Stochastic optimization has yet already been introduced successively to optimize day-ahead commitment profiles for renewable power plants deployed in other contexts, as in [START_REF] Yuan | Optimal operation strategy of energy storage unit in wind power integration based on stochastic programming[END_REF], using chance constraints programming for inserting wind power in the Nord Pool spot market, and in [START_REF] Castillo | Stochastic optimisation with risk aversion for virtual power plant operations: a rolling horizon control[END_REF], using two stage stochastic programming with risk aversion for the daily operation of aggregated renewable units inserted in the US wholesale market. However, few references propose intraday controllers based on stochastic dynamic programming, despite the success of the method in other microgrid control applications, such as in [START_REF] Rigaut | Stochastic optimization of braking energy storage and ventilation in a subway station[END_REF][START_REF] Hafiz | Real-time Stochastic Optimization of Energy Storage Management using Rolling Horizon Forecasts for Residential PV Applications[END_REF][START_REF] Le Franc | EMSx: a numerical benchmark for energy management systems[END_REF].

The contribution of this chapter is twofold. First, we propose a numerical experiment to attest the performance of the methods developed in Chapter 2 for solving parametric multistage stochastic optimization problems. We formulate a parametric problem inspired by the NIZ day-ahead power commitment rules, where we minimize the expected intraday costs of a solar plant parametrized by the commitment profile. We compare methods based on lower smooth and lower polyhedral approximations of the intraday value functions, as introduced in §2.5, and evaluate the profiles obtained with each method by Monte-Carlo simulation. Second, we compare a set of controllers, defined as a combination of day-ahead and intraday control strategies, for the management of a solar plant in the French NIZ context. Among our candidate controllers, we feature two innovative strategies. On the one hand, we introduce a day-ahead control strategy based on daily parametric multistage stochastic optimization problems, as developed in Chapter 2, and on the other hand, we propose an intraday control strategy based on stochastic dynamic programming, motivated by the results of Chapter 1. We simulate the management of a solar power plant over a sequence of historical data representing one year of consecutive operating days, and showcase up to 11.6% of gains over state-of-the-art techniques.

This chapter is structured as follows. First, we introduce a solar plant management model for the French NIZ context in §3.2. Second, we attest the numerical performance of the methods introduced in Chapter 2 on a parametric multistage stochastic optimization problem inspired by day-ahead power commitment rules, in §3.3. Third, we evaluate a pool of controllers combining day-ahead and intraday strategies for the management of a solar plant in the French NIZ context, in §3.4. This chapter is oriented toward numerical 3.2. Solar plant microgrid management model applications, in the continuity of the work exposed in Chapter 2.

Notations

We introduce mathematical notations. Let (Ω, F, P) be a probability space, We use bold capital letters to denote random variables. We denote by B(X) the Borel σ-field of a topological space X. We introduce the extended real line R = [-∞, +∞], and we denote

R + = [0, +∞[, R * + = ]0, +∞[, R -= ] -∞, 0], and R * -= ] -∞, 0[.

Solar plant microgrid management model

We introduce the components of a dynamical system for modeling the management of a solar power plant. We consider an electric microgrid composed of photovoltaic panels, chained with a controllable DC/AC power inverter, and a battery. Note that in practice, the battery is also coupled with a DC/AC inverter, that we omit to represent here as we use a single control variable for a battery-inverter system. A schematic organization of the power plant is provided in Figure 3.1. We now comment on the components of Time scale. We consider the management of a solar plant over a finite number of discrete time steps

0, T = {0, 1, . . . , T -1, T } , (3.1)
of horizon T ∈ N * , where unit time steps are spaced by time intervals [t, t + 1[ of length ∆ t ∈ R * + , which do not overlap. In the NIZ context, the peak time corresponds to a period of higher demand on the power grid, and induces specific costs and constraints. This time period depends on the zone considered, but typically spans over [19:00, 21:00]. We introduce notations to distinguish the subsets of off-peak and on-peak time steps, respectively

T off ⊆ 0, T -1 and T on ⊆ 0, T -1 , (3.2a)
Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity such that

T off ∩ T on = ∅ and T off ∪ T on = 0, T -1 . (3.2b)
Commitment profile. For each time interval [t, t + 1[, the solar plant is engaged to deliver a certain value of committed power

p t ∈ R , ∀t ∈ 0, T -1 , (3.3a)
composing all together the commitment profile

p = {p t } t∈ 0,T -1 ∈ R T . (3.3b)
Dynamics of the battery. The storage system is assumed to be a lithiumion battery (or a container of aggregated batteries), characterized by the coefficients (s, v b , v b , ρ c , ρ d ) referring respectively to the battery's capacity (MWh), minimum load (MW), maximum load (MW), charge and discharge efficiency coefficients. The dynamics of the state of charge

s t ∈ [0, 1] , ∀t ∈ 0, T , (3.4a)
is given by

s t+1 = f (s t , v b t ) , ∀t ∈ 0, T -1 , (3.4b)
where the dynamics f is defined as

f (s, v b ) = s + ρ c (v b ) + - 1 ρ d (v b ) -∆ t s , ∀(s, v b ) ∈ [0, 1] × R , (3.4c)
with v + = max(0, v) and v -= max(0, -v). The battery control

v b t ∈ [v b , v b ] , ∀t ∈ 0, T -1 , (3.5)
taken at the beginning of every time interval [t, t + 1[, accounts for the charging power (v b t ≥ 0) or discharging power (v b t ≤ 0) applied to the battery during [t, t+ 1[. Combined with the dynamics (3.4), constraints of the form

v b t ∈ V(s t ) , ∀t ∈ 0, T -1 , (3.6a)
restrict decisions v b t to the admissibility set (related to the battery parameters (s, v b , v b , ρ c , ρ d ))

V(s) = v b ∈ R v b ≤ v b ≤ v b and 0 ≤ f (s, v b ) ≤ 1 , ∀s ∈ [0, 1] . (3.6b)
Solar panels and curtailment. The solar panels are characterized by the installed peak power p ∈ R * + (MW), and the uncertainties of the model arise 3.2. Solar plant microgrid management model from sun availability, introducing randomness in the generated power

g t ∈ [0, p] , ∀t ∈ 1, T , (3.7)
where g t+1 stands for the amount of power generated during the time interval [t, t+1[, for t ∈ 0, T -1 , and observed at the end of this interval. Besides battery controls v b t in (3.5), we may also adjust the power delivery by performing power curtailment

v c t ∈ R + , ∀t ∈ 1, T , (3.8a)
where the amount of curtailed power is at most equal to the total generated power, that is,

v c t ≤ g t , ∀t ∈ 1, T . (3.8b)
During the time interval [t, t+1[, the interplay between decisions and uncertainties is organized as the sequence

v b t g t+1 v c t+1 ,
where v c t+1 is decided after observing g t+1 , and can be thought as a recourse to the decision v b t . Such a decision model is well-adapted to the French NIZ context, detailed in §3.4.1, where overproduction is strongly penalized, hence the importance of curtailment as a recourse variable. The resulting delivered power is given by

pt+1 = g t+1 -v b t -v c t+1 ∈ R , ∀t ∈ 0, T -1 . (3.9)
The above equation summarizes the organization of the solar power plant as depicted in Figure 3.1.

Management costs. Stage management costs are computed based on the unitary energy price

c t ∈ R + , ∀t ∈ 0, T -1 , (3.10a)
expressed in e/MWh. In the NIZ context, it typically takes two values

c t = c , ∀t ∈ T off , c , ∀t ∈ T on , with 0 ≤ c ≤ c , (3.10b)
reflecting the attractive peak tariff designed to encourage power delivery during the evening peak hours. Over each time interval [t, t + 1[, where t ∈ 0, T -1 , the power delivery pt+1 ∈ R in (3.9) is compared with the value of the committed power p t ∈ R in (3.3a) to compute the stage cost

J t (p t+1 , p t ) = J e t (p t+1 ) + J p t (p t+1 , p t ) ∈ R , (3.11a)
Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity where the energy cost J e t is defined as

J e t (p t+1 ) = -c t ∆ t pt+1 ∈ R , (3.11b)
and the penalty cost

J p t : R × R → R + , (3.11c)
measures the deviation between the committed power p t and the delivered power pt+1 . We specify instances of penalty costs later in §3.3 and in §3. [START_REF] Bach | Optimization with Sparsity-Inducing Penalties[END_REF]. Finally, at the end of the time span 0, T , the energy left in the battery is valued at the energy price, hence the final cost

R(s T ) = -c T s T s ∈ R -.
(3.12)

Stochastic optimization of the day-ahead commitment profile

We consider a simplified version of the NIZ context for the purpose of testing the methods introduced in Chapter 2. First, in §3.3.1, we formalize the problem of minimizing the expected intraday management cost of the solar plant introduced in §3.2 with respect to the day-ahead commitment profile p t in (3.3b). We obtain a convex nondifferentiable optimization problem, whose criterion formulates itself as the value of a parametric multistage stochastic optimization problem, as introduced in §2.2. Second, in §3.3.2, we detail how to apply the lower smooth and lower polyhedral approximation techniques introduced in §2.5 to solve this problem. Third, in §3.3.3, we showcase the results obtained with both approximation techniques on a numerical experiment.

Problem statement

We introduce a parametric multistage stochastic optimization problem as defined in §2.2 for the daily management of the solar unit of §3.2. We consider the time span of one operating day, with time intervals of length ∆ t = 30 minutes, hence a problem horizon of T = 48.

Variables. We model the generated power g t in (3.7) as a Markovian process1

G : ω ∈ Ω → (G 0 , . . . , G T ) ∈ [0, p] T +1 , (3.13a)
following a linear dynamics given by 3.3. Stochastic optimization of the day-ahead commitment profile

G 0 = 0 , (3.13b) G t+1 = α t G t + β t + W t+1 , ∀t ∈ 0, T -1 , (3.13c)
where

(α t , β t ) ∈ R 2 , ∀t ∈ 0, T -1 , (3.13d)
are the coefficients of the linear dynamics (3.13b)-(3.13c), and

W : ω ∈ Ω → (W 1 , . . . , W T ) ∈ R T (3.14)
is the error noise process for the dynamics (3.13b)-(3.13c). We assume the sequence of random variables {W t } t∈ 1,T to be stagewise independent, and that each noise variable W t has a finite support, as in the discrete white noise Assumption 2.2.2. In this simplified model, we consider a single control variable

u t = v b t , ∀t ∈ 0, T -1 , (3.15a)
where v b t is the battery control defined in (3.5), so that we have the control process

U : ω ∈ Ω → (U 0 , . . . , U T -1 ) ∈ R T . (3.15b)
Moreover, we introduce the state variable

x t = x s t x g t = s t g t ∈ R 2 , ∀t ∈ 0, T , (3.16a)
where s t is the state of charge in (3.4a) and g t is the generated power in (3.7). The state x t evolves according to the dynamics

x 0 = s 0 0 , (3.16b
)

x t+1 = f t (x t , u t , w t+1 ) , ∀t ∈ 0, T -1 , (3.16c)
where, for t ∈ 0, T -1 ,

f t (x, u, w) = f (x s , u) α t x g + β t + w , ∀(x, u, w) ∈ R 2 × R × R , (3.16d)
with x = (x s , x g ) in (3.16a) and the dynamics f defined in (3.4). Due to uncertainties in the evolution of the state variable in (3.16d), we also introduce the state process

X : ω ∈ Ω → (X 0 , . . . , X T ) ∈ (R 2 ) T +1 .
(3.17) plant with storage capacity

Constraints. With the formulation of the state in (3.16a), controls are constrained by the admissibility sets

U t (x) = V(x s ) , ∀x = (x s , x g ) ∈ R 2 , ∀t ∈ 0, T -1 , (3.18)
defined with the set V in (3.6). Besides, given the stagewise independence assumption on the noise process W in (3.14) and the expression of the state variable x t in (3.16a), the nonanticipativity constraint written as

σ(U t ) ⊆ σ(W 0 , . . . , W t ) , ∀t ∈ 0, T -1 , (3.19a)
in standard form, can be reformulated as

σ(U t ) ⊆ σ(X t ) , ∀t ∈ 0, T -1 , (3.19b)
without loss of optimality [17, §4.4].

Costs. Lastly, for t ∈ 0, T -1 , we formulate the penalty cost J p t in (3.11c) as the distance in absolute value, weighted by a penalty coefficient λ ≥ 1, where, for a value of delivered power pt+1 ∈ R in (3.9) and a value of committed power

p t ∈ R in (3.3a), J p t (p t+1 , p t ) = λc t ∆ t |p t+1 -p t | . (3.20)
Given the expression of the delivered power pt+1 in (3.9), we reformulate the stage cost, for t ∈ 0, T -1 and (x, u, w, p t ) ∈ R 2 × R × R × R, as L t (x, u, w, p t ) = J e t (α t x g + β t + w -u) + J p t (α t x g + β t + w -u, p t ) , (3.21a) with x = (x s , x g ) in (3.16a) and the energy cost J e t defined in (3.11b), and we write the final cost as

K(x) = R(x s ) , ∀x ∈ R 2 .
(3.21b)

Optimization problem. Gathering all components introduced above, we define the intraday value function

Φ : R T → R , p → Φ(p) , (3.22a)

Stochastic optimization of the day-ahead commitment profile

as the value of a parametric multistage stochastic optimization problem as defined in §2.2, given by

Φ(p) = min U 0 ,...,U T -1 E T -1 t=0 L t (X t , U t , W t+1 , p t ) + K(X T ) , (3.22b) X 0 = (s 0 , 0) , (3.22c) X t+1 = f t (X t , U t , W t+1 ) , ∀t ∈ 0, T -1 , (3.22d) U t ∈ U t (X t ) , ∀t ∈ 0, T -1 , (3.22e) σ(U t ) ⊆ σ(X t ) , ∀t ∈ 0, T -1 . (3.22f)
Finally, we introduce the set of admissible profiles

P = [0, p] T , (3.23)
and we consider the day-ahead optimization of the expected management cost in (3.21a) with respect to the commitment profile p ∈ P, that is, we want to solve min p∈P Φ(p) .

(3.24)

Resolution methods

We turn to the resolution of Problem (3.24). Since the sequence of noise variables {W t } t∈ 1,T is stagewise independent, we have that the intraday value function Φ in (3.24) is related to the parametric value functions {V t } t∈ 0,T defined by the backward induction (2.10) via

Φ(p) = V 0 (x 0 , p) , ∀p ∈ R T , ( 3
L µ t (x, u, w, p t ) = inf p t ∈R L t (x, u, w, p t ) + 1 2µ (p t -p t ) 2 , (3.26a) ∀t ∈ 0, T -1 , ∀(x, u, w, p t ) ∈ R 2 × R × R × R ,
which, skipping easy computation steps, takes values

-c t ∆ t pt+1 + λc t ∆ t × 1 2µ (p t+1 -p t ) 2 , if |p t+1 -p t | ≤ µ , |p t+1 -p t | -µ 2 , if |p t+1 -p t | > µ , (3.26b)
where µ = µλc t ∆ t , and we recall that pt+1 = α t x g + β t + w -u, from the expression of the delivered power pt+1 in (3.9). We illustrate the partial Moreau envelope of the stage cost in Figure 3.2. Then, we define lower smooth parametric value functions, as in (2.49), given inductively by

V µ T (x, p) = K(x) , ∀(x, p) ∈ R 2 × R T , (3.27a) V µ t (x, p) = inf u∈Ut(x) E L µ t (x, u, W t+1 , p t ) + V µ t+1 f t (x, u, W t+1 ), p , (3.27b) ∀(x, p) ∈ R 2 × R T , ∀t ∈ 0, T -1 .
We stress that the infimum in (3.27b) is performed over the set U t (x), whereas it is performed over the set range(U t ) in the original expression of V µ t in (2.49b), due to the introduction of the indicator function δ gr(Ut) in (2.43a) which is not introduced here for the reasons given above. where we compute the function V µ 0 (x 0 , •) with (3.27) and the gradient ∇ p V µ 0 (x 0 , •) using the Bellman-like recursion (2.39), following Proposition 2.5.6. Lower polyhedral approximation. We introduce a second method based on lower polyhedral approximations of the original parametric value function V 0 in (3.25). We model the commitment profile p in (3.3b) as a state variable, and define lower polyhedral value functions {V k t } t∈ 0,T as detailed in §2.5.2, with a fixed value k ∈ N * of forward-backward passes of the SDDP algorithm. Then, we approximate a solution of Problem (3.24) by solving the convex polyhedral optimization problem

min p∈P V k 0 (x 0 , p) , (3.29)
where for a given value of p ∈ P, after running k ∈ N * forward-backward passes of the SDDP algorithm, we compute the value V k 0 (x 0 , p) and a subgradient in ∂ p V k 0 (x 0 , p) , following the methodology developed in §2.5.2.

Optimization methods. We introduce three optimization methods for computing numerical solutions of (3.24). µSDP+IPM. In our first method, that we designate as µSDP+IPM, we embed the first order oracle p → V µ 0 (x 0 , p), ∇ p V µ 0 (x 0 , p) described above for solving (3.28) within the interior point method [START_REF] Wright | The interior-point revolution in optimization: history, recent developments, and lasting consequences[END_REF]. The name µSDP+IPM Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity refers to the computation of the objective function and of its gradient by application of Stochastic Dynamic Programming to a regularized formulation of the original problem (hence µSDP), combined with the interior point method (hence IPM), implemented in a nonlinear solver. Note that the interior point method usually requires second order information on the objective of the problem, but we use an approximation the Hessian of V µ 0 (x 0 , •) as in the L-BFGS algorithm [START_REF] Nocedal | Updating quasi-Newton matrices with limited storage[END_REF], provided by our solver.

kSDDP+PSM. In our second method, that we designate as kSDDP+PSM, we embed the first order oracle p → V k 0 (x 0 , p), q ∈ ∂ p V k 0 (x 0 , p) described above for solving (3.29) within the projected subgradient algorithm [6, §8.2]. The name kSDDP+PSM refers to the combined use of SDDP with the projected subgradient method (hence PSM).

µSDP+PGD. In our third method, that we designate as µSDP+PGD, we modify the method µSDP+IPM to replace the interior point method with a standard projected gradient descent algorithm [START_REF] Bertsekas | On the Goldstein-Levitin-Polyak gradient projection method[END_REF] (hence PGD). This method performs exactly the same iterative update rule as kSDDP+PSM, but with the smooth first order oracle of µSDP+IPM. Its purpose is to distinguish the role of the iterative method employed in the comparison of µSDP+IPM versus kSDDP+PSM, while taking benefit of the possibility to use an efficient smooth nonlinear solver for µSDP+IPM.

Numerical experiments

We perform numerical experiments with a single computer equipped with 4 Intel Core i7-7700K CPU and 15 GB of RAM. We use the nonlinear solver Ipopt [START_REF] Wächter | On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming[END_REF] for the µSDP+IPM method, and the package SDDP.jl [START_REF] Dowson | SDDP.jl: a Julia package for stochastic dual dynamic programming[END_REF] for the kSDDP+PSM method together with the LP solver of CPLEX 12.9. Apart from the two solvers, all our code is implemented with the Julia language [START_REF] Bezanson | Julia: A fast dynamic language for technical computing[END_REF].

Our goal is to evaluate the cost and time performances of the methods introduced in §3.3.2 for solving Problem (3.24). First, we introduce the data used for this experiment and provide implementation details. Second, we describe our experimental protocol. Third, we comment on the results of the smooth approximation methods µSDP+IPM and µSDP+PGD. Fourth, we perform the same analysis of the results of the polyhedral approximation method kSDDP+PSM. Finally, we confront the results of all methods.

Data and implementation details. First, we detail the implementation of our probabilistic model introduced in §3.3.1. We use one year of historical photovoltaic power data from the publicly accessible platform of the Australian transmission system operator Ausgrid [START_REF]Solar home electricity data[END_REF]. We scale the generated power data to simulate the operating of a solar power plant with an installed peak power p = 1 MW. Then, we use a standard linear regression to calibrate the weights of the linear model in (3.13b)-(3.13c), and, we perform a quantization of the support of the error noise process {W t } t∈ 1,T in (3.14) with the K-means algorithm. This latter technique lets us compute discrete probability laws for each random variable in {W t } t∈ 1,T . We refer to [START_REF] Napat Rujeerapaiboon | Scenario reduction revisited: Fundamental limits and guarantees[END_REF] for the theoretical motivations of this 3.3. Stochastic optimization of the day-ahead commitment profile quantization scheme. Due to the nature of the data, that we illustrate in Figure 3.3, we let the amount of quantization points in the support of each random variable W t vary between 1 and 10, depending on the value of t ∈ 1, T . This allows us to handle the difference of stochasticity between night time, where P(G t = 0) = 1, and day time, where the support of G t contains more elements.

Second, we provide implementation details for the oracles of the three methods introduced in §3.3.2. We use the same oracle for both µSDP+IPM and µSDP+PGD. For our implementation of the backward recursions in (3.27) (for value functions) and in (2.39) (for gradients), we parallelize computations across a discrete grid of states. We also use a discrete grid for controls, and a regularization parameter µ = 0.1 for the Moreau envelopes in (3.26). As for the oracle of the kSDDP+PSM method, we use the built-in parallelization scheme of SDDP.jl to run forward-backward passes in asynchronous mode.

Lastly, concerning other parameters, we take s = Experimental protocol. We consider several instances of the three methods introduced in §3.3.2. For µSDP+IPM and µSDP+PGD, an instance is characterized by the size of its discrete grids for state and control variables. For kSDDP+PSM, an instance is characterized by the number of forward-backward passed k ∈ N * run by the SDDP algorithm. For this experiment, we have a total pool of 33 instances. Considering a single instance, we now describe our experimental protocol, which we repeat for all instances. First, we compute a commitment profile p * ∈ P as a solution of the dayahead optimization Problem (3.24), using one of the three methods of §3.3.2. For all methods, we initialize the iterative update rules of either IPM, PSM or PGD with p 0 = 0 ∈ R T . Then, at each iteration of the method, we use a Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity dynamic step size of η i = 10 3 i for PSM and PGD, and we rely on Ipopt's line search for IPM. As for our stopping rule, we stop the computation if we exceed 100 iterations, or if the progress of the objective value is not larger than ±0.5% for 5 consecutive iterations.

Second, given the solution commitment profile p * ∈ P, we evaluate the performance of the instance by computing an estimation of the intraday value Φ(p * ) in (3.22b)-(3.22f) using the SDDP algorithm. At this evaluation stage, we do not assume that the commitment profile p in (3.3b) is a state, as in §2.5.2, so that we compute the value functions

V T (x) = K(x) , ∀x ∈ R 2 , (3.30a) V t (x) = inf u∈Ut(x) E L t (x, u, W t+1 , p * t ) + V m t+1 f t (x, u, W t+1 ) , (3.30b) ∀x ∈ R 2 , ∀t ∈ 0, T -1 ,
where the state variable is reduced to x t in (3.16a). We run the SDDP algorithm for 2000 forward-backward passes. Then, we use the resulting policy

π t (x) ∈ arg min u∈Ut(x) E L t (x, u, W t+1 , p * t ) + V t+1 f t (x, u, W t+1 ) , (3.31) ∀x ∈ R 2 , ∀t ∈ 0, T -1 ,
to simulate the management of the solar plant, that is, we estimate the expected simulation cost

V 0 (x 0 ) = E T -1 t=0 L t X t , π t (X t ), W t+1 , p * t + K(X T ) , (3.32)
as in (3.22), where the above expectation is computed by Monte-Carlo simulation, generating 25.000 scenarios with the discrete probability laws fitted for {W t } t∈ 1,T in (3.14). Since SDDP provides a polyhedral under estimate of the true value function, {π t } t∈ 0,T -1 in (3.31) is a suboptimal policy, so that we have the inequality

V 0 (x 0 ) ≤ Φ(p * ) ≤ V 0 (x 0 ) . (3.33)
Third, we gather numerical performance metrics. In Figure 3.4, we report cost performance (Y -axis, the lower the better) with respect to time performance (X-axis in log scale, the lower the better), expressed in term of average computing time used per oracle call during the computation of p * . Then, in Figure 3.5, we report again cost performance (Y -axis, the lower the better) with respect to time performance (X-axis in log scale, the lower the better), but this time expressed in term of overall computing time used for the computation of p * . For both figures, each marker represents one of the 33 instances. The height of a marker spans over the interval [V 0 (x 0 ), V 0 (x 0 )] on the Y -axis, thus representing an estimation of the intraday value Φ(p * ), from (3.33), and the color of a marker refers to the computing method (blue for µSDP+IPM, orange for µSDP+PGD, green for kSDDP+PSM). Note that for each instance, the gap between the lower bound V 0 (x 0 ) in (3.30) and the expected simulation Results of the smooth approximation methods. We comment on the results of instances of µSDP+IPM and µSDP+PGD. The performance of these instances is related to the size of the discrete grid introduced for the state and control variables (x, u) in (3.16a) and (3.15a). In this experiment, we use 12 grid sizes ranging from (5×5, 11) points to (101×101, 201) points for both methods, hence a total of 24 instances. First, we comment on the results of Figure 3.4 for µSDP+IPM instances (blue markers) and µSDP+PGD instances (orange markers). We expect that the finer the discretization, the more accurate the computation of the value function V µ 0 and of the gradient ∇ p V µ 0 , but also the longer the computing time per oracle call. Indeed, we observe that the two instances that perform the worst in cost values (highest estimated values of Φ(p * ) on the Y -axis) correspond to instances for which the discretization is performed with the fewest grid points (lowest average computing times per oracle call, reported on the Y -axis). We obtain better cost performances when using a finer grid. For example, with µSDP+IPM, when improving the grid size from (5×5, 11) points to (11×21, 41) points, we increase the time per oracle call from 0.17 seconds to 1.7 seconds, but we observe a decrease in the value of the expected simulation cost V 0 (x 0 ) Second, we comment on the results of Figure 3.5 for µSDP+IPM instances (blue markers) and µSDP+PGD instances (orange markers). The key difference between µSDP+IPM and µSDP+PGD lies in the iterative update rule employed for the optimization process. At each iteration, µSDP+IPM tends to consume more computing time as it performs an approximation of the Hessian of V µ 0 and a line search to calibrate the step size for its update rule. Although each iteration takes longer, we observe that µSDP+IPM converges with less iterations than µSDP+PGD for all instances (as reported in Appendix 3.A.1). Besides, using the same discrete grid size, µSDP+IPM converges faster in term of overall (wall clock) computing time than µSDP+PGD for 7 out of 12 cases. In particular, we see that the three instances that converge the fastest (lowest overall computing time, reported on the X-axis) are µSDP+IPM instances. However, the instance that converges the slowest is also an instance of µSDP+IPM (highest overall computing time, reported on the X-axis). This instance corresponds to the finest discretization of the state-control grid in (101×101, 201) points, and thus consumes a lot of time for line search, while not returning better cost performances. Lastly, we report that using the same discrete grid size, µSDP+IPM instances yield better cost performances than µSDP+PGD instances for 9 out of 12 cases, with expected simulation cost V 0 (x 0 ) in (3.32) up to 5.6% lower.

Stochastic optimization of the day-ahead commitment profile

Results of the polyhedral approximation method. We comment on the results of instances of kSDDP+PSM. The performance of these instances is related to the number k ∈ N * of forward-backward passes performed by the SDDP algorithm at each iteration of the method. We report results for a total of 9 instances, with k ∈ {10, 20, 40, 80, 150, 250, 500, 750, 1000}.

First, we comment on the results of Figure 3.4 for kSDDP+PSM instances (green markers). We expect that the more forward-backward passes of the SDDP algorithm we run, the more accurate the approximation of the value function V 0 by V k 0 and thus of the subdifferential ∂ p V 0 by ∂ p V k 0 , but also the longer the computing time per oracle call. Indeed, we observe that the performance in cost values gets better (the estimated value of Φ(p * ) decreases on the Y -axis) with higher values of k (the average computing time per oracle call increases on the Y -axis). The gains in performance cost are significant, as we observe a decrease in the value of the expected simulation cost V 0 (x 0 ) in (3.32) from -438 e to -653 e (upper value of the span of the markers on the Y -axis) when improving from k = 10 to k = 150, at the cost of an average computing time per oracle call jumping from 1.5 seconds to 21.7 seconds. However, pushing the value of k further continues to degrade computing times, while not returning better cost performances.

Second, we comment on the results of Figure 3.5 for kSDDP+PSM instances (green markers). For low values of k ∈ {10, 20}, the SDDP algorithm only samples a few scenarios and fails to obtain accurate representations of the value function V 0 . As a consequence, we observe that the optimization process stagnates and stops after a few iterations (as reported in Appendix 3.A.1), with a solution p * returning low cost performances (highest estimated values of Φ(p * ) on the Y -axis). Then, for values of k ∈ {40, 80, 150}, we observe that the method achieves much better cost performances. However, the oracle remains quite noisy as the SDDP algorithm stops far before convergence at each oracle call. Consequently, the iterative optimization process does not converge before our limit of 100 iterations. Lastly, for higher values of k, we observe a stabilization of the oracle values in the optimization process, as SDDP performs more forward-backward iterations. It follows that the corresponding instances of k ∈ {250, 500, 750, 1000} reach convergence in respectively {34, 15, 16, 12} iterations.

Cross-method comparison. We compare the results obtained with smooth and polyhedral methods. Since we have already discussed the differences between µSDP+IPM and µSDP+PGD instances above, we concentrate on the comparison of µSDP+PGD versus kSDDP+PSM. This appears to us as a fairer comparison, given that these two methods only differ by the nature of their oracle (they use the same iterative update rule).

We observe in Figures 3.4 and 3.5 that µSDP+PGD (orange markers) almost attains its best cost performance with a value of the expected simulation cost V 0 (x 0 ) in (3.32) of -648 e (upper value of the span of the markers on the Yaxis) with only 0.25 seconds spent per oracle call (Figure 3.4, X-axis) and only 17 seconds of overall computing time (Figure 3.5, X-axis). Comparatively, for kSDDP+PSM instances (green markers), we need to perform at least k = 80 Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity forward-backward passes of the SDDP algorithm to attain V 0 (x 0 )= -646 e (upper value of the span of the markers on the Y -axis). For this value of k, we spend on average 10.2 seconds per oracle call (Figure 3.4, X-axis), and the overall computing time is of 1061 seconds (Figure 3.5, X-axis). We conclude that, in general, µSDP+PGD instances, and hence also µSDP+IPM instances, perform better that kSDDP+PSM ones in our experiments, both in term of time performance and in term of cost performance.

Co-optimization of day-ahead commitment profiles and intraday microgrid controls

We now turn to a more applied problem than the one considered in §3.3, motivated by industrial applications. Our goal is to design and evaluate controllers for the management of a solar plant, as introduced in §3.2, in the French NIZ context. First, in §3.4.1, we detail the regulatory rules of [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF] for solar plants in the French NIZ context. Second, in §3.4.2, we introduce a mathematical framework for assessing a solar plant controller, inspired by the framework of the EMSx benchmark of Chapter 1. Third, in §3.4.3, we introduce controller models, inspired by the results of Chapter 1 and Chapter 2. Finally, in §3.4.4, we perform numerical experiments and comment on the results that we obtain.

Regulatory rules for non-interconnected zones

We consider a solar plant deployed in a non-interconnected zone in France (e.g. Corsica, Guadeloupe, Reunion Island...). We detail the specific regulatory rules set in [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF] for a solar plant equipped with an energy storage system, which is enrolled in the optional engagement of power delivery during evening peak hours.

Time scale. We consider the management of a solar plant over several consecutive days. To reflect the periodicity of this specific timeline, we introduce two different time scales. First, we call the intraday time scale the original time scale introduced in §3.2, that we use for the intraday management of the solar plant over a single operating day, with time intervals of length ∆ t = 15 minutes and a horizon T = 96. Second, we embed the intraday time scale into a daily time scale, for which we introduce a sequence D of consecutive operating days. We denote by d (respectively d) the first (respectively last) day of the sequence D, and for d ∈ D, we denote by d + the day that follows day d in the chronological order. Consequently, for all variables introduced in §3.2, we add a daily subscript to stress that their value depends on the day considered. For instance, we now denote the committed power in (3.3a) by

p d,t ∈ R , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.34a)
3.4. Co-optimization of day-ahead commitment profiles and intraday microgrid controls and the commitment profile in (3.3b) by

p d = {p d,t } t∈ 0,T -1 ∈ R T , ∀d ∈ D . (3.34b)
Chronology of the commitment profile. For every operating day d ∈ D, an initial commitment profile p d as in (3.34b) must be supplied day-ahead at 16:00, then, during the day, the values of the commitment profile prior to 19:00 can be adjusted at three decision times. In this work, we simplify this decision framework by considering that the decision profile p d is decided dayahead once and for all at 00:00 for the upcoming operating day d, in line with the experimental set up of [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF].

Admissible profiles. For every operating day d ∈ D, the commitment profile p d as in (3.34b) must respect a set of constraints imposed by the regulator, related to the off-peak and on-peak intraday time steps T off and T on in (3.2). First, we have constraints on each committed power value p d,t in (3.34a),

p d,t ∈ [-0.05 × p, p] , ∀t ∈ T off , ∀d ∈ D , (3.35a)
p d,t ∈ [0.2 × p, p] , ∀t ∈ T on , ∀d ∈ D . (3.35b)
Second, we have constraints on the consecutive values of the profile,

|p d,t -p d,t+1 | ≤ 0.075 × p , ∀t ∈ T off , ∀d ∈ D , (3.36a
(q) = q + 0.05p , ∀q ∈ R , (3.38a) b(q) = q -0.05p , ∀q ∈ R , (3.38b)
so that, for a value of delivered power pd,t+1 ∈ R in (3.9) at day d ∈ D, and a value of committed power p d,t ∈ R in (3.34a), the penalty cost

J p t (p d,t+1 , p d,t ) takes values            c t ∆ t pd,t+1 -b(p d,t ) 2 p -0.2 pd,t+1 -b(p d,t ) , if pd,t+1 < b(p d,t ) , -J e t (p d,t+1 ) , if pd,t+1 > b(p d,t ) , 0 , else. (3.38c)
Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity

Assessing a solar plant controller

We introduce an assessment method that mirrors the framework of the EMSx benchmark as detailed in §1.3.2. For this purpose, we provide new definitions for daily simulation chronicles, for controllers, and for the management cost of the system.

Daily simulation chronicles. At a given day d ∈ D and time step t ∈ 0, T , we may use all the past observations and past forecasts to make a curtailment decision v c d,t in (3.8), decided at the end of the time interval [t-1, t[, and a battery decision v b d,t in (3.5), decided at the beginning of the time interval [t, t+1[. For practical computational reasons, we have chosen to restrict this information to the partial observations

(g d,t , g d,t-1 , . . . , g d,t-95 ) ∈ R 96 , ∀t ∈ 0, T , ∀d ∈ D , (3.39a)
of the generated power (3.7) over the last 24 hours, and to the partial forecasts

(ĝ t+1 d,t , . . . , ĝt+96 d,t ) ∈ R 96 , ∀t ∈ 0, T , ∀d ∈ D , (3.39b)
which represent a prediction of the generated power (3.7) for the next 24 hours.

Combining them together with the initial partial forecasts

(ĝ 1 d,0 , . . . , ĝ96 d,0 ) ∈ R 96 , ∀d ∈ D , (3.39c)
∈ H , ∀t ∈ 0, T , ∀d ∈ D , (3.39d)
where

H = R 96 × R 96 × R 96 . (3.39e)
Note that again, for practical computational reasons, we do not consider all past partial forecasts in the composition of h d,t in (3.39d). We only keep the partial forecast (3.39b) at step t, which stands for the latest hence most reliable prediction available at this time, and the initial partial forecast (3.39c), which lets us measure our prediction error made when submitting day-ahead a commitment profile based on this forecast. Then, stacking partial observationsforecasts (3.39d) all over the whole intraday time span, we obtain the daily simulation chronicle

h d = (h d,0 , . . . , h d,T ) ∈ H T +1 , ∀d ∈ D . (3.39f)
Controller. A controller is a tuple (π, φ, ψ), where the day-ahead controller

π = {π d } d∈D , (3.40a)
π d : [0, 1] × H → R T , ∀d ∈ D , (3.40b)
3.4. Co-optimization of day-ahead commitment profiles and intraday microgrid controls is a sequence of commitment policies mapping an initial state of charge s d,0 in (3.4a) and an initial partial observation-forecast h d,0 as in (3.39d), available at the initial intraday step t = 0, to a commitment profile p d in (3.34b); the battery intraday controller

φ = {φ d,t } t∈ 0,T -1 ,d∈D , (3.41a)
φ d,t : [0, 1] × H → R , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.41b)
is a sequence of battery policies mapping a state of charge s d,t in (3.4) and a partial observation-forecast h d,t in (3.39d) to a battery decision v b d,t in (3.5); and the curtailment intraday controller

ψ = {ψ d,t } t∈ 1,T ,d∈D , (3.42a)
ψ d,t : [v b , v b ] × H → R , ∀t ∈ 1, T , ∀d ∈ D , (3.42b)
is a sequence of curtailment policies mapping a battery decision v b d,t-1 in (3.5) and a partial observation-forecast

h d,t in (3.39d) to a curtailment decision v c d,t in (3.8).
Management cost of a controller. The application of a controller (π, φ, ψ) as defined in (3.40a)-(3.42b) along the daily simulation chronicles in (3.39f) yields the management cost

J (π, φ, ψ), {h d } d∈D = d∈D T -1 t=0 J t (g d,t+1 -v b d,t -v c d,t+1 , p d,t )+R(s d,T ) , (3.43a)
where the stage cost J t is defined in (3.11a), the final cost R is defined in (3.12), the generated power g d,t+1 defined in (3.7) is a component of h d,t+1 in (3.39d), and all other variables in the expression of the management cost (3.43a) are ruled by the controller (π, φ, ψ) and given by

p d = π d (h d,0 ) , ∀d ∈ D , (3.43b)
v b d,t = φ d,t (s d,t , h d,t ) ∈ V(s d,t ) , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.43c)
v c d,t = ψ d,t (v b d,t-1 , h d,t ) ∈ [0, g d,t ] , ∀t ∈ 1, T , ∀d ∈ D , (3.43d)
s d,0 = 0 , (3.43e)
s d + ,0 = s d,T , ∀d ∈ D \ d , (3.43f)
s d,t+1 = f (s d,t , v b d,t ) ∈ [0, 1] , ∀t ∈ 0, T -1 , ∀d ∈ D . (3.43g)
The performance of a controller (π, φ, ψ) is measured by its ability to minimize the management cost (3.43a), or equivalently, to maximize the management gain

G (π, φ, ψ), {h d } d∈D = -J (π, φ, ψ), {h d } d∈D .
(3.44)

Controller models

We introduce solar plant controller models, inspired by our results of Chapter 1 and Chapter 2, and by the controllers considered in [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF]. First, we comment on the management cost in (3.43) to simplify the search for optimal intraday controllers (φ, ψ) as in (3.41a)-(3.42b). Second, we introduce a mathematical framework for stochastic optimization. Finally, we introduce two families of controllers (π, φ, ψ) as in (3.40a)-(3.42b) with, on the one hand, controllers based on stochastic optimization, and on the other hand, controllers based on deterministic optimization.

Simplified intraday controllers. We analyse the cost structure of the management cost in (3.43) to simplify the search for optimal intraday controllers (φ, ψ) as in (3.41b)-(3.42b). Given a day d ∈ D and a time step t ∈ 0, T -1 , we introduce the constraint

-v b d,t ≤ b(p d,t ) , (3.45)
on the battery controls v b d,t in (3.5) and the closed form expression

ψ * d,t+1 (v b d,t , h d,t+1 ) = g d,t+1 -v b d,t -b(p d,t ) + , (3.46)
for the optimal curtailment policies ψ d,t in (3.42b), that we briefly justify with physical arguments2 . Let us consider the time interval [t, t+1[, we recall that the delivered power is given by pd,t+1 = g d,t+1 -v b d,t -v c d,t+1 in (3.9), and that the curtailment control v c d,t+1 ∈ [0, g d,t+1 ] in (3.8) is a recourse decision made after observing the generated power g d,t+1 in (3.7) to avoid overproduction, which is strongly penalized when pd,t+1 > b(p d,t ) in the expression of the penalty cost J p t in (3.43a).

First, we justify the constraint (3.45

). If -v b d,t > b(p d,t
), then from the expression of pd,t+1 in (3.9) and from g d,t+1 -v c d,t+1 ≥ 0 in (3.8), we have that pd,t+1 > b(p d,t ) so that we hit overproduction regardless the values of g d,t+1 and v c d,t+1 , leading to suboptimal management policies, as already observed in [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF]. Second, we justify the closed form expression in (3.46). We observe that the curtailment control v

(ii) if g d,t+1 -v b d,t > b(p d,t
), we need to apply curtailment to avoid overproduction, while keeping the energy cost J e t in (3.11b) as low as possible, so that we set

v c d,t+1 = g d,t+1 -v b d,t -b(p d,t ) which is an admissible curtailment control v c d,t+1 ∈ [0, g d,t+1
] as in (3.8), from constraint (3.45). We obtain the closed form expression in (3.46) by gathering the conclusions of these two cases.

Co-optimization of day-ahead commitment profiles and intraday microgrid controls

Stochastic optimization framework. We introduce noise, control and state random processes, and reformulate the dynamics and the stage cost of the solar power plant model of §3.2 to fit the multistage stochastic optimization framework as formalized in [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Carpentier | Stochastic multi-stage optimization[END_REF].

First, we introduce model variables and random processes. We model the generated power g d,t in (3.7) as a Markovian process3

G : ω ∈ Ω → (G d,0 , . . . , G d,T , . . . , G d,0 , . . . , G d,T ) ∈ [0, p] (T +1)×|D| , (3.47)
following a linear dynamics given, for every day d ∈ D, by

G d,0 = 0 , (3.48a)
G d,t+1 = ĝt+1 d,0 + α t (G d,t -ĝt d,0 ) + β t + W d,t+1 , ∀t ∈ 0, T -1 , (3.48b)
where

(α t , β t ) ∈ R 2 , ∀t ∈ 0, T -1 , (3.49)
are the coefficients of the dynamics (3.48), that we choose to be identical in this model for every day d ∈ D,

ĝ0 d,0 = 0 , (3.50a)
and {ĝ t d,0 } t∈ 1,T ∈ R T , (3.50b)
is the initial partial forecast in (3.39c) 4 , a component of the partial observationforecast h d,t in (3.39d), and last,

W : ω ∈ Ω → (W d,1 , . . . , W d,T , . . . , W d,1 , . . . , W d,T ) ∈ R T ×|D| , (3.51)
is the error noise process for the dynamics (3.48). We assume that the sequence of random variable in (3.51) fulfills the discrete white noise Assumption 2.2.2.

Given the closed form expression ψ * d,t in (3.46) for the curtailment control v c d,t in (3.8), the control variable is reduced to the battery control

u d,t = v b d,t , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.52a)
defined in (3.5), so that we have the control process

U : ω ∈ Ω → (U d,0 , . . . , U d,T -1 , . . . , U d,0 , . . . , U d,T -1 ) ∈ R T ×|D| . (3.52b)
We also introduce the state variable

x t = x s d,t x g d,t = s d,t g d,t -ĝt d,0 ∈ R 2 , ∀t ∈ 0, T , ∀d ∈ D , (3.53)
which incorporates the state of charge s t in (3.4a) and the forecast error g d,tĝt d,0 , and is ruled by the new dynamics

x d,0 = 0 0 , x d + ,0 = x d,T , ∀d ∈ D \ d , (3.54a)
x d,t+1 = f t (x d,t , u d,t , w d,t+1 ) , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.54b)
where, for t ∈ 0, T -1 ,

f t (x, u, w) = f (x s , u) α t x g + β t + w , ∀(x, u, w) ∈ R 2 × R × R , (3.54c)
with x = (x s , x g ) in (3.53) and with the definition of the dynamics f in (3.4). Due to uncertainties in the evolution of the state variable in (3.54c), we also introduce the state process

X : ω ∈ Ω → (X d,0 , . . . , X d,T , . . . , X d,0 , . . . , X d,T ) ∈ (R 2 ) (T +1)×|D| . (3.55)
Second, we introduce constraints. The state variables x d,t in (3.53) and the committed profile p d in (3.3b) induce constraints on the control variables u d,t in (3.52a) via the admissibility set V in (3.6) and the battery constraint (3.45), merged in the parametric admissibility sets

U t (x, p d,t ) = V(x s ) ∩ u ∈ R -u ≤ b(p d,t ) , (3.56)
∀x = (x s , x g ) ∈ R 2 , ∀p d,t ∈ R , ∀t ∈ 0, T -1 .
Besides, given the stagewise independence assumption on the noise process W in (3.51) and the expression of the state variable x t in (3.53), the nonanticipativity constraint

σ(U d,t ) ⊆ σ(W d,0 , . . . , W d,T , . . . , W d,0 , . . . , W d,t ) , ∀t ∈ 0, T -1 , (3.57a)
simplifies without loss of optimality [17, §4.4] as

σ(U d,t ) ⊆ σ(X d,t ) , ∀t ∈ 0, T -1 , ∀d ∈ D . (3.57b)
Finally, we introduce cost functions. We reformulate the stage cost

J t in (3.11a) by defining, for d ∈ D, t ∈ 0, T -1 and (x, u, w, p d,t ) ∈ R 2 ×R×R×R, L d,t (x, u, w, p d,t ) = J e t (p d,t ) + J p t (p d,t , p d,t ) , (3.58a)
where

pd,t = g d,t+1 -u -g d,t+1 -u -b(p d,t ) + , (from ψ * d,t in (3.46)) and g d,t+1 = ĝt+1 d,0 + α t x g + β t + w , (from (3.48)
)

3.4. Co-optimization of day-ahead commitment profiles and intraday microgrid controls with x = (x s , x g ) in (3.53), J e t in (3.11b), J p t in (3.38c), and we write the final cost as

K(x) = R(x s ) , ∀x ∈ R 2 , (3.58b)
where the function R is defined in (3.12).

Stochastic optimization based day-ahead controller. We introduce a day-ahead controller π as in (3.40a) based on stochastic optimization. For every day d ∈ D, we formulate a parametric multistage stochastic optimization problem as in (2.1), by defining the intraday value

Φ d : R T → R , p d → Φ d (p d ) , (3.59a)
as, for

p d ∈ R T , Φ d (p d ) = min U d,0 ,...,U d,T -1 E T -1 t=0 L d,t (X d,t , U d,t , W d,t+1 , p d,t ) + K(X d,T ) , (3.59b) X d,0 = (s d,0 , 0) , (3.59c)
X d,t+1 = f t (X d,t , U d,t , W d,t+1 ) , ∀t ∈ 0, T -1 , (3.59d)
U d,t ∈ U t (X d,t , p d,t ) , ∀t ∈ 0, T -1 , (3.59e)
σ(U d,t ) ⊆ σ(X d,t ) , ∀t ∈ 0, T -1 . (3.59f)
We want to define a commitment policy π d as in (3.40b) that returns a minimizer of the intraday value Φ d in (3.59). The stage cost functions {L d,t } t∈ 0,T -1 in (3.58a) are nonconvex and nondifferentiable with respect to the committed power p d,t in (3.3a), due to the expression of the penalty cost J p t in (3.38c). Therefore, computing a minimizer of the function Φ d in (3.59) looks difficult at first sight. Adapting the methodology of §2.5.1, we reformulate the battery constraint (3.45) using the indicator function

δ -u≤b(p d,t ) (u, p d,t ) = 0 if -u ≤ b(p d,t ) , +∞ else , (3.60)
so that we introduce the new admissibility set

U(x) = V(x s ) , ∀x = (x s , s g ) ∈ R 2 , (3.61)
and the new stage costs

L d,t (x, u, w, p d,t ) = L d,t (x, u, w, p d,t ) + δ -u≤b(p d,t ) (u, p d,t ) , (3.62)
∀(x, u, w, p d,t ) ∈ R nx × R nu × R nw × R np , ∀t ∈ 0, T -1 .
The functions {L d,t } t∈ 0,T -1 in (3.62) are convex but nondifferentiable with respect to the committed power p d,t in (3.3a), as illustrated in Figure 3.6, so that Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity we introduce the partial Moreau envelope of L d,t with respect to the committed power p d,t in (3.3a) given, for a regularization parameter µ ∈ R * + , by

L µ d,t (x, u, w, p d,t ) = inf p d,t ∈R L d,t (x, u, w, p d,t ) + 1 2µ (p d,t -p d,t ) 2 , (3.63) ∀t ∈ 0, T -1 , ∀(x, u, w, p d,t ) ∈ R 2 × R × R × R ,
whose analytical expression is detailed in Appendix 3.A.2. The regularized stage costs {L µ d,t } t∈ 0,T -1 in (3.63) are convex and differentiable with respect to the committed power p d,t in (3.3a), as illustrated in Figure 3.6. Then, we define lower smooth parametric value functions, as in (2.49), given by Stochastic optimization based intraday controller. We introduce an intraday controller (φ, ψ) as in (3.41a) and (3.42a) based on the Stochastic Dynamic Programming (SDP) method (see [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF][START_REF] Puterman | Markov Decision Processes: Discrete Stochastic Dynamic Programming[END_REF]), following the same methodology as in §1.5.2. For every day d ∈ D, given a value of committed profile p d in (3.3b) returned by a day-ahead controller π in (3.40a), we compute value functions

V µ d,T (x, p d ) = K(x) , ∀(x, p d ) ∈ R 2 × R T , (3.64a)
V µ d,t (x, p d ) = inf u∈U (x) E L µ d,t (x, u, W d,t+1 , p d,t ) + V µ t+1 f t (x, u, W d,t+1 ), p d , ∀(x, p d ) ∈ R 2 × R T , ∀t ∈ 0, T -1 , (3.64b
V d,T (x) = K(x) , ∀x ∈ R 2 , (3.66a)
V d,t (x) = inf u∈Ut(x,p d,t ) E L d,t (x, u, W d,t+1 , p d,t ) + V t+1 f t (x, u, W d,t+1 ) , ∀x ∈ R 2 , ∀t ∈ 0, T -1 , (3.66b
E L d,t (x, u, W d,t+1 , p d,t ) + V d,t+1 f t (x, u, W d,t+1 ) , ∀t ∈ 0, T -1 , ∀d ∈ D , (3.67)
p d ∈P min v b d ,v c d s d T -1 t=0 J t (ĝ t+1 d,0 -v b d,t -v c d,t+1 , p d,t ) + R(s d,T ) , (3.68a)
v b d,t ∈ V(s d,t ) , ∀t ∈ 0, T -1 , (3.68b)
-v b d,t ≤ b(p d,t ) , ∀t ∈ 0, T -1 , (3.68c)
v c d,t = ĝt+1 d,0 -v b d,t -b(p d,t ) + , ∀t ∈ 1, T , (3.68d)
s d,t+1 = f (s d,t , v b d,t ) ∈ [0, 1] , ∀t ∈ 0, T -1 . (3.68e)
The constraint (3.68d) is an adaptation of the curtailment policy ψ * d,t in (3.46) where, at time t = 0, we replace the future generated power values {g d,t } t∈ 1,T by the initial partial forecast {ĝ t d,0 } t∈ 1,T . We refer to [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF] for a detailed implementation of such controllers as Mixed Integer Quadratic Programming (MIQP) problems.

Deterministic optimization based intraday controller. We introduce a deterministic intraday controller (φ, ψ) as in (3.41a) and (3.42a) based on the Model Predictive Control (MPC) method (see [START_REF] Bertsekas | Dynamic programming and optimal control[END_REF]), following the same methodology as in §1.5.1. For every day d ∈ D and time step t ∈ 0, T -1 , given a value of committed profile p d in (3.3b) returned by a day-ahead controller π in (3.40a) and the partial forecast {ĝ t+i d,t } i∈ 1,T in (3.39b), we define the deterministic optimization based intraday controller (φ Det , ψ * ) as in (3.41a) and (3.42a), where each battery policy φ Det d,t in (3.41b) is given by

φ Det d,t (s d,t , h d,t ) ∈ arg min v b d,t min v b d,t+1 ,...,v b d,T -1 v c d ,s d T -1 i=t J i (ĝ i+1 d,t -v b d,i -v c d,i+1 , p d,i ) + R(s d,T ) , (3.69a)
v b d,i ∈ V(s d,i ) , ∀i ∈ t, T -1 , (3.69b)
-v b d,i ≤ b(p d,i ) , ∀i ∈ t, T -1 , (3.69c)
v c d,i = ĝi+1 d,t -v b d,i -b(p d,i ) + , ∀i ∈ t + 1, T , (3.69d)
s d,i+1 = f (s d,i , v b d,i ) ∈ [0, 1] , ∀i ∈ t, T -1 . (3.69e)
The constraint (3.69d) is an adaptation of the curtailment policy ψ * d,t in (3.46), where at time t ∈ 0, T -1 , we replace the future generated power values {g d,i+1 } i∈ t,T -1 by the partial forecast {ĝ i+1 d,0 } i∈ t,T -1 . The curtailment policies ψ * d,t in (3.42b) are given in (3.46). Again, we refer to [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF] for a detailed implementation of such controllers as MIQP problems.

Numerical experiments

We perform numerical experiments with a single computer equipped with 4 CPUs Intel Core Processor (Haswell, no TSX) and 22 GB of RAM. For solving instances of the nonlinear convex optimization problem in (3.65), we use the solver Ipopt [START_REF] Wächter | On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming[END_REF], and for solving instances of the MIQP problems in (3.68) and (3.69), we use the solver CPLEX 12.9. Apart from the two solvers, all our code is implemented with the Julia language [START_REF] Bezanson | Julia: A fast dynamic language for technical computing[END_REF].

We present the results obtained for the numerical simulation of the management of the solar plant described in §3.2 under the regulatory rules of §3.4.1, with the controllers introduced in §3.4.3. First, we detail the implementation of the experiments. Second, we comment on the overall management gain obtained by each controller. Third, we give a closer look at the results obtained with the day-ahead controllers π µ,Sto in (3.65) and π Det in (3.68). Finally, we discuss further questions raised by our work and possible improvements.

Throughout our discussion, we shorten our notation for controllers, denoting now (π, φ) = (π, φ, ψ * ), where the curtailment intraday controller ψ * given in (3.46) is adopted for all experiments.

Detail of the experiments. We detail parameter values and data. For the battery parameters (s, v b , v b , ρ c , ρ d ) in (3.4), we take s = 1 MWh, v b = -v b = 1 MW, and ρ c = ρ d = 0.95. For the energy price in (3.10a), we take the maximum price values allowed in [START_REF] Cre | Cahier des charges des appels d'offres portant sur la réalisation et l'exploitation d'installations de production d'électricité à partir de l'énergie solaire et situées dans les zones non interconnectées[END_REF], with c = 0.4 e and c = 0.6 e. Concerning data, we use the data of the EMSx benchmark as introduced in §1.2 for the daily Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity gains is reversed. Indeed, the pair (π µ,Sto , φ Sto ) achieves a gain of 619 ke, while the pair (π Det , φ Sto ) yields gains 1% higher, amounting to 626 ke. The relative gain displayed day by day in Figure 3.7b highlights that the difference of gains is tighter between (π µ,Sto , φ Sto ) and (π Det , φ Sto ) than in Figure 3.7a, with an average daily relative gain of -19 e. However, the controller (π Det , φ Sto ) yields higher gains more often (days with negative relative gains), for 273 days out of 365.

Third, we conclude that all methods introduced in our work, whose novelty is to design controllers based on stochastic optimization techniques, perform better than the deterministic controller (π Det , φ Det ) of [START_REF] Arnold N'goran | Optimal engagement and operation of a grid-connected PV/battery system[END_REF]. For the specific context of the regulatory rules of the French NIZ detailed in §3.4.1, this controller stands for the state-of-the-art method, for which we showcase improvements ranging from 3%, with (π µ,Sto , φ Det ), to 11.6%, with (π Det , φ Sto ). Analysis of the day-ahead controllers. While it is clear from Table 3.1 that φ Sto performs better than φ Det , the performance gap between the dayahead controllers is more subtle. Therefore, we further analyse the behavior of the day-ahead controller π µ,Sto , based on stochastic optimization in (3.65), and π Det , based on deterministic optimization in (3.68). We choose to look closer at 3.4. Co-optimization of day-ahead commitment profiles and intraday microgrid controls daily data for the controllers (π µ,Sto , φ Sto ) and (π Det , φ Sto ), as its yields higher gains than their counterparts with φ Det . First, we comment Figure 3.8, which reports managing data of the power plant for a day where the gain achieved by the controller (π Det , φ Sto ) is 52 e higher than the one performed by (π µ,Sto , φ Sto ). We observe in Figure 3.8a that the commitment profile p d in (3.3b) returned by π Det displays higher power values during the evening peak time of 19:00-21:00 than the ones of π µ,Sto in Figure 3.8b. The strategy of π Det is advantageous here, since the generated power g d,t in (3.7) turns out to exceed the initial forecast ĝt d,0 in (3.39c) in Figure 3.8d. Consequently, the controller (π Det , φ Sto ) makes the battery perform a full cycle in Figure 3.8c (red color), as it fills the battery completely during the day, and empties all the stored energy during the evening peak time to deliver the large amount of committed power. This results in a high managing gain, since the energy price c t in (3.10a) is higher during peak time. As for (π µ,Sto , φ Sto ), although the generated power exceeds the initial forecast in Figure 3.8d, the controller cannot deliver the exceeding power during the evening peak time, due to the stage cost in (3.11a) which strongly penalizes over production. Therefore, the exceeding power is stored in the battery which is not empty at the end of the day, as shown in Figure 3.8c (blue color).

Second, we comment Figure 3.9, which reports managing data of the power plant for a day where the controller (π µ,Sto , φ Sto ) outperforms (π Det , φ Sto ) in gain by 88 e. As in the previous case, we see that the power values of the commitment profile p d in (3.3b) returned by π µ,Sto are moderate during the evening peak time of 19:00-21:00. However, the initial forecast ĝt d,0 in (3.39c) turns out to be overoptimistic on that day, as the generated power g d,t in (3.7) is lower than expected in Figure 3.9d. For such a day, the moderate on-peak commitment strategy of (π µ,Sto , φ Sto ) reveals advantages in two points. On the one hand, since the on-peak committed power values are not too high, power delivery is achieved while maintaining power delivery around 250 kW for most of daytime, from 10:00 to 18:00. On the other hand, daytime power delivery is also supported by the energy saved in the battery on the previous days, as revealed in Figure 3.9c (blue color). In this case, the strong on-peak commitment strategy of (π Det , φ Sto ) reveals disadvantageous, as the intraday controller needs to lower power delivery during daytime to deliver the high amount of power committed for peak time, as shown in Figure 3.9a. Indeed, we observe that the delivered power fluctuates around 200 kW for most of daytime, from 10:00 to 18:00, and that moreover, there is no additional energy stock saved in the battery to face this challenging situation (Figure 3.9c, red color).

Discussion. We interpret the strong on-peak commitment strategy of the day-ahead controller π Det in (3.68), analysed from Figures 3.8 and 3.9, as a consequence of the use of a deterministic optimization method. Indeed, this day-ahead controller tends to maximize benefits during the evening peak time when the energy price c t in (3.10a) is higher, based on the initial forecast ĝt d,0 only, and no other scenario. When the associated intraday controller is φ Det in (3.69), the strong on-peak committed profile is challenging to achieve, and the gain obtained are lower than with a stochastic day-ahead controller, as revealed Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity in Table 3.1, second column. However, the stochastic intraday controller φ Sto manages to take benefit of the strong on-peak commitment strategy of π Det , as (π Det , φ Sto ) yields the highest gain in Table 3.1. Our question is: how does this phenomenon extend to other regulatory market rules than the ones of the French NIZ detailed in §3.4.1? In particular, the good performance of the (π Det , φ Sto ) controller might be backed by the fixed high on-peak energy price c in (3.10a) which offers arbitrage opportunities, and thus introduces a recourse for the intraday controller, which can buy power at a lower price to respect strong on-peak commitment values.

We interpret the moderate on-peak commitment strategy of the day-ahead controller π µ,Sto in (3.65), observed in Figures 3.8 and 3.9, as a consequence of the use of a stochastic optimization method. As opposed to deterministic methods, the stochastic method takes into account several scenarios and their probabilities for the realization of the upcoming daily generated power g d,t in (3.7). While this strategy returns lower gains when comparing (π µ,Sto , φ Sto ) with (π Det , φ Sto ) in Table 3.1, third column, it appears to be more robust when using a φ Det as an intraday controller, as shown in Table 3.1, second column. Concerning possible improvements for π µ,Sto , we believe that our probability model would benefit the use of a daily probabilistic forecasting method as developed in [START_REF] David | Constructing probabilistic scenarios for wide-area solar power generation[END_REF], whereas in our model, {W d,t } t∈ 1,T in (3.51) is identically distributed for all days d ∈ D. Also, the role of the regularization parameter µ in the efficiency of the numerical method for computing the value returned by π µ,Sto in (3.65) should be further investigated. Finally, as for π Det , we look forward to see how the results obtained with π µ,Sto for the French NIZ context extend to other regulatory rules, and to other data.

Conclusion

We have introduced a microgrid control model for the operation of a solar power plant under regulatory constraints imposing the coordination of day-ahead and intraday decisions.

In a first numerical experiment, we have considered a simplified context and formulated a parametric multistage stochastic optimization problem, for the purpose of testing the methods introduced in Chapter 2. We have attested numerically that our Bellman-like recursion algorithm computes efficiently the gradient of the parametric objective function, in the case where the intraday problem is approximated by a smooth lower estimate, and displays convexity. The insertion of this algorithm in a standard descent method gives an efficient new approach for optimizing the commitment profile, which returns better results for our experiments than a subgradient method combined with the SDDP algorithm.

In a second numerical experiment, we have implemented the simulation of the management of a solar plant in the French NIZ context. In this cases, both day-ahead and intraday decisions alternate sequentially. We have proposed new controller models based on stochastic optimization methods, including some of the methods introduced in Chapter 1 and Chapter 2. Compared with state-ofthe-art controllers, we obtain up to 11.6% of improvement in yearly management Other columns report the number of iterations performed (second column), time performances (third and fourth columns), together with the lower bound V 0 (x 0 ) in (3.30) (fifth column), the expected simulation cost V 0 (x 0 ) in (3.32) (sixth column), and the estimation gap (seventh column), expressed as a percentage of V 0 (x 0 ). For columns 2-6, the lower the values the better the performance of the instance

3.A.2 Regularized stage cost

We provide the analytical expression of the regularized stage cost {L µ t } t∈ 0,T -1 in (3.63), for some regularization parameter µ ∈ R * + , obtained thanks to computing rules detailed in [START_REF] Planiden | Proximal mappings and Moreau envelopes of single-variable convex piecewise cubic functions and multivariable gauge functions[END_REF]. For (x, u, w, p

d,t ) ∈ R 2 × R × R × R, denoting Chapter 4
Mirror descent with one-sided linear (OSL) couplings

Introduction

The Fenchel conjugacy plays a central role in convex analysis. For instance, starting from a primal optimization problem, it introduces a systematic way to derive a dual problem, in the well-known framework of the Fenchel-Rockafellar duality (see e.g. [START_REF] Rockafellar | Variational analysis[END_REF]Chapter 11], [5,Chapter 15]). Beyond famous results in optimization, the Fenchel conjugacy also makes a bridge between a geometrical and an analytical conception of convexity. Roughly speaking, proper lower-semicontinuous convex functions are fonctions that can be expressed as the pointwise supremum of a collection of affine functions. Geometrically, their epigraph is described exactly as a collection of supporting hyperplanes. Analytically, these functions are equal to their Fenchel biconjugate.

In view of the success of convex analysis, especially for solving convex optimization problems, a natural question is: can some of these results extend to a more general context? Positive answers to this question have flourished in the second half of the 20th century, and have led to the emergence of a global theory of generalized (or abstract) convexity. We refer to [START_REF] Singer | Abstract convex analysis[END_REF][START_REF] Alexander | Abstract convexity and global optimization[END_REF][START_REF] Enrique | Generalized Convex Duality and its Economic Applicatons[END_REF] for a review of the main concepts developed in this direction. In this chapter, we concentrate Chapter 4. Mirror descent with one-sided linear (OSL) couplings on general Fenchel-Moreau conjugacies induced by a coupling function, pairing a primal set with a dual set (in the standard Fenchel conjugacy, this coupling is a bilinear form). With such conjugacies come naturally extended notions of generalized convexity and subdifferentials. In particular, we pay a specific attention to the so-called one-sided linear (OSL) couplings, which let us retrieve some results of the classical convex framework.

Our main concern lies in numerical methods. One of the most famous algorithms for addressing generalized convex optimization problems is the cutting angle method [START_REF] Andramonov | Cutting angle methods in global optimization[END_REF][START_REF] Alexander | Abstract convexity and global optimization[END_REF], based on the iterative construction of a global representation of the objective function, obtained as the supremum of generalized affine functions, derived from generalized subgradients. This method can be thought as an extension of the cutting plane algorithm. However, as opposed to the convex cutting plane framework, solving the nonconvex subproblems at each iterations can be difficult (see discussions in [START_REF] Alexander | Abstract convexity and global optimization[END_REF]Chapter 9]), so that applications are limited so far.

In the spirit of previous approaches, we intend to solve optimization problems based on generalized subgradients. We explore the possibility to extend the so-called mirror descent algorithm to generalized convex problems, when convexity is induced by a OSL coupling. The mirror descent algorithm is considered to be first introduced in [START_REF] Semenovivc | Problem complexity and method efficiency in optimization[END_REF]. A similar algorithm can also be traced contemporarily in [START_REF] Cohen | Auxiliary problem principle and decomposition of optimization problems[END_REF], and further investigations on this method can be found in [START_REF] Beck | Mirror descent and nonlinear projected subgradient methods for convex optimization[END_REF][START_REF] Beck | First-order methods in optimization[END_REF]. Whereas the cutting plane method has a more global approach, the mirror descent method constructs successive local approximations of the objective function based on the evaluation of a subgradient (as e.g. in the subgradient method, considered as a particular case). In the (translated) words of Nemirovski and Yudin, a key advantage of the method is that "its laboriourness does not depend explicitely on the dimension of the problem" [START_REF] Semenovivc | Problem complexity and method efficiency in optimization[END_REF]. We find that the mirror descent algorithm extends well to the generalized convex setting induced by a OSL coupling, with the same complexity with regard to the dimension of the problem. To our knowledge, the extension of the mirror descent algorithm to generalized convex optimization is new. Finally, as in the cutting angle algorithm, the sequence of subproblems that we find might not be straightforward to solve, but is of different nature than the one of cutting angle. We address such practical questions later, in Chapter 6.

The chapter is organized as follows. First, we start with background notions and a few extended results on couplings and generalized Fenchel-Moreau conjugacies in §4.2. Second, we introduce a generalization of the Bregman divergence with OSL couplings, in §4.3. Third, we extend the mirror descent algorithm with OSL couplings and give a proof of convergence in §4.4.

We warn the reader that this chapter focuses on the introduction of theoretical notions, and paves the way for Chapters 5 and 6, where we turn to more applied considerations.

Notations

When we manipulate functions with values in the extended real line R = [-∞, +∞], we adopt the Moreau lower and upper additions [START_REF] Moreau | Inf-convolution, sous-additivité, convexité des fonctions numériques[END_REF]

• + (-∞) = (-∞) • + (+∞) = -∞ and (+∞) (-∞) = (-∞) (+∞) = +∞.
Given a set U, we denote by R U the set of functions f : U → R. For a function f ∈ R U , its domain is the set dom f = u ∈ U f (u) < +∞ . We say that the function f is proper if it never takes the value -∞ and if dom f = ∅.

Couplings and Fenchel-Moreau conjugacies

We review general concepts and notations about generalized couplings and conjugacies in §4.2.1. Then, we consider special cases by introducing the sum coupling in §4.2.2, and by turning to the one-sided linear couplings in §4.2.3.

Background on couplings and conjugacies

We review some definitions and properties of general conjugacies induced by a coupling function. We refer to [START_REF] Singer | Abstract convex analysis[END_REF][START_REF] Enrique | Generalized Convex Duality and its Economic Applicatons[END_REF] for a more complete introduction to the subject. First, we review properties of couplings and conjugacies in the general case. Second, we introduce the notion of subdifferential with respect to a conjugacy.

General couplings and conjugacies. Let be given two sets U ("primal") and V ("dual"), together with a coupling function

c : U × V → R . (4.1)
With any coupling, we associate conjugacies from R U to R V and from R V to R U as follows.

f c (v) = sup u∈U c(u, v) • + -f (u) , ∀v ∈ V . (4.2a)
With the coupling c, we associate the reverse coupling c defined by

c : V × U → R , c (v, u) = c(u, v) , ∀(v, u) ∈ V × U . (4.2b)
The c -Fenchel-Moreau conjugate of a function g : V → R, with respect to the coupling c , is the function g c : U → R defined by

g c (u) = sup v∈V c(u, v) • + -g(v) , ∀u ∈ U . (4.2c)
The c-Fenchel-Moreau biconjugate of a function f : U → R, with respect to the coupling c, is the function f cc : U → R defined by

f cc (u) = f c c (u) = sup v∈V c(u, v) • + -f c (v) , ∀u ∈ U . (4.2d)
As a special case, when the sets U and V are vector spaces coupled by a bilinear form c = , , the corresponding conjugacy is the classical Fenchel conjugacy, and we denote by f the Fenchel conjugate function as in (4.2a); g the reverse Fenchel conjugate function1 as in (4.2c); and by f the Fenchel biconjugate fonction as in (4.2d).

With Definition 4.2.1 comes a series of results relating functions with their cconjugate in (4.2a) and c-biconjugate in (4.2d). We recall the following notable facts:

• the c-biconjugate of a function f : U → R satisfies

f cc (u) ≤ f (u) , ∀u ∈ U , (4.3a)
• for any function f : U → R, we have the (Fenchel-Young) inequality

f c (v) ≥ c(u, v) • + -f (u) , ∀(u, v) ∈ U × V , (4.3b)
• for any pair of functions f : U → R and h : U → R, we have the inequality

sup v∈V -f c (v) • + -h -c (v) ≤ inf u∈U f (u) h(u) , (4.3c)
where the (-c)-Fenchel-Moreau conjugate is given by

h -c (v) = sup u∈U -c(u, v) • + -h(u) , ∀v ∈ V , (4.3d)
• for any function f : U → R, we have the equality

f cc c = f c (4.3e)
which expresses that conjugacies are closure operators.

Finally, the coupling c in (4.1) induces a class of c-elementary functions

c(•, v) • + (-t) : U → R , (4.4)
or c-affine functions, parametrized by v ∈ V and t ∈ R. This induces the following generalized notion of convexity for functions. Equivalently, c-convexity can be expressed in term of c-biconjugacy.

Proposition 4.2.3 (from [START_REF] Enrique | Generalized Convex Duality and its Economic Applicatons[END_REF], Corollary 6.1) A function f : U → R is cconvex iff it is equal to its c-biconjugate f cc in (4.2d).

Couplings and Fenchel-Moreau conjugacies

Subdifferential with respect to a conjugacy. As the c-Fenchel-Moreau conjugacy induces a duality, the notion of subdifferential with respect to a duality leads to the following definition, taken from [START_REF] Akian | Invertibility of functional Galois connections[END_REF].

Definition 4.2.4 The c-subdifferential of a function f : U → R at u ∈ U, with respect to the coupling c in (4.1), is the subset ∂ c f (u) ⊆ V defined equivalently, either by

v ∈ ∂ c f (u) ⇐⇒ f c (v) = c(u, v) • + -f (u) , (4.5a)
or by

v ∈ ∂ c f (u) ⇐⇒ c(u, v) • + -f (u) ≥ c(u , v) • + -f (u ) , ∀u ∈ U . (4.5b)
As in the case of the classical Fenchel conjugacy, the c-subdifferential is strongly related to the c-Fenchel-Moreau conjugate (4.2a) and biconjugate (4.2d), by (4.5a).

The sum coupling

In optimization theory and problems, we often have to deal with composite objective functions, where we sum a first criterion with a second term representing constraints or a regularization penalty. With such applications in mind, we now show that the lower addition of two generalized convex functions gives a function which is also generalized convex, for a specific coupling that we introduce next.

Let the (primal) set U be paired with two (dual) sets V 1 and V 2 by the couplings c

1 : U × V 1 → R and c 2 : U × V 2 → R. We introduce the sum coupling c ⊕ defined by c ⊕ u, (v 1 , v 2 ) = c 1 (u, v 1 ) • + c 2 (u, v 2 ) , ∀u ∈ U , ∀(v 1 , v 2 ) ∈ V 1 × V 2 . (4.6) Proposition 4.2.5 Let f 1 : U → R and f 2 : U → R be two functions. If f 1 is c 1 -convex and f 2 is c 2 -convex, then the sum f 1 • + f 2 is c ⊕ -convex. Proof. Let u ∈ U, given that f 1 is c 1 -convex (resp. f 2 is c 2 -convex), it is equal to its c 1 -biconjugate (resp. to its c 2 -biconjugate), from Proposition 4.2.3, so that f 1 (u) • + f 2 (u) = f c 1 c 1 1 (u) • + f c 2 c 2 2 (u) , = sup v 1 ∈V 1 c 1 (u, v 1 ) • + -f c 1 1 (v 1 ) • + sup v 2 ∈V 2 c 2 (u, v 2 ) • + -f c 2 2 (v 2 ) , = sup (v 1 ,v 2 )∈V 1 ×V 2 c 1 (u, v 1 ) • + -f c 1 1 (v 1 ) • + c 2 (u, v 2 ) • + -f c 2 2 (v 2 ) , = sup (v 1 ,v 2 )∈V 1 ×V 2 c ⊕ u, (v 1 , v 2 ) • + -f c 1 1 (v 1 ) • + -f c 2 2 (v 2 ) .
Therefore, the function f 1 • + f 2 is the pointwise supremum of c ⊕ -elementary functions, which means that it is c ⊕ -convex, following Definition 4.2.2.

We also prove a property that relates the c ⊕ -subdifferential of the function f 1 • + f 2 to the c 1 -subdifferential of f 1 and the c 2 -subdifferential of f 2 .

Couplings and Fenchel-Moreau conjugacies

define the one-sided linear coupling c θ between the set W and the vector space V by

θ : W × V → R , θ (w, v) = θ(w) , v , ∀(w, v) ∈ W × V . (4.8)
It is worth mentioning that, in the context of Definition 4.2.7, if V is a Hilbert space, and if for all w ∈ W, the linear function c(w, •) : V → R is continuous (as is always the case if the dimension of V is finite), then from the Riesz representation theorem (see e.g. [5,Fact 2.24]), there exists a mapping θ :

W → V such that c(w, v) = θ(w) , v , ∀(w, v) ∈ W × V . (4.9)
Therefore, the particular case of OSL couplings introduced in Definition 4.2.8 covers in fact a large panel of situations2 . When a OSL coupling can be factorized by a mapping θ as in (4.8), there exists several links between the induced θ -Fenchel-Moreau conjugacy and the standard Fenchel conjugacy. We gather some of these useful results in the following proposition, for which we introduce some definitions and notations. Definition 4.2.9 (from [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF], Definition 4) Let h : W → R be a function. We define the conditional infimum (of the function h knowing the mapping θ)

as the function inf h | θ : U → R given by inf h | θ (u) = inf h(w) w ∈ W , θ(w) = u , ∀u ∈ U . (4.10)
Also, for any subset W ⊆ W, δ W : W → R denotes the indicator function of the set W :

δ W (w) = 0 if w ∈ W , δ W (w) = +∞ if w ∈ W , (4.11)
and for any subset U ⊆ U, σ U : V → R denotes the support function of the set U :

σ U (v) = sup u∈U u , v , ∀v ∈ V . (4.12)
Proposition 4.2.10 (mainly from [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF]) Under the assumptions of Definition 4.2.8, the θ -conjugacy displays the following properties. For any function g : V → R, the θ -Fenchel-Moreau conjugate g θ : W → R is given by

g θ = g • θ . (4.13a) For any function h : W → R, the θ -Fenchel-Moreau conjugate h θ : V → R is given by h θ = inf h | θ , (4.13b)
and the θ -Fenchel-Moreau biconjugate h θ θ : W → R is given by

h θ θ = h θ • θ = inf h | θ • θ . (4.13c) Moreover, h is θ -convex iff there exists a closed convex function f : U → R such that h = f • θ. In this case, we have that v ∈ ∂f θ(w) =⇒ v ∈ ∂ θ h(w) , ∀w ∈ W . (4.13d)
For any subset W ⊆ W, we have

δ θ W = σ θ(W ) . ( 4
θ(w) , v -f θ(w) ≥ u , v -f (u ) , ∀u ∈ U , =⇒ θ(w) , v -f (θ(w)) ≥ θ(w ) , v -f θ(w ) , ∀w ∈ W , (as θ(W) ⊆ U) =⇒ v ∈ ∂ θ h(w) , since h = f • θ, θ = θ(•) ,
• , and by definition of the θ -subdifferential in (4.5b).

Properties of the c-subdifferential induced by a OSL coupling. We now review some properties of the c-subdifferential that arise when c is a OSL coupling. These properties extend some results of standard convex analysis playing a major role in optimization theory and practice, to the case of conjugacies induced by a OSL coupling. As already mentioned in §4.2.2, composite objective functions are ubiquitous in optimization. Therefore, we start with a result which characterizes the csubdifferential of the sum of two functions, when c is OSL. This result can be interpreted as an extension of a well-known property of the subdifferential in standard convex analysis (see e.g. [5,Proposition 16.42]). Similar formulations for generalized conjugacies can be found in [START_REF] Martinez-Legaz | Fenchel duality and related properties in generalized conjugation theory[END_REF][START_REF] Singer | Abstract convex analysis[END_REF]. Proposition 4.2.11 (inspired by [START_REF] Martinez-Legaz | Fenchel duality and related properties in generalized conjugation theory[END_REF][START_REF] Singer | Abstract convex analysis[END_REF]) Let W be a set, V be a vector space, and c : W × V → R be a OSL coupling as in Definition 4.2.7. Let f 1 : W → R and f 2 : W → R be two proper functions. We have that

∂ c f 1 (w) + ∂ c f 2 (w) ⊆ ∂ c f 1 + f 2 (w) , ∀w ∈ domf 1 ∩ domf 2 . (4.14a)
If, moreover, we have the equality

f 1 + f 2 c (v) = min (v 1 ,v 2 )∈V 2 f c 1 (v 1 ) + f c 2 (v 2 ) v 1 + v 2 = v , ∀v ∈ V , (4.14b)
meaning that the equality in (4.14b) is achieved by a minimizer (v 1 , v 2 ) ∈ V 2 , then we have that

∂ c f 1 (w) + ∂ c f 2 (w) = ∂ c f 1 + f 2 (w) , ∀w ∈ domf 1 ∩ domf 2 . (4.14c)
Proof. First, we prove the inclusion in (4.14a). Let w ∈ domf

1 ∩domf 2 , v 1 ∈ ∂ c f 1 (w), v 2 ∈ ∂ c f 2 (w)
, from the definition of the c-subdifferential in (4.5b), using that c is finite valued, we have that

c(w, v 1 ) -f 1 (w) ≥ c(w , v 1 ) -f 1 (w ) , ∀w ∈ W , c(w, v 2 ) -f 2 (w) ≥ c(w , v 2 ) -f 2 (w ) , ∀w ∈ W , =⇒ c(w, v 1 + v 2 ) -f 1 + f 2 (w) ≥ c(w , v 1 + v 2 ) -f 1 + f 2 (w ) , ∀w ∈ W ,
using the fact that c is a OSL coupling, and therefore v 1 + v 2 ∈ ∂ c f 1 + f 2 (w), using again (4.5b).

Second, let us assume that the equality (4.14b) holds, and that it is always achieved by a minimizer (v 1 , v 2 ) ∈ V 2 . We prove the reciprocal inclusion of (4.14a). Let w ∈ W and v ∈ ∂ c f 1 + f 2 (w), from the definition of the c-subdifferential in (4.5a),

f 1 + f 2 c (v) = c(w, v) -f 1 + f 2 (w) , (as c is OSL, c(w, v) is finite) =⇒ f c 1 (v 1 ) + f c 2 (v 2 ) = c(w, v) -f 1 (w) -f 2 (w) , (by assumption, with v = v 1 + v 2 ) =⇒ f c 1 (v 1 ) + f 1 (w) -c(w, v 1 ) + f c 2 (v 2 ) + f 2 (w) -c(w, v 2 ) = 0 ,
rearranging terms, using that f 1 (w), f 2 (w) are finite, and thus

f c 1 (v 1 ) ≥ c(w, v 1 ) - f 1 (w) > -∞ and f c 2 (v 2 ) ≥ c(w, v 2 ) -f 2 (w) > -∞
, by definition of the c-conjugate in (4.2a). Then, according to the (Fenchel-Young) inequality (4.3b), both terms in the left-hand side are nonnegative, and therefore, we deduce that

f c 1 (v 1 ) + f 1 (w) -c(w, v 1 ) = 0 , f c 2 (v 2 ) + f 2 (w) -c(w, v 2 ) = 0 ,
and thus, using again (4.5a) and that all quantities are finite, that

v 1 ∈ ∂ c f 1 (w) and v 2 ∈ ∂ c f 2 (w). It follows that v = v 1 + v 2 ∈ ∂ c f 1 (w) + ∂ c f 2 (w)
. This concludes the proof.

Moreover, we prove the following properties of the c-subdifferential induced by a OSL coupling. Proposition 4.2.12 Let W be a set, V be a vector space, and c : W × V → R be a OSL coupling as in Definition 4.2.7. For any function f

: W → R, we have that w ∈ arg min f ⇐⇒ 0 ∈ ∂ c f (w) . ( 4

.15a)

For any v ∈ V, we have that

∂ c f + c(•, v) = ∂ c f + v . ( 4

.15b)

If the function f is proper, we have that

∀w ∈ W ∂ c f (w) = ∅ =⇒ -∞ < f (w) < +∞ . ( 4

.15c)

Proof. First, we prove (4.15a). By definition of the c-subdifferential in (4.5b),

0 ∈ ∂ c f (w) ⇐⇒ c(w, 0) -f (w) ≥ c(w , 0) -f (w ) , ∀w ∈ W , (as c is finite valued) ⇐⇒ -f (w) ≥ -f (w ) , ∀w ∈ W , as for any w ∈ W, v ∈ V, c(w , 0) = c(w , v-v) = c(w , v)-c(w , v) = 0,
given that the coupling c is OSL, and which is equivalent to w ∈ arg max(-f ) ⇐⇒ w ∈ arg min f . Second, we prove (4.15b). From (4.5b), we have that

v ∈ ∂ c f + c(•, v) (w) ⇐⇒ c(w, v ) -f (w) + c(w, v) ≥ c(w , v ) -f (w ) + c(w , v) , ∀w ∈ W , (as c is finite valued) ⇐⇒ c(w, v -v) -f (w) ≥ c(w , v -v) -f (w ) , ∀w ∈ W , (since c is OSL) ⇐⇒ v -v ∈ ∂ c f (w) . (from (4.5b))
Third, we prove (4.15c). Let w ∈ W be such that ∂ c f (w) = ∅, and let v ∈ ∂ c f (w). From (4.5b), we have that

c(w, v) -f (w) ≥ c(w , v) -f (w ) , ∀w ∈ W , (as c is finite valued) =⇒ -f (w) ≥ c( w, v) -f ( w) -c(w, v) ,
choosing w ∈ W such that f ( w) is finite, which we can do since f is proper. Since moreover the coupling c is OSL, all terms in the right hand side of the above inequality are finite. Clearly, f (w) = +∞ leads to a contradiction, and finally -∞ < f (w) < +∞, because f is proper.

Remark 4.2.13 Observe that we only need the coupling c to be finite-valued (and not necessary OSL) to prove the implication (4.15c).

The Bregman divergence with OSL couplings

In the usual convex framework, the mirror descent algorithm is often considered as an extension of the projected subgradient method to contexts where the underlying spaces are not Hilbertian. The key idea is to replace the distance induced by the 2 norm with a Bregman divergence, which generalizes the notion of distance. The original motivation behind the Bregman divergence is that it lets us address a much larger family of problems (beyond the Hilbertian context). Moreover, it offers the possibility to adapt the optimization method to the nature of the problem, as detailed in [6, §9.1]. First, we generalize the Bregman divergence with couplings in §4.3.1. Second, we prove that a fundamental property of the Bregman divergence extends with OSL couplings in §4.3.2. Throughout this section, we guide the reader with references to the classical convex framework depicted in [START_REF] Beck | First-order methods in optimization[END_REF].

The Bregman divergence with couplings

D c κ : W × w∈dom(∂cκ) {w} × ∂ c κ(w) →] -∞, +∞] , (4.16a)
given by

D c κ (w, w , v ) = κ(w) -κ(w ) -c(w, v ) + c(w , v ) , ∀(w, w ) ∈ W × dom(∂ c κ) , ∀v ∈ ∂ c κ(w ) . ( 4
c(w, v) • + -f (w) ≥ c(w , v) • + -f (w ) + d(w, w ) 2 , ∀(w, w ) ∈ W 2 , ∀v ∈ ∂ c f (w) . (4.17)
We recall that a pseudometric shares the same properties as a distance, except that d(w, w ) = 0 =⇒ w = w . We now prove the following properties of the c-Bregman divergence. Proof.

D c κ (w, w , v ) ≥ 0 , ∀(w, w ) ∈ W × dom(∂ c κ) , ∀v ∈ ∂ c κ(w ) , (4.18a)
D c κ (w, w , v ) + D c κ (w , w , v ) -D c κ (w, w , v ) = c(w , v ) -c(w, v ) -c(w , v ) -c(w, v ) , ∀w ∈ domκ , ∀(w , w ) ∈ dom(∂ c κ) 2 , ∀v ∈ ∂ c κ(w ) , ∀v ∈ ∂ c κ(w ) .
• Let (w, w ) ∈ W × dom(∂ c κ) and v ∈ ∂ c κ(w ). From (4.5b) we have that c(w , v ) -κ(w ) ≥ c(w, v ) -κ(w) , ∀w ∈ W . From Remark 4.2.13, as c is finite valued, all terms but κ(w) must be finite, from which we deduce (4.18a), by definition of D c κ in (4.16b).

• Let w ∈ domκ, (w , w

) ∈ dom(∂ c κ) 2 , v ∈ ∂ c κ(w ), v ∈ ∂ c κ(w ). By definition of D c
κ in (4.16b), we have that (where all terms are finite)

D c κ (w, w , v ) + D c κ (w , w , v ) -D c κ (w, w , v ) = κ(w) -κ(w ) + c(w , v ) -c(w, v ) + κ(w ) -κ(w ) + c(w , v ) -c(w , v ) -κ(w) + κ(w ) -c(w , v ) + c(w, v ) = c(w , v ) -c(w, v ) -c(w , v ) + c(w, v ) .
• By Definition 4.3.2 of the c-strong convexity of κ with respect to the pseudometrics d, using that the coupling c is finite-valued, for all (w, w

) ∈ domκ × dom(∂ c κ) and v ∈ ∂ c κ(w ), we have that c(w , v ) -κ(w ) ≥ c(w, v ) -κ(w) + d(w , w)

The Bregman divergence with OSL couplings

The fundamental result in the architecture of the mirror descent method is given in [START_REF] Beck | First-order methods in optimization[END_REF]Theorem 9.12]. We now prove that this result generalizes to the c-Bregman divergence, when c is a OSL coupling. Proposition 4.3.4 Let W be a set and V be a vector space. Let c : W × V → R be a one-sided linear coupling between W and V, as in Definition 4.2.7. Let κ : W →] -∞, +∞] be a proper (divergence generating) function, and let h :

W →] -∞, +∞] be a proper function, such that dom(∂ c κ) ∩ domh = ∅. Let w ∈ dom(∂ c κ) ∩ domh, and let v ∈ ∂ c κ(w ). If there exists (w * , v * ) ∈ W × V such that w * ∈ arg min w∈W h(w) + D c κ (w, w , v ) , (4.20a) v * ∈ ∂ c κ(w * ) , (4.20b) v -v * ∈ ∂ c h(w * ) , (4.20c)
then, we have that

h(w)+D c κ (w, w , v ) ≥ h(w * )+D c κ (w * , w , v )+D c κ (w, w * , v * ) , ∀w ∈ W . (4.21) Proof. Let be (w * , v * ) ∈ W × V satisfying (4.20a)-(4.20c).

The mirror descent algorithm with OSL couplings

First, we prove an inequality. Since c is a OSL coupling, it takes finite values, and from which we deduce that h(w * ) and κ(w * ) are finite, by definition of D c κ in (4.16b). Then, for any w ∈ W, all terms but h(w) and κ(w) must be finite in the following lines:

h(w) -c(w, v ) = h(w) -c(w, v -v * ) -c(w, v * ) , ∀w ∈ W , ≥ h(w * ) -c(w * , v -v * ) -c(w, v * ) , ∀w ∈ W , (as v -v * ∈ ∂ c h(w * ),
h(w) + D c κ (w, w , v ) = h(w) + κ(w) -κ(w ) + c(w , v ) -c(w, v ) , (D c κ in (4.16b)) = h(w) -c(w, v ) + κ(w) -κ(w ) + c(w , v ) , ≥ h(w * ) -c(w * , v ) + c(w * , v * ) -c(w, v * ) + κ(w) -κ(w ) + c(w , v ) ,
(from the just established inequality above)

= h(w * ) + κ(w * ) -κ(w ) + c(w , v ) -c(w * , v ) + κ(w) -κ(w * ) + c(w * , v * ) -c(w, v * ) , = h(w * ) + D c κ (w * , w , v ) + D c κ (w, w * , v * ) . (D c κ in (4.16b))
This ends the proof.

The mirror descent algorithm with OSL couplings

We now turn to our main result, where we prove that the mirror descent algorithm generalizes to situations where a primal set W is paired with a dual vector space V by a OSL coupling. First, we give a general definition for a regularity property of OSL couplings. Let N ∈ N, and suppose that there exists sequences

{w n } n∈ 0,N ∈ W N +1 , {v n } n∈ 0,N ∈ V N +1 , v f n n∈ 0,N ∈ V N +1 , {α n } n∈ 0,N -1 ∈ R N + , such that v 0 ∈ ∂ c κ + δ W (w 0 ) , (4.24a)
v f 0 ∈ ∂ c f (w 0 ) , (4.24b)
and, for n ∈ 0, N -1 ,

w n+1 ∈ arg min w∈W κ(w) + c(w, α n v f n -v n ) , (4.25a
)

v n+1 = v n -α n v f n , (4.25b)
v f n+1 ∈ ∂ c f (w n+1 ) . (4.25c) Then, if max 0≤n≤N D c κ+δ W (w * , w n , v n ) ≤ R 2 , max 0≤n≤N -1 ϕ(v f n ) 2 ≤ G 2 , (4.26)
we have that

min 0≤n≤N -1 f (w n ) -f * ≤ R 2 + G 2 4 N -1 n=0 α 2 n N -1 n=0 α n . ( 4

.27)

Proof. We proceed in two steps, and adopt the notation κ = κ + δ W . First, supposing that such sequences {w n } n∈ 0,N , {v n } n∈ 0,N , and {v f n } n∈ 0,N exist, we prove that for n ∈ 0, N -1 ,

D c κ (w * , w n+1 , v n+1 ) ≤ D c κ (w * , w n , v n ) -α n f (w n ) -f * + α 2 n 4 ϕ(v f n ) 2 . (4.28)
Chapter 4. Mirror descent with one-sided linear (OSL) couplings

Second, we sum the inequalities in (4.28) over n ∈ 0, N -1 , and we obtain

D c κ (w * , w N , v N ) ≤ D c κ (w * , w 0 , v 0 ) - N -1 n=0 α n f (w n ) -f * + N -1 n=0 α 2 n 4 ϕ(v f n ) 2 , =⇒ N -1 n=0 α n f (w n ) -f * ≤ R 2 + N -1 n=0 α 2 n 4 G 2 , (from (4.26)) =⇒ min 0≤n≤N -1 f (w n ) -f * ≤ R 2 + G 2 4 N -1 n=0 α 2 n N -1 n=0 α n .
This ends the proof.

As a concluding remark, we observe that the bound on the optimality gap in (4.27) is the same as the one given in [6, Lemma 9.14] in the usual convex case. Therefore, the same convergence rules apply for the choice of a dynamic step size {α n } n∈ 0,N -1 ∈ R N + as the ones dicussed in [6, §9.2.3].

Conclusion

After introducing background notions on general Fenchel-Moreau conjugacies, we have identified conjugacies induced by one-sided linear couplings as a promising field to extend results from usual convex analysis. The main novelty lies in the generalization of the mirror descent algorithm to solve optimization problems where the objective and the constraints display c-convexity properties, with c a OSL coupling. With such notions in hands, we can now turn to more applied considerations. In Chapter 5, we introduce a particular case of OSL coupling, and we compute generalized subdifferentials. In Chapter 6, we identify famous optimization problems which display the desired c-convex properties, and discuss perspectives in the application of the mirror descent algorithm with OSL couplings.

Introduction

The 0 pseudonorm is a function which counts the number of nonzero elements of a vector. This function appears in numerous optimization problems to enforce the sparsity of the solution. As this function is nonconvex and noncontinuous, the powerful framework of convex analysis is unadapted to address such problems, unless considering a convex relaxation. In a recent series of work [START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF][START_REF] Chancelier | Orthant-Strictly Monotonic Norms, Graded Sequences and Generalized Top-k and k-Support Norms for Sparse Optimization[END_REF][START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF], it was shown that conjugacies induced by the so-called Capra (constant along primal rays) coupling, a special kind of one-sided linear coupling as in §4.2.3, are well-suited to handle the 0 pseudonorm. In particular, the authors show in [START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF] that for a large class of source norms (that encompasses the p norms for p ∈]1, ∞[) employed in the definition of the Capra coupling, the

Background on norms

Inequality (5.4a), that is,

v |||•||| u ⇐⇒ u , v = |||u||| × |||v||| . ( 5
N C (u) = v ∈ R d v , u -u ≤ 0 , ∀u ∈ C .
(5.5)

Now, easy computations show that the notion of |||•|||-duality can be rewritten in terms of normal cones N B and N B as follows:

v |||•||| u ⇐⇒ v ∈ N B u |||u||| ⇐⇒ u ∈ N B v |||v||| , ∀(u, v) ∈ R d \{0}×R d \{0} .
(5.6)

Restriction norms

For any u ∈ R d and subset K ⊆ {1, . . . , d}, we denote by u K ∈ R d the vector which coincides with u, except for the components outside of K that vanish: u K is the orthogonal projection of u onto the subspace1

R K = R K × {0} -K = u ∈ R d u j = 0 , ∀j ∈ K ⊆ R d , (5.7)
where R ∅ = {0}.

Definition 5.2.1 (from [START_REF] Chancelier | Orthant-Strictly Monotonic Norms, Graded Sequences and Generalized Top-k and k-Support Norms for Sparse Optimization[END_REF], Definition 1) For any norm |||•||| on R d and any subset K ⊆ {1, . . . , d}, we define three norms on the subspace R K of R d , as defined in (5.7), as follows.

• The K-restriction norm |||•||| K is defined by

|||u||| K = |||u||| , ∀u ∈ R K . ( 5
|||•||| R (k), = ||•|| tn (k,q) and |||•||| R (k) = ||•|| sn (p,k) , (5.22a)
where, for Then, we proceed in three steps. First, in §5.4.1, we provide an explicit formulation for the set V l in (5.19). Second, in §5.4.2, we provide an explicit formulation for the normal cone in (5.20b). Finally, we gather both results to provide an explicit formulation of the Capra-subdifferential of the 0 pseudonorm in §5.4.3.

v ∈ R d , if ν is a permutation of 1, d such that |v ν(1) | ≥ . . . ≥ |v ν(d) |, the top (k, q)-norm ||•|| tn (k,q) is given explicitly by ||v|| tn (k,q) = k i=1 |v ν(i) | q 1 q , q ∈ [1, ∞[ , and ||v|| tn (k,∞) = ||v|| ∞ , (5.22b

Explicit formulation for V l

We derive explicit formulations of the sets V l in (5.19) |v ν(i) | q , (5.24) so that, from Proposition 5.4.1, we have that ||v|| tn (k,q) = v Σ k,q 1 q . First, we prove the inequality v Σ k,q + j|v ν(k+1) | q 1 q -v Σ k,q 1 q ≤ j v Σ k,q + |v ν(k+1) | q 1 q -v Σ k,q 1 q .

(5.25)

133

Chapter 5. Capra-subdifferential of the 0 pseudonorm By concavity of the function x → x 1 q (as q ≥ 1), we have that

1 j v Σ k,q + j|v ν(k+1) | q 1 q + 1 - 1 j v Σ k,q 1 q ≤ 1 j v Σ k,q + j|v ν(k+1) | q + 1 - 1 j v Σ k,q 1 q , ⇐⇒ v Σ k,q + j|v ν(k+1) | q 1 q + j -1 v Σ k,q 1 q ≤ j v Σ k,q + |v ν(k+1) | q 1 q , ⇐⇒ v Σ k,q + j|v ν(k+1) | q 1 q -v Σ k,q 1 q ≤ j v Σ k,q + |v ν(k+1) | q 1 q -v Σ k,q 1 q
.

Second, we prove the implication in (5.23) in its nonstrict inequality version. Let us assume that ||v|| tn (k+1,q) -||v|| tn (k,q) ≤ 1, ||v|| tn (k+j,q) -||v|| tn (k,q) ≤ v Σ k,q + j|v ν(k+1) | q 1 q -v Σ k,q ≤ j v Σ k,q + |v ν(k+1) | q 1 q -v Σ k,q 1 q , (from (5.25))

= j ||v|| tn (k+1,q) -||v|| tn (k,q) , (from the expression of ||•|| tn (k,q) ) ≤ j .

(by assumption)

The proof of the strict inequality version of (5.23) is analogous.

We state our second preliminary result in Lemma 5.4.3.

Lemma 5.4.3 Let v ∈ R d , q ∈ [1, ∞[ and k ∈ 0, d -1 . We have that ||v|| tn (k+1,q) -1 ≤ ||v|| tn (k,q) ⇐⇒ |v ν(k+1) | q ≤ ||v|| tn (k,q) + 1 q -||v|| tn (k,q)

q . (5.26)

Moreover, the same result holds if inequalities are strict or replaced with equalities in (5.26).

Proof. For v ∈ R d and k ∈ 0, d -1 , we have that ||v|| tn (k+1,q) -1 ≤ ||v|| tn (k,q) ⇐⇒ k i=1 |v ν(i) | q + |v ν(k+1) | q 1 q -1 ≤ ||v|| tn (k,q) , ⇐⇒ k i=1 |v ν(i) | q + |v ν(k+1) | q ≤ ||v|| tn (k,q) + 1 q , (x → x q is nondecreasing on R + ) so that finally, ||v|| tn (k+1,q) -1 ≤ ||v|| tn (k,q) ⇐⇒ |v ν(k+1) | q ≤ ||v|| tn (k,q) + 1 q -||v|| tn (k,q)

q .

The proof of the strict inequality and equality versions of (5.23) is analogous.

We now provide explicit formulations of the sets V l in (5. p + 1 q = 1. For l ∈ 0, d , let the set V l be as in (5.19). We have that

|v k |≤1 u k v k ||u|| ∞ , 1 + sup |v k |≥1 u k v k ||u|| ∞ -|v k | , ∀u ∈ R d , = d k=1 |u k | ||u|| ∞ = ||u|| 1 ||u|| ∞ , ∀u ∈ R d ,
using similar arguments as above. This proves (5.34b), and ends the proof.

Graphical visualizations and discussion

First, we provide a numerical example to illustrate the Capra-subdifferential of the 0 pseudonorm in §5.5.1. Second, we compare our expression of the Caprasubdifferential of the 0 pseudonorm with other notions of subdifferential in §5.5.2. (5.36b)

Visualization with the 2 source norm

In particular, we illustrate in Figure 5.1 the Capra-subdifferentials obtained with (5.36) in the two-dimensional case, for 0 : R 2 → N. In Figure 5.1a, we display the Capra-subdifferential of 0 at three points, covering the three possible cases in R 2 , with 0 (u) = 0 (green color), 0 (u) = 1 (red color), and 0 (u) = 2 (blue color). Then, using the same colors, we display in Figure 5.1b the Capra-subdifferential of 0 at all points in R 2 .

Discussion

We now compare the Capra-subdifferential of the 0 pseudonorm that we give explicitly in Proposition 5.4.7 with other notions of subdifferentials.

First, we recall that the standard subdifferential of convex analysis obtained with the Fenchel conjugacy is given by ∂ 0 (0) = {0} , and ∂ 0 (u) = ∅ , ∀u ∈ R d \ {0} , (5.37) following [START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF]Table 3]. Therefore, this subdifferential provides very little information about the local and global properties of 0 , except at u = 0. Second, we recall other notions of generalized subdifferentials established for the 0 pseudonorm. We refer to [START_REF] Yen | Generalized subdifferentials of the rank function[END_REF] for the definitions of the Fréchet, viscosity, proximal, Clarke and limiting subdifferentials, where the author establishes that all these notions coincide for the 0 pseudonorm, and are equal to the set-valued mapping

M : R d ⇒ R d , u → v ∈ R d v L = 0 , (5.38)
where L = supp(u), from [51, Theorems 1, 2]. We deduce that the Capra-subdifferential of the 0 pseudonorm is significantly different form previous notions of generalized subdifferentials of 0 , summarized by (5.38). In particular, we have that

0 ∈ M(u) , ∀u ∈ R d , ( 5

Conclusion

More generally, we argue that since the 0 pseudonorm displays the Capraconvex properties recalled in Proposition 5.4.8, the Capra-subdifferential is a natural object to study the local and global properties of 0 . As another example, combining the Fenchel-Young inequality in (4.3b) and the definition of the c-subdifferential in (4.5a), we obtain exact elementary Capra-convex minorants (generalizing exact affine minorants for proper lsc convex functions) of the 0 pseudonorm.

Conclusion

We have derived explicit formulations for the Capra-subdifferential of the 0 pseudonorm for the p source norms with p ∈ [1, ∞]. With these formulations, it is now possible to compute elements in such Capra-subdifferentials, that we have illustrated by a graphical representation. On top of that, we have extended previous knowledge on 0 , establishing that it is neither Capra-convex nor Capra-subdifferentiable everywhere in the limit cases where p ∈ {1, ∞}.

The formulation that we obtain differs drastically from previous notions of generalized subdifferential for the 0 pseudonorm. Whereas most other notions coincide, the Capra-subdifferential enriches this collection and provides interesting tools to study the local and global properties of 0 , in the spirit of the usual notion of subdifferential for proper lsc convex functions.

Chapter 6

Perspectives of generalized convexity in sparse optimization

Introduction

Sparse optimization search for the solutions of a problem that have as few nonzero coordinates as possible. Typically, exact sparse optimization problems involve the 0 pseudonorm introduced in Chapter 5, either in their constraints or in their objective function. In applications, this serves the handling of huge flows of data collected on complex systems. A statistical model fitted with sparse optimization captures the main variables, among thousands of others, that explain the system's behavior. Unfortunately, sparse optimization problems formulated with the 0 pseudonorm are difficult to solve in general [START_REF] Kausik | Sparse approximate solutions to linear systems[END_REF]. A common and successful practice to bypass this difficulty is to replace the original problem by a convex counterpart [START_REF] Bach | Optimization with Sparsity-Inducing Penalties[END_REF][START_REF] Hastie | Statistical learning with sparsity: the lasso and generalizations[END_REF]. In some contexts, such convex relaxation techniques even yield global optimal solutions [START_REF] Donoho | Sparse nonnegative solution of underdetermined linear equations by linear programming[END_REF]. However, this is not always guaranteed, and the interest for exact sparse formulations, or for more exact nonconvex relaxations, is still alive [START_REF] Yin | Ratio and difference of l 1 and l 2 norms and sparse representation with coherent dictionaries[END_REF][START_REF] Soubies | A continuous exact 0 penalty (CEL0) for least squares regularized problem[END_REF].

Motivated by this situation, we discuss the perspectives of generalized convexity in exact sparse optimization problems, based on the strong relationship between the 0 pseudonorm and the Capra coupling, as introduced in Chapter 5. We see possible applications for two classes of problems. For a first class of problems, we consider the minimization of 0 among elements of a constraint set. This raises the question of a general characterization for Capra-convex sets. For a second class of problems, we consider the minimization of a convex function summed with a 0 penalty. In both cases, we identify the potential c-convex property of the objective function, for a coupling c that is one-sided linear. Therefore, we discuss perspectives in numerical methods, based on the results of Chapter 4.

The chapter is organized as follows. First, in §6.2, we identify Capra-convex sets, and provide some examples of these sets. Second, in §6.3, we discuss the potential applications of generalized convexity in sparse optimization.

Capra-convex sets

By analogy with convex analysis, we provide the following definition of Capraconvex sets. Definition 6.2.1 Let |||•||| be a source norm. Let ¢ be the corresponding Capracoupling, as in Definition 5.3.1. We say that the set U ⊆ R d is Capra-convex if the indicator function δ U is a Capra-convex function, as in Definition 4.2.2.

We now identify Capra-convex sets. First, we recall background notions on sets in §6.2.1. Second, we identify Capra-convex sets in §6.2.2. Third, we provide some examples of such sets in §6.2.3.

Background on sets in convex analysis

We start with some background notions of convex analysis related to sets. For a subset U ⊆ R d , we denote by coU the convex hull of U (defined as the smallest convex subset of R d containing U ), and by coU the closed convex hull of U (defined as the closure of coU ). We recall that, if σ U denotes the support function of U as in (4.12), then σ U = σ coU (see e.g. [5,Proposition 7.13]). We pay a special attention to cones, which are subsets K ⊆ R d such that K = λu u ∈ K and λ > 0 , (6.1)

and following the terminology of [5, Definition 6.5], we say that the cone K in (6.1) is pointed if K ∩ (-K) ⊆ {0} .

Generalized convexity in sparse optimization

We identify generalized convexity properties in two classes of famous sparse optimization problems. First, in §6.3.1, we identify a class of sparse optimization problems that can be tackled by another problem with conic constraints, which suggests that in some situations, this second problem could be Capra-convex. Second, in §6.3.2, we show that for a second class of sparse problems, the objective function is c-convex, for specific coupling that we introduce. Third, in §6.3.3, we discuss numerical perspectives for both problems.

Capra-convex problems

Let |||•||| be a (source) norm on R d . We consider the corresponding Capracoupling ¢, as in Definition 5.3.1. We recall that, with a p norm as a source norm, and p ∈]1, ∞[, the 0 pseudonorm is a Capra-convex function, following Proposition 5.4.8. We have interest in optimization problems that formulate as

where A ∈ R m×d is a matrix, m ∈ N, and b ∈ R m is a vector. Problem (6.14) corresponds to the search of the sparse nonnegative solutions of a linear system, a famous problems in the sparse optimization literature (see e.g. [START_REF] Donoho | Sparse nonnegative solution of underdetermined linear equations by linear programming[END_REF][START_REF] Bruckstein | Sparse non-negative solution of a linear system of equations is unique[END_REF][START_REF] Gillis | Nonnegative Matrix Factorization[END_REF]).

To address problems of type (6. It is straightforward to see that Problem (6.15) provides a lower bound for Problem (6.13). In fact, since 0 is constant along rays, by definition of the conical hull in (6.3), we deduce that both problems have the same value. This observation suggests perspectives to Capra-convexify sparse optimization problems. In further works, we wish to identify cases for which cone(U ) is Capra-convex, by means of our characterization of Capra-convex sets in Proposition 6.2.6.

Sum-convex problems

As a second class of problems, we also pay attention to sparse optimization problems that formulate as min u∈R d f (u) + λ 0 (u) , (6.16) where f : R d →] -∞, +∞[ is a proper, lsc, convex function, and λ ≥ 0. As an example, the formulation (6.16) includes problems like min u∈R d ||Au -b|| 2 2 + λ 0 (u) , (6.17)

where A ∈ R m×d is a matrix, m ∈ N, and b ∈ R m is a vector. Problem (6.17) corresponds to a linear regression with a sparse penalty, one of the most frequent problems met in the sparse optimization litterature (see e.g. [START_REF] Bach | Optimization with Sparsity-Inducing Penalties[END_REF][START_REF] Soubies | A continuous exact 0 penalty (CEL0) for least squares regularized problem[END_REF][START_REF] Hastie | Statistical learning with sparsity: the lasso and generalizations[END_REF]). By introducing a sum coupling c ⊕ : R d × (R d ) 2 → R, defined as

c ⊕ u, (v 1 , v 2 ) = u , v 1 + ¢(u, v 2 ) , ∀u ∈ R d , ∀(v 1 , v 2 ) ∈ R 2d , (6.18)
we observe that the objective function f + λ 0 is c ⊕ -convex, following Proposition 4.2.5. Moreover, note that the coupling c ⊕ in (6.18) is one-sided linear.

Numerical perspectives

We now discuss numerical perspectives for solving Problem (6.15), when cone(U ) is Capra-convex, and Problem (6.17). Our main observation is that both problems display a c-convex objective function, in the sense of Proposition 4.2.3. Moreover, in both cases, the coupling c is one-sided linear, as in Definition 4.2.7. Therefore, we can apply the results of Chapter 4 to solve Problem (6.14) and Problem (6.17). In particular, we see two main perspectives in numerical applications.

Our first perspective lays in the possibility to apply the mirror descent algorithm with one-sided linear couplings. As in the case of the standard mirror descent algorithm, the divergence generating function κ : R d →] -∞, +∞] involved Definition 4.3.1 for the Bregman divergence is a key component for the success of the method. On top of the standard ingredients of the mirror descent method, we also need to choose a pseudometric d : (R d ) 2 → R + , inducing a generalized notion of strong convexity, as in Definition 4.3.2. We are currently working on such applications for Problem (6.15), for cases where cone(U ) is Capra-convex.

As a second perspective, we see opportunities to derive global optimality conditions for both problems. Concerning Problem (6.15), we deduce from Proposition 4.2.12 that when cone(U ) is Capra-convex, we have that u ∈ arg min u∈cone(P ) 0 (u) ⇐⇒ 0 ∈ ∂ ¢ 0 + δ cone(P ) (u) .

(6. [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF] We hope that we can exploit our formulae for ∂ ¢ 0 obtained in Proposition 5.4.7. We recall that from Proposition 4.2.11, since the coupling ¢ is OSL, we already know that ∂ ¢ 0 (u) + ∂ ¢ δ cone(P ) (u) ⊆ ∂ ¢ 0 + δ cone(P ) (u) , ∀u ∈ cone(P ) . (6.20)

Conclusion

For this, we need to further investigate the possibility to have an equality in (6.20). As for Problem (6.17 Although we have not studied the subdifferential of the sum coupling c ⊕ so far, we already know that it is related to ∂f and ∂ ¢ 0 via Proposition 4.2.6. This is also an interesting direction to explore in future works.

Conclusion

In this chapter, we have first characterized Capra-convex sets, a key step in the identification of Capra-convex optimization problems. In future works, we plan to use this characterization to identify Capra-convex sparse optimization problems of interest. We have also identified generalized convexity in sparse optimization problems featuring the sum of a convex objective function with a 0 penalty. In both cases, convexity arises from a one-sided linear coupling, which opens new perspectives in the application of the results of Chapter 4 to compute numerical solutions of these problems. Overall, we contribute to an original viewpoint on sparse optimization. We highlight that some problems possess unexpected structure, and point to interesting future research tracks.

Conclusion

We gather the contributions and the perspectives of each chapter, following the plan of the thesis.

Chapter 1. We have released the EMSx, a benchmark to attest controller techniques for microgrids composed with loads, photovoltaic generators, and an energy storage system. This benchmark is made of three constituents, namely a large dataset of observations and forecasts collected by Schneider Electric; a mathematical assessment framework; and a software. All components of the benchmark are publicly available, and we hope that it can serve other researchers in their work.

Concerning numerical results, we have tested microgrid controllers derived from standard optimal control methods, and observed that controllers based on stochastic dynamic programming induce significant gains on the EMSx benchmark. In complement to the experiments conducted so far, we believe that other scenario generation methods than the one that we have used for OLFC could be tested by experts of the field. Also, this benchmark only reflects partially the performance of an EMS deployed on a real site. As discussed with our colleagues from Schneider Electric, the modeling of the primary (or local) controller, that operates at a finer scale, would enrich the realism of the experiments. This could be the next step to take EMSx further.

Chapter 2. We have introduced a class of parametric multistage stochastic optimization problems, a solution of which is given by stochastic dynamic programming, using parametric value function. Studying further the properties of such parametric value function, we have identified key hypotheses of convexity and of differentiability, that guarantee the existence of their gradients. When such gradients are well-defined, we have obtained formulae to compute them by backward induction, following the dynamic programming principle. When the differentiability assumption breaks, we have proposed two approximation methods for the parametric value functions, one based on smooth lower approximations via the Moreau envelope, and one based on polyhedral lower approximations via the SDDP algorithm. In the first case, we retrieve a favorable context, and we compute gradients. In the second case, we obtain subgradients from our polyhedral approximations.

We believe that interesting further contributions reside in numerical applications, to understand better the strengths and weaknesses of both approximation schemes. Such contributions are initiated in Chaptre 3.

Chapter 3. In this chapter, we have conducted two experiments, inspired by the context of a solar plant constrained by day-ahead power commitment rules.

The first experiment is a natural test case to challenge numerically the methods developed in Chapter 2. We find that our new method based on smooth lower approximations of parametric value functions outperforms the polyhedral method based on SDDP in term of computing time. We look forward to see how such results generalize to other test cases. In particular, for our class of parametric problems, the smooth method's complexity is sensitive to the dimension of the state, as state spaces are discretized. The polyhedral method should be more resilient to an augmentation in the number of state variables.

The second example introduces a numerical challenge to evaluate solar plant controllers mixing day-ahead and intraday sequential decisions, for a horizon of one year. In the spirit of the EMSx benchmark, we introduce controllers based on the results of Chapter 1 and Chapter 2. We find that intraday controllers based on stochastic dynamic programming yield up to 11.6% of gains compared to state-of-the-art controllers. The role of the day-ahead controller seems less impacting on the problem that we consider. We look forward to see how our conclusions generalize to other contexts, especially in cases where not only power generation but also energy prices display stochasticity.

Chapter 4. We have gathered and extended the main properties of the socalled one-sided linear (OSL) couplings. Then, pushing further the resemblance with the usual convex analysis world, we have extended the notion of Bregman divergence for OSL couplings, that we have used to introduce an extension of the mirror descent algorithm with OSL couplings. This appears as a new contribution to the algorithmic toolbox of generalized convexity.

With additional time, we wish to try our algorithm to compute numerical solutions of the generalized convex problems related to some OSL coupings highlighted in Chapter 6.

Chapter 5. It was already known that the Capra (constant along primal rays) coupling is a well-suited coupling to handle the 0 pseudonorm. In particular, under a judicious choice of source norm employed in the definition of this coupling, 0 is Capra-convex and Capra-subdifferentiable. We have computed explicitly these Capra-subdifferentials, and proposed some visualizations for a particular example in R 2 . We have also proved that 0 is not Capra-convex in the case where the source norm is the p norm with p ∈ {1, ∞}.

In term of future work, we wish to exploit the possibility offered by the properties of OSL coupings outlined in Chapter 4 to derive applications to the Capra-convex sparse optimization problems identified in Chapter 6. Chapter 6. In this last chapter, we have obtained an explicit characterization of Capra-convex sets, in the case where the source norm is the p norm with p ∈]1, ∞[. Then, we have listed some perspectives in the application of the results of Chapter 4 and Chapter 5 in sparse optimization.

As for future research tracks, we have identified two main directions. First, we would like to push further the identification of Capra-convex problems in sparse optimization. Second, for generalized convex problems of interest arising in sparse optimization, we wish to explore the application of the mirror descent

  Version française . . . . . . . . . . . . . . . . . . . . . . . . . . . . . English version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1. 1 .

 1 Introductioncontrollers on an open, transparent and unified challenge.

1. 2 .Figure 1 . 1 :

 211 Figure 1.1: Examples of daily chronicles (1.1)

Figure 1 . 2 : 20 1. 3 .

 12203 Figure 1.2: RMSE of the net demand forecast (Y -axis) over the pool of 70 sites, ranked in increasing order of forecast error along the X-axis

Figure 1 . 3 :

 13 Figure 1.3: Schematic microgrid model

Figure 1 . 5 :

 15 Figure 1.5: Detail of the Information type from the EMSx.jl package

  3.1, with a new dynamics ft , new constraints Ũ, and a new 1.5. Numerical experiments stage cost Lt as follows, for all t ∈ {0, . . . , T -1}: xt

Figure 1 . 6 :

 16 Figure 1.6: Gain G i (φ i ) (Y -axis) in (1.17) per sites i ∈ I (Yaxis) of MPC, OLFC-50, SDP and SDP-AR (1); sites are ranked in increasing order of RMSE along the X-axis

  Figures 1.6 and 1.7.

Figure 1 . 7 :

 17 Figure 1.7: Gains (Y -axis) per sites i ∈ I (X-axis): the upper bound (dashed line) is the quantity G i in (1.18a); the horizontal dotted and dashed line represents the null gain of the dummy controller; the other symbols represent the quantities G i (φ i ) in (1.17) corresponding to the four methods SDP-AR (1), SDP , OLFC-50, MPC; sites are ranked in increasing order of gain G i along the X-axis

Figure 1 . 8 :

 18 Figure 1.8: Performance score G i (φ i ) per sites i ∈ I for the SDP-AR (1) and OLFC-50 computation methods (X-axis) versus RMSE (Y -axis); the vertical line recalls the baseline score positioning of a dummy controller

Figure 1 . 9 :

 19 Figure 1.9: Example of scenarios generated from a 24 hours net demand forecast

Example 2 .

 2 3.8 (from[5], Remark 16.8) Let Ψ(x, u) = δ B (x, u) be defined on R 2 as the indicator function of the Euclidean unit ball B. The marginal function in

Lemma 2 . 5 . 3

 253 Under the discrete white noise Assumption 2.2.2, the convex multistage problem Assumption 2.4.2 and the parameter set Assumption 2.5.1, we have that • the data of the parametric value functions {V t } t∈ 0,T defined in (2.44) satisfy the feasibility assumption as defined in Definition 2.4.1,

  Moreau envelope. Next, we recall the definition of the Moreau envelope, also known as the Moreau-Yosida regularization [65, 100]. Definition 2.5.4 Let n ∈ N * , let f : R n → R be an extended real valued function and µ ∈ R * + be a regularization parameter. The Moreau envelope of f is the function

Lemma 2 . 5 . 5

 255 Let µ ∈ R * + be a regularization parameter. Under the convex multistage problem Assumption 2.4.2 and the parameter set Assumption 2.5.1,

Contents 3 . 1 76 3. 3 . 1 76 3. 3 . 2 79 3. 3 . 3 82 3. 4 88 3. 4 . 1

 317631763279338248841 Introduction . . . . . . . . . . . . . . . . . . . . . . . 71 3.2 Solar plant microgrid management model . . . . . . 73 3.3 Stochastic optimization of the day-ahead commitment profile . . . . . . . . . . . . . . . . . . . . . . . . Problem statement . . . . . . . . . . . . . . . . . . . Resolution methods . . . . . . . . . . . . . . . . . . Numerical experiments . . . . . . . . . . . . . . . . . Co-optimization of day-ahead commitment profiles and intraday microgrid controls . . . . . . . . . . . . Regulatory rules for non-interconnected zones . . . . 88 3.4.2 Assessing a solar plant controller . . . . . . . . . . . 90 3.4.3 Controller models . . . . . . . . . . . . . . . . . . . . 92 3.4.4 Numerical experiments . . . . . . . . . . . . . . . . . 98 3.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 104 3.A Appendix . . . . . . . . . . . . . . . . . . . . . . . . . 105 3.A.1 Detailed performances for all methods instances . . . 105 3.A.2 Regularized stage cost . . . . . . . . . . . . . . . . . 107

Figure 3 Figure 3 . 1 :

 331 Figure 3.1: Schematic organization of the solar power plant

3. 3 .

 3 Stochastic optimization of the day-ahead commitment profile Finally, we approximate a solution of Problem (3.24) by solving the convex smooth optimization problem min p∈P V µ 0 (x 0 , p) , (3.28)

Figure 3 . 2 :

 32 Figure 3.2: Stage cost L t (x, u, w, •) in (3.21a) and partial Moreau envelopes L µ t (x, u, w, •) in (3.26) for µ = 100, µ = 1000, for a fixed value of pt+1 = α t x g + β t + w -u = 600kW, a stage t ∈ T off , and λ = 2

1

 1 MWh, v b = -v b = 1 MW, and ρ c = ρ d = 0.95 for the battery parameters (s, v b , v b , ρ c , ρ d ) in (3.4); c = 0.4 e and c = 0.6 e for the energy price in (3.10a); and λ = 2 for the penalty cost in (3.20).

Figure 3 . 3 :

 33 Figure 3.3: Example of 5 daily scenarios of generated power g t in (3.7), data from Ausgrid

3. 3 .

 3 Stochastic optimization of the day-ahead commitment profile cost V 0 (x 0 ) in (3.32) is lower than 1.7%. In the following discussion, we focus on Figure 3.4 and Figure 3.5. Additional details on numerical performances are given in Appendix 3.A.1.

Figure 3 . 4 :

 34 Figure 3.4: Estimate of Φ(p * ) ∈ [V 0 (x 0 ), V 0 (x 0 )] in (3.33) (marker span on the Y -axis) for instances of µSDP+IPM (in blue), µSDP+PGD (in orange) and kSDDP+PSM (in green); and average computing time per oracle call for the computation of p * (X-axis in log scale). For both axis, the lower the values the better

Figure 3 . 5 :

 35 Figure 3.5: Estimate of Φ(p * ) ∈ [V 0 (x 0 ), V 0 (x 0 )] in (3.33) (marker span on the Y -axis) for instances of µSDP+IPM (in blue), µSDP+PGD (in orange) and kSDDP+PSM (in green); and overall computing time for the computation of p * (Xaxis in log scale). For both axis, the lower the values the better

)

  |p d,t -p d,t+1 | ≤ 0.15 × p , ∀t ∈ T on , ∀d ∈ D . (3.36b) All together, the constraints (3.35a)-(3.36b) define the set of admissible profiles P ⊆ R T . (3.37) Penalty cost. Management costs are computed based on the energy price c t in (3.10a), on the energy cost J e t in (3.11b), and on the penalty cost J p t in (3.11c). At step t ∈ 0, T -1 , the formulation of the penalty cost J p t in (3.11c) involves the tolerance bounds b

  c d,t+1 only impacts the management cost in (3.43a) at the stage cost of the time interval [t, t+1[, as neither the dynamics of the state of charge s d,t in (3.43e)-(3.43g), nor the commitment and battery policies in (3.43b)-(3.43c) take v c d,t+1 as an argument. In other words, we can safely choose v c d,t+1 for [t, t+1[ without consequences on future costs. Then, we distinguish two cases, (i) if g d,t+1 -v b d,t ≤ b(p d,t ), overproduction is avoided regardless the value of v c d,t+1 and we set v c d,t+1 = 0 to minimize the energy cost J e t in (3.11b);

Figure 3 . 6 :

 36 Figure 3.6: Stage cost L d,t (x, u, w, •) in (3.62) and partial Moreau envelopes L µ d,t (x, u, w, •) in (3.63) for µ = 100, µ = 1000, for fixed values of ĝt+1 d,0 = 300kW, x = (0.5, 0), u = -200kW, w = 0, and a stage t ∈ T on

  and the curtailment policies ψ * d,t in (3.42b) are given in (3.46). Deterministic optimization based day-ahead controller. We introduce a day-ahead controller π Det as in (3.40a) based on a deterministic optimization problem. For every day d ∈ D, based on the initial partial forecast {ĝ t d,0 } t∈ 1,T in (3.39c), we define the commitment policy π Det d as in (3.40b) by π Det d (s d,0 , h d,0 ) ∈ arg min

Table 3 . 1 :Figure 3 . 7 :

 3137 Figure 3.7: Relative gain G (π µ,Sto , φ, ψ * ), {h d } d∈D -G (π Det , φ, ψ * ), {h d } d∈D (Y -axis), where G in (3.44), displayed day by day for d ∈ D (X-axis), for both φ = φ Det in (3.69), Figure 3.7a, and φ = φ Sto in (3.67), Figure 3.7b

Figure 3 . 8 :Figure 3 . 9 :

 3839 Figure 3.8: Managing data of 31/07/2015: committed power p d,t in (3.3a), tolerance bounds (b, b) in (3.38), and delivered power pd,t in (3.9) for controllers (π Det d , φ Sto d,t ) (Figure 3.8a) and (π µ,Sto d , φ Sto d,t ) (Figure 3.8b); state of charge s t in (3.4a) for both controllers (Figure 3.8c); initial forecast ĝt d,0 in (3.39c) and observed generated power g d,t in (3.7) (Figure 3.8d)

Contents 4 . 1

 41 Introduction . . . . . . . . . . . . . . . . . . . . . . . 111 4.2 Couplings and Fenchel-Moreau conjugacies . . . . . 113 4.2.1 Background on couplings and conjugacies . . . . . . 113 4.2.2 The sum coupling . . . . . . . . . . . . . . . . . . . 115 4.2.3 One-sided linear couplings (OSL couplings) . . . . . 116 4.3 The Bregman divergence with OSL couplings . . . 120 4.3.1 The Bregman divergence with couplings . . . . . . . 120 4.3.2 The Bregman divergence with OSL couplings . . . . 122 4.4 The mirror descent algorithm with OSL couplings . 123 4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 126

Definition 4 . 2 . 1

 421 The c-Fenchel-Moreau conjugate of a function f : U → R, with respect to the coupling c in (4.1), is the function f c : V → R defined by

Definition 4 . 2 . 2

 422 We say that a function f : U → R is c-convex if it is the pointwise supremum of c-elementary functions, defined by (4.4).

  We introduce a general definition for the Bregman divergence with couplings, extending the usual definition given in [6, Definition 9.2]. Definition 4.3.1 Let W and V be two sets, and let c : W × V → R be a finitevalued coupling. Let κ : W →] -∞, +∞] be a proper (divergence generating) 4.3. The Bregman divergence with OSL couplings function. We define the c-Bregman divergence associated with κ as the function

  .16b) Note that, from Remark 4.2.13, the term κ(w ) in (4.16b) is always finite, as ∂ c κ(w ) = ∅. The choice of the divergence generating function 3 κ in Definition 4.3.1 plays an important role in the properties of the Bregman divergence D c κ in (4.16b). In particular, we pay a specific attention to the notion of strong convexity, extended to c-convex functions. Definition 4.3.2 Let W and V be two sets. Let c : W × V → R be a coupling, and d : W 2 → R + be a pseudometric. The function f : W → R is said to be c-strongly convex with respect to the pseudometric d if

Proposition 4 . 3 . 3

 433 Let D c κ be the c-Bregman divergence associated with κ, as in Definition 4.3.1. We have the following properties

( 4 .

 4 18b) Moreover, if the function κ : W →] -∞, +∞] is c-strongly convex with respect to the pseudometric d : W 2 → R + (as in Definition 4.3.2), then we have that D c κ (w, w , v ) ≥ d(w, w ) 2 , ∀(w, w ) ∈ W × dom(∂ c κ) , ∀v ∈ ∂ c κ(w ) . (4.19)

Proposition 4 .

 4 3.3 extends some basic properties of the usual Bregman divergence found in[START_REF] Beck | First-order methods in optimization[END_REF] Lemmas 9.4, 9.11] to the general context of couplings.

  by definition of the c-subdifferential in (4.5b)) = h(w * ) -c(w * , v ) + c(w * , v * ) -c(w, v * ) , ∀w ∈ W . (as c is OSL) Second, we prove (4.21). From (4.15c), κ(w ) is finite. Besides, we observe that h(w * ) + D c κ (w * , w , v ) ≤ h(w ) + D c κ (w , w , v ) , (from (4.20a)) = h(w ) , (by definition of D c κ in (4.16b)) < +∞ , (as w ∈ domh)

Definition 4 . 4 . 1 Chapter 4 .

 4414 Let W be a set and V be a vector space. Let c : W × V → R be a one-sided linear coupling as in Definition 4.2.7, d : W 2 → R + be a pseudometric and ϕ : V → R be a function. The coupling c is said to be ϕ-Lipschitz with respect to the pseudometric d ifc(w, v) -c(w , v) ≤ ϕ(v)d(w, w ) , ∀(w, w ) ∈ W 2 , ∀v ∈ V . (4.22)Second, we prove our main result.123 Mirror descent with one-sided linear (OSL) couplings Theorem 4.4.2 Let W be a set and V be a vector space. Let f : W →] -∞, +∞] be a proper function, and let W ⊆ W be a constraint set such that domf ∩ W = ∅. We consider the optimization problem min w∈W f (w) . (4.23a) We suppose that there exists w * ∈ arg min w∈W f (w) , (4.23b) and we denote f * = f (w * ) = min w∈W f (w) ∈ R . (4.23c) Let d : W 2 → R + be a pseudometric. Let c : W × V → R be a one-sided linear coupling as in Definition 4.2.7, supposed to be ϕ-Lipschitz with respect to the pseudometric d (as in Definition 4.4.1), where ϕ : V → R. Let κ : W →] -∞, +∞] be a proper (divergence generating) function, such that W ⊆ dom(∂ c κ), and that κ + δ W is c-strongly convex with respect to the pseudometric d (as in Definition 4.3.2).

  .4b) It will be convenient to express this notion of |||•|||-duality in terms of geometric objects of convex analysis. For this purpose, we recall that the normal cone N C (u) to the (nonempty) closed convex subset C ⊆ R d at u ∈ C is the closed convex cone defined by[START_REF] Hiriart-Urruty | Fundamentals of convex analysis[END_REF] Definition 5.2.3]

  for the p source norms |||•||| = ||•|| p , when p ∈ [1, ∞]. We start with two preliminary results. We state our first preliminary result in Lemma 5.4.2.Lemma 5.4.2 Let v ∈ R d , q ∈ [1, ∞[ and k ∈ 0, d -1 . We have that ||v|| tn (k+1,q) -||v|| tn (k,q) ≤ 1 =⇒ ||v|| tn (k+j,q) -||v|| tn (k,q) ≤ j , ∀j ∈ 1, d-k . (5.23)Moreover, the same result holds if inequalities are strict in(5.23).Proof. Let v ∈ R d and ν denote a permutation of 1, d such that |v ν(1) | ≥ . . . ≥ |v ν(d) |, let be q ∈ [1, ∞[, k ∈ 0, d -1 and j ∈ 1, d -k . We denote v Σ k,q = k i=1

  5.24) and |vν(k+1) | ≥ |v ν(k+2) | ≥ . . . ≥ |v ν(k+j) |)

  [START_REF] Zhihao Cen | Sensitivity analysis of energy contracts management problem by stochastic programming techniques[END_REF] for the p source norms |||•||| = ||•|| p , when p ∈ [1, ∞]. Proposition 5.4.4 Let the source norm be the p norm |||•||| = ||•|| p , where p ∈ [1, ∞], and let q ∈ [1, ∞] be such that 1

First, we consider p = 1 .||u|| 1 -= 1 ,

 111 From (5.35) and(5.22b),¢ 0 (v) = max j=1,...,d ||v|| ∞ -j + = ||v|| ∞ -1 + , ∀v ∈ R d , and thus, ||v|| ∞ , ∀u ∈ R d , ∀u ∈ R d \ {0} , since sup ||v||∞≤1 u , v = ||u|| 1 , by ||•|| 1 = ||•|| ∞ * , and u , v ≤ ||u|| 1 ||v|| ∞ , byHölder's inequality. This proves (5.34a). Second, we consider p = ∞. From (5.35) and (5.22b), for v ∈ R d and ν a permutation of 1,d such that |v ν(1) | ≥ . . . ≥ |v ν(d) |, ¢ 0 (v) = max j=1,...,d j k=1 |v ν(k) | -j + = d k=1 (|v ν(k) | -1)1 |v ν(k) |≥1 , ∀v ∈ R d , and thus, ¢¢ 0 (u) = sup v∈R d u , v ||u|| ∞ -d k=1 (|v ν(k) | -1)1 |v ν(k) |≥1 , ∀u ∈ R d , (from (4.2d)) u k v k ||u|| ∞ -(|v k | -1)1 |v k |≥1 , ∀u ∈ R d ,

5 . 5 .v

 55 As a numerical example, we compute the Capra-subdifferential of 0 for the 2 source norm |||•||| = ||•|| 2 . According to Proposition 5.4.7, we have that ∂ ¢ 0 (0) = B ||•||∞ , (5.36a) Graphical visualizations and discussion and for u = 0, v ∈ R d , denoting l = 0 (u), L = supp(u), and ν a permutation of 1, d such that |v ν(1) | ≥ . . . ≥ |v ν(d) |,v ∈ ∂ ¢ 0 (u) L = λu , λ ≥ 0 , |v j | ≤ min i∈L |v i | , ∀j / ∈ L , |v ν(k+1) | 2 ≥ ||v|| tn (k,2) + 1 2 -||v|| tn (k,2)2 , ∀k ∈ 0, l -1 , |v ν(l+1) | 2 ≤ ||v|| tn (l,2)

. 39 ) 1 u 2 (Figure 5 . 1 :

 391251 Figure 5.1: Capra-subdifferential of the 0 pseudonorm in R 2 with the 2 source norm |||•||| = ||•|| 2 , illustrated for three points (Figure 5.1a) and for all points in R 2 (Figure 5.1b)

Contents 6 . 1

 61 Introduction . . . . . . . . . . . . . . . . . . . . . . . 145 6.2 Capra-convex sets . . . . . . . . . . . . . . . . . . . . 146 6.2.1 Background on sets in convex analysis . . . . . . . . 146 6.2.2 Characterization of Capra-convex sets . . . . . . . . 147 6.2.3 Examples with the 2 source norm . . . . . . . . . . 150 6.3 Generalized convexity in sparse optimization . . . . 153 6.3.1 Capra-convex problems . . . . . . . . . . . . . . . . 153 6.3.2 Sum-convex problems . . . . . . . . . . . . . . . . . 153 6.3.3 Numerical perspectives . . . . . . . . . . . . . . . . . 154 6.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 155

6 . 3 .

 63 be constructed from any subset U ⊆ R d , by means of the conical hull of U , defined in [5, Definition 6.1] as cone(U ) = λu u ∈ U , λ > 0 , (6.3) and of the positive hull of U , defined in [82, Chapter 3, §G] as pos(U ) = cone(U ) ∪ {0} = λu u ∈ U , λ ≥ 0 . (6.4) Generalized convexity in sparse optimization

min u∈R d 0

 0 (u) , s.t. u ∈ U ,(6.13) where the set U ⊆ R d is a constraint set. As an example, the formulation (6.13) includes problems likemin u∈R d 0 (u) , s.t. Au = b , u ≥ 0 ,

  [START_REF] Bezanson | Julia: A fast dynamic language for technical computing[END_REF], we propose to consider the problemmin u∈R d 0 (u) , s.t. u ∈ cone(U ) . (6.15)

  ), Proposition 4.2.11 gives that u ∈ arg minu∈R d f + λ 0 (u) ⇐⇒ 0 ∈ ∂ c ⊕ f + λ 0 (u) . (6.21)

  Given a sequence (w 1 , . . . , w T ) of uncertainties and a sequence (u 0 , . . . , u T -1 ) of controls, we obtain the total operating cost

	1.3. The EMSx benchmark mathematical formulation
	where (p + t , p -t ) is the energy tariff (buying at price p + t and selling at price p -t )
	applied during the time interval [t, t+1[.
	∀t ∈ {1, . . . , T }	(1.10)
	which represent a couple of photovoltaic generation g t and of energy demand d t .
	As defined, uncertainties are exogenous model variables. When we turn to
	numerical experiments in §1.5, sequences (w 1 , . . . , w T ) ∈ R 2×T of uncertainties
	are obtained as samples from the historical observations of §1.2.2.
	Costs. We now turn to the management costs. The stage cost during the
	time interval [t, t+1[ is
	L t (u t , w t+1 ) = p + t • e + t+1 -p -t • e -t+1 , ∀t ∈ {0, . . . , T -1} ,	(1.11a)
	where
	e t+1 = d t+1 -g t+1 + u t , ∀t ∈ {0, . . . , T -1} ,	(1.11b)
	is the energy exchanged with the grid -which, like the uncertainty (g t+1 , d t+1 ),
	materializes at the end of the time interval [t, t+1[, hence the index t+1 -and

Table

  , (1.23b) and (1.26b).

		Performance	Offline time	Online time
		score	(seconds)	(seconds)
	MPC	0.487	-	9.82 10 -4
	OLFC-10	0.506	-	1.14 10 -2
	OLFC-50	0.513	-	8.62 10 -2
	OLFC-100	0.510	-	1.87 10 -1
	SDP	0.691	2.67	3.09 10 -4
	SDP-AR(1)	0.794	38.1	4.44 10 -4
	SDP-AR(2)	0.795	468	5.55 10 -4
	Upper bound 1.0	-	-

  Introduction . . . . . . . . . . . . . . . . . . . . . . .

	Chapter 2
	Differentiability of parametric
	value functions in multistage
	stochastic optimization
	Contents
	2.1

2.2 Parametric multistage stochastic optimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Problem formulation . . . . . . . . . . . . . . . . . . 2.2.2 Parametric value functions . . . . . . . . . . . . . . . 2.3 Background on marginal functions . . . . . . . . . . 2.3.1 Directional derivatives . . . . . . . . . . . . . . . . . 2.3.2 Subdifferential . . . . . . . . . . . . . . . . . . . . . 2.3.3 Dual problem . . . . . . . . . . . . . . . . . . . . . . 2.3.4 Further first order information results . . . . . . . . 2.4 Convex differentiable parametric value functions . 2.4.1 Convex value functions . . . . . . . . . . . . . . . . . 2.4.2 Gradient of a convex differentiable parametric value function . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Convex nondifferentiable parametric value functions 2.5.1 Lower smooth approximation . . . . . . . . . . . . . 2.5.2 Lower polyhedral approximation . . . . . . . . . . . 2.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . .

  complement to Theorem 2.3.4, we state a result relating the subdifferential ∂ψ of the marginal function ψ in (2.23a), the partial subdifferential ∂ x Ψ of the bivariate function Ψ in (2.14a), and the projected subdifferential proj X (∂Ψ). The following result is essentially a corollary of Theorem 2.3.4. Under the assumptions of Theorem 2.3.4, for any u

	Corollary 2.3.6

* ∈ U * (x), we have that ∂ψ

  .37c) We say that the set-valued mapping U t is closed if its graph gr(U t ) is a closed set, and that it is convex if gr(U t ) is a convex set. . the cost functions {L t } t∈ 0,T -1 in (2.9a) are jointly convex and lsc in their state, control and subparameter arguments, and are proper, and the final cost K in (2.9b) is convex, proper, lsc, 3. the dynamics {f t } t∈ 0,T -1 in (2.8) are affine in their state and control arguments, 4. the set-valued mappings {U t } t∈ 0,T -1 in (2.6) are closed, convex, and have nonempty domains and compact ranges. Proposition 2.4.3 Under the discrete white noise Assumption 2.2.2 and the convex multistage problem Assumption 2.4.2, the parametric value functions {V t } t∈ 0,T defined in (2.10) and the Q-functions {Q t } t∈ 0,T -1 defined in (2.12) are convex, proper, lsc.

	Assumption 2.4.2 (convex multistage problem) We assume that

1. the data of the parametric value functions {V t } t∈ 0,T defined in (2.10) satisfy the feasibility assumption as defined in Definition 2.4.1, 2

  Since moreover the function Q t is proper, we obtain that V t > -∞, and from the feasibility assumption in Assumption 2.4.2, there exists

x, u, p) + δ gr(Ut) (x, u, p t ) .

(2.38)

Since the set-valued mapping U t is convex, the set gr(U t ) is convex, so that the set range(U t ) = proj R nu (gr(U t )) is convex and the function Q t + δ gr(Ut) is convex, which proves that the function V t is convex. Moreover, the set gr(U t ) is closed, so that the function Q t + δ gr(Ut) is lsc, and since the set range(U t ) is compact, by application of Theorem 2.3.1, the function V t is lsc, and the infimum in (2.38) is attained.

  2.4. Convex differentiable parametric value functions Assumption 2.4.4 (smoothness) We assume that 1. the cost functions {L t } t∈ 0,T -1 and K in (2.9) are differentiable with respect to their subparameter argument p t in (2.3b), 2. for all t ∈ 0, T -1 , the set-valued mapping U t in (2.6) is constant with respect to its subparameter argument p t in (2.3b), i.e. it takes the same set value for all p t ∈ R np ; in that case, we use the notation U t (x) instead of U t (x, p t ). Under the discrete white noise Assumption 2.2.2, the convex multistage problem Assumption 2.4.2 and the smoothness Assumption 2.4.4, the value functions {V t } t∈ 0,T defined in (2.10) are differentiable with respect to their parameter argument, and their gradients may be computed by backward induction, with, at stage T ,

	We now state our main result.
	Theorem 2.4.5

  x, u, p) + δ gr(Ut) (x, u, p t ) + δ Pt (p t ) , (by definition of the range and the graph in (2.37) and from δ Pt (p t ) = 0)E L t (x, u, W t+1 , p t ) + V t+1 f t (x, u, W t+1 ), p , (by definition of U t in (2.42), L t in (2.43) and Q t in (2.12a)) = V t (x, p) .(since V t+1 satisfies (2.46))In the case where p i / ∈ P i for some i ∈ t, T , V t (x, p) = +∞ as either L t (•, •, •, p t ) or V t+1 (•, p) is equal to +∞. This ends the proof.

	=	inf
		u∈U t (x,pt)

  1 2µ ||p t -p t || 2 2 is jointly convex and lsc in (x, u, p t , p t ), and is proper. Therefore, from [82, Proposition 2.2], the marginal function L µ t in (2.48) is convex in (x, u, p t ). Moreover, by definition of the cost function L t in (2.43), the infimum in (2.48a) can be restricted to p t ∈ P t . Since the function proj t in (2.3c) is linear and, from Assumption 2.5.1, the set P is compact, then the set P t in (2.41) is compact. It follows from Theorem 2.3.1 that the marginal function L µ t in (2.48) is lsc in (x, u, p t ), and that the infimum in (2.48a) is attained. Last, since the infimum in (2.48a) is attained and since, from Lemma 2.5.3, L t is proper, we have that L µ t is proper. The proof for K µ is analogous. • From Lemma 2.5.3, the partial functions {L t (x, u, w, •)} t∈ 0,T -1 and K (x, •) are convex, proper, lsc, so that the Moreau envelopes {L µ t (x, u, w, •)} t∈ 0,T -1 in (2.48a) and K µ (x, •) in (2.48b) are differentiable, from [5, Proposition 12.30].

  from Proposition 2.5.2)• From Lemma 2.5.3, for t ∈ 0, T -1 , the set-valued mapping (x, p t ) → range(U t ) = U t (x, p t ) satisfies the hypotheses of Assumption 2.4.2. Similarly, from Lemma 2.5.5, the cost functions {L µ t } t∈ 0,T -1 and K µ in (2.48) satisfy the hypotheses of Assumption 2.4.2. Last, since the data of the parametric value functions {V t } t∈ 0,T defined in (2.44) satisfy the feasibility assumption as in Definition 2.4.1, so do the data of the lower smooth value functions { V µ t } t∈ 0,T , given that dom(L t ) ⊆ dom(L µ t ), from the definition of L µ t in (2.48a), and dom(V t ) ⊆ dom( V µ t ), from V µ t ≤ V t as discussed in the first point of this proof. Then, it follows from Proposition 2.4.3 that the functions { V µ t } t∈ 0,T are convex, proper, lsc. • Using again Lemma 2.5.3 and Lemma 2.5.1, we see that the constraints and the cost functions in the definition of { V µ t } t∈ 0,T in (2.49) satisfy the hypotheses of the smoothness Assumption 2.4.4, so that the result follows by application of Theorem 2.4.5 to the functions { V µ t } t∈ 0,T .

  Moreover, the nondecreasing sequences {L µn t } n∈N and { V µn t+1 } n∈N converge pointwise respectively to L t in (2.43), from the properties of the Moreau envelope (see [5, Proposition 12.33(ii)]), and to V t+1 , following our assumption, so that sup n∈N Q µn

						. From the properties
	of the Moreau envelope, the sequence {L µn t } n∈N in (2.48a) is nondecreasing, and from Lemma 2.5.5, each function L µn t is lsc. Similarly, by assumption, the sequence { V µn t+1 } n∈N is nondecreasing, and from Proposition 2.5.6, each function V µn t+1 is lsc. It follows that (i) { Q µn t (x, •, p)} n∈N is nondecreasing; and since the expectation above is
	finite, and range(U t ) is compact from Assumption 2.4.2, hence closed, (ii) each func-tion Q µn t is lsc. Therefore, from [82, Proposition 7.4(d)], we have the epiconvergence
	Q µn t (x, •, p)	e -----→ n→+∞	sup n∈N	lsc Q µn t	(x, •, p) = sup n∈N	Q µn t (x, •, p) .
	Therefore, by application of [82, Theorem 7.33], we have the convergence
	inf
	u∈range(Ut)

t (x, •, p) = Q t (x, •, p) + δ range(Ut) ,

from the expression of Q t in (2.45). As a second step, we show that (2.53) holds at stage t. Since dom( Q µn t (x, •, p)) ⊆ range(U t ), where range(U t ) is compact from Assumption 2.4.2, hence bounded, the sequence { Q µn t (x, •, p)} n∈N is eventually level-bounded (see [82, Exercice 7.32(a)]).

  n∈N converges pointswise and epiconverges to V 0 in(2.44). Moreover, under Assumption 2.5.1, δ {x 0 }×P is lsc. It follows from[START_REF] Rockafellar | Variational analysis[END_REF] Proposition 7.46] that { V µn 0 + δ {x 0 }×P } n∈N epiconverges to V 0 + δ {x 0 }×P = V 0 + δ {x 0 }×P ,from Proposition 2.5.2. Then as dom( V µn 0 + δ {x 0 }×P ) ⊆ 64 2.5. Convex nondifferentiable parametric value functions {x 0 } × P is bounded, the sequence { V µn 0 + δ {x 0 }×P } n∈N is eventually level-bounded (see [82, Exercice 7.32(a)]). Therefore, by application of [82, Theorem 7.33], we have the convergence inf

	p∈P

.

[START_REF] Lohndorf | Modeling time-dependent randomness in stochastic dual dynamic programming[END_REF]

Proof. From Proposition 2.5.7, the sequence { V µn 0 }

  Properties of Problem(3.24). First, we discuss the convexity properties of Problem(3.24). We consider solving Problem(3.24) under the discrete white noise Assumption 2.2.2, and the model components introduced in §3.3.1 satisfy the convex multistage problem Assumption 2.4.2. In particular, the feasibility assumption of Definition 2.4.1 is fulfilled, with e.g. (x, p) ∈ [0, 1] × [0, p] × P and u = 0. It follows that, from Proposition 2.4.3, the parametric value functions {V t } t∈ 0,T are convex, proper, lsc. Therefore, we deduce from (3.25) that the intraday value function Φ is convex, and since the set P in (3.23) is convex, Problem (3.24) is a convex optimization problem. Second, we discuss the differentiability properties of the objective function Φ in Problem (3.24). For all t ∈ 0, T -1 , the cost function L t defined in (3.21a) is nondifferentiable with respect to the committed power p t in (3.3a). More precisely, we observe that the cost functions of the multistage Problem (3.22b)-(3.22f) are polyhedral, due to the term J p t in (3.20), and that the constraints Chapter 3. Day-ahead and intraday co-optimization of a renewable power plant with storage capacity are linear. In this context, the parametric value functions {V t } t∈ 0,T are polyhedral (see e.g. arguments given in [87, §3.2.1]). It follows that the intraday value function Φ in Problem (3.24) is nondifferentiable. Therefore, we turn to the lower approximation techniques developed in §2.5 to compute numerical solutions of Problem (3.24). smooth approximation. We introduce smooth approximations of the stage costs {L t } t∈ 0,T -1 in (3.21a) by means of the Moreau envelope, following the methodology developed in §2.5.1. However, we simplify the smoothing procedure by omitting the indicator functions δ gr(Ut) and δ Pt in the reformulation of the stage costs as in (2.43a). Concerning δ gr(Ut) , we argue that there is no need to move the constraints induced by the set-valued mappings {U t } t∈ 0,T -1 in (3.18) to the new cost functions, since the values taken by U t in (3.18) do not depend on the committed power p t in (3.3a). Thus, we only need to regularize the stage costs {L t } t∈ 0,T -1 in (3.21a) to fulfill the smoothness Assumption 2.4.4. As for δ Pt , the compactness of P t serves the proof of Lemma 2.5.5 in the general formulation, the result of which can be proved here equivalently thanks to the coercivity of the stage costs {L t } t∈ 0,T -1 in (3.21a) with respect to p t . The partial Moreau envelope of the stage cost with respect to the committed power p

	Lower
	.25)
	following the discussion of §2.2.2. We now outline the properties of Prob-
	lem (3.24) and introduce two families of resolution methods, based on the work
	of Chapter 2.

t is given, for a regularization parameter µ ∈ R * + , by

  ) which, as opposed to the value functions in(3.64), only take the state variable x in (3.53) as argument, since the committed profile p d in (3.3b) has been fixed day-ahead. Then, we define the stochastic optimization based intraday controller (φ Sto , ψ * ) as in (3.41a) and (3.42a), where each battery policy φ Sto

	d,t
	in (3.41b) is given by

φ Sto d,t (s d,t , h d,t ) ∈ arg min u∈Ut(x,p d,t )

Table 3 . 3 :

 33 Detailed numerical performances for instances of the µSDP+IPM method, characterized by the size of the discrete grids for state and control variables in the first column. Other columns report the number of iterations performed (second column), time performances (third and fourth columns), together with the lower bound V 0 (x 0 ) in (3.30) (fifth column), the expected simulation cost V 0 (x 0 ) in (3.32) (sixth column), and the estimation gap (seventh column), expressed as a percentage of V 0 (x 0 ). For columns 2-6, the lower the values the better the performance of the instance

	3.A. Appendix
	(x, u) grid size	Iterative steps	Overall time (seconds)	Avg. time / oracle call (seconds)	V 0 (x 0 ) in (3.30) (e)	V 0 (x 0 ) in (3.32) (e)	Gap (%)
	5×5, 11	97	16	0.16	-613.6	-609.6	0.7
	5×6, 11	78	14	0.19	-648.5	-642.4	0.9
	6×6, 11	69	14	0.20	-648.8	-643.6	0.8
	6×6, 21	66	17	0.25	-651.0	-647.7	0.5
	6×11, 21	63	25	0.40	-653.1	-647.5	0.9
	11×11, 21	54	41	0.67	-653.1	-648.9	0.6
	11×11, 41	93	87	0.94	-639.4	-633.4	0.9
	11×21, 41	72	121	1.7	-649.7	-649.1	0.1
	21×21, 41	54	168	3.1	-647.1	-638.7	1.3
	21×21, 201	42	442	10.5	-652.3	-638.7	1.3
	21×101, 201	42	2092	49.8	-654.2	-651.5	0.4
	101×101, 201	41	10781	263.4	-650.4	-643.5	1.0

Table 3 . 4 :

 34 Detailed numerical performances for instances of the µSDP+PGD method, characterized by the size of the discrete grids for state and control variables in the first column.

  that extend 4.2. Couplings and Fenchel-Moreau conjugacies the usual addition with (+∞)

  .13e) Proof. All results are taken from [20, Propositions 5 and 6], except for (4.13d), which we prove next. Let w ∈ W, v ∈ ∂f θ(w) , by definition of the subdifferential,

  .8) • The ( , K)-norm |||•||| ,K is the norm |||•||| K , given by the restriction to the subspace R K of the dual norm |||•||| (first dual, then restriction), • The (K, )-norm |||•||| K, is the norm |||•||| K , given by the dual norm (on the subspace R K ) of the restriction norm |||•||| K to the subspace R K (first restriction, then dual). ||| , ∀u ∈ R d , (5.9)where we recall that u K is the vector which coincides with u, except for the components outside of K that are zero. We call generalized k-support norm the dual norm of the generalized top-k norm, denoted by 2 |||•||| sn (k) : The notation sup |K|≤k is a shorthand for sup K⊆{1,...,d},|K|≤k . It is easily verified that |||•||| tn (k) indeed is a norm, for all k ∈ {1, . . . , d}. For k ∈ {1, . . . , d}, we call coordinatek norm the norm |||•||| R (k) whose dual norm is the dual coordinate-k norm, denoted by |||•||| R In the following definition, we introduce an important characterization of the source norm |||•|||. For any u ∈ R d , we denote by |u| the vector of R d with components |u i |, i = 1, . . . , d: u = (u 1 , . . . , u d ) ⇒ |u| = (|u 1 |, . . . , |u d |) . Definition 5.2.4 (from [22], Definition 1) A norm |||•||| on the space R d is called • orthant-monotonic [38] if, for all u, u in R d , we have |u| ≤ |u | and u • u ≥ 0 ⇒ |||u||| ≤ |||u ||| , where |u| ≤ |u | means |u i | ≤ |u i | for all i = 1, . . . , d, and where u • u = (u 1 u 1 , . . . , u d u d ) is the Hadamard (entrywise) product, • orthant-strictly monotonic [21, Definition 3] if, for all u, u in R d , we have |u| < |u | and u • u ≥ 0 ⇒ |||u||| < |||u ||| , where |u| < |u | means that |u .4. Capra-subdifferential of 0 for the p source norms Proposition 5.4.1 (from [23], Table 1) Let the p source norms |||•||| = ||•|| p , where p ∈ [1, ∞], and let q ∈ [1, ∞] such that 1 p + 1 q = 1. The coordinate-k and dual coordinate-k norms in Definition 5.2.3 are given, for k ∈ 1, d , by

	by
	|||u||| tn (k) = sup
	|||•||| sn (k) = |||•||| tn (k)	.	(5.10)
	Coordinate-k and dual coordinate-k norms
	Definition 5.2.3 (from [23], Definition 3) (k), , with expression
	|||v||| R (k), = sup
	Also, following [23, §3.2], we extend the dual coordinate-k norms in Defini-
	tion 5.2.3 with the convention |||•||| R (0), = 0, also this is not a norm on R d but a
	seminorm.
	Orthant monotonicity
			(5.12)
	Generalized top-k and k-support norms
	Definition 5.2.2 (from [21], Definition 9) For k ∈ {1, . . . , d}, we call gen-
	eralized top-k norm (associated with the source norm |||•|||) the norm defined

|K|≤k |||u K |K|≤k |||v K ||| K, , ∀v ∈ R d , (

5

.11) where the (K, )-norm |||•||| K, is given in Definition 5.2.1, and where the notation sup |K|≤k is a shorthand for sup K⊆{1,...,d},|K|≤k . i | ≤ |u i | for all i = 1, . . . , d, and there exists j ∈ {1, . . . , d}, such that |u j | < |u j |. 5

Article surtout resté célèbre pour ses travaux précurseurs en géométrie différentielle.

Traduction personnelle de la citation originale.

Idem.

Traduction personnelle de la citation originale.

, et par des comparaisons à d'autres notions de sous-différentiel généralisé de la pseudo-norme 0 . Chapitre 6. Enfin, nous explorons les perspectives d'application du Chapitre 4 et du Chapitre 5 à l'optimisation parcimonieuse. Nous commentons les propriétés de convexité généralisée de deux familles de problèmes d'optimisation parcimonieuse, obtenues avec le couplage Capra. En particulier, ces propriétés de convexité font intervenir dans les deux cas un couplage OSL, ce qui ouvre la possibilité d'appliquer les résultats des précédents chapitres. Dans l'ensemble, bien que nous ne résolvions pas directement des problèmes liés à la gestion de l'énergie, notre contribution réside en un nouveau point de vue original sur l'optimisation parcimonieuse.Les pages qui suivent sont rédigées en langue anglaise.

Mostly famous for laying the ground for the modern theory of differential geometry.

When the horizon extends further than the period, we truncate the lookahead window to min(H, T -t+1).

We recall that gains were defined relatively to the cost performance of a dummy controller.

We extend the generated power g t in (3.7) with g 0 = 0, reflecting the absence of sun at midnight.

A mathematical formal proof would rely on monotonicity arguments

We extend the generated power g d,t in (3.7) with g d,0 = 0, reflecting the absence of sun at midnight.

For the same reason, we set ĝ0 d,0 = 0.

In convex analysis, one does not use the notation , but simply the notation , as it is often the case that U = V in the Euclidean and Hilbertian cases.

Note that as a Hilbert space, V is self dual here, so that we can introduce U = V to fit exactly in the notations of Definition 4.2.8.

Sometimes called "distance generating function", although in general D c κ in (4.16b) is not a distance with respect to (w, w ) ∈ W × dom(∂ c κ).

pseudonorm is equal to its Capra-biconjugate, meaning that it is a Capraconvex function. They also provide formulae for the Capra-subdifferential of 0 in[START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF], and prove that this subdifferential is nonempty for the same class of source norms that guarantee the Capra-convexity of 0 in[START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF].

Here, following notation from Game Theory, we have denoted by -K the complementary subset of K in {1, . . . , d}: K ∪ (-K) = {1, . . . , d} and K ∩ (-K) = ∅.

We use the symbol in the superscript to indicate that the generalized k-support norm |||•||| sn (k) is a dual norm.

Remerciements

3.4. Co-optimization of day-ahead commitment profiles and intraday microgrid controls simulation chronicles in (3.39f). We recall that the data of EMSx is based on a single photovoltaic profile, rescaled for each of the 70 sites. We scale this profile to simulate the operating of a solar power plant with an installed peak power p = 1 MW. We use one year of consecutive data for the simulation days d ∈ D employed for computing the management cost in (3.43a). For the controllers based on stochastic optimization, we use another year of consecutive data for the calibration of the model. We compute the coefficients (α t , β t ) t∈ 0,T -1 of the generated power dynamics in (3.49) with a linear regression. Then, we compute discrete probability laws with at most 10 atoms for each random variable of {W d,t } t∈ 1,T in (3.51), using a quantization method based on the K-means algorithm, as in [START_REF] Napat Rujeerapaiboon | Scenario reduction revisited: Fundamental limits and guarantees[END_REF].

We detail our protocol for computing the oracle V µ d,0 (x 0 , •), ∇ p d V µ d,0 (x 0 , •) in (3.65), for each day d ∈ D. We discretize the two dimensional state space [0, 1] × [-0.5p, 0.5p], as in (3.4a) and (3.37), in a grid of 11×111 discrete values, and the one dimensional control space [v b , v b ], as in (3.6b), in 81 values. Although the results of §2.5.1 show that the smaller the regularization parameter µ ∈ R + , the better the approximation of Φ d in (3.59b) by V µ d,0 (x 0 , •), we report that our numerical method is less efficient for low values of µ, as the absolute values of the on-peak gradient coordinates t ∈ T on tend to get smaller. Empirically, we find that µ = 1000 yields satisfying results. Then, we embed the oracle V µ d,0 (x 0 , •), ∇ p d V µ d,0 (x 0 , •) in a nonlinear solver. As a stopping rule, we stop the computation if the wall clock time exceeds 10 minutes, or if the progression of the objective value is not larger than ±0.5% for 5 consecutive iterations.

We detail our protocol for computing the value functions {V d,t } t∈ 0,T -1 in (3.66), for each day d ∈ D. We discretize the two dimensional state space [0, 1] × [-0.5p, 0.5p] as in (3.4a) and (3.37), in a grid of 21×111 discrete values, and the one dimensional control space [v b , v b ], as in (3.6b), in 201 values.

Gain performance. We display the gain G (π, φ, ψ * ), {h d } d∈D in (3.44) obtained for each pair of controllers (π, φ) among the controllers of §3.4.3 in Table 3.1. We also report the relative gain G (π µ,Sto , φ, ψ * ), {h d } d∈D -G (π Det , φ, ψ * ), {h d } d∈D displayed day by day in Figure 3.7, for fixed intraday controllers φ = φ Det in (3.69) (Figure 3.7a) and φ = φ Sto in (3.67) (Figure 3.7b). These two figures let us analyze further the role of the day-ahead controller, and detail the columnwise performance gaps in Table 3. [START_REF] Akian | Invertibility of functional Galois connections[END_REF].

First, we comment on the gains obtained with the intraday controller φ Det in (3.69) based on deterministic optimization (second column). When using as a day-ahead controller π Det in (3.68), also based on deterministic optimization, the pair (π Det , φ Det ) achieves a gain of 561 ke. This result is improved when using a day-ahead controller based on stochastic optimization instead, as the pair (π µ,Sto , φ Det ) returns 577 ke of gains, increasing the management gain by 3% with respect to (π Det , φ Det ). On a daily basis, we see in Figure 3.7a that the controller (π µ,Sto , φ Det ) outperforms (π Det , φ Det ) for 181 days out of 365 (days with positive relative gains), with an average daily relative gain of 44 e.

Second, we comment on the gains obtained with the intraday controller φ Sto in (3.67) based on stochastic optimization (third column). We observe that with φ Sto as an intraday controller, the effect of the day-ahead controller on 3.A. Appendix gain. We also point to further directions to investigate on the replicability of the method to other contexts, and on possible improvements.

3.A Appendix

3.A.1 Detailed performances for all methods instances

We provide additional details on the numerical performances of each instance of the µSDP+IPM, µSDP+PGD and kSDDP+PSM methods considered in the experiments of §3.

where

Part II

Numerical methods in generalized convexity

Chapter 4. Mirror descent with one-sided linear (OSL) couplings Proposition 4.2.6 Let the function f 1 : U → R be c 1 -convex and the function f 2 : U → R be c 2 -convex. Let the sum coupling c ⊕ be defined as in (4.6). We have that

, by definition of the generalized subdifferential in (4.5b), we have that

and by definition of c ⊕ in (4.6),

(by definition of the c ⊕ -subdifferential)

This ends the proof.

One-sided linear couplings (OSL couplings)

We now recall the definition of the so-called one-sided linear (OSL) couplings, introduced in [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF]. This class of couplings encompasses the classical bilinear form c = , involved in the Fenchel conjugacy. Our interest in such couplings is motivated by several results of standard convex analysis which extend naturally to OSL couplings, and that play a central role in the optimization theory and practice. First, we review some definitions and properties of OSL couplings and factorization mappings. Second, we introduce some properties of the c-subdifferential induced by a OSL coupling.

General definition and factorization mappings. We start with a general definition of OSL couplings. Definition 4.2.7 Let W be a set and V be a vector space. We say that a finite valued coupling c : W × V → R is one-sided linear (OSL) if, for all w ∈ W, the function c(w, •) : V → R is linear.

In particular, we can construct OSL couplings induced by a factorization (or primal valued) mapping, proceeding as follows. Definition 4.2.8 (from [START_REF] Chancelier | Hidden convexity in the l0 pseudonorm, 2020. Accepted for publication in Journal of Convex Analysis[END_REF], Definition 3) Let U and V be two vector spaces, paired with a bilinear form , . Let W be a set and θ : W → U a mapping. We

The mirror descent algorithm with OSL couplings

For any n ∈ 0, N -1 , we define the function

Note that as the coupling c is OSL, the function f is proper, and

) . (from v n+1 in (4.25b) and from (4.15b))

Moreover, from (4.25b), v n -v n+1 = α n v f n , and using again (4.15b),

). In summary, we have proved that (w n+1 , v n+1 ) satisfies (4.20a)-(4.20c). As a consequence, by application of Proposition 4.3.4, we obtain that for all w ∈ W,

Taking w = w * in the above inequality, and using that all quantities are finite,

Then, we use the following three inequalities,

which give us the following bound:

This concludes the first step of the proof.

Chapter 5. Capra-subdifferential of the 0 pseudonorm

The formulation of the Capra-subdifferential of the 0 pseudonorm in [START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF] involves the coordinate-k and dual coordinate-k norms, defined by variational expressions in [START_REF] Chancelier | Orthant-Strictly Monotonic Norms, Graded Sequences and Generalized Top-k and k-Support Norms for Sparse Optimization[END_REF], and is not readily computable. The main contribution of this chapter is to derive explicit formulations to compute the Capra-subdifferential of the 0 pseudonorm for all p source norms with p ∈ [1, ∞]. Subsequently, we comment on the domain of these subdifferentials, and extend previous results by showing that when p ∈ {1, ∞}, the 0 pseudonorm is not Capra-convex. We also illustrate the Capra-subdifferential of 0 that we find, and compare it with other notions of generalized subdifferentials for 0 found in [START_REF] Yen | Generalized subdifferentials of the rank function[END_REF].

The chapter is organized as follows. First, we recall background notions on norms in §5.2. Second, we recall background notions on the Capra coupling in §5.3. Third, we derive explicit formulations for the Capra-subdifferential of 0 in §5.4. Finally, we provide a numerical example and discuss the positioning of the Capra-subdifferential of 0 with respect to other notions of subdifferentials in §5.5.2.

Background on norms

For any norm |||•||| on R d , we introduce subsequent norms and some of their properties.

Dual norms

We denote the unit sphere and the unit ball of the norm |||•||| by

(5.3b)

|||•|||-duality, normal cone

By definition of the dual norm in (5.2), we have the inequality

We are interested in the case where this inequality is an equality. One says

(5.13)

Let us denote S (0) = S ∪ {0} .

(5.14)

From Definition 5.3.1, we see that if we introduce the primal normalization mapping

the Capra coupling is the one-sided linear coupling expressed as It was shown in [START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF] that, with a judicious choice of source norm |||•|||, the Capra coupling is well-suited for optimization problems involving the 0 pseudonorm. We recall the definition of 0 and of its level sets. Definition 5.3.2 Let d be a positive integer (dimension of regression variables). The 0 pseudonorm is the function 0 : R d → {0, 1, . . . , d} defined by

where |K| denotes the cardinality of a subset K ⊆ {1, . . . , d}. We introduce the level sets

The following theorem is one of the main result relating the Capra coupling and the 0 pseudonorm. that is, the pseudonorm 0 is a Capra-convex function.

As a complement to Theorem 5.3.3, further results in [START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF], [START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF] discuss the Capra-subdifferentiability properties of the 0 pseudonorm. We recall the definition of the Capra-subdifferential of the 0 pseudonorm, for which we introduce the sets (j), } j∈ 1:d be the corresponding sequences of unit balls for these norms. Let ¢ be the Capra coupling associated to |||•|||, as in Definition 5.3.1, the Caprasubdifferential of the function 0 is given by,

• if u = 0 and 0 (u) = l,

(5.20b)

Finally, in complement to Proposition 5.3.4, we recall the current state of knowledge regarding the Capra-subdifferentiability of the 0 pseudonorm.

that is, the pseudonorm 0 is Capra-subdifferentiable on R d .

Capra-subdifferential of 0 for the p source norms

We provide explicit formulas for the Capra-subdifferential of the 0 pseudonorm as introduced in Proposition 5. • if p = 1,

)

q .

(5.27b) 1], hence (5.27a) from the expression of V l in (5.19). Next, we consider p ∈]1, ∞], and proceed in two steps to prove the equivalence in (5.27b).

In the first step ( ⇐= ), let us take v ∈ R d and make the two following assumptions:

q , ∀k ∈ 0, l -1 , then, from Lemma 5.4.3, we have that

||v|| tn (j,q) -j ;

• if |v ν(l+1) | q ≤ ||v|| tn (l,q) + 1 q -||v|| tn (l,q) q , then, from Lemma 5.4.3, we have that ||v|| tn (l+1,q) -1 ≤ ||v|| tn (l,q) , =⇒ ||v|| tn (l+j,q) -j ≤ ||v|| tn (l,q) , ∀j ∈ 1, d -l , (from Lemma 5.4.2)

Therefore, v ∈ V l , which concludes the first step.

In the second step ( =⇒ ), we proceed by contraposition, assuming that either one of the two assumptions above breaks:

q , then, from Lemma 5.4.3, we have that

=⇒ l / ∈ arg max j=0,...,l ||v|| tn (j,q) -j ;

Chapter 5. Capra-subdifferential of the 0 pseudonorm then, from Lemma 5.4.3,

||v|| tn (j,q) -j .

In either case, v / ∈ V l , which concludes the second step, and finally proves the equivalence in (5.27b).

Explicit formulation for N B sn (p,l)

We turn to the explicit formulation of the normal cone in (5.20b) for the p source norms

We start with the following Lemma.

Lemma 5.4.5 Let the source norm be the

(5.28c) Third, we prove (5.28c). We have that

=⇒ ||v|| tn (l,q) ≤ ||v L || q . (from the Hölder inequality and (5.28a))

We now provide an explicit expression of the normal cone in (5.20b) for the

(5.29)

5.4. Capra-subdifferential of 0 for the p source norms . First, we prove that

(5.30)

We consider two cases. In the first case, we assume |I| ≤ |L| = l. Since v has at most l nonzero coordinates, from the expression of ||•|| tn (l,q) in Proposition 5.4.1, we have that ||v|| tn (l,q) = ||v I || q . It follows that

In the second case, we assume |I| > |L| = l. Since v has more than l nonzero coordinates, from the expression of ||•|| tn (l,q) in Proposition 5.4.1, we have that ||v|| tn (l,q) ≥ ||v L || q . Combined with (5.28c), we have that v ∈ N B sn (p,l) (u ) =⇒ ||v|| tn (l,q) = ||v L || q . Gathering the conclusions of both cases, we obtain (5.30).

Second, we prove (5.29). We have that

(from (5.28a), (5.28b), (5.30))

by definition of the normal cone, observing that u = u ||u||p from (5.28a), and by the expression of of ||•|| tn (l,q) in Proposition 5.4.1. This ends the proof.

Capra-subdifferential and Capra-convexity of 0

Finally, we gather the explicit expressions of the Capra-subdifferential of the pseudonorm 0 , for the p source norms • The Capra-subdifferential of the function 0 at u = 0 is given by

(5.31)

• The Capra-subdifferential of the function 0 at u = 0, where l = 0 (u) and L = supp(u), is given by,

Chapter 5. Capra-subdifferential of the 0 pseudonorm

(5.32b)

where, for a dual element v ∈ R d , ν denotes a permutation of 1, d such that

we prove an inclusion:

=⇒ ||v|| tn (j,q) ≤ j (by definition of ||•|| tn (j,q) in (5.22b) and from j ≥ j Second, we prove our claims on dom ∂ ¢ 0 . If p ∈]1, ∞[, the norm ||•|| p and the dual norm ||•|| q are orthant-strictly monotonic, following Definition 5.2.4, so that 0 is Capra-subdifferentiable on R d , from [START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF]Proposition 14]. We now consider the case p = ∞. Let us for example take u ∈ R d defined, for some i ∈ 1, d and ε ∈]0, 1[, by

(5.33)

We prove that

In particular, for j = i, taking u = u -e j , where {e k } k∈ 1,d is the canonical basis of R d , we obtain that v j ≥ 0. Moreover,

(by definition of the normal cone)

(from our definition of u)

However, since 0 (u) = d, we deduce from (5.32c) that we must have v i ≥ 1. We arrive at a contradiction, and conclude that ∂ ¢ 0 (u) = ∅, and therefore that dom [START_REF] Garcia | Model predictive control: theory and practice-A survey[END_REF], it is straightforward to check in (5.32c) that (1, . . . , 1) ∈ ∂ ¢ 0 (u), so that {0} dom ∂ ¢ 0 . This ends the proof.

In complement to Proposition 5.4.7, we gather and actualize results on the Capra-convexity and the Capra-subdifferentiability of the 0 pseudonorm for the p source norms |||•||| = ||•|| p , when p ∈ {1, ∞}. Proposition 5.4.8 (gathering and extending results from [START_REF] Chancelier | Constant along primal rays conjugacies and the l0 pseudonorm[END_REF], [START_REF] Chancelier | Variational Formulations for the l0 Pseudonorm and Application to Sparse Optimization[END_REF]) Let the source norm

• If p = 1, the 0 pseudonorm is not Capra-convex, and only Capra-subdifferentiable at u = 0. Its Capra-subdifferential at u = 0 is given by (5.31), and its Caprabiconjugate is

(5.34a)

, ∞[, the 0 pseudonorm is Capra-convex and Capra-subdifferentiable everywhere on R d , and its Capra-subdifferential is given by (5.31) and (5.32b).

• If p = ∞, the 0 pseudonorm is not Capra-convex, and not Capra-subdifferentiable everywhere on R d . Its Capra-subdifferential is given by (5.31) and (5.32b), and its Capra-biconjugate is

Proof. Results about Capra-subdifferentiability are taken from Proposition 5.4.7, and the Capra-convexity of 0 for p ∈]1, ∞[ is taken from Theorem 5.3.3. Thus, we only need to prove that 0 is not Capra-convex for p ∈ {1, ∞} by proving the expressions of the ¢-biconjugate in (5.34a) and (5.34b). To this end, we recall that from [23, Proposition 11] and Proposition 5.4.1, if q ∈ {1, ∞} is such that

(5.35)

6.2. Capra-convex sets

Characterization of Capra-convex sets

We recall that, from Proposition 4.2.3, the indicator function δ U is Capra-convex iff it is equal to its Capra-biconjugate, defined in (4.2d), which we characterize in the following lemma. • n . (

Proof. The coupling ¢ in Definition 5.3.1 is one-sided linear and factorizes with the normalization mapping n : R d → S (0) in (5.15). Therefore, we get that

• n , (see e.g. [5, Proposition 7.13])

• n .

(as co n(U ) is nonempty, closed and convex)

This ends the proof.

We deduce an immediate characterization of Capra-convex sets.

Proposition 6.2.3 Let |||•||| be a source norm on R d . Let ¢ be the corresponding Capra-coupling, as in Definition 5.3.1, and let n : R d → S (0) be the corresponding normalization mapping in (5.15). Let U ⊆ R d be a nonempty set. We have that

)

Proof. This follows directly from Definition 6.2.1, Proposition 4.2.3 and Lemma 6.2.2.

Beyond this immediate characterization, we now turn to more explicit conditions to characterize Capra-convex sets. We start with the following Lemma. Lemma 6.2.4 Let |||•||| be a source norm on R d . Let ¢ be the corresponding Capra-coupling, as in Definition 5.3.1. Let K ⊆ R d be a cone, we have that

Chapter 6. Perspectives of generalized convexity in sparse optimization

Proof. First, considering the normalization mapping n defined in (5.15), we show that n(K) = K ∩ S (0) . (6.8)

We start with the ⊆ inclusion. By definition of n in (5.15), n(K) ⊆ S (0) . Moreover since K is a cone, we also have that n(K) ⊆ K. We conclude that n(K) ⊆ K ∩ S (0) . We turn to the ⊇ inclusion. Let u ∈ K ∩ S (0) . If u = 0, then 0 ∈ K, and thus u = 0 = n(0) ∈ n(K). If u = 0, then u ∈ K ∩ S and thus u = n(u) ∈ n(K). We conclude that n(K) ⊇ K ∩ S (0) . Finally, (6.8) holds. Second, we show the equivalence in (6.7).

( =⇒ ) Let us assume that K is Capra-convex. We notice that • n .

(as K is Capra-convex, and from Lemma 6.2.2)

By definition of n in (5.15), n(R d ) = S (0) . We deduce that

This concludes the first implication.

( ⇐= ) Let us assume that K ∩ S (0) = co(K ∩ S (0) ) ∩ S (0) . We have that 0) , by definition of n in (5.15),)

• n .

(as K is a cone, and using (6.8))

This proves that K is Capra-convex, from (6.6a), and concludes the second implication.

Then, restricting us to the case of p source norms, p ∈]1, ∞[, for which we know from Proposition 5.4.8 that the 0 pseudonorm is Capra-convex, we prove the following result.

then K ∩ S (0) = co(K ∩ S (0) ) ∩ S (0) . (6.9b)

Proof. Let us suppose that the cone K satisfies (6.9a). It is straightforward to see that K ∩ S (0) ⊆ co(K ∩ S (0) ) ∩ S (0) . We concentrate on the reciprocal inclusion. Let us take u ∈ co(K ∩ S (0) ) ∩ S (0) . We consider two cases.

• Let us assume that u = 0. We deduce that 0 ∈ co(K ∩ S (0) ) = co n(K) , since K is a cone (see (6.8)). Then, as K ∩ {0} = co n(K) ∩ {0}, we conclude that 0 ∈ K, and thus that u = 0 ∈ K ∩ S (0) .

Capra-convex sets

• We now turn to the case u = 0. We observe that

Since K ∪ {0} is closed, we deduce that K ∩ S (0) is closed, and thus compact. It follows that the convex hull of K ∩ S (0) is compact (see e.g. [START_REF] Rockafellar | Variational analysis[END_REF]Corollary 2.30]), and thus that co(K ∩ S (0) ) = co(K ∩ S (0) ). We deduce that u ∈ co(K ∩ S (0) ), and therefore, from Carathéodory's Theorem (see e.g. [START_REF] Rockafellar | Variational analysis[END_REF]Theorem 2.29]), that there exists

Moreover, as u = 0, there exists j ∈ 1, d + 1 such that u j ∈ S and α j = 0. Since u ∈ S and |||•||| is a p norm, p ∈]1, ∞[, we obtain by Minkowski's inequality that

This case of equality in Minkowski's inequality implies that one of the two following statements holds (see e.g. [16, §2.4, Theorem 9]):

In both cases, it follows that we can write u = µu j , for some µ > 0, so that u ∈ K, as K is a cone, and thus u ∈ K ∩ S (0) . We conclude that K ∩ S (0) ⊇ co(K ∩ S (0) ) ∩ S (0) , and thus that (6.9b) holds.

We now show an explicit characterization of Capra-convex sets, when the source norm is a p norm with p ∈]1, ∞[.

Proof. First, let us suppose that the set U is Capra-convex, and prove the implication ( =⇒ ) in (6.10).

Chapter 6. Perspectives of generalized convexity in sparse optimization

• We prove that U is a cone. Let u ∈ U and λ > 0. We have that δ U (λu) = δ co n(U )

• n(λu) , (from (6.6a))

= δ co n(U )

• n(u) , (by definition of n in (5.15))

= δ U (u) (using again (6.6a))

= 0 .

(as u ∈ U )

We conclude that λu ∈ U , and thus that U is a cone. = co(U ∩ S (0) ) ∩ S (0) . (from Lemma (6.2.4), as U is a Capra-convex cone)

Moreover, observing that co(U ∩ S (0) ) ∩ S (0) is closed, we deduce that the limit ū |||ū||| of the converging sequence u k |||u k ||| k≥ k belongs to co(U ∩ S (0) ) ∩ S (0) . We deduce that ū |||ū||| ∈ U ∩ S (0) , (using again Lemma (6.2.4))

=⇒ ū ∈ U .

(since ū |||ū||| ∈ U and U is a cone)

We conclude that U ∪ {0} is closed.

• The fact that U ∩ {0} = co n(U ) ∩ {0} follows from n(0) = 0 in (5.15), which implies that δ U (0) = δ co n(U ) (0) in (6.6a), hence 0 ∈ U ⇐⇒ 0 ∈ co n(U ) .

Second, let us suppose that the set U satisfies the three conditions in the righthand side of the equivalence in (6.10). We deduce from Lemma 6.2.5 that U ∩ S (0) = co(U ∩ S (0) ) ∩ S (0) . We conclude from Lemma 6.2.4 that U is a Capra-convex set.

Examples with the 2 source norm

Let us consider the source norm |||•||| = ||•|| 2 . We recall that with this choice of source norm, Capra-convex sets are cones characterized by Proposition 6.2.6. We provide in Figure 6.1 examples of cones in R 2 and comment on their Capraconvexity.

Given that if 0 ∈ K, problems like min u∈K 0 (u) (6.11) are trivially solved by u = 0, we pay a specific attention to sets for which 0 / ∈ K. All three cones of the sequence {K i } i∈{1,2,3} displayed in Figure 6.1 (left column) are such that K i ∪{0} is closed, and 0 / ∈ K i . First, we observe that the condition K i ∩{0} = co n(K i ) ∩{0} required for Capra-convex sets by Proposition 6.2.6 is 6.2. Capra-convex sets not fulfilled for K 1 , as 0 ∈ co n(K 1 ) ∩ {0} (Figure 6.1b). We deduce that K 1 is not a Capra-convex set. Second, we observe that this condition is fulfilled for the other two cones, as 0 / ∈ co n(K 2 ) ∩ {0} (Figure 6.1d), and 0 / ∈ co n(K 3 ) ∩ {0} (Figure 6.1f). We deduce that K 2 and K 3 fulfill the characterization given in Proposition 6.2.6, and thus that these sets are Capra-convex.

The example K 2 of Figure 6.1c reveals that a cone needs not be convex to be Capra-convex. However, as convex sets are ubiquitous in optimization problems, convex cones are examples of particular interest. We show that some of these sets are Capra-convex. Lemma 6.2.7 Let K ⊆ R d be a closed convex cone. If K is pointed, then we have that 0 / ∈ co(K ∩ S) . (6.12)

Proof. Let us assume that K is pointed and that 0 ∈ co(K ∩ S). We prove that this leads to a contradiction. Since K is closed, the set K ∩ S is compact, and therefore so is its convex hull (see e. Let j ∈ 1, d + 1 be such that α j = 0. We have, by construction, that u j ∈ K and that -u j = i∈ 1,d+1 ,i =j

As K is a convex cone, we deduce from the above expression that -u j ∈ K (see e.g.

[5, Proposition 6.3(i)]). Then, since K is pointed, necessary u j = 0, which contradicts the fact that u j ∈ S.

In addition to our previous examples given in Figure 6.1, we identify the following notable cases of Capra-convex sets. Proposition 6.2.8 Let K ⊆ R d be a cone. If K is nonempty, closed and convex, then K is a Capra-convex set. If moreover K is pointed, then K \ {0} is also a Capra-convex set.

Proof. First, we consider the cone K. Since K is closed, so is K ∪ {0}, and 0 ∈ K. It follows that 0 ∈ n(K), by definition of the normalization mapping n in (5.15), and thus that 0 ∈ co n(K) . We conclude that K ∩ {0} = co n(K) ∩ {0} = {0}, and therefore that K is Capra-convex, from Proposition 6.2.6.

Second, we consider the cone K = K \ {0}. We have that K ∪ {0} = K is closed, and 0 / ∈ K . It follows that K ∩ S (0) = K ∩ S, so that n(K ) = K ∩ S (see (6.8)). As K is pointed, so is K , and we deduce from Lemma 6.2.7 that 0 / ∈ co n(K ) . We conclude that K ∩ {0} = co n(K ) ∩ {0} = ∅, and therefore that K is Capra-convex, from Proposition 6.2.6.