-
Notifications
You must be signed in to change notification settings - Fork 0
/
scatterplots_main_paper.R
50 lines (41 loc) · 2.21 KB
/
scatterplots_main_paper.R
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
source('common.R')
rows_to_keep <- function() {
c(
'instance',
'solved',
'seqs',
'restarts',
'total_astar_time',
'total_solve_time',
'planner_memory',
'mean_ops_by_constraint',
'best_bound'
)
}
filename <- 'results/12_17/4_get_best_bounds_1.xlsx'
our <- read_all_results(filename, 'LMCUT_T3', rows_to_keep = rows_to_keep)
sat <- read_all_results(filename, 'SAT', rows_to_keep = rows_to_keep)
seqs <- tibble(our = our$seqs, sat = sat$seqs) %>%
filter(!is.na(our), !is.na(sat)) %>% mutate(our = our + 1, sat = sat + 1)
g1 <- scatter_plot(log2(seqs$sat), log2(seqs$our),
y_label = 'OpSearch',
subtitle = TeX("$S$"), fontsize = 50, pointsize=7) + xlim(0, 13) + ylim(0, 13)
planner_memory <- tibble(our = our$planner_memory, sat = sat$planner_memory) %>%
filter(!is.na(our), !is.na(sat)) %>% mutate(our = our + 1, sat = sat + 1)
g2 <- scatter_plot(log2(planner_memory$sat), log2(planner_memory$our),
subtitle = TeX("$M$"), fontsize = 50, pointsize=7) + xlim(6, 13) + ylim(6, 13)
mean_ops_by_constraint <- tibble(our = our$mean_ops_by_constraint, sat = sat$mean_ops_by_constraint) %>%
filter(!is.na(our), !is.na(sat)) %>% mutate(our = our + 1, sat = sat + 1)
g3 <- scatter_plot(log2(mean_ops_by_constraint$sat), log2(mean_ops_by_constraint$our),
x_label = 'OpSeq',
subtitle = TeX("$\\bar{u}$"), fontsize = 50, pointsize=7) + xlim(0, 7) + ylim(0, 7)
seqs_time <- tibble(our = our$total_seq_time, sat = sat$total_seq_time) %>%
filter(!is.na(our), !is.na(sat)) %>% mutate(our = our + 1, sat = sat + 1)
g4 <- scatter_plot(log2(seqs_time$sat), log2(seqs_time$our),
subtitle = TeX("$S_t$"), fontsize = 50, pointsize=7) + xlim(0, 12) + ylim(0, 12)
total_time <- tibble(our = our$total_solve_time, sat = sat$total_solve_time) %>%
filter(!is.na(our), !is.na(sat)) %>% mutate(our = our + 1, sat = sat + 1)
g5 <- scatter_plot(log2(total_time$sat), log2(total_time$our),
subtitle = TeX("$T_t$"), fontsize = 50, pointsize=7) + xlim(0, 13) + ylim(0, 13)
all <- ggarrange(g1, g2, g3, g4, g5, nrow = 1)
ggsave('figs/main_scatter.pdf', plot = all, family = 'Times', width = 38, height = 8)