def start_round(self, message: Message): print("Start round message received... forwarding to institution") message = Message() message.set_sender(self) message.set_recipients(self.institutions[0]) message.set_directive("start_round") self.send(self.institutions[0], message)
def create_agent(cls, agent_class): message = Message() message.set_sender("Universe") # SPECIAL CASE Environment message.set_recipients("Environment") message.set_directive("create_agent") message.set_payload(agent_class) return message
def list_agents(cls): message = Message() message.set_sender("Environment") # SPECIAL CASE Environment message.set_recipients("Institution") message.set_directive("list_agents") message.set_payload(None) return message
def request_agent_list(cls): print("AGENT LIST REQUESTED") message = Message() message.set_sender("Institution") # SPECIAL CASE Environment message.set_recipients("Environment") message.set_directive("request_agent_list") message.set_payload(None) return message