Overview
Comment: | Removed initialisation of AA and AAx Remove _switch calls -- uses _switchopen exclusively |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
aa71639d765e2a45ee08b7e95c574765 |
User & Date: | gawthrop@users.sourceforge.net on 1999-04-20 06:16:07 |
Other Links: | branch diff | manifest | tags |
Context
1999-04-20
| ||
06:16:46 | Removed calls to _switch.m check-in: ca97b27284 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
06:16:07 |
Removed initialisation of AA and AAx Remove _switch calls -- uses _switchopen exclusively check-in: aa71639d76 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
06:14:53 | Reorder to make equivalent to .p version check-in: 50fc0a4bcc user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/make_ode2odes from [6c35e3e4df] to [81e64960c4].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.20 1999/04/02 02:13:58 peterg ## Back to RCS ## ## Revision 1.19 1999/03/30 21:39:25 peterg ## In implicit approach, set derivatives to zero (when switch is off) ## before update. This seems to stop numerical leakage though non-return ## switches. | > > > | 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.21 1999/04/02 06:29:25 peterg ## New implicit method - solves numerical prob with ISW ## ## Revision 1.20 1999/04/02 02:13:58 peterg ## Back to RCS ## ## Revision 1.19 1999/03/30 21:39:25 peterg ## In implicit approach, set derivatives to zero (when switch is off) ## before update. This seems to stop numerical leakage though non-return ## switches. |
︙ | ︙ | |||
104 105 106 107 108 109 110 | # MTTx = 0; # Dummy value #endif; [MTTy] = $1_odeo(MTTx,MTTu,MTTt); # Evaluate initial output [MTTu] = $1_input(MTTt,MTTx,MTTy); # Evaluate initial input mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # And write them | | | | | | > | < | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | # MTTx = 0; # Dummy value #endif; [MTTy] = $1_odeo(MTTx,MTTu,MTTt); # Evaluate initial output [MTTu] = $1_input(MTTt,MTTx,MTTy); # Evaluate initial input mtt_write(MTTt,MTTx,MTTy,$Nx,$Ny); # And write them #[mttAA] = zero_matrix($Nx); # Zero the A matrix #[mttAAx] = zero_vector($Nx); # Zero the AAx vector #if $Nx>0 # [MTTx] = $1_switch(MTTx); # Switches #endif; if mttmethod==1 # Euler MTTddt = mttdt/mttstepfactor; # The small sample interval endif; for MTTit = 1:MTTilast #Integration loop if $Nx>0 # Dont if no states if mttmethod==1 # Euler for MTTjt = 1:mttstepfactor [MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative [MTTopen] = $1_switchopen(MTTx); # Open switches [MTTx] = mtt_euler(MTTx,MTTdx,MTTddt,$Nx,MTTopen); # Euler update 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 [MTTopen] = $1_switchopen(MTTx); # Open switches |
︙ | ︙ |