Say that there are two factories connected to the same 20 kV medium voltage line (see Fig. 1). Each of them has 400 V motors that consume power by turning some machines acting as mechanical loads. One of the factories has a diesel electric generator connected to its 400 V bus and synchronized with it.
Question: Is it possible (without disconnecting the factory with the diesel generator from its transformer) to adjust the power of the generator in such a way as to feed all consumers in the factory without sending energy to the loads in the other industrial facility which does not have a generator or to any other consumer connected to the grid?
For me, it appears that even if the generator is adjusted to deliver exactly the same power as needed by the loads in its factory, nothing stops those loads to draw energy from the grid and nothing stops the power of the generator from going into the medium voltage grid and be consumed by the motors of the other factory or by another industrial facility. But, I can be wrong.
Fig. 1. Two industrial facilities (surrounded by a dashed blue line) connected to the medium voltage grid through two transformers. One of the factories has a diesel electric generator connected to its 400 V bus.