Overview
Comment:*** empty log message ***
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a6fb2224022c669fdff4773b11f18d4e6b4e5ba3af2d8d67cbe2f5feb886bdc3
User & Date: gawthrop@users.sourceforge.net on 1998-08-13 09:03:35
Other Links: branch diff | manifest | tags
Context
1998-08-13
12:37:45
Puts mttu1 --> mttu(1) etc. check-in: 69270d7f2b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:03:35
*** empty log message *** check-in: a6fb222402 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:52:33
Added implicit method check-in: c97c09e8d0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/ode2smx_lang from [61ba98ca6f] to [fbf00dafe0].

10
11
12
13
14
15
16



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

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



## Revision 1.2  1998/07/30 10:49:02  peterg
## Put [] round output of zeros.
##
## Revision 1.1  1998/07/19 16:59:56  peterg
## 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, 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1998/07/30 10:49:55  peterg
## Removed zeroing.
##
## Revision 1.2  1998/07/30 10:49:02  peterg
## Put [] round output of zeros.
##
## Revision 1.1  1998/07/19 16:59:56  peterg
## Initial revision
##
###############################################################
52
53
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
BEGIN
  IF (element NEQ 0) THEN
  BEGIN
    IF (lang = r) THEN 
      write name, "(", i, ",", j, ") := ", element;

    IF (lang = m) THEN 
      write name, "(", i, ",", j, ") = ", element;

  END
END;

%Set up output according to the language.
 OFF NAT;
 OUT "$1_smx.$lang";
 LineLength 1000;

% Set up output according to the language.
    IF (lang = r) THEN 
    BEGIN
      write "matrix mtta(", mttnx, ",", mttnx, ");";    
      write "matrix mttb(", mttnx, ",", mttnu, ");";    
      write "matrix mttc(", mttny, ",", mttnx, ");";    
      write "matrix mttd(", mttny, ",", mttnu, ");";    
    END;



% find MTTA : the A matrix
  FOR j := 1:MTTNx DO
    BEGIN
    xj := MTTX(j,1);
    FOR i := 1:MTTNx DO
      WriteElement("mtta",i,j,df(MTTdx(i,1), xj, 1));
    END;

% Find MTTB : the B matrix
  FOR j := 1:MTTNu DO
    BEGIN
    uj := MTTU(j,1);
    FOR i := 1:MTTNx DO
      WriteElement("mttb",i,j,df(MTTdx(i,1), uj, 1));
    END;

% Find MTTC : the C matrix
  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNx DO
    BEGIN
      xj := MTTX(j,1);
      WriteElement("mttc",i,j,df(MTTY(i,1), xj, 1));
    END;

% Find MTTD : the D matrix
  FOR i := 1:MTTNy DO
    FOR j := 1:MTTNu DO
    BEGIN
      xj := MTTU(j,1);
      WriteElement("mttd",i,j,df(MTTY(i,1), xj, 1));
    END;

%Shut the  output according to the language.
 SHUT "$1_smx.$lang";

EOF

if [ "$lang" = "m" ]; then
  mv $1_smx.$lang  mtt_junk
  lang_header $1 smx m 'mttx,mttu' '[mtta,mttb,mttc,mttd]' > $1_smx.m
  cat mtt_junk >> $1_smx.m
  rm -f mtt_junk
fi

# Now invoke the standard error handling.
mtt_error_r ode2smx_lang.log











|







<










<
<








|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|








|
|









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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
BEGIN
  IF (element NEQ 0) THEN
  BEGIN
    IF (lang = r) THEN 
      write name, "(", i, ",", j, ") := ", element;

    IF (lang = m) THEN 
      write name, "[", i, ",", j, "] = ", element;

  END
END;

%Set up output according to the language.
 OFF NAT;
 OUT "$1_smx.$lang";


% Set up output according to the language.
    IF (lang = r) THEN 
    BEGIN
      write "matrix mtta(", mttnx, ",", mttnx, ");";    
      write "matrix mttb(", mttnx, ",", mttnu, ");";    
      write "matrix mttc(", mttny, ",", mttnx, ");";    
      write "matrix mttd(", mttny, ",", mttnu, ");";    
    END;



% find MTTA : the A matrix
  FOR j := 1:MTTNx DO
    BEGIN
    xj := MTTX(j,1);
    FOR i := 1:MTTNx DO
      WriteElement("mtta",i,j,df(MTTdx(i,1), xj, 1));
    END;

%% Find MTTB : the B matrix
%  FOR j := 1:MTTNu DO
%    BEGIN
%    uj := MTTU(j,1);
%    FOR i := 1:MTTNx DO
%      WriteElement("mttb",i,j,df(MTTdx(i,1), uj, 1));
%    END;
%
%% Find MTTC : the C matrix
%  FOR i := 1:MTTNy DO
%    FOR j := 1:MTTNx DO
%    BEGIN
%      xj := MTTX(j,1);
%      WriteElement("mttc",i,j,df(MTTY(i,1), xj, 1));
%    END;
%
%% Find MTTD : the D matrix
%  FOR i := 1:MTTNy DO
%    FOR j := 1:MTTNu DO
%    BEGIN
%      xj := MTTU(j,1);
%      WriteElement("mttd",i,j,df(MTTY(i,1), xj, 1));
%    END;

%Shut the  output according to the language.
 SHUT "$1_smx.$lang";

EOF

if [ "$lang" = "m" ]; then
  mv $1_smx.$lang  mtt_junk
  lang_header $1 smx m 'mttx,mttu' '[mtta]' > $1_smx.m
  cat mtt_junk | mtt_p2m >> $1_smx.m
  rm -f mtt_junk
fi

# Now invoke the standard error handling.
mtt_error_r ode2smx_lang.log





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