Overview
Comment:Now reads in data from the simpar file.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 31f05bb19d4cd441c3b1779f9e9ee229f65a71938b85fadf0aa81680cf5a4354
User & Date: gawthrop@users.sourceforge.net on 1998-05-14 08:14:28.000
Other Links: branch diff | manifest | tags
Context
1998-05-14
08:20:29
Start time at DT - the result at time zero is computed outside the
loop
check-in: aa3caa35d4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:14:28
Now reads in data from the simpar file. check-in: 31f05bb19d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:05:10
Put back under RCS check-in: 73f1b3d4d6 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, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.5  1998/05/13 16:42:03  peterg
## Fixed various bugs etc.
##
# Revision 1.4  1996/08/24  14:27:59  peter
# Global parameters.
# Error handling.
#
## Revision 1.3  1996/08/18 12:00:19  peter
## Unified format of responses.
##
37
38
39
40
41
42
43






44
45
46
47
48










49
50
51
52
53
54
55
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







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







rm -f dae2daes_m.log
rm -f $1_daes.m
rm -f $1_daeso.m


$MATRIX << EOF > dae2daes_m.log 2>mtt_error.txt

  %System structure
  [nx,ny,nu,nz,nyz] = $1_def;
  
  % Number of descriptor "states"
  NX = nx+2*nz+nyz;

  %Read the parameters
  $1_numpar;

  [nx,ny,nu,nz,nyz] = $1_def;
  NX = nx+2*nz+nyz;
  %Read in parameters
  $1_numpar; 
 
  %Read in state (needs redoing for descriptor xevtor
  %x = $1_state;


  %Read in simulation parameters
  $1_simpar;
  T = [0:DT:LAST];

  t=0;  %Just in case its in the parameter list

  %Defaults
  if exist('T')==0
    T=[0:0.1:10]
  end;
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
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







-









+


-
+
+

-
+







  end;

  [n,m]=size(T);
  if m>n
    T=T';
  end;


if NX>0
  x = dassl("$1_dae", x0, dx0,  T);
  write_matrix([T,x], '$1_daes');
else
  x = zeros(size(T));
end;

if ny>0
  i=0;
  Y = [];
  for tt=T'
    i=i+1;
    y(i,:) = $1_daeo(x(i,:),tt)';
    y = $1_daeo(x(i,:),tt)';
    Y = [Y; y'];
  end;
  write_matrix([T,y], '$1_daeso');
  write_matrix([T,Y], '$1_daeso');
end;

EOF

# Now invoke the standard error handling.
mtt_error mtt_error.txt


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