Пример #1
0
def gen_heuristic_subplan(max_depth: int, heuristic_links: list):
    heuristic_plan = []

    for prop_links in heuristic_links:
        prop_links.sort()
        prop_plan: list = base.dfs(max_depth, prop_links)
        heuristic_plan = union_plans(heuristic_plan, prop_plan)

    return heuristic_plan
Пример #2
0
def gen_full_plan(max_depth: int, heuristic_subplan: list,
                  links: list) -> list:
    sorted_links = sorted(links)
    full_dfs_plan: list = base.dfs(max_depth, sorted_links)

    pre_validate_heuristic_gen(heuristic_subplan, full_dfs_plan)
    heuristic_plan: list = union_plans(heuristic_subplan, full_dfs_plan)
    post_validate_heuristic_gen(heuristic_plan, full_dfs_plan)

    return heuristic_plan
Пример #3
0
 def get_dfs_plan(self) -> list:
     return base.dfs(self.depth, self.links)