A computerized method for optimizing the use of energy

The invention relates to a computerized method for monitoring, controlling and optimizing the use of energy in a system, including mobile power sources, an energy network, a computer connected to the power network stationary energy supplier, connected to the energy-power energy consumers, and also connected to the energy network fixed docking stations for mobile energy sources. The system is controlled by autonomous agents, wherein they assume with respect to the components of the system with a substitute function. The agents, which are associated with the stationary power supplier and the mobile power sources, with each other negotiate the timing and amount of energy to be exchanged, and then, if necessary, ensure the inclusion of additional agents for the necessary control of the energy transmission.