|
|
@ -58,18 +58,32 @@ def parse_result(res_str): |
|
|
|
|
|
|
|
return res |
|
|
|
|
|
|
|
def parse_instance_path(ipath): |
|
|
|
name = pl.Path(ipath).name.strip() |
|
|
|
|
|
|
|
ext_nr = int(name[:-len(".cnf.bz2")][-4:]) |
|
|
|
instance = name[:-len("_0000.cnf.bz2")] |
|
|
|
|
|
|
|
return instance, ext_nr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
parser = argparse.ArgumentParser() |
|
|
|
parser.add_argument("-i", "--instance", help="The instance.") |
|
|
|
|
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
|
|
|
|
|
res_str = run_alg(args.instance) |
|
|
|
|
|
|
|
|
|
|
|
iname, ext_nr = parse_instance_path(args.instance) |
|
|
|
|
|
|
|
res = parse_result(res_str) |
|
|
|
|
|
|
|
res_vals = [iname, str(ext_nr)] + list(map(str, res.values())) |
|
|
|
|
|
|
|
print(','.join(map(str, res.values()))) |
|
|
|
print(','.join(res_vals)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|