TimeBehavior.m
1.14 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
%Concrete class representing the time behavior of a model variable. It
%stores the values of a variable curve, the values of the selected
%evaluation function and the method chosen for tail computation
classdef TimeBehavior < handle
properties
time %x-axis of time simulation
values %y-axis of time simulation
currentEvalFunc
evalFuncValues
currentTailMethod
end
methods
function obj=TimeBehavior(t,v)
obj.time=t;
obj.values=v;
end
% function obj=set.currentEvalFunc(obj,func)
% obj.currentEvalFunc=func;
% end
%pattern Strategy for computing values of the evaluation function
function EvalValues=computeEvalFunc(obj)
EvalValues=obj.currentEvalFunc.compute_ef(obj);
obj.evalFuncValues=EvalValues;
end
%pattern Strategy
function [XiMax, XiMin]=compute_tail(obj,perturbation,tail_size)
[XiMax, XiMin]=obj.currentTailMethod.compute_tailspdf(obj,perturbation,tail_size);
end
end
end