def generator(self, start_vertex, goal_connector, rg): #yield # NOTE - include if don't want initial generation vertex = rg.vertex(goal_connector.condition.substate) vertex.connect(goal_connector) variable, value = list(vertex.substate)[0] for operator in self.operators: if variable in operator.effects: effect = operator.effects[variable] if is_discrete_effect(effect) and effect.value == value: rg.edge(operator).connect(vertex) yield
def __call__(self, start_vertex, goal_connector): assert is_discrete_condition(goal_connector.condition) vertex = self.rg.vertex(goal_connector.condition.substate) vertex.connect(goal_connector) variable, value = list(vertex.substate)[0] for operator in self.operators: if variable in operator.effects: effect = operator.effects[variable] if is_discrete_effect(effect) and effect.value == value: self.rg.edge(operator).connect(vertex) return []
def __call__(self, start_vertex, goal_connector): assert is_discrete_condition(goal_connector.condition) vertex = self.rg.vertex(goal_connector.condition.substate) vertex.connect(goal_connector) variable, value = list(vertex.substate)[0] subplanners = [] for operator in self.operators: if variable in operator.effects: effect = operator.effects[variable] if is_discrete_effect(effect) and effect.value == value: subplanners.append(DiscreteSubplanner([operator])(start_vertex, goal_connector, self.rg)) return subplanners
def __call__(self, start_vertex, goal_connector): assert is_discrete_condition(goal_connector.condition) vertex = self.rg.vertex(goal_connector.condition.substate) vertex.connect(goal_connector) variable, value = list(vertex.substate)[0] subplanners = [] for operator in self.operators: if variable in operator.effects: effect = operator.effects[variable] if is_discrete_effect(effect) and effect.value == value: subplanners.append( DiscreteSubplanner([operator])(start_vertex, goal_connector, self.rg)) return subplanners