Browse Source

Add fixed-horizon option to benchmark runner

master
Patrick Lühne 4 years ago
parent
commit
e014a450ed
  1. 9
      benchmark.py

9
benchmark.py

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

Loading…
Cancel
Save