#!/usr/bin/env python3 from util import script as scriptUtils from util import compare import glob import os def __main(): args = __parseArguments() __compareRuns(args) def __parseArguments(): parser = scriptUtils.ArgParser() parser.addInstanceDirArg() return parser.parse() def __compareRuns(args): instancePaths = glob.glob(os.path.join( os.path.join(args["dataset_dir"], args["instance_dir"]), "*.dimacs")) runDirs = glob.glob(os.path.join( os.path.join(args["dataset_dir"], args["wmis_result_dir"]), "run*")) for path in instancePaths: __compareRunsOfInstance(path, runDirs) def __compareRunsOfInstance(instancePath, runDirs): instanceName = os.path.basename(instancePath) with open(instancePath) as instanceFile: if __name__ == "__main__": __main()