Esempio n. 1
0
    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
Esempio n. 2
0
  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
Esempio n. 3
0
    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 []
Esempio n. 4
0
    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 []
Esempio n. 5
0
    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
Esempio n. 6
0
    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