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
|
% We need four versions so that state does not need to be explicitly
% mentioned.
% At the moment, assume only one solution (in fact the first is
% chosen)
%%%% This is the Equation version
% Flow input
FOR ALL mtt_cr, input, out_cause
LET cr(mtt_cr,out_cause, 1, input, flow, 1)
= eqn2ass(mtt_cr,mtt_e,{mtt_f=input});
% Effort input
FOR ALL mtt_cr, input, out_cause
LET cr(mtt_cr,out_cause, 1, input, effort, 1)
= eqn2ass(mtt_cr,mtt_f,{mtt_e=input});
% Effort output
FOR ALL mtt_cr, input, in_cause
LET cr(mtt_cr,effort, 1, input, in_cause, 1)
= eqn2ass(mtt_cr,mtt_e,{mtt_f=input});
% Flow output
FOR ALL mtt_cr, input, in_cause
LET cr(mtt_cr,flow, 1, input, in_cause, 1)
= eqn2ass(mtt_cr,mtt_f,{mtt_e=input});
%%%% This is the assignment version
% Flow input
FOR ALL mtt_cr_e,mtt_cr_f, input, out_cause
LET cr(mtt_cr_e,mtt_cr_f,out_cause, 1, input, flow, 1)
= sub(mtt_f=input,mtt_cr_f);
% Effort input
FOR ALL mtt_cr_e,mtt_cr_f, input, out_cause
LET cr(mtt_cr_e,mtt_cr_f,out_cause, 1, input, effort, 1)
= sub(mtt_e=input,mtt_cr_e);
% Effort output
FOR ALL mtt_cr_e,mtt_cr_f, input, in_cause
LET cr(mtt_cr_e,mtt_cr_f,effort, 1, input, in_cause, 1)
= sub(mtt_f=input,mtt_cr_f);
% Flow output
FOR ALL mtt_cr_e,mtt_cr_f, input, in_cause
LET cr(mtt_cr_e,mtt_cr_f,flow, 1, input, in_cause, 1)
= sub(mtt_e=input,mtt_cr_e);
%%% Q&D FMR 2 port.
FOR ALL mtt_cr_e,mtt_cr_f,input_1,input_2
LET cr(mtt_cr_e,mtt_cr_f,flow,1,
input_1,effort,1,
input_2,flow,2
) = sub(mtt_mod=input_2,sub(mtt_e=input_1,mtt_cr_e));
END;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
% We need four versions so that state does not need to be explicitly
% mentioned.
% At the moment, assume only one solution (in fact the first is
% chosen)
%%%% This is the Equation version
% Flow input
FOR ALL comp_type, mtt_cr, input, out_cause
LET cr(comp_type,mtt_cr,out_cause, 1, input, flow, 1)
= eqn2ass(mtt_cr,mtt_e,{mtt_f=input});
% Effort input
FOR ALL comp_type, mtt_cr, input, out_cause
LET cr(comp_type,mtt_cr,out_cause, 1, input, effort, 1)
= eqn2ass(mtt_cr,mtt_f,{mtt_e=input});
% Effort output
FOR ALL comp_type, mtt_cr, input, in_cause
LET cr(comp_type,mtt_cr,effort, 1, input, in_cause, 1)
= eqn2ass(mtt_cr,mtt_e,{mtt_f=input});
% Flow output
FOR ALL comp_type, mtt_cr, input, in_cause
LET cr(comp_type,mtt_cr,flow, 1, input, in_cause, 1)
= eqn2ass(mtt_cr,mtt_f,{mtt_e=input});
%%%% This is the assignment version
% Flow input
FOR ALL comp_type, mtt_cr_e,mtt_cr_f, input, out_cause
LET cr(comp_type,mtt_cr_e,mtt_cr_f,out_cause, 1, input, flow, 1)
= sub(mtt_f=input,mtt_cr_f);
% Effort input
FOR ALL comp_type, mtt_cr_e,mtt_cr_f, input, out_cause
LET cr(comp_type,mtt_cr_e,mtt_cr_f,out_cause, 1, input, effort, 1)
= sub(mtt_e=input,mtt_cr_e);
% Effort output
FOR ALL comp_type, mtt_cr_e,mtt_cr_f, input, in_cause
LET cr(comp_type,mtt_cr_e,mtt_cr_f,effort, 1, input, in_cause, 1)
= sub(mtt_f=input,mtt_cr_f);
% Flow output
FOR ALL comp_type, mtt_cr_e,mtt_cr_f, input, in_cause
LET cr(comp_type,mtt_cr_e,mtt_cr_f,flow, 1, input, in_cause, 1)
= sub(mtt_e=input,mtt_cr_e);
%%% Q&D FMR 2 port.
FOR ALL comp_type, mtt_cr_e,mtt_cr_f,input_1,input_2
LET cr(comp_type,mtt_cr_e,mtt_cr_f,flow,1,
input_1,effort,1,
input_2,flow,2
) = sub(mtt_mod=input_2,sub(mtt_e=input_1,mtt_cr_e));
END;
|