Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.167 1998/07/24 17:10:34 peterg +## *** empty log message *** +## ## Revision 1.166 1998/07/22 08:37:30 peterg ## Implicit integration now the default - for octave anyway. ## ## Revision 1.165 1998/07/19 16:00:22 peterg ## Added smx representation @@ -1315,14 +1318,14 @@ echo Creating $1_simpar.txt ( \ echo "# Simulation parameters for system $1 ($1_simpar.txt)"; \ echo "# Generated by MTT on" `date`.; \ cat $MTTPATH/trans/rcs_header.sh; \ - echo 'LAST=10.0'; \ - echo 'DT=0.1'; \ - echo 'STEPFACTOR=1'; \ - echo 'METHOD="Implicit"'; \ + echo 'LAST=10.0;'; \ + echo 'DT=0.1;'; \ + echo 'STEPFACTOR=1;'; \ + echo 'METHOD="Implicit;"'; \ )> $1_simpar.txt #SUMMARY simpar simulation information (m) $1_simpar.m: $1_simpar.txt echo Creating $1_simpar.m @@ -1345,41 +1348,49 @@ #SUMMARY numpar numerical parameter declaration (c) $1_numpar.c: $1_numpar.txt $1_sympar.c txt2c $1 numpar #SUMMARY input numerical input declaration -- default (txt) -ifeq ($switches,0) -$1_input.txt: - mtt $mtt_switches $1 struc txt; - mtt $mtt_switches $1 ss r; +$1_input.txt: $1_struc.txt struc2input_txt2txt $1 -endif -ifeq ($switches,1) -$1_input.txt: - mtt $mtt_switches -q -u $1 struc txt; - mtt $mtt_switches $1 ss r; - mtt $mtt_switches -q -u $1 switch txt; - struc2input_txt2txt -s $1 -endif + +#SUMMARY state numerical state declaration -- default (txt) +$1_state.txt: $1_struc.txt + struc2state_txt2txt $1 + +#ifeq ($switches,0) +#$1_input.txt: +# mtt $mtt_switches $1 struc txt; +# mtt $mtt_switches $1 ss r; +# struc2input_txt2txt $1 +#endif +#ifeq ($switches,1) +#$1_input.txt: +# mtt $mtt_switches -q -u $1 struc txt; +# mtt $mtt_switches $1 ss r; +# mtt $mtt_switches -q -u $1 switch txt; +# struc2input_txt2txt -s $1 +#endif + #SUMMARY input numerical input declaration (m) $1_input.m: $1_input.txt $1_sympar.txt $1_ss.r input_txt2m $1 #SUMMARY state state declaration -- default (txt) -$1_state.txt: - mtt $mtt_switches $1 struc txt; - mtt $mtt_switches $1 ss r; - struc2state_txt2txt $1 +#$1_state.txt: +# mtt $mtt_switches $1 struc txt; +# mtt $mtt_switches $1 ss r; +# struc2state_txt2txt $1 #SUMMARY state state declaration (m) $1_state.m: $1_state.txt $1_sympar.txt txt2m $1 state #SUMMARY state state declaration (c) -$1_state.c: $1_state.txt $1_sympar.txt - txt2c $1 state +#$1_state.c: $1_state.txt $1_sympar.txt +# txt2c $1 state #SUMMARY input numerical input declaration (c) ifeq ($switches,0) $1_input.c: $1_input.txt $1_sympar.c input_txt2c $1 @@ -1577,14 +1588,41 @@ matlab_tidy $1_odeo.m $1_odea.m: $1_ode.m touch $1_odea.m $1_odeo.m: $1_ode.m touch $1_odeo.m -$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_sympar.c - ode_r2c $1 +#$1_ode.c: $1_def.r $1_ode.r $1_sympar.r $1_sympar.c +# ode_r2c $1 $1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r ode_r2tex $1; latex_tidy $1_ode.tex + +$1_ode2odes.m : $1_def.r + make_ode2odes $1 + +#Conversion of m to p to c +#SUMMARY ode ordinary differential equations (c) +#SUMMARY ode ordinary differential equations (p) +#SUMMARY state state declaration (c) +#SUMMARY state state declaration (p) +$1_simpar.p : $1_def.r $1_simpar.m + mtt_m2p $1_simpar.m +$1_numpar.p : $1_def.r $1_numpar.m + mtt_m2p $1_numpar.m +$1_state.p : $1_def.r $1_state.m + mtt_m2p $1_state.m +$1_input.p : $1_def.r $1_input.m + mtt_m2p $1_input.m +$1_ode.p : $1_def.r $1_ode.m + mtt_m2p $1_ode.m +$1_odeo.p : $1_def.r $1_odeo.m + mtt_m2p $1_odeo.m +$1_ode2odes.p : $1_def.r $1_simpar.p $1_numpar.p $1_state.p $1_input.p \ + $1_ode.p $1_odeo.p $1_ode2odes.m mtt_write.p + mtt_m2p $1_ode2odes.m + +$1_ode2odes.c: $1_ode2odes.p + p2c $1_$2.p #SUMMARY obs observer equations for CGPC (r) #SUMMARY obs observer equations for CGPC (m) #SUMMARY obs observer equations for CGPC (tex) #SUMMARY obs observer equations for CGPC (view) @@ -1812,17 +1850,15 @@ $1_odes.m: $1_ode.m $1_numpar.m $1_def.m $1_input.m $1_state.m $1_simpar.m $1_smx.m time ode2odes_m $1 endif ifeq ($computation,c) -$1_odes.m: $1_odes.c $1_ode.c $1_numpar.c $1_state.c $1_simpar.h\ - $1_sympar.c $1_sympar.h\ - $1_numpar.c $1_input.c sign.c +$1_odes.m: $1_ode2odes.c echo Creating $1_odes.m echo Creating $1_odeso.m echo 'Compiling ...' - $CC $1_odes.c -lm + $CC $1_ode2odes.c -lm echo 'Running ...'; time ./a.out; echo 'Done.' $1_sms.m: $1_sms.c $1_sm.c $1_numpar.c $1_simpar.h\ $1_sympar.c $1_sympar.h\ @@ -2039,10 +2075,14 @@ mkdir RCS $1_$2.vc: RCS echo Version control on $1_$2.$VCext ci -I $1_$2.$VCext