Overview
Comment:Added "IF MTTNx>0 THEN" to avoid error message when no states
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 0fd592aaf1f029b6416a741c29a29233a39f366ff2067c7313d44ed6cedb74d7
User & Date: gawthrop@users.sourceforge.net on 1998-11-18 11:42:55.000
Other Links: branch diff | manifest | tags
Context
1998-11-18
11:55:51
Now uses sympar2global_txt2m for the m bit check-in: 756ebf5439 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:42:55
Added "IF MTTNx>0 THEN" to avoid error message when no states check-in: 0fd592aaf1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:34:24
Cleaned up to:
work properly for no globals
no need to repeat las global
check-in: 630e6a8f42 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
11
12
13
14
15
16
17



18
19
20
21
22
23
24
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+
+
+







# Copyright (c) P.J.Gawthrop, 1990, 1994.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.2  1998/07/22 15:47:28  peterg
## Now operates on ordinary differential equation file.
##
## Revision 1.1  1996/08/25 09:52:20  peter
## Initial revision
##
###############################################################

#Inform user
echo Creating $1_ss.r
38
39
40
41
42
43
44
45




46
47
48
49
50


51
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
41
42
43
44
45
46
47

48
49
50
51
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







-
+
+
+
+





+
+



-
-
-
+
+
+
+
-
-
+
+
+
+

+
-
+
-
-
+
-
-
+
+
+

+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+

+
+
+
-
-
+
+
+

+
-
+
+
+
+
+







%Read the steady-state values 
in "$1_sspar.r";

%Read in the constrained-state equation
%in "$1_cse.r";

%Read in the ode
%in "$1_ode.r";
in "$1_ode.r";

%Read the formatting function
in "$MTTPATH/trans/reduce_matrix.r";

OFF Echo;
OFF Nat;
OUT "$1_ss.r";

IF MTTNx>0 THEN
  MTTdx:= MTTdx;

%Write out the steady-state values (if any)
write "%Steady-state values";
IF MTTNx>0 THEN
BEGIN
  write "matrix MTTX0(", MTTNx, ",1)";


% State
MTT_Matrix := MTTX$ 
END;
MTTX0 := MTTX;
MTT_Matrix_name := "MTTx"$
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% State derivative
IF MTTNu>0 THEN
MTT_Matrix := MTTdX$ 
BEGIN
  write "matrix MTTU0(", MTTNu, ",1)";
MTT_Matrix_name := "MTTdX"$
END;
MTTU0 := MTTU;
MTT_Matrix_n := MTTNx$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Nonstate
MTT_Matrix := MTTZ$ 
MTT_Matrix_name := "MTTZ"$
IF MTTNy>0 THEN
MTT_Matrix_n := MTTNz$
BEGIN
  write "matrix MTTY0(", MTTNy, ",1)";
END;
MTTY0 := MTTY;
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Output
MTT_Matrix := MTTy$ 
MTT_Matrix_name := "MTTy"$
MTT_Matrix_n := MTTNy$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Zero outputs
MTT_Matrix := MTTYz$ 
MTT_Matrix_name := "MTTYz"$
IF MTTNx>0 THEN
  write "matrix MTTdX0(", MTTNx, ",1)";
MTT_Matrix_n := MTTNyz$
MTT_Matrix_m := 1$
Reduce_Matrix()$

% Input
MTTdX0 := MTTdX;
MTT_Matrix := MTTu$ 
MTT_Matrix_name := "MTTu"$
MTT_Matrix_n := MTTNu$
MTT_Matrix_m := 1$
Reduce_Matrix()$


%Write them out by component - but only if values have been set
%(This assumes that if element 1 not set then the rest aren't either)
%ON Rounded; %Make numbers have dec. points-- nice for c
%
%clear MTTx1;

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