## 7 Consumption-Production Cassation  
The transition to renewable energy sources has fundamentally altered the generation, consumption, and management of energy resources. The concepts of grid consumption, surplus, and self-consumption [21] are critical for comprehending this dynamic.  
The importance of the relationship between consumption and production in the sizing of installations lies in the optimization of energy generation and use. It is essential to adjust the size of these systems to match the user's consumption pattern, thus maximizing self-consumption and minimizing dependence on the electrical grid.  
When discussing the sizing of a photovoltaic installation, a common approach is to ensure that solar energy production closely aligns with the energy consumption of the building or facility. This alignment allows the majority of the generated energy to be used locally and helps avoid legal and contractual complications that can arise from injecting excess energy into the electrical grid. To achieve this, factors such as daily minimum consumption needs are considered [22].  
Energy consumption refers to the use of energy by end consumers, whether residential, SME or industrial. It should be noted that, to meet this consumption, electricity can come from various energy sources:  
* The electrical grid, managed at the European level by the entities such as ENTSO-E (European Network of Transmission System Operators for Electricity), plays a key role in distributing electricity from generation plants, both renewable and non-renewable, to end consumers. These networks ensure supply while allowing for the integration of renewable sources such as solar and wind.
* Self-generation: this type of generation allows consumers to self-consume using renewable sources, such as photovoltaic panels or modules, enabling them to save not only on their electricity bills but also on overall electricity consumption. To meet the demand for electrical energy, various sources are used, both renewable (solar, wind, hydroelectric, and biomass) and non-renewables. Photovoltaic solar energy has gained importance due to its ability to enable self-consumption, generate surpluses, or reduce grid consumption, thanks to the generation from solar panels that convert sunlight into electricity.
* Self-consumption refers to a consumer's ability to generate and consume their own energy. This reduces reliance on the electrical grid and can result in savings on the electricity bill. Self-consumption lowers costs by decreasing energy consumption from the grid and reducing electricity bills, generates less dependence on the electrical network, and contributes to the reduction in greenhouse gas emissions.
* Surplus refers to the energy generated that is not consumed and can be fed back into the electrical grid. This energy can be sold to the utility company, providing compensation for the surplus.
* Grid consumption is the energy that a consumer obtains from the electrical grid when their self-generation is insufficient to meet their demand. To feed energy back into the grid, it is important to consider that the grid must balance supply and demand, efficiently integrating renewable generation.  
This electricity can be used directly or stored in batteries. The batteries can be Lithium-Ion, Lead-Acid, Flow, Nickel-Cadmium, or Nickel-Metal Hydride [23].