-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_results.py
More file actions
153 lines (131 loc) · 6.76 KB
/
Copy pathplot_results.py
File metadata and controls
153 lines (131 loc) · 6.76 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import ast
import os
import re
import pandas as pd
from utility.metrics import compute_metrics_problems, plot_3d_graph, compute_NDCG_TOPK_time, \
compute_bar_plot_sparsity, plot_relative_sparsity, plot_NDCG_TOPK_TIME, plot_NDCG_TOPK_IMAGE, compute_unsat_time
from utility.utility import plot_for_problem, compute_avg_fixed_values
#problems = ['ordered solutions','ozlen+','saugmecon','rectangle']
# example for generating graphs for Q1
# problems = ['fwi','fi','disjunction','tamby','tamby_lex','saugmecon','dpa','ozlen+','rectangle']
# compute_metrics_problems('./plot_Q12/gurobi_inc/facility/custom', top_k=100,
# title = 'Facility Location Problem',
# type_problem= 'facility',
# objs=[3,4],
# problems = problems,is_q3=False)
# # #
# compute_metrics_problems('./plot_Q12/gurobi_inc/general_assignment/custom', top_k=100,
# title = 'Assignment Problem',
# type_problem= 'assignment',
# objs=[3,4],
# problems = problems,is_q3=False)
# # # #
# compute_metrics_problems('./plot_Q12/gurobi_inc/knapsack/custom', top_k=100,
# title = 'Knapsack Problem',
# type_problem= 'knapsack',
# objs=[3,4],
# problems = problems,is_q3=False)
# #
# compute_metrics_problems('./plot_Q12/gurobi_inc/land_conservation', top_k=100,
# title = 'Land Conservation Problem',
# type_problem= 'land_conservation',
# objs=[3,4],
# problems = problems,is_q3=False)
# #
#
# #example for generating graphs for Q2
# problems = ['fwi','fi','disjunction','tamby','tamby_lex','saugmecon','dpa','ozlen+','rectangle']
# # # # # # #
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/facility/custom/3KL6C36',
# type_problem= 'facility',
# top_k = 100 ,title= 'Facility Location Problem 3 objectives',
# problems = problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/facility/custom/4KL6C36',
# type_problem= 'facility',
# top_k = 100 ,title= 'Facility Location Problem 4 objectives',
# problems = problems)
# #
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/knapsack/custom/3KP30-C1',
# type_problem= 'knapsack',
# top_k = 100 ,title= 'Knapsack Problem 3 objectives',
# problems = problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/knapsack/custom/4KP30-C1',
# type_problem='knapsack',
# top_k=100, title='Knapsack Problem 4 objectives',
# problems=problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/general_assignment/custom/3KP30',
# type_problem= 'assignment',
# top_k = 100 ,title= 'Assignment Problem 3 objectives',
# problems = problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/general_assignment/custom/4KP30',
# type_problem='assignment',
# top_k=100, title='Assignment Problem 4 objectives',
# problems=problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/land_conservation/3K',
# type_problem= 'land_conservation',
# top_k = 100 ,title= 'Land Conservation 3 objectives',
# problems = problems)
#
# plot_NDCG_TOPK_TIME('./plot_Q12/gurobi_inc/land_conservation/4K',
# type_problem='land_conservation',
# top_k = 100, title='Land Conservation 4 objectives',
# problems=problems)
#
# example for generating graphs for Q3
# compute_metrics_problems('plot_Q3/gurobi_inc/assignment/custom', top_k=50,
# title = 'Assignment Problem',
# type_problem= 'assignment',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
#
# compute_metrics_problems('plot_Q3/gurobi_inc/assignment/custom', top_k=100,
# title = 'Assignment Problem',
# type_problem= 'assignment',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
#
# compute_metrics_problems('plot_Q3/gurobi_inc/assignment/custom', top_k=200,
# title = 'Assignment Problem',
# type_problem= 'assignment',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
# compute_metrics_problems('./plot_Q3/gurobi_inc/knapsack/custom', top_k=200,
# title = 'Knapsack Problem',
# type_problem= 'knapsack',
# objs=[4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
#
# compute_metrics_problems('./plot_Q3/gurobi_inc/assignment/custom', top_k=100,
# title = 'Knapsack Problem',
# type_problem= 'knapsack',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
#
# compute_metrics_problems('./plot_Q3/gurobi_inc/assignment/custom', top_k=50,
# title = 'Knapsack Problem',
# type_problem= 'knapsack',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fwi','fi','disjunction'],is_q3=True)
# compute_metrics_problems('./plot_Q3/gurobi_inc/land_conservation/custom', top_k=200,
# title = 'Land Conservation Problem',
# type_problem= 'land_conservation',
# objs=[4,5,6,7,8,9,10],
# problems = ['fi','disjunction','fwi'],is_q3=True)
#
# compute_metrics_problems('./plot_Q3/gurobi_inc/land_conservation/custom', top_k=100,
# title = 'Land Conservation Problem',
# type_problem= 'land_conservation',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fi','disjunction','fwi'],is_q3=True)
#
# compute_metrics_problems('./plot_Q3/gurobi_inc/land_conservation/custom', top_k=50,
# title = 'Land Conservation Problem',
# type_problem= 'land_conservation',
# objs=[3,4,5,6,7,8,9,10],
# problems = ['fi','disjunction','fwi'],is_q3=True)
compute_bar_plot_sparsity('plot_Q3/gurobi_inc',[3,4,5,6,7,8,9,10])