From 18e4074453e9e24a866a59c0fa66716ebcd8d9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 28 Nov 2017 00:49:44 +0100 Subject: [PATCH] Support separate domain files With this change, the benchmark runner looks for per-problem domain files in the case that there is no single domain.pddl file. This is necessary for a range of domains where there is a domain file for each problem file. --- benchmark.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmark.py b/benchmark.py index cf438b70b..23dab08df 100644 --- a/benchmark.py +++ b/benchmark.py @@ -141,6 +141,10 @@ def inputFilenames(instance, config): pddlInstancesDir = config["input"]["pddlInstances"] domainFile = os.path.join(pddlInstancesDir, instance["ipc"], "domains", instance["domain"], "domain.pddl") + + if not os.path.exists(domainFile): + domainFile = os.path.join(pddlInstancesDir, instance["ipc"], "domains", instance["domain"], "domains", "domain-" + str(instance["instance"]) + ".pddl") + instanceFile = os.path.join(pddlInstancesDir, instance["ipc"], "domains", instance["domain"], "instances", "instance-" + str(instance["instance"]) + ".pddl") return {"domainFile": domainFile, "instanceFile": instanceFile}