code: def init(self):
          
          system = self.system
          config = self.config
          dae = self.system.dae
          if system.pflow.solved is False:
              return
  
          t, s = elapsed()
  
          # Assign indices for post-powerflow device variables
          system.xy_addr1()
  
          # Assign variable names for bus injections and line flows if enabled
          system.varname.resize_for_flows()
          system.varname.bus_line_names()
  
          # Reshape dae to retain power flow solutions
          system.dae.init1()
  
          # Initialize post-powerflow device variables
          for device, init1 in zip(system.devman.devices, system.call.init1):
              if init1:
                  system.__dict__[device].init1(system.dae)
  
          # compute line and area flow
          if config.compute_flows:
              dae.init_fg()
              self.compute_flows()  # TODO: move to PowerSystem
  
          t, s = elapsed(t)
  
          if system.dae.n:
              logger.debug('Dynamic models initialized in {:s}.'.format(s))
          else:
              logger.debug('No dynamic model loaded.')
  
          # system.dae flags initialize
          system.dae.factorize = True
          system.dae.mu = 1.0
          system.dae.kg = 0.0
docs: Initialize time domain simulation
  
          Returns
          -------
          None