code: def switch(self, idx, u):
          
          self.u[self.uid[idx]] = u
          self.rebuild = True
          self.system.dae.factorize = True
          logger.debug('<Line> Status switch to {} on idx {}.'.format(u, idx))
docs: switch the status of Line idx