def activate_effectors(self, current_position: Position): filtered_effectors = [ effector for effector in self.effectors if distance.distance(current_position.getCoordinates( ), effector.getCoordinates()).m < THRESHOLD_DISTANCE ] return filtered_effectors
def __init__(self, idx, x, y, z, name, mac): Position.__init__(self, x, y, z, name) self.idx = idx self.mac = mac.lower()
def __str__(self): position_str = Position.__str__(self) return "{}\n{}\n{}".format(position_str, self.mac, self.idx)
def __init__(self, idSlot, idNode, latitude, longitude, name=""): Position.__init__(self, latitude, longitude, name) self.idSlot = idSlot self.idNode = idNode self.occupied = False
def __init__(self, idParking, latitude, longitude, name): Position.__init__(self, latitude, longitude, name) self.idParking = idParking self.nodes: list[Node] = []
def __init__(self, x, y, z, isIndoor): Position.__init__(self, x, y, z, "Point3D") self.isIndoor = isIndoor self.floor = -1 self.drawn = False self.position = None
def __hash__(self): return Position.computeHash(self.x, self.y, self.floor)
def initPosition(self): return Position(self.x, self.y, self.floor)
def __init__(self, idx, x, y, z, name): Position.__init__(self, x, y, z, name) self.idx = idx