-
Notifications
You must be signed in to change notification settings - Fork 5
/
DynamicSliceTest.m
31 lines (26 loc) · 1.01 KB
/
DynamicSliceTest.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
classdef DynamicSliceTest < DynamicSlice
%%
% Add a warm-up phase for experiment, in the warm-up phase we only use the 'dimconfig' method to
% reconfigure slices.
properties (Access = protected)
saved_options;
end
methods
function this = DynamicSliceTest(slice_data)
this@DynamicSlice(slice_data);
this.saved_options = this.options;
this.options = structmerge(this.options, ...
getstructfields(slice_data, 'NumberEventWarmUp','default-ignore', 50));
this.options.ReconfigMethod = ReconfigMethod.Dimconfig;
end
end
methods(Access=protected)
function [exitflag,fidx] = executeMethod(this, action)
global event_num DEBUG; %#ok<NUSED>
[exitflag,fidx] = executeMethod@DynamicSlice(this, action);
if event_num == this.options.NumberEventWarmUp
this.options.ReconfigMethod = this.saved_options.ReconfigMethod;
end
end
end
end