def __init__(self, agent, competence_name, elements): """Initialises the competence priority element. The log domain is set to [AgentName].CP.[competence_name] @param agent: The element's agent. @type agent: L{POSH.strict.Agent} @param competence_name: The name of the competence. @type competence_name: string @param elements: The set of competence elements of the priority element. @type elements: sequence of L{POSH.strict.CompetenceElement} """ ElementCollection.__init__(self, agent, "CP.%s" % competence_name) self._name = competence_name self._elements = elements self.log.debug("Created")
def __init__(self, agent, competence_name, elements): """Initialises the competence priority element. The log domain is set to [AgentName].CP.[competence_name] @param agent: The element's agent. @type agent: L{SPOSH.Agent} @param competence_name: The name of the competence. @type competence_name: string @param elements: The set of competence elements of the priority element. @type elements: sequence of L{SPOSH.CompetenceElement} """ ElementCollection.__init__(self, agent, "CP.%s" % competence_name) self._name = competence_name self._elements = elements self.debug("Created")
def __init__(self, agent, drive_name, elements): """Initialises the drive priority element. The log domain is set to [AgentName].DP.[drive_name] @param agent: The element's agent. @type agent: L{SPOSH.Agent} @param drive_name: The name of the associated drive. @type drive_name: string @param elements: The drive elements of the priority element. @type elements: sequence of L{SPOSH.DriveElement} """ ElementCollection.__init__(self, agent, "DP.%s" % drive_name) self._name = drive_name self._elements = elements self._timer = agent.getTimer() self.debug("Created")
def __init__(self, agent, drive_name, elements): """Initialises the drive priority element. The log domain is set to [AgentName].DP.[drive_name] @param agent: The element's agent. @type agent: L{POSH.strict.Agent} @param drive_name: The name of the associated drive. @type drive_name: string @param elements: The drive elements of the priority element. @type elements: sequence of L{POSH.strict.DriveElement} """ ElementCollection.__init__(self, agent, "DP.%s" % drive_name) self._name = drive_name self._elements = elements self._timer = agent.getTimer() self.log.debug("Created") self.agent = agent
def __init__(self, agent, pattern_name, elements): """Initialises the action pattern. The log domain is set to [AgentId].AP.[patternName] @param agent: The corresponding agent. @type agent: L{POSH.strict.Agent} @param pattern_name: The name of the action pattern. @type pattern_name: string @param elements: The sequence of actions, with an optional competence as the final element. @type elements: sequence of L{POSH.strict.Action}, L{POSH.strict.Sense} and L{POSH.strict.Competence} """ ElementCollection.__init__(self, agent, "AP.%s" % pattern_name) self._name = pattern_name self._elements = elements self._element_idx = 0 self.log.debug("Created")
def __init__(self, agent, pattern_name, elements): """Initialises the action pattern. The log domain is set to [Agentname].AP.[patternName] @param agent: The corresponding agent. @type agent: L{SPOSH.Agent} @param pattern_name: The name of the action pattern. @type pattern_name: string @param elements: The sequence of actions, with an optional competence as the final element. @type elements: sequence of L{SPOSH.Action}, L{SPOSH.Sense} and L{SPOSH.Competence} """ ElementCollection.__init__(self, agent, "AP.%s" % pattern_name) self._name = pattern_name self._elements = elements self._element_idx = 0 self.debug("Created")
def __init__(self, agent, competence_name, priority_elements, goal): """Initialises the competence. If no goal is given, then the goal will never be reached. The log domain is set to "[AgentName].C.[competence_name]". @param agent: The competence's agent. @type agent: L{SPOSH.Agent} @param competence_name: The name of the competence. @type competence_name: string @param priority_elements: The priority elements of the competence, in their order of priority. @type priority_elements: sequence of L{SPOSH.CompetencePriorityElement} @param goal: The goal of the competence. @type goal: L{SPOSH.Trigger} or None """ ElementCollection.__init__(self, agent, "C.%s" % competence_name) self._name = competence_name self._elements = priority_elements self._goal = goal self.debug("Created")
def __init__(self, agent, competence_name, priority_elements, goal): """Initialises the competence. If no goal is given, then the goal will never be reached. The log domain is set to "[AgentId].C.[competence_name]". @param agent: The competence's agent. @type agent: L{POSH.strict.Agent} @param competence_name: The name of the competence. @type competence_name: string @param priority_elements: The priority elements of the competence, in their order of priority. @type priority_elements: sequence of L{POSH.strict.CompetencePriorityElement} @param goal: The goal of the competence. @type goal: L{POSH.strict.Trigger} or None """ ElementCollection.__init__(self, agent, "C.%s" % competence_name) self._name = competence_name self._elements = priority_elements self._goal = goal self.log.debug("Created")
def __init__(self, agent, collection_name, priority_elements, goal): """Initialises the drive collection. The log domain is set to [Agent].DC.[collection_name] If no goal is given (goal = None), then it can never be satisfied. @param agent: The collection's agent. @type agent: L{SPOSH.Agent} @param collection_name: The name of the drive collection. @type collection_name: string @param priority_elements: The drive elements in order of their priority, starting with the highest priority. @type priority_elements: sequence of L{SPOSH.DrivePriorityElement} @param goal: The goal of the drive collection. @type goal: L{SPOSH.Trigger} or None """ ElementCollection.__init__(self, agent, "DC.%s" % collection_name) self._name = collection_name self._elements = priority_elements self._goal = goal self.debug("Created")
def __init__(self, agent, collection_name, priority_elements, goal): """Initialises the drive collection. The log domain is set to [AgentId].DC.[collection_name] If no goal is given (goal = None), then it can never be satisfied. @param agent: The collection's agent. @type agent: L{POSH.strict.Agent} @param collection_name: The name of the drive collection. @type collection_name: string @param priority_elements: The drive elements in order of their priority, starting with the highest priority. @type priority_elements: sequence of L{POSH.strict.DrivePriorityElement} @param goal: The goal of the drive collection. @type goal: L{POSH.strict.Trigger} or None """ ElementCollection.__init__(self, agent, "DC.%s" % collection_name) self._name = collection_name self._elements = priority_elements self._goal = goal self.log.debug("Created") self.last_triggered_element = None