code: def s_supply(self, bus):
          
          Sg = array([complex(g.p, g.q) for g in self.generators if
                     (g.bus == bus) and not g.is_load], dtype=complex64)
  
          if len(Sg):
              return sum(Sg)
          else:
              return 0 + 0j
docs: Returns the total complex power generation capacity.