def write_pddl(domain_pddl=None, problem_pddl=None, temp_dir=TEMP_DIR): clear_dir(temp_dir) domain_path = os.path.join(temp_dir, DOMAIN_INPUT) if domain_pddl is not None: write(domain_path, domain_pddl) problem_path = os.path.join(temp_dir, PROBLEM_INPUT) if problem_pddl is not None: write(problem_path, problem_pddl) return domain_path, problem_path
def write_pddl(domain_pddl, problem_pddl): # TODO: already in downward.py safe_rm_dir(TEMP_DIR) # Ensures not using old plan ensure_dir(TEMP_DIR) domain_path = TEMP_DIR + DOMAIN_INPUT problem_path = TEMP_DIR + PROBLEM_INPUT write(domain_path, domain_pddl) write(problem_path, problem_pddl) return domain_path, problem_path