A method for managing energy in a decentralized way in an electric installation, the installation comprising: - at least one electric energy consumption unit (12, 12A, 12B, 12C, 12D, 12E), - at least one electric energy production unit (12, 12F, 12G, 12H, 121, 12J), - at least one electric energy storage unit (12, 12K, 12L), - an energy transport network, each unit being able to be connected to or disconnected from the energy transport network, the transport network being divided in at least two sub-networks (17, 18), each sub-network (17, 18) grouping at least one unit, - a processing module for each sub-network (17, 18), the plurality of processing modules being arranged at different points of the transport network, - a communications network connected to each unit and to each processing module, each unit being able to transmit data over the communications network towards at least one unit and towards each processing module, the method being implemented by each processing module, the method comprising at least one step for: - providing the nature of the operation of each unit of each sub-network (17, 18), the nature of the operation of each unit being selected from the group comprising: an energy production, an energy consumption unit and an energy storage unit, - providing a first indicator relative to a priority operation of each unit of each sub-network (17, 18), - providing a second indicator relative to a rated energy volume of operation of each unit of each sub-network (17, 18), - determining, for each unit of each sub-network (17, 18), a global indicator starting from the nature, from the provided first indicator and second indicator, - calculating for each average indicator (I1_M) from at least one global indicator of a production unit (12, 12F, 12G, 12H, 121, 12J) and from at least one global indicator of a consumption unit (12, 12A, 12B, 12C, 12D, 12E), - comparing, for each unit of each sub-network (17, 18), the first indicator with the first average indicator (I1_M), and - connecting to or disconnecting each unit of each sub-network (17, 18) from the energy transport network depending on the comparison and on the nature of each unit, the indicators provided for each unit depending on at least one characteristic selected from the group comprising: the time of the day, the period of the year, the weather, the operational energy needs of the unit, the energy autonomy of the unit, the capability of the unit of producing energy, the stopping or the operation of the unit, the feedback on the operation of the unit, the failures of the unit and an anticipation of the energy needs of the unit. - at least one electric energy consumption unit (12, 12A, 12B, 12C, 12D, 12E), - at least one electric energy production unit (12, 12F, 12G, 12H, 121, 12J), - at least one electric energy storage unit (12, 12K, 12L), - an energy transport network, each unit being able to be connected to or disconnected from the energy transport network, the transport network being divided in at least two sub-networks (17, 18), each sub-network (17, 18) grouping at least one unit, - a processing module for each sub-network (17, 18), the plurality of processing modules being arranged at different points of the transport network, - a communications network connected to each unit and to each processing module, each unit being able to transmit data over the communications network towards at least one unit and towards each processing module, - providing the nature of the operation of each unit of each sub-network (17, 18), the nature of the operation of each unit being selected from the group comprising: an energy production, an energy consumption unit and an energy storage unit, - providing a first indicator relative to a priority operation of each unit of each sub-network (17, 18), - providing a second indicator relative to a rated energy volume of operation of each unit of each sub-network (17, 18), - determining, for each unit of each sub-network (17, 18), a global indicator starting from the nature, from the provided first indicator and second indicator, - calculating for each average indicator (I1_M) from at least one global indicator of a production unit (12, 12F, 12G, 12H, 121, 12J) and from at least one global indicator of a consumption unit (12, 12A, 12B, 12C, 12D, 12E), - comparing, for each unit of each sub-network (17, 18), the first indicator with the first average indicator (I1_M), and - connecting to or disconnecting each unit of each sub-network (17, 18) from the energy transport network depending on the comparison and on the nature of each unit,