code: def pre(self):
          
          logger.info('-> Power flow study: {} method, {} start'.format(
              self.config.method.upper(), 'flat' if self.config.flatstart else 'non-flat')
          )
  
          t, s = elapsed()
  
          system = self.system
          dae = self.system.dae
  
          system.dae.init_xy()
  
          for device, pflow, init0 in zip(system.devman.devices,
                                          system.call.pflow, system.call.init0):
              if pflow and init0:
                  system.__dict__[device].init0(dae)
  
          # check for islands
          system.check_islands(show_info=True)
  
          t, s = elapsed(t)
          logger.debug('Power flow initialized in {:s}.'.format(s))
docs: Initialize system for power flow study
  
          Returns
          -------
          None