You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB

6 years ago
  1. #!/usr/bin/env python3
  2. import scriptUtils
  3. import compare
  4. import glob
  5. import os
  6. def __main():
  7. args = __parseArguments()
  8. __compareRuns(args)
  9. def __parseArguments():
  10. parser = scriptUtils.ArgParser()
  11. parser.addInstanceDirArg()
  12. return parser.parse()
  13. def __compareRuns(args):
  14. instancePaths = glob.glob(os.path.join(
  15. os.path.join(args["dataset_dir"],
  16. args["instance_dir"]),
  17. "*.dimacs"))
  18. runDirs = glob.glob(os.path.join(
  19. os.path.join(args["dataset_dir"],
  20. args["wmis_result_dir"]),
  21. "run*"))
  22. for path in instancePaths:
  23. __compareRunsOfInstance(path, runDirs)
  24. def __compareRunsOfInstance(instancePath, runDirs):
  25. instanceName = os.path.basename(instancePath)
  26. with open(instancePath) as instanceFile:
  27. if __name__ == "__main__":
  28. __main()