def __init__(self, *args): """Init the RoutingShowcaseWiggler person.""" Person.__init__(self, *args) self.dest_node = self.next_node self.p_color_rgba = COLOR[self.p_id] self.routed = True self.next_target = self.next_target_routed
def __init__(self, *args, **kwargs): """Inits the PoiWiggler person.""" super(PoiWiggler, self).__init__(*args, **kwargs) Person.__init__(self, *args) self.dest_node = self.next_node if kwargs.get("cafes"): self.cafes = kwargs["cafes"] #: list of all cafes in osm data else: self.cafes = None #: list of all cafes in osm data self.p_state = GO_SOMEWHERE self.p_cafe = None self.p_color = self.p_id self.p_color_rgba = COLOR[self.p_id] self.next_target = self.next_target_routed
def __init__(self, *args): """Inits the working man.""" Person.__init__(self, *args) w_id = self._random.choice(WORKPLACES) for node in self.sim.geo.way_nodes: if node.id == w_id: self.p_workplace_node = node break else: raise Exception('No workplace found') self.p_wakeup_time = self._random.randint(6000, 8000) self.p_home_time = self._random.randint(16000, 18000) self.dest_node = self.next_node self.home_node = self.last_node self.p_state = 'SLEEP' self.p_color = 2 self.p_color_rgba = (0.1, 1.0, 0.1, 1.0)