def relayIndextoCoord(self, i):
    """
    Map 1D cell index to a 2D coordinate

    :param i: integer 1D cell index

    :return: (x, y), a 2D coordinate
    """
    x = i % self.relayWidth
    y = i / self.relayWidth
    return x, y
Map 1D cell index to a 2D coordinate

    :param i: integer 1D cell index

    :return: (x, y), a 2D coordinate