A generator is modeled as a complex power injection at a speciﬁc bus. For generator , the injection is
Let be the vector of these generator injections. The MW and MVAr equivalents (before conversion to p.u.) of and are speciﬁed in columns PG (2) and QG (3), respectively of row of the gen matrix. A sparse generator connection matrix can be deﬁned such that its element is 1 if generator is located at bus and 0 otherwise. The vector of all bus injections from generators can then be expressed as
A generator with a negative injection can also be used to model a dispatchable load.