Overview
Comment:Integration with switches handled separately fro Euler and Implicit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 7f5a5bd7d1ad85071a7f4bf3188701b9c55b96c0a06d6f75a9c62d61be9ba740
User & Date: gawthrop@users.sourceforge.net on 1998-10-01 16:02:01
Other Links: branch diff | manifest | tags
Context
1998-10-01
16:05:34
Separate switch.m file for euler and implicit integration check-in: c3cb33a9b3 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:02:01
Integration with switches handled separately fro Euler and Implicit. check-in: 7f5a5bd7d1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:01:09
Now does implicit integration with switches check-in: 5f43ad54ef user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/make_ode2odes from [82ad21bca8] to [9ab01c8a2a].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21











+
+
+







#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.13  1998/09/30 17:41:24  peterg
## Implicit method now allows for switches via _switchA
##
## Revision 1.12  1998/08/27 08:55:18  peterg
## Mods to integration methods
##
## Revision 1.11  1998/08/25 12:28:31  peterg
## Move initila switch to after initial input
##
## Revision 1.10  1998/08/25 12:22:45  peterg
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
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







+






-
+




-










for MTTit = 1:MTTilast
  [MTTu] = $1_input(MTTx,MTTt);	# Input

  if mttmethod==1		# Euler
    for MTTjt = 1:mttstepfactor
      [MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
      [MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx); # Euler update
      [MTTx] = $1_switch(MTTx);	# Switches
      MTTt = MTTt + MTTddt;
    endfor;
  endif;
  if mttmethod==2		# Implicit 
    [MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative
    [mttAA,mttAAx] = $1_smx(MTTx,MTTu,mttdt);	# (I-Adt) and (I-Adt)x
    [mttAA] = $1_switchA(mttAA,MTTx);	# Switches
    [mttAA] = $1_switcha(mttAA,MTTx);	# Switches
    [MTTx] = mtt_implicit(MTTx,MTTdx,mttAA,mttAAx,mttdt,$Nx); # Implicit update
    MTTt = MTTt + mttdt;
  endif;

  [MTTx] = $1_switch(MTTx);	# Switches

  [MTTy] = $1_odeo(MTTx,MTTu,MTTt);
  mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny);
endfor;				# Integration loop

EOF





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