aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/case.study.pledge.run/MODELS2020Plots-temp.ipynb
blob: 3ced7f5bc80e4669a0daed101c18f73365a5a5f3 (plain) (blame)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Data analysis for the paper \"Automated Generation of Consistent Models with Structural and Attribute Constraints\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First, let's load some packages."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Warning message in dir.create(\"plots\"):\n",
      "“'plots' already exists”\n"
     ]
    }
   ],
   "source": [
    "require(tidyverse)\n",
    "dir.create('plots')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "ProcessDetailedStatistics <- function(str) {\n",
    "    str <- sub('TransformationExecutionTime', 'TransformationExecutionTime:', str)\n",
    "    str <- sub('Backtrackingtime', 'BacktrackingTime', str)\n",
    "    str <- gsub('\\\\(|\\\\)', '', str)\n",
    "    str <- lapply(strsplit(str, '\\\\||:'), function (v) {\n",
    "        dim(v) <- c(2, 11)\n",
    "        values <- as.double(v[2,])\n",
    "        names(values) <- v[1,]\n",
    "        as.data.frame(t(values))\n",
    "    })\n",
    "    str\n",
    "}\n",
    "Load10Log <- function(filename, size) {\n",
    "    read_csv(filename, col_types = cols(\n",
    "      .default = col_double(),\n",
    "      Result = col_character(),\n",
    "      Solution1DetailedStatistics = col_character(),\n",
    "      Solution2DetailedStatistics = col_character(),\n",
    "      Solution3DetailedStatistics = col_character(),\n",
    "      Solution4DetailedStatistics = col_character(),\n",
    "      Solution5DetailedStatistics = col_character(),\n",
    "      Solution6DetailedStatistics = col_character(),\n",
    "      Solution7DetailedStatistics = col_character(),\n",
    "      Solution8DetailedStatistics = col_character(),\n",
    "      Solution9DetailedStatistics = col_character(),\n",
    "      Solution10DetailedStatistics = col_character()\n",
    "    )) %>% transmute(\n",
    "        n = size,\n",
    "        Run = Run,\n",
    "        preprocessingTime = get('Domain to logic transformation time') + get('Logic to solver transformation time') + ExplorationInitializationTime,\n",
    "        Solution0FoundAt = Solution0FoundAt,\n",
    "        additionalTime = Solution9FoundAt - Solution0FoundAt,\n",
    "        Solution1DetailedStatistics = ProcessDetailedStatistics(Solution1DetailedStatistics)\n",
    "    ) %>% unnest()\n",
    "#     %>% unnest() %>% mutate(\n",
    "#         # (Logical) constraint evluation should count as refinement.\n",
    "#         ForwardTime = ForwardTime + GlobalConstraintEvaluationTime + FitnessCalculationTime,\n",
    "#         preprocessingTime = preprocessingTime,\n",
    "#         BacktrackingTime = Solution0FoundAt - (StateCoderTime + ForwardTime + NumericalSolverSumTime)\n",
    "#     ) %>% select(n, Run, preprocessingTime, StateCoderTime, ForwardTime, BacktrackingTime, NumericalSolverSumTime, additionalTime)\n",
    "}\n",
    "Load1Log <- function(filename, size) {\n",
    "    read_csv(filename, col_types = cols(\n",
    "      .default = col_double(),\n",
    "      Result = col_character(),\n",
    "      Solution1DetailedStatistics = col_character()\n",
    "    )) %>% filter(Result == \"ModelResultImpl\") %>% transmute(\n",
    "        n = size,\n",
    "        Run = Run,\n",
    "        preprocessingTime = get('Domain to logic transformation time') + get('Logic to solver transformation time') + ExplorationInitializationTime,\n",
    "        Solution0FoundAt = Solution0FoundAt,\n",
    "        Solution1DetailedStatistics = ProcessDetailedStatistics(Solution1DetailedStatistics)\n",
    "    ) %>% unnest(cols = c(Solution1DetailedStatistics)) %>% mutate(\n",
    "        ForwardTime = ForwardTime + GlobalConstraintEvaluationTime + FitnessCalculationTime,\n",
    "        BacktrackingTime = Solution0FoundAt - (StateCoderTime + ForwardTime + NumericalSolverSumTime)\n",
    "    ) %>% select(n, Run, preprocessingTime, StateCoderTime, ForwardTime, BacktrackingTime, NumericalSolverSumTime)\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "ProcessRQ1 <- function(df) {\n",
    "    df %>% group_by(n) %>% summarize(\n",
    "        .groups = 'drop',\n",
    "        time = median(preprocessingTime + StateCoderTime + ForwardTime + BacktrackingTime + NumericalSolverSumTime) / 1000.0\n",
    "    )\n",
    "}\n",
    "ProcessRQ2 <- function(df) {\n",
    "    df %>% group_by(n) %>% summarize(\n",
    "        .groups = 'drop',\n",
    "        preprocessingTime = median(preprocessingTime) / 1000.0,\n",
    "        StateCoderTime = median(StateCoderTime) / 1000.0,\n",
    "        ForwardTime = median(ForwardTime) / 1000.0,\n",
    "        BacktrackingTime = median(BacktrackingTime) / 1000.0,\n",
    "        NumericalSolverSumTime = median(NumericalSolverSumTime) / 1000.0,\n",
    "        additionalTime = median(additionalTime) / 1000.0\n",
    "    )\n",
    "}\n",
    "ProcessRQ3 <- ProcessRQ1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "RQ2Plot <- function(df, name) {\n",
    "    df <- df %>% gather(name, value, -n) %>% filter(name != \"preprocessingTime\")\n",
    "    df$name <- factor(df$name, levels=rev(c('ForwardTime', 'BacktrackingTime', 'StateCoderTime', 'NumericalSolverSumTime', 'additionalTime')))\n",
    "    plot <- df %>% ggplot(aes(x=n, y=value, fill=name)) +\n",
    "        geom_bar(stat='identity') +\n",
    "        scale_fill_brewer(palette='Set2',\n",
    "                          labels=rev(c('Refinement', 'Backtracking', 'State Coding', 'SMT Solver Calls', 'Additional Model Generation')),\n",
    "                          guide=FALSE) +\n",
    "        scale_x_continuous(breaks=c(20, 40, 60, 80, 100), name=\"Model Size (# nodes)\") +\n",
    "        scale_y_continuous(name=\"Runtime (s)\") +\n",
    "        theme_bw()\n",
    "    ggsave(plot=plot, filename=paste0('plots/plot_RQ2_', name, '.pdf'), width=3.5, height=2.5)\n",
    "    plot\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Fam domain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Warning message:\n",
      "“`cols` is now required when using unnest().\n",
      "Please use `cols = c(Solution1DetailedStatistics)`”\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A tibble: 10 × 16</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>n</th><th scope=col>Run</th><th scope=col>preprocessingTime</th><th scope=col>Solution0FoundAt</th><th scope=col>additionalTime</th><th scope=col>TransformationExecutionTime</th><th scope=col>ForwardTime</th><th scope=col>BacktrackingTime</th><th scope=col>GlobalConstraintEvaluationTime</th><th scope=col>FitnessCalculationTime</th><th scope=col>ActivationSelectionTime</th><th scope=col>SolutionCopyTime</th><th scope=col>NumericalSolverSumTime</th><th scope=col>NumericalSolverProblemFormingTime</th><th scope=col>NumericalSolverSolvingTime</th><th scope=col>NumericalSolverInterpretingSolution</th></tr>\n",
       "\t<tr><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>20</td><td> 1</td><td>1038</td><td>5248</td><td>3980</td><td>31</td><td>225</td><td>108</td><td>10</td><td>1</td><td>0</td><td>1</td><td>4675</td><td>2239</td><td>2239</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 2</td><td> 724</td><td>4132</td><td>3628</td><td>20</td><td>155</td><td> 76</td><td> 6</td><td>1</td><td>0</td><td>0</td><td>3780</td><td>2019</td><td>2019</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 3</td><td> 735</td><td>5329</td><td>4437</td><td>20</td><td>195</td><td>106</td><td> 6</td><td>2</td><td>0</td><td>0</td><td>4876</td><td>2588</td><td>2588</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 4</td><td> 694</td><td>4261</td><td>4920</td><td>16</td><td>150</td><td> 69</td><td> 5</td><td>1</td><td>0</td><td>0</td><td>3925</td><td>2085</td><td>2085</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 5</td><td> 888</td><td>5959</td><td>5086</td><td>18</td><td>200</td><td> 93</td><td> 8</td><td>1</td><td>0</td><td>0</td><td>5490</td><td>2946</td><td>2946</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 6</td><td> 665</td><td>6310</td><td>4320</td><td>17</td><td>195</td><td> 90</td><td> 6</td><td>1</td><td>0</td><td>0</td><td>5870</td><td>3167</td><td>3167</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 7</td><td> 604</td><td>5024</td><td>5738</td><td>14</td><td>165</td><td> 74</td><td> 4</td><td>1</td><td>0</td><td>0</td><td>4662</td><td>2464</td><td>2464</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 8</td><td> 589</td><td>5733</td><td>3917</td><td>15</td><td>181</td><td> 81</td><td> 4</td><td>1</td><td>0</td><td>0</td><td>5337</td><td>2827</td><td>2827</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td> 9</td><td> 705</td><td>4719</td><td>4259</td><td>14</td><td>156</td><td> 71</td><td> 4</td><td>1</td><td>0</td><td>2</td><td>4367</td><td>2390</td><td>2390</td><td>0</td></tr>\n",
       "\t<tr><td>20</td><td>10</td><td> 554</td><td>4061</td><td>3990</td><td>13</td><td>141</td><td> 68</td><td> 3</td><td>1</td><td>0</td><td>0</td><td>3741</td><td>1991</td><td>1991</td><td>0</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A tibble: 10 × 16\n",
       "\\begin{tabular}{llllllllllllllll}\n",
       " n & Run & preprocessingTime & Solution0FoundAt & additionalTime & TransformationExecutionTime & ForwardTime & BacktrackingTime & GlobalConstraintEvaluationTime & FitnessCalculationTime & ActivationSelectionTime & SolutionCopyTime & NumericalSolverSumTime & NumericalSolverProblemFormingTime & NumericalSolverSolvingTime & NumericalSolverInterpretingSolution\\\\\n",
       " <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl>\\\\\n",
       "\\hline\n",
       "\t 20 &  1 & 1038 & 5248 & 3980 & 31 & 225 & 108 & 10 & 1 & 0 & 1 & 4675 & 2239 & 2239 & 0\\\\\n",
       "\t 20 &  2 &  724 & 4132 & 3628 & 20 & 155 &  76 &  6 & 1 & 0 & 0 & 3780 & 2019 & 2019 & 0\\\\\n",
       "\t 20 &  3 &  735 & 5329 & 4437 & 20 & 195 & 106 &  6 & 2 & 0 & 0 & 4876 & 2588 & 2588 & 0\\\\\n",
       "\t 20 &  4 &  694 & 4261 & 4920 & 16 & 150 &  69 &  5 & 1 & 0 & 0 & 3925 & 2085 & 2085 & 0\\\\\n",
       "\t 20 &  5 &  888 & 5959 & 5086 & 18 & 200 &  93 &  8 & 1 & 0 & 0 & 5490 & 2946 & 2946 & 0\\\\\n",
       "\t 20 &  6 &  665 & 6310 & 4320 & 17 & 195 &  90 &  6 & 1 & 0 & 0 & 5870 & 3167 & 3167 & 0\\\\\n",
       "\t 20 &  7 &  604 & 5024 & 5738 & 14 & 165 &  74 &  4 & 1 & 0 & 0 & 4662 & 2464 & 2464 & 0\\\\\n",
       "\t 20 &  8 &  589 & 5733 & 3917 & 15 & 181 &  81 &  4 & 1 & 0 & 0 & 5337 & 2827 & 2827 & 0\\\\\n",
       "\t 20 &  9 &  705 & 4719 & 4259 & 14 & 156 &  71 &  4 & 1 & 0 & 2 & 4367 & 2390 & 2390 & 0\\\\\n",
       "\t 20 & 10 &  554 & 4061 & 3990 & 13 & 141 &  68 &  3 & 1 & 0 & 0 & 3741 & 1991 & 1991 & 0\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A tibble: 10 × 16\n",
       "\n",
       "| n &lt;dbl&gt; | Run &lt;dbl&gt; | preprocessingTime &lt;dbl&gt; | Solution0FoundAt &lt;dbl&gt; | additionalTime &lt;dbl&gt; | TransformationExecutionTime &lt;dbl&gt; | ForwardTime &lt;dbl&gt; | BacktrackingTime &lt;dbl&gt; | GlobalConstraintEvaluationTime &lt;dbl&gt; | FitnessCalculationTime &lt;dbl&gt; | ActivationSelectionTime &lt;dbl&gt; | SolutionCopyTime &lt;dbl&gt; | NumericalSolverSumTime &lt;dbl&gt; | NumericalSolverProblemFormingTime &lt;dbl&gt; | NumericalSolverSolvingTime &lt;dbl&gt; | NumericalSolverInterpretingSolution &lt;dbl&gt; |\n",
       "|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n",
       "| 20 |  1 | 1038 | 5248 | 3980 | 31 | 225 | 108 | 10 | 1 | 0 | 1 | 4675 | 2239 | 2239 | 0 |\n",
       "| 20 |  2 |  724 | 4132 | 3628 | 20 | 155 |  76 |  6 | 1 | 0 | 0 | 3780 | 2019 | 2019 | 0 |\n",
       "| 20 |  3 |  735 | 5329 | 4437 | 20 | 195 | 106 |  6 | 2 | 0 | 0 | 4876 | 2588 | 2588 | 0 |\n",
       "| 20 |  4 |  694 | 4261 | 4920 | 16 | 150 |  69 |  5 | 1 | 0 | 0 | 3925 | 2085 | 2085 | 0 |\n",
       "| 20 |  5 |  888 | 5959 | 5086 | 18 | 200 |  93 |  8 | 1 | 0 | 0 | 5490 | 2946 | 2946 | 0 |\n",
       "| 20 |  6 |  665 | 6310 | 4320 | 17 | 195 |  90 |  6 | 1 | 0 | 0 | 5870 | 3167 | 3167 | 0 |\n",
       "| 20 |  7 |  604 | 5024 | 5738 | 14 | 165 |  74 |  4 | 1 | 0 | 0 | 4662 | 2464 | 2464 | 0 |\n",
       "| 20 |  8 |  589 | 5733 | 3917 | 15 | 181 |  81 |  4 | 1 | 0 | 0 | 5337 | 2827 | 2827 | 0 |\n",
       "| 20 |  9 |  705 | 4719 | 4259 | 14 | 156 |  71 |  4 | 1 | 0 | 2 | 4367 | 2390 | 2390 | 0 |\n",
       "| 20 | 10 |  554 | 4061 | 3990 | 13 | 141 |  68 |  3 | 1 | 0 | 0 | 3741 | 1991 | 1991 | 0 |\n",
       "\n"
      ],
      "text/plain": [
       "   n  Run preprocessingTime Solution0FoundAt additionalTime\n",
       "1  20  1  1038              5248             3980          \n",
       "2  20  2   724              4132             3628          \n",
       "3  20  3   735              5329             4437          \n",
       "4  20  4   694              4261             4920          \n",
       "5  20  5   888              5959             5086          \n",
       "6  20  6   665              6310             4320          \n",
       "7  20  7   604              5024             5738          \n",
       "8  20  8   589              5733             3917          \n",
       "9  20  9   705              4719             4259          \n",
       "10 20 10   554              4061             3990          \n",
       "   TransformationExecutionTime ForwardTime BacktrackingTime\n",
       "1  31                          225         108             \n",
       "2  20                          155          76             \n",
       "3  20                          195         106             \n",
       "4  16                          150          69             \n",
       "5  18                          200          93             \n",
       "6  17                          195          90             \n",
       "7  14                          165          74             \n",
       "8  15                          181          81             \n",
       "9  14                          156          71             \n",
       "10 13                          141          68             \n",
       "   GlobalConstraintEvaluationTime FitnessCalculationTime\n",
       "1  10                             1                     \n",
       "2   6                             1                     \n",
       "3   6                             2                     \n",
       "4   5                             1                     \n",
       "5   8                             1                     \n",
       "6   6                             1                     \n",
       "7   4                             1                     \n",
       "8   4                             1                     \n",
       "9   4                             1                     \n",
       "10  3                             1                     \n",
       "   ActivationSelectionTime SolutionCopyTime NumericalSolverSumTime\n",
       "1  0                       1                4675                  \n",
       "2  0                       0                3780                  \n",
       "3  0                       0                4876                  \n",
       "4  0                       0                3925                  \n",
       "5  0                       0                5490                  \n",
       "6  0                       0                5870                  \n",
       "7  0                       0                4662                  \n",
       "8  0                       0                5337                  \n",
       "9  0                       2                4367                  \n",
       "10 0                       0                3741                  \n",
       "   NumericalSolverProblemFormingTime NumericalSolverSolvingTime\n",
       "1  2239                              2239                      \n",
       "2  2019                              2019                      \n",
       "3  2588                              2588                      \n",
       "4  2085                              2085                      \n",
       "5  2946                              2946                      \n",
       "6  3167                              3167                      \n",
       "7  2464                              2464                      \n",
       "8  2827                              2827                      \n",
       "9  2390                              2390                      \n",
       "10 1991                              1991                      \n",
       "   NumericalSolverInterpretingSolution\n",
       "1  0                                  \n",
       "2  0                                  \n",
       "3  0                                  \n",
       "4  0                                  \n",
       "5  0                                  \n",
       "6  0                                  \n",
       "7  0                                  \n",
       "8  0                                  \n",
       "9  0                                  \n",
       "10 0                                  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "ename": "ERROR",
     "evalue": "Error: Problem with `summarise()` input `StateCoderTime`.\n\u001b[31m✖\u001b[39m object 'StateCoderTime' not found\n\u001b[34mℹ\u001b[39m Input `StateCoderTime` is `median(StateCoderTime)/1000`.\n\u001b[34mℹ\u001b[39m The error occurred in group 1: n = 20.\n",
     "output_type": "error",
     "traceback": [
      "Error: Problem with `summarise()` input `StateCoderTime`.\n\u001b[31m✖\u001b[39m object 'StateCoderTime' not found\n\u001b[34mℹ\u001b[39m Input `StateCoderTime` is `median(StateCoderTime)/1000`.\n\u001b[34mℹ\u001b[39m The error occurred in group 1: n = 20.\nTraceback:\n",
      "1. FamilyTreeRQ2Raw %>% ProcessRQ2",
      "2. ProcessRQ2(.)",
      "3. df %>% group_by(n) %>% summarize(.groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n .     StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n .     BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n .     additionalTime = median(additionalTime)/1000)   # at line 8-16 of file <text>",
      "4. summarize(., .groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n .     StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n .     BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n .     additionalTime = median(additionalTime)/1000)",
      "5. summarise.grouped_df(., .groups = \"drop\", preprocessingTime = median(preprocessingTime)/1000, \n .     StateCoderTime = median(StateCoderTime)/1000, ForwardTime = median(ForwardTime)/1000, \n .     BacktrackingTime = median(BacktrackingTime)/1000, NumericalSolverSumTime = median(NumericalSolverSumTime)/1000, \n .     additionalTime = median(additionalTime)/1000)",
      "6. summarise_cols(.data, ...)",
      "7. withCallingHandlers({\n .     for (i in seq_along(dots)) {\n .         quo <- dots[[i]]\n .         chunks[[i]] <- mask$eval_all_summarise(quo)\n .         mask$across_cache_reset()\n .         result_type <- types[[i]] <- withCallingHandlers(vec_ptype_common(!!!chunks[[i]]), \n .             vctrs_error_incompatible_type = function(cnd) {\n .                 abort(class = \"dplyr:::error_summarise_incompatible_combine\", \n .                   parent = cnd)\n .             })\n .         if ((is.null(dots_names) || dots_names[i] == \"\") && is.data.frame(result_type)) {\n .             map2(seq_along(result_type), names(result_type), \n .                 function(j, nm) {\n .                   mask$add(nm, pluck(chunks[[i]], j))\n .                 })\n .         }\n .         else {\n .             mask$add(auto_named_dots[i], chunks[[i]])\n .         }\n .     }\n .     recycle_info <- .Call(dplyr_summarise_recycle_chunks, chunks, \n .         mask$get_rows(), types)\n .     chunks <- recycle_info$chunks\n .     sizes <- recycle_info$sizes\n .     for (i in seq_along(dots)) {\n .         result <- vec_c(!!!chunks[[i]], .ptype = types[[i]])\n .         if ((is.null(dots_names) || dots_names[i] == \"\") && is.data.frame(result)) {\n .             cols[names(result)] <- result\n .         }\n .         else {\n .             cols[[auto_named_dots[i]]] <- result\n .         }\n .     }\n . }, error = function(e) {\n .     local_call_step(dots = dots, .index = i, .fn = \"summarise\", \n .         .dot_data = inherits(e, \"rlang_error_data_pronoun_not_found\"))\n .     call_step <- peek_call_step()\n .     error_name <- call_step$error_name\n .     if (inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n .         bullets <- c(x = glue(\"Input `{error_name}` must return compatible vectors across groups\", \n .             .envir = peek_call_step()), i = cnd_bullet_combine_details(e$parent$x, \n .             e$parent$x_arg), i = cnd_bullet_combine_details(e$parent$y, \n .             e$parent$y_arg))\n .     }\n .     else if (inherits(e, \"dplyr:::summarise_unsupported_type\")) {\n .         bullets <- c(x = glue(\"Input `{error_name}` must be a vector, not {friendly_type_of(result)}.\", \n .             result = e$result), i = cnd_bullet_rowwise_unlist())\n .     }\n .     else if (inherits(e, \"dplyr:::summarise_incompatible_size\")) {\n .         peek_mask()$set_current_group(e$group)\n .         bullets <- c(x = glue(\"Input `{error_name}` must be size {or_1(expected_size)}, not {size}.\", \n .             expected_size = e$expected_size, size = e$size), \n .             i = glue(\"An earlier column had size {expected_size}.\", \n .                 expected_size = e$expected_size))\n .     }\n .     else {\n .         bullets <- c(x = conditionMessage(e))\n .     }\n .     bullets <- c(cnd_bullet_header(), bullets, i = cnd_bullet_input_info())\n .     if (!inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n .         bullets <- c(bullets, i = cnd_bullet_cur_group_label())\n .     }\n .     abort(bullets, class = \"dplyr_error\")\n . })",
      "8. mask$eval_all_summarise(quo)",
      "9. median(StateCoderTime)",
      "10. .handleSimpleError(function (e) \n  . {\n  .     local_call_step(dots = dots, .index = i, .fn = \"summarise\", \n  .         .dot_data = inherits(e, \"rlang_error_data_pronoun_not_found\"))\n  .     call_step <- peek_call_step()\n  .     error_name <- call_step$error_name\n  .     if (inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n  .         bullets <- c(x = glue(\"Input `{error_name}` must return compatible vectors across groups\", \n  .             .envir = peek_call_step()), i = cnd_bullet_combine_details(e$parent$x, \n  .             e$parent$x_arg), i = cnd_bullet_combine_details(e$parent$y, \n  .             e$parent$y_arg))\n  .     }\n  .     else if (inherits(e, \"dplyr:::summarise_unsupported_type\")) {\n  .         bullets <- c(x = glue(\"Input `{error_name}` must be a vector, not {friendly_type_of(result)}.\", \n  .             result = e$result), i = cnd_bullet_rowwise_unlist())\n  .     }\n  .     else if (inherits(e, \"dplyr:::summarise_incompatible_size\")) {\n  .         peek_mask()$set_current_group(e$group)\n  .         bullets <- c(x = glue(\"Input `{error_name}` must be size {or_1(expected_size)}, not {size}.\", \n  .             expected_size = e$expected_size, size = e$size), \n  .             i = glue(\"An earlier column had size {expected_size}.\", \n  .                 expected_size = e$expected_size))\n  .     }\n  .     else {\n  .         bullets <- c(x = conditionMessage(e))\n  .     }\n  .     bullets <- c(cnd_bullet_header(), bullets, i = cnd_bullet_input_info())\n  .     if (!inherits(e, \"dplyr:::error_summarise_incompatible_combine\")) {\n  .         bullets <- c(bullets, i = cnd_bullet_cur_group_label())\n  .     }\n  .     abort(bullets, class = \"dplyr_error\")\n  . }, \"object 'StateCoderTime' not found\", base::quote(median(StateCoderTime)))",
      "11. h(simpleError(msg, call))",
      "12. abort(bullets, class = \"dplyr_error\")",
      "13. signal_abort(cnd)"
     ]
    }
   ],
   "source": [
    "FamilyTreeRQ2Raw <- rbind(\n",
    "#     Load10Log(\"measurements/stats/FamilyTree//size010to-1r10n10rt300nsdrealstats_06-0249.csv\", 10),\n",
    "    Load10Log(\"measurements/stats/FamilyTree//size020to-1r10n10rt3600nsz3stats_06-0205.csv\", 20)\n",
    ")\n",
    "FamilyTreeRQ2Raw\n",
    "FamilyTreeRQ2 <- FamilyTreeRQ2Raw %>% ProcessRQ2\n",
    "FamilyTreeRQ2\n",
    "# median(FamilyTreeRQ2Raw$preprocessingTime) / 1000.0\n",
    "# FamilyTreeRQ2 %>% RQ2Plot('FamilyTree')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "R",
   "language": "R",
   "name": "ir"
  },
  "language_info": {
   "codemirror_mode": "r",
   "file_extension": ".r",
   "mimetype": "text/x-r-source",
   "name": "R",
   "pygments_lexer": "r",
   "version": "4.0.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}