Add fixed-horizon option to benchmark runner

This commit is contained in:
Patrick Lühne 2018-02-14 18:44:56 +01:00
parent f845e2a95b
commit e014a450ed

View File

@ -175,6 +175,12 @@ def nextJob(config):
if not instanceSetID in configuration["instanceSets"]:
continue
fixedHorizon = ("fixedHorizon" in configuration and configuration["fixedHorizon"] == True)
planLength = (instance["planLength"] if "planLength" in instance else None)
if fixedHorizon and planLength == None:
continue
if not os.path.exists(outputFile) or not os.path.exists(errorFile) or not os.path.exists(environmentFile):
return {"configuration": configuration, "instance": instance}
@ -219,6 +225,9 @@ def runJob(configuration, instance, config):
command += configuration["options"]
if "fixedHorizon" in configuration and configuration["fixedHorizon"] == True:
command += ["-F " + str(instance["planLength"]), "-T " + str(instance["planLength"])]
# TODO: verify planner Git hash
plannerDir = config["executables"]["planner"]["directory"]
stdout, stderr, exitCode = executeCommand(command, cwd = plannerDir)