Пример #1
0
 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
Пример #2
0
 def __init__(self, idx, x, y, z, name, mac):
     Position.__init__(self, x, y, z, name)
     self.idx = idx
     self.mac = mac.lower()
Пример #3
0
 def __str__(self):
     position_str = Position.__str__(self)
     return "{}\n{}\n{}".format(position_str, self.mac, self.idx)
Пример #4
0
 def __init__(self, idSlot, idNode, latitude, longitude, name=""):
     Position.__init__(self, latitude, longitude, name)
     self.idSlot = idSlot
     self.idNode = idNode
     self.occupied = False
Пример #5
0
 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)
Пример #9
0
 def __init__(self, idx, x, y, z, name):
     Position.__init__(self, x, y, z, name)
     self.idx = idx