Overview
Comment:Avoid error messages when no inputs or no outputs or no states
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: e2561c665a4d987c6c316fca865a7275cf46369dc24256c0987095ea501f7f10
User & Date: gawthrop@users.sourceforge.net on 2005-03-21 11:44:06
Other Links: branch diff | manifest | tags
Context
2005-03-21
11:50:39
Don't write an empty cseo file check-in: 761ac82af7 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:44:06
Avoid error messages when no inputs or no outputs or no states check-in: e2561c665a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:09:47
Now handles bicausal SS component -
ie source-source or sensor-sensor
check-in: 467b73fa30 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/dae2dm_r from [b03f8606db] to [79f142d44a].

10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop, 1991, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



# Revision 1.2  1996/08/25  09:53:35  peter
# Error handling added.
#
## Revision 1.1  1996/08/18 20:03:51  peter
## Initial revision
##
###############################################################







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop, 1991, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1998/07/27 20:25:36  peterg
## *** empty log message ***
##
# Revision 1.2  1996/08/25  09:53:35  peter
# Error handling added.
#
## Revision 1.1  1996/08/18 20:03:51  peter
## Initial revision
##
###############################################################
55
56
57
58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73

% Second row partition
  IF MTTNz>0 THEN 
     FOR j := 1:MTTNz DO
      MTTE(j+MTTNx, j+MTTNx) := 1;

% Find MTTA : the A matrix
matrix MTTA(MTTN,MTTN);

% First row partition: x
IF MTTNx>0 THEN 
  BEGIN

  FOR j := 1:MTTNx DO
    BEGIN
    xj := MTTX(j,1);
    FOR i := 1:MTTNx DO
      MTTA(i,j) := df(MTTdX(i,1), xj, 1);
    END;








<




>







58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
73
74
75
76

% Second row partition
  IF MTTNz>0 THEN 
     FOR j := 1:MTTNz DO
      MTTE(j+MTTNx, j+MTTNx) := 1;

% Find MTTA : the A matrix


% First row partition: x
IF MTTNx>0 THEN 
  BEGIN
  matrix MTTA(MTTN,MTTN);
  FOR j := 1:MTTNx DO
    BEGIN
    xj := MTTX(j,1);
    FOR i := 1:MTTNx DO
      MTTA(i,j) := df(MTTdX(i,1), xj, 1);
    END;

149
150
151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
       uij := MTTUi(j,1);
       FOR i := 1:MTTNyz DO
         MTTA(i+MTTNx+2*MTTNz, j+MTTNx+2*MTTNz) := df(MTTYz(i,1), uij, 1);
       END;
  END;

% Find MTTB : the B matrix
matrix MTTB(MTTN,MTTNu);

IF MTTNu>0 THEN
BEGIN


% First row partition
IF MTTNx>0 THEN 
  BEGIN
  FOR j := 1:MTTNu DO
    BEGIN
    uj := MTTU(j,1);







<



>







152
153
154
155
156
157
158

159
160
161
162
163
164
165
166
167
168
169
       uij := MTTUi(j,1);
       FOR i := 1:MTTNyz DO
         MTTA(i+MTTNx+2*MTTNz, j+MTTNx+2*MTTNz) := df(MTTYz(i,1), uij, 1);
       END;
  END;

% Find MTTB : the B matrix


IF MTTNu>0 THEN
BEGIN
matrix MTTB(MTTN,MTTNu);

% First row partition
IF MTTNx>0 THEN 
  BEGIN
  FOR j := 1:MTTNu DO
    BEGIN
    uj := MTTU(j,1);
190
191
192
193
194
195
196
197
198
199

200
201
202
203
204
205
206
      MTTB(i + MTTNx + 2*MTTNz,j) := df(MTTYz(i,1), uj, 1);
    END;
  END;

END;

% Find MTTC : the C matrix
matrix MTTC(MTTNy,MTTN);
IF MTTNy>0 THEN
BEGIN


% First column partition
IF MTTNx>0 THEN 
  BEGIN
  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNx DO
    BEGIN







<


>







193
194
195
196
197
198
199

200
201
202
203
204
205
206
207
208
209
      MTTB(i + MTTNx + 2*MTTNz,j) := df(MTTYz(i,1), uj, 1);
    END;
  END;

END;

% Find MTTC : the C matrix

IF MTTNy>0 THEN
BEGIN
matrix MTTC(MTTNy,MTTN);

% First column partition
IF MTTNx>0 THEN 
  BEGIN
  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNx DO
    BEGIN
231
232
233
234
235
236
237
238
239
240
241

242
243
244
245
246
247
248
    END;
  END;

END;
END; %of MTTN>0

% Find MTTD : the D matrix
matrix MTTD(MTTNy,MTTNu);
IF MTTNy>0 THEN
IF MTTNu>0 THEN
BEGIN

  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNu DO
    BEGIN
      uj := MTTU(j,1);
      MTTD(i,j) := df(MTTY(i,1), uj, 1);
    END;
END;







<



>







234
235
236
237
238
239
240

241
242
243
244
245
246
247
248
249
250
251
    END;
  END;

END;
END; %of MTTN>0

% Find MTTD : the D matrix

IF MTTNy>0 THEN
IF MTTNu>0 THEN
BEGIN
  matrix MTTD(MTTNy,MTTNu);
  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNu DO
    BEGIN
      uj := MTTU(j,1);
      MTTD(i,j) := df(MTTY(i,1), uj, 1);
    END;
END;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]