Method for operating an internal combustion engine (1), wherein a fuel-air mixture is burned in the internal combustion engine (1) and the internal combustion engine (1) drives a generator (2), wherein the generator (2) is connected to an energy supply network (3) and delivers energy to the energy…