How do you calculate energy losses in an energy grid? Let's say you have an energy transmission line, that gets powered by an energy plant with a power of 6150MW. You know the line is for example 133 km long and you know the voltage of the power line is 380 kV. I am tempted to say you could calculate the energy loss of the line without taking any information about the power plant into account, calculating the power by P_loss=V²/R. However as mentionned before, we do not take the power of the plant into account so it could happen that you lose more heat than you produce energy. This is obviously not correct, so how should I solve this problem?
Question solved: Why high voltage transmission lines?
 A: The first step is to define energy losses.  When I hear that term regarding electrical grids, I typically assume they are referring to the $P=I^2R$ losses of the lines.  This is because this particular loss is something that can be changed (by planning higher voltage lines).
There are also reactive loads.  If a system is out of balance, with too much capacitance or too much inductance, power is lost charging those.  That is a loss factor which matters greatly for electrical companies.  They tend to have banks of capacitors which can be switched in to balance the loads (modern power consumption tends to be inductive on average because electric motors are inductive).
If you are accounting for loses in the production system, you're going to have to carefully define what the energy losses are with respect to.  For these things, we are typically talking about losses with respect to the theoretical energy load of the fuel.  In this sense, a typical coal plant is around 37% efficient.  It can also be compared to the efficiency of an ideal thermodynamic cycle.  Known as the Carnot efficiency, this is a value that is dependent on temperature, but tends to be around the 60% to 70% range.
So define losses based on what is most useful, and then go from there.  What is useful really depends on what you think you can optimize.  Tailor your definition of loss to best capture the variables you wish to improve upon.
A: The electrical production facility will measure output of voltage and amperage, so they know how much electrical power is being generated.  All of their customers have meters which tell the electric company how much to bill them.  Since there is never "excess" power on the grid (electrical power can't be stored in transmission lines), the energy losses can be calculated over a long time interval (e.g., 1 month) as the difference between what was generated and the sum of all of the customer's electrical meter usages.
