-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
42 lines (29 loc) · 1.13 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import sys
import time
from reading_simplified_params.make_graph_from_params import create_final_parameters_from_file
from sat_solver.sat_solver_mcd import sat_solver_pipeline
def main():
# ------ TIME LOGGING STARTS -------
start = time.time()
# ----- INPUT -----
if len(sys.argv) != 2:
print("Usage: python main.py <path_to_folder>")
sys.exit(1)
folder_path = sys.argv[1]
# -------- SIMPLIFICATION --------
s1_sat, s2_sat, g1_grey_sat, g2_grey_sat, black_sat, he_sat, cycles_removed, num_vertices = create_final_parameters_from_file(
f'{folder_path}/vertices.txt',
f'{folder_path}/gr.txt',
f'{folder_path}/partners.txt',
f'{folder_path}/gene_list.txt',
f'{folder_path}/simplified_cycles.txt'
)
# # ------ SAT SOLVER ------
log = []
log = sat_solver_pipeline(s1_sat, s2_sat, g1_grey_sat + g2_grey_sat, black_sat, he_sat, num_vertices, log)
print(f'Simplified Cycles: {cycles_removed}')
# # # ------ TIME LOGGING ENDS ------
end = time.time()
print(f'Total Time Taken: {str(end - start)}')
if __name__ == "__main__":
main()