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
|
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
+
+
+
+
-
-
-
-
-
-
+
+
-
|
fprintf(filenum, '%s := MTTu(%d,1);\n', ...
varname(name, bond_number,1),inputs);
else % Sensor
outputs = outputs+1;
fprintf(filenum, 'MTTy(%d,1) := %s;\n', ...
outputs, varname(name, bond_number,1));
end;
elseif strcmp(effort_attribute, 'unknown') % Unknown input
unknown_inputs = unknown_inputs + 1;
fprintf(filenum, '%s := MTTUi%d;\n', ...
varname(name, bond_number,1), unknown_inputs);
elseif strcmp(effort_attribute, 'internal')
% Do nothing
else
if bonds(1,1)==-1 % Named or unknown source
if strcmp(effort_attribute, 'unknown') % Unknown input
fprintf(filenum, '%s := MTTUi%d;\n', ...
varname(name, bond_number,-1), zero_outputs);
else
fprintf(filenum, '%s := %s;\n', ...
varname(name, bond_number,1), effort_attribute);
fprintf(filenum, '%s := %s;\n', ...
varname(name, bond_number,1), effort_attribute);
end;
else % Sensor
if strcmp(effort_attribute, 'zero') %Zero output
zero_outputs = zero_outputs + 1;
fprintf(filenum, 'MTTyz%d := %s;\n', ...
zero_outputs, varname(name, bond_number,1));
else
mtt_info([effort_attribute, ' not appropriate for an output '],STDerr);
|