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.
This commit is contained in:
Patrick Lühne 2017-11-28 00:49:44 +01:00
parent ef6d1c4a7f
commit 18e4074453
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -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}