def __init__( self, name="cmanager@localhost", passwd="secret", players=10, fps=33, match_time=380, map_name="map_01", map_path=None, service_jid="cservice@localhost", service_passwd="secret", port=8001, ): AbstractAgent.__init__(self, name, service_jid=service_jid) Agent.__init__(self, name, passwd) self.game_statistic = GameStatistic() self.max_total_agents = players self.fps = 1 / fps self.match_time = match_time self.map_name = str(map_name) self.port = port self.config = Config(data_path=map_path) self.number_of_agents = 0 self.agents = {} self.match_init = 0 self.domain = name.split("@")[1] self.objective_agent = None self.service_agent = Service(jid=self.service_jid, password=service_passwd) self.render_server = Server(map_name=self.map_name, port=self.port) self.din_objects = dict() self.map = TerrainMap()
def __init__(self, manager_jid, neighbours, cars_speed, *args, **kwargs): Agent.__init__(self, *args, **kwargs) Crossroad.__init__(self) self.sumo_api = SumoApi() self.manager_jid = manager_jid self.subscribers = [] self.neighbours = neighbours self.neighbours_jid = {} self.cfp = { messages_body_labels.direction: None, # because of which direction we wanna change lights messages_body_labels.to_change: None, # if we wanna last green longer (false) or change it quicker (true) messages_body_labels.change_by: None } # how much we wanna change lights remaining duration self.last_cfp_ts = 0 self.delay_before_next_cfp = 0 self.cars_speed = cars_speed self.directions_max_cars = { 'vertical': 0, 'horizontal': 0 } # directions and max cars on their streets
def __init__(self, ip, _pass, source, place, kwords, summ_parms): Agent.__init__(self, ip, _pass) self.source = source self.place = place self.kwords = kwords self.summ_parms = summ_parms self.connected = False
def __init__( self, jid, password, workersParams, task ): #workersParams to lista slownikow (jid, password, name, priceEle, priceChan, sameIndex, coworkers) Agent.__init__(self, jid, password) self.MyJid = jid self.logger = Logger(self.jid) self.workersParams = workersParams self.task = task self.workers = []
def __init__(self, host, pw, network, num_routes, agent_type="global", start_node=None, destination_node=None, loop=None): Agent.__init__(self, host, pw, loop=loop) self.traveller = Traveller(network, num_routes, agent_type, start_node, destination_node)
def __init__(self, jid, passwd="secret", team=0, service_jid="cservice@localhost", verify_security=False): self.m_ServiceList = list() self._name = jid self.m_iPositionX = None self.m_iPositionZ = None self.m_eTeam = team self.service_jid = service_jid Agent.__init__(self, jid, passwd, verify_security)
def __init__(self, name, passwd="secret", manager_jid="cmanager@localhost", x=0, z=0, team=0): Agent.__init__(self, name, passwd) AbstractAgent.__init__(self, name, team) self.type = PACK_NONE self.manager = manager_jid self.position = Vector3D() self.position.x = x self.position.y = 0 self.position.z = z
def __init__(self, jid="cservice@localhost", password="******"): self.m_ServiceList = {} Agent.__init__(self, jid, password)
def __init__(self, config): self.config = config Agent.__init__(self, jid=self.config.jid, password=self.config.password)
def __init__(self, host, pw, network): Agent.__init__(self, host, pw) self.supervisor = Supervisor(network)
def __init__(self, jid, password): Agent.__init__(self, jid, password) traci.start(["sumo-gui", "-c", "simulation/configuration/simulation.sumo.cfg"], label="simulation")
def __init__(self, config): Agent.__init__(self, jid=config.jid, password=config.password, verify_security=False) self.config = config