Differences From Artifact [73cd3789ce]:

To Artifact [b03f8606db]:


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
# Copyright (c) P.J.Gawthrop, 1991, 1994.

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



## Revision 1.1  1996/08/18 20:03:51  peter
## Initial revision
##
###############################################################

#Inform user
echo Creating $1_dm.r

# Remove the old log file
rm -f dae2dm_r.log

# Use reduce to accomplish the transformation
reduce >dae2dm_r.log << EOF

in "$1_def.r";
in "$1_dae.r";
in "$1_cr.r";
in "$1_sympar.r";

OFF Echo;
OFF Nat;


%Total number of descriptor variables
MTTN := MTTNx + 2*MTTNz + MTTNyz;







>
>
>

















|







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
43
44
# 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
##
###############################################################

#Inform user
echo Creating $1_dm.r

# Remove the old log file
rm -f dae2dm_r.log

# Use reduce to accomplish the transformation
reduce >dae2dm_r.log << EOF

in "$1_def.r";
in "$1_dae.r";
in "$1_cr.r";
%%in "$1_sympar.r";

OFF Echo;
OFF Nat;


%Total number of descriptor variables
MTTN := MTTNx + 2*MTTNz + MTTNyz;
239
240
241
242
243
244
245
246






















247
248
249
250
251
252
253
254
255
  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;























%Substitute the ss values
in "$1_ss.r";

%Create the output file
OUT "$1_dm.r";

%Write out the matrices.
IF MTTN>0 THEN
BEGIN








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
  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;

%Zap the dz terms (not a nice way)
MTTdz1 := 0;
MTTdz2 := 0;
MTTdz3 := 0;
MTTdz4 := 0;
MTTdz5 := 0;
MTTdz6 := 0;
MTTdz7 := 0;
MTTdz8 := 0;
MTTdz9 := 0;
MTTdz10 := 0;
MTTdz11 := 0;
MTTdz12 := 0;
MTTdz13 := 0;
MTTdz14 := 0;
MTTdz15 := 0;
MTTdz16 := 0;
MTTdz17 := 0;
MTTdz18 := 0;
MTTdz19 := 0;


%Substitute the ss values
in "$1_sspar.r";

%Create the output file
OUT "$1_dm.r";

%Write out the matrices.
IF MTTN>0 THEN
BEGIN

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