Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.205 1999/03/15 23:27:43 peterg +## Modified generation of odes.dat2 data +## ## Revision 1.204 1999/03/15 05:53:33 peterg ## Put in user-defined representations ## ## Revision 1.203 1999/03/08 03:51:12 peterg ## Version 3.5 for Linux Red Hat 5.2 (Newcastle) @@ -1437,10 +1440,12 @@ struc2switch_txt $1 $1_switch.m: $1_switch.txt $1_sympars.txt switch_txt2m $1 $1_switcha.m: $1_switch.m touch $1_switcha.m +$1_switchopen.m: $1_switch.m + touch $1_switchopen.m #SUMMARY sympars sympar + dynamic switch information (txt) $1_sympars.txt: $1_sympar.txt $1_switch.txt echo Creating $1_sympars.txt cat $1_sympar.txt $1_switch.txt > $1_sympars.txt @@ -1813,13 +1818,15 @@ mtt_m2p $1_smx.m $1_switch.p : $1_def.r $1_switch.m mtt_m2p $1_switch.m $1_switcha.p : $1_def.r $1_switcha.m mtt_m2p $1_switcha.m +$1_switchopen.p : $1_def.r $1_switchopen.m + mtt_m2p $1_switchopen.m $1_ode2odes.p : $1_ode2odes.m $1_def.r\ $1_simpar.p $1_numpar.p $1_state.p $1_input.p \ - $1_ode.p $1_odeo.p $1_switch.p $1_switcha.p + $1_ode.p $1_odeo.p $1_switch.p $1_switcha.p $1_switchopen.p mtt_m2p $1_ode2odes.m $1_ode2odes.c: $1_ode2odes.p mtt_p2c $info_switch $1 ode2odes Index: mttroot/mtt/bin/trans/make_ode2odes ================================================================== --- mttroot/mtt/bin/trans/make_ode2odes +++ mttroot/mtt/bin/trans/make_ode2odes @@ -7,10 +7,13 @@ ############################################################### ## 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. ## @@ -128,14 +131,13 @@ MTTt = MTTt + MTTddt; endfor; endif; if mttmethod==2 # Implicit [MTTdx] = $1_ode(MTTx,MTTu,MTTt); # State derivative - #[MTTdx] = $1_switch(MTTx); # Set derivs to zero if states to zero [mttAA,mttAAx] = $1_smx(MTTx,MTTu,mttdt); # (I-Adt) and (I-Adt)x - [mttAA] = $1_switcha(mttAA,MTTx); # Switches - [MTTx] = mtt_implicit(MTTx,MTTdx,mttAA,mttAAx,mttdt,$Nx); # Implicit update + [MTTopen] = $1_switchopen(MTTx); # Open switches + [MTTx] = mtt_implicit(MTTx,MTTdx,mttAA,mttAAx,mttdt,$Nx,MTTopen); # Implicit update MTTt = MTTt + mttdt; endif; else MTTt = MTTt + mttdt; endif; # $Nx>0