this repo has no description

Adjust analysis scripts for Python and solver versions

+7 -6
analyse_chuffed.py
···
for line in contents:
# match = re.match(r'%\sinit_area\s=\s(\d+)', line)
# if match:
-
# objectives.append(int(match[1]))
+
# objectives.append(int(match.group(1)))
# continue
match = re.match(r"objective\s=\s(\d+)", line)
if match:
-
objectives.append(int(match[1]))
+
objectives.append(int(match.group(1)))
continue
match = re.match(r"%\stime elapsed:\s(\d+)\sms", line)
if match:
-
times.append(int(match[1]))
+
times.append(int(match.group(1)))
continue
times.append(time)
···
contents = f.readlines()
statistics = {}
+
print(contents)
for line in contents:
# Nodes
-
match = re.search(r"nodes:\s+(\d+)", line)
+
match = re.search(r"nodes=(\d+)", line)
if match:
statistics["nodes"] = int(match.group(1))
continue
# Solve time
-
match = re.search(r"search time:\s+(\d+\.\d+)\s*seconds", line)
+
match = re.search(r"solveTime=(\d+\.\d+)", line)
if match:
statistics["search_time"] = int(float(match.group(1)) * 1000)
continue
···
# Best objective
match = re.match(r"objective\s=\s(\d+)", line)
if match:
-
statistics["objective"] = int(match[1])
+
statistics["objective"] = int(match.group(1))
break
# Area
area = compute_area(contents, statistics["search_time"])
+10 -10
analyse_gecode.py
···
# continue
match = re.match(r"objective\s=\s(\d+)", line)
if match:
-
objectives.append(int(match[1]))
+
objectives.append(int(match.group(1)))
continue
-
match = re.match(r"%\stime elapsed:\s(\d+)\sms", line)
+
match = re.match(r"%\stime elapsed:\s(\d\.\d+)\ss", line)
if match:
-
times.append(int(match[1]))
+
times.append(float(match.group(1)))
continue
-
match = re.search(r"solvetime:.*\((\d+).(\d+)\s+ms\)", line)
+
match = re.search(r"solveTime=(\d+(.\d+)?)", line)
if match:
-
times.append(int(match.group(1)))
+
times.append(float(match.group(1)))
continue
assert len(objectives) > 0
···
return int(area)
-
foler = sys.argv[1]
+
folder = sys.argv[1]
statistics = {}
for root, dirs, files in os.walk(folder):
for name in files:
···
# Best objective
match = re.match(r"objective\s=\s(\d+)", line)
if match:
-
objective = int(match[1])
+
objective = int(match.group(1))
break
nodes = -1
···
nodes = int(match.group(1))
continue
# Solve time
-
match = re.search(r"solvetime:.*\((\d+).(\d+)\s+ms\)", line)
+
match = re.search(r"solveTime=(\d+(.\d+)?)", line)
if match:
-
solvetime = int(match.group(1))
+
solvetime = float(match.group(1))
continue
# Restarts
-
match = re.search(r"restarts:\s+(\d+)", line)
+
match = re.search(r"restarts=(\d+)", line)
if match:
restarts = int(match.group(1))
continue