code: def _compile_int_g(self):
          
          string = '"""\n'
  
          # evaluate the algebraic equations g
          string += 'system.dae.init_g()\n'
          for gcall, call in zip(self.gcall, self.gcalls):
              if gcall:
                  string += call
          string += '\n'
          string += 'system.dae.reset_small_g()\n'
  
          # handle islands
          string += self.gisland
  
          # rebuild constant Jacobian elements if needed
          string += 'if system.dae.factorize:\n'
          string += '    system.dae.init_jac0()\n'
          for jac0, call in zip(self.jac0, self.jac0s):
              if jac0:
                  string += '    ' + call
          string += '    system.dae.temp_to_spmatrix(\'jac0\')\n'
  
          # evaluate Jacobians Gy
          string += 'system.dae.setup_Gy()\n'
          for gycall, call in zip(self.gycall, self.gycalls):
              if gycall:
                  string += call
          string += '\n'
          string += self.gyisland
          string += 'system.dae.temp_to_spmatrix(\'jac\')\n'
  
          string += '"""'
          self.int_g = compile(eval(string), '', 'exec')
docs: Time Domain Simulation - update algebraic equations and Jacobian