-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_me.m
270 lines (228 loc) · 13.9 KB
/
run_me.m
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
close all;
clear all;
clc;
addpath('tools/')
range = 1:450;
output_options = struct(...
'font_type', 'Times',...
'font_size', 20,...
'pixel_width', 1280,...
'pixel_height', 720,...
'paper_width', 21,... % In centimeters
'paper_height', 9*21/16,... % In centimeters
'path', './output/',...
'range', range...
);
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------
gs_blocked_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_blocked_glasses_in_glass_profiling.m');
gs_blocked_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_blocked_jacks_in_glass_profiling.m');
gs_blocked_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_blocked_spheres_in_glass_profiling.m');
gs_blocked_tower_results = clean_up_data('data/2017_03_22/gs_blocked_tower_profiling.m');
gs_blocked_wall_results = clean_up_data('data/2017_03_22/gs_blocked_wall_profiling.m');
gs_bounce_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_bounce_spheres_in_glass_profiling.m');
gs_bounce_tower_results = clean_up_data('data/2017_03_22/gs_bounce_tower_profiling.m');
gs_bounce_wall_results = clean_up_data('data/2017_03_22/gs_bounce_wall_profiling.m');
gs_box_model_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_box_model_jacks_in_glass_profiling.m');
gs_box_model_pantheon_results = clean_up_data('data/2017_03_22/gs_box_model_pantheon_profiling.m');
gs_box_model_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_box_model_spheres_in_glass_profiling.m');
gs_box_model_tower_results = clean_up_data('data/2017_03_22/gs_box_model_tower_profiling.m');
gs_box_model_wall_results = clean_up_data('data/2017_03_22/gs_box_model_wall_profiling.m');
gs_global_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_global_glasses_in_glass_profiling.m');
gs_global_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_global_jacks_in_glass_profiling.m');
gs_global_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_global_spheres_in_glass_profiling.m');
gs_global_tower_results = clean_up_data('data/2017_03_22/gs_global_tower_profiling.m');
gs_global_wall_results = clean_up_data('data/2017_03_22/gs_global_wall_profiling.m');
gs_local_colosseum_results = clean_up_data('data/2017_03_22/gs_local_colosseum_profiling.m');
gs_local_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_local_glasses_in_glass_profiling.m');
gs_local_jacks_in_funnel_results = clean_up_data('data/2017_03_22/gs_local_jacks_in_funnel_profiling.m');
gs_local_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_local_jacks_in_glass_profiling.m');
gs_local_pantheon_results = clean_up_data('data/2017_03_22/gs_local_pantheon_profiling.m');
gs_local_shoot_results = clean_up_data('data/2017_03_22/gs_local_shoot_profiling.m');
gs_local_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_local_spheres_in_glass_profiling.m');
gs_local_temple_results = clean_up_data('data/2017_03_22/gs_local_temple_profiling.m');
gs_local_tower_results = clean_up_data('data/2017_03_22/gs_local_tower_profiling.m');
gs_local_wall_results = clean_up_data('data/2017_03_22/gs_local_wall_profiling.m');
gs_no_fricton_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_no_friction_glasses_in_glass_profiling.m');
gs_no_friction_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_no_friction_jacks_in_glass_profiling.m');
gs_no_friction_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_no_friction_spheres_in_glass_profiling.m');
gs_no_friction_tower_results = clean_up_data('data/2017_03_22/gs_no_friction_tower_profiling.m');
gs_no_friction_wall_results = clean_up_data('data/2017_03_22/gs_no_friction_wall_profiling.m');
gs_no_stab_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_no_stab_glasses_in_glass_profiling.m');
gs_no_stab_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_no_stab_jacks_in_glass_profiling.m');
gs_no_stab_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_no_stab_spheres_in_glass_profiling.m');
gs_no_stab_tower_results = clean_up_data('data/2017_03_22/gs_no_stab_tower_profiling.m');
gs_no_stab_wall_results = clean_up_data('data/2017_03_22/gs_no_stab_wall_profiling.m');
gs_pre_post_glasses_in_glass_results = clean_up_data('data/2017_03_22/gs_pre_post_glasses_in_glass_profiling.m');
gs_pre_post_jacks_in_glass_results = clean_up_data('data/2017_03_22/gs_pre_post_jacks_in_glass_profiling.m');
gs_pre_post_spheres_in_glass_results = clean_up_data('data/2017_03_22/gs_pre_post_spheres_in_glass_profiling.m');
gs_pre_post_tower_results = clean_up_data('data/2017_03_22/gs_pre_post_tower_profiling.m');
gs_pre_post_wall_results = clean_up_data('data/2017_03_22/gs_pre_post_wall_profiling.m');
jacobi_pre_post_spheres_in_glass_results = clean_up_data('data/2017_03_22/jacobi_pre_post_spheres_in_glass_profiling.m');
long_glasses_in_glass_results = clean_up_data('data/2017_03_22/long_runs_glasses_in_glass_profiling.m');
long_jacks_in_funnel_results = clean_up_data('data/2017_03_22/long_runs_jacks_in_funnel_profiling.m');
long_jacks_in_glass_results = clean_up_data('data/2017_03_22/long_runs_jacks_in_glass_profiling.m');
long_pantheon_results = clean_up_data('data/2017_03_22/long_runs_pantheon_profiling.m');
long_shoot_results = clean_up_data('data/2017_03_22/long_runs_shoot_profiling.m');
long_spheres_in_glass_results = clean_up_data('data/2017_03_22/long_runs_spheres_in_glass_profiling.m');
long_tower_results = clean_up_data('data/2017_03_22/long_runs_tower_profiling.m');
long_wall_results = clean_up_data('data/2017_03_22/long_runs_wall_profiling.m');
data = {...
{'Glasses (Blocked)', gs_blocked_glasses_in_glass_results},...
{'Jacks (Blocked)', gs_blocked_jacks_in_glass_results},...
{'Spheres (Blocked)', gs_blocked_spheres_in_glass_results},...
{'Tower (Blocked)', gs_blocked_tower_results},...
{'Wall (Blocked)', gs_blocked_wall_results},...
{'Spheres (Bounce)', gs_bounce_spheres_in_glass_results},...
{'Tower (Bounce)', gs_bounce_tower_results},...
{'Wall (Bounce)', gs_bounce_wall_results},...
{'Jacks (Box Model)', gs_box_model_jacks_in_glass_results},...
{'Pantheon (Box Model)', gs_box_model_pantheon_results},...
{'Spheres (Box Model)', gs_box_model_spheres_in_glass_results},...
{'Tower (Box Model)', gs_box_model_tower_results},...
{'Wall (Box Model)', gs_box_model_wall_results},...
{'Glasses (Global)', gs_global_glasses_in_glass_results},...
{'Jacks (Global)', gs_global_jacks_in_glass_results},...
{'Spheres (Global)', gs_global_spheres_in_glass_results},...
{'Tower (Global)', gs_global_tower_results},...
{'Wall (Global)', gs_global_wall_results},...
{'Colosseum (Local)', gs_local_colosseum_results},...
{'Glasses (Local)', gs_local_glasses_in_glass_results},...
{'Funnel (Local)', gs_local_jacks_in_funnel_results},...
{'Jacks (Local)', gs_local_jacks_in_glass_results},...
{'Pantheon (Local)', gs_local_pantheon_results},...
{'Shoot (Local)', gs_local_shoot_results},...
{'Spheres (Local)', gs_local_spheres_in_glass_results},...
{'Temple (Local)', gs_local_temple_results},...
{'Tower (Local)', gs_local_tower_results},...
{'Wall (Local)', gs_local_wall_results},...
{'Glasses (No friction)', gs_no_fricton_glasses_in_glass_results},...
{'Jacks (No friction)', gs_no_friction_jacks_in_glass_results},...
{'Spheres (No friction)', gs_no_friction_spheres_in_glass_results},...
{'Tower (No friction)', gs_no_friction_tower_results},...
{'Wall (No friction)', gs_no_friction_wall_results},...
{'Glasses (No stabilization)', gs_no_stab_glasses_in_glass_results},...
{'Jacks (No stabilization)', gs_no_stab_jacks_in_glass_results},...
{'Spheres (No stabilization)', gs_no_stab_spheres_in_glass_results},...
{'Tower (No stabilization)', gs_no_stab_tower_results},...
{'Wall (No stabilization)', gs_no_stab_wall_results},...
{'Glasses (Pre & Post)', gs_pre_post_glasses_in_glass_results},...
{'Jacks (Pre & Post)', gs_pre_post_jacks_in_glass_results},...
{'Spheres (Pre & Post)', gs_pre_post_spheres_in_glass_results},...
{'Tower (Pre & Post)', gs_pre_post_tower_results},...
{'Wall (Pre & Post)', gs_pre_post_wall_results},...
{'Spheres (Jacobi)', jacobi_pre_post_spheres_in_glass_results},...
{'Glasses', long_glasses_in_glass_results},...
{'Funnel', long_jacks_in_funnel_results},...
{'Jacks', long_jacks_in_glass_results},...
{'Pantheon', long_pantheon_results},...
{'Shoot', long_shoot_results},...
{'Spheres', long_spheres_in_glass_results},...
{'Tower', long_tower_results},...
{'Wall', long_wall_results},...
};
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------
for i=1:length(data)
test_scene = data{i}{1};
test_results = data{i}{2};
yrange = [1, 10e6];
plot_time_slice(test_scene, test_results, output_options, yrange);
plot_convergence_rates(test_scene, test_results, output_options);
yrange = [10e-6, 10e5];
plot_convergence_quartiles(test_scene, test_results, output_options, yrange);
plot_rfactors(test_scene, test_results, output_options);
plot_rfactors_quartiles(test_scene, test_results, output_options);
plot_energy(test_scene, test_results, output_options);
plot_exit_status(test_scene, test_results, output_options);
close all;
end
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------
funnel_results = clean_up_data('data/2017_03_05/funnel/profiling.m');
glasses_results = clean_up_data('data/2017_03_05/glasses/profiling.m');
test_scenes = { 'Funnel', 'Glasses'};
test_results = { funnel_results, glasses_results };
make_time_slice_tabel(test_scenes, test_results, 'Time slice analysis for different test scenes')
specs_labels = {'Objects', 'Vertices ($10^6$)', 'Tetrahera ($10^6$)', 'Contacts ($10^6$)', 'Contacts per Step ($10^3$)', 'Max Contacts per Step ($10^3$)' };
specs_data = {...
[2002, round(1596685 / 1000000, 1), round(4676121/ 1000000, 1), round(sum(funnel_results.contacts)/ 1000000, 1), round(median(funnel_results.contacts)/1000, 1), round(max(funnel_results.contacts)/1000, 1) ];...
[4004, round(1102561 / 1000000, 1), round(3365707/ 1000000, 1), round(sum(glasses_results.contacts)/ 1000000, 1), round(median(glasses_results.contacts)/1000, 1), round(max(glasses_results.contacts)/1000, 1)];...
};
filter = 1:6;
write_subset_latex_tabel(filter, test_scenes, specs_labels, specs_data, 'Test scene specifications', 'keep')
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------
plot_all_contact_points(test_scenes, test_results, output_options);
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------
% gs_blocked_glasses_in_glass_results = clean_up_data('../2017_03_22/gs_blocked_glasses_in_glass_profiling.m');
% gs_blocked_jacks_in_glass_results = clean_up_data('../2017_03_22/gs_blocked_jacks_in_glass_profiling.m');
% gs_blocked_spheres_in_glass_results = clean_up_data('../2017_03_22/gs_blocked_spheres_in_glass_profiling.m');
% gs_blocked_tower_results = clean_up_data('../2017_03_22/gs_blocked_tower_profiling.m');
% gs_blocked_wall_results = clean_up_data('../2017_03_22/gs_blocked_wall_profiling.m');
%
% gs_global_glasses_in_glass_results = clean_up_data('../2017_03_22/gs_global_glasses_in_glass_profiling.m');
% gs_global_jacks_in_glass_results = clean_up_data('../2017_03_22/gs_global_jacks_in_glass_profiling.m');
% gs_global_spheres_in_glass_results = clean_up_data('../2017_03_22/gs_global_spheres_in_glass_profiling.m');
% gs_global_tower_results = clean_up_data('../2017_03_22/gs_global_tower_profiling.m');
% gs_global_wall_results = clean_up_data('../2017_03_22/gs_global_wall_profiling.m');
%
% gs_local_glasses_in_glass_results = clean_up_data('../2017_03_22/gs_local_glasses_in_glass_profiling.m');
% gs_local_jacks_in_glass_results = clean_up_data('../2017_03_22/gs_local_jacks_in_glass_profiling.m');
% gs_local_spheres_in_glass_results = clean_up_data('../2017_03_22/gs_local_spheres_in_glass_profiling.m');
% gs_local_tower_results = clean_up_data('../2017_03_22/gs_local_tower_profiling.m');
% gs_local_wall_results = clean_up_data('../2017_03_22/gs_local_wall_profiling.m');
test_scenes = {...
'Glasses (Blocked)',...
'Jacks (Blocked)',...
'Spheres (Blocked)',...
'Tower (Blocked)',...
'Wall (Blocked)',...
'Glasses (Global)',...
'Jacks (Global)',...
'Spheres (Global)',...
'Tower (Global)',...
'Wall (Global)',...
'Glasses (Local)',...
'Jacks (Local)',...
'Spheres (Local)',...
'Tower (Local)',...
'Wall (Local)',...
};
results = {...
gs_blocked_glasses_in_glass_results,...
gs_blocked_jacks_in_glass_results,...
gs_blocked_spheres_in_glass_results,...
gs_blocked_tower_results,...
gs_blocked_wall_results,...
gs_global_glasses_in_glass_results,...
gs_global_jacks_in_glass_results,...
gs_global_spheres_in_glass_results,...
gs_global_tower_results,...
gs_global_wall_results,...
gs_local_glasses_in_glass_results,...
gs_local_jacks_in_glass_results,...
gs_local_spheres_in_glass_results,...
gs_local_tower_results,...
gs_local_wall_results,...
};
reduced_labels = {...
'Glasses',...
'Jacks',...
'Spheres',...
'Tower',...
'Wall',...
};
yrange = [0, 1400];
histogram_exit_status( reduced_labels, {results{1:5}}, 'Blocked r-Factor', output_options, yrange );
histogram_exit_status( reduced_labels, {results{6:10}}, 'Global r-Factor', output_options, yrange );
histogram_exit_status( reduced_labels, {results{11:15}}, 'Local r-Factor', output_options, yrange );
%-----------------------------------------------------------
%-----------------------------------------------------------
%-----------------------------------------------------------