예제 #1
0
 def __init__(self, agentjid, password, debug):
     Agent.__init__(self, agentjid, password, debug=debug)
     self.agent_id = None
     self.status = PASSENGER_WAITING
     self.current_pos = None
     self.dest = None
     self.port = None
     self.taxi_assigned = None
     self.init_time = None
     self.waiting_time = None
     self.pick_up_time = None
     self.end_time = None
예제 #2
0
 def __init__(self, agentjid, password, debug):
     Agent.__init__(self, agentjid, password, debug=debug)
     self.agent_id = None
     self.status = TAXI_WAITING
     self.current_pos = None
     self.dest = None
     self.path = None
     self.distances = []
     self.durations = []
     self.port = None
     self.current_passenger = None
     self.current_passenger_orig = None
     self.current_passenger_dest = None
     self.num_assignments = 0
예제 #3
0
    def __init__(self, agentjid, password, debug, http_port, backend_port,
                 debug_level):
        self.simulation_running = False
        self.kill_simulator = threading.Event()
        self.kill_simulator.clear()
        self.lock = threading.RLock()
        self.taxi_agents = {}
        self.passenger_agents = {}

        self.coordinator_strategy = None
        self.taxi_strategy = None
        self.passenger_strategy = None

        self.faker = faker.Factory.create()

        self.http_port = http_port
        self.backend_port = backend_port
        self.debug_level = debug_level

        Agent.__init__(self, agentjid=agentjid, password=password, debug=debug)