Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -12,10 +12,14 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.168 1998/07/25 09:44:25 peterg +## Uses Pascal as step on the way to c code -- MUCH nicer! +## State and input now use the simple default - no steady states +## ## 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. @@ -1318,14 +1322,18 @@ 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 "global ..."; \ + echo "mtt_no_global ..."; \ + echo "mtt_no_global;"; \ + echo ;\ echo 'LAST=10.0;'; \ echo 'DT=0.1;'; \ echo 'STEPFACTOR=1;'; \ - echo 'METHOD="Implicit;"'; \ + echo 'METHOD="Implicit";'; \ )> $1_simpar.txt #SUMMARY simpar simulation information (m) $1_simpar.m: $1_simpar.txt echo Creating $1_simpar.m @@ -1352,11 +1360,12 @@ #SUMMARY input numerical input declaration -- default (txt) $1_input.txt: $1_struc.txt struc2input_txt2txt $1 #SUMMARY state numerical state declaration -- default (txt) -$1_state.txt: $1_struc.txt +$1_state.txt: + mtt -q $1 struc txt struc2state_txt2txt $1 #ifeq ($switches,0) #$1_input.txt: # mtt $mtt_switches $1 struc txt; @@ -1372,11 +1381,11 @@ #endif #SUMMARY input numerical input declaration (m) $1_input.m: $1_input.txt $1_sympar.txt $1_ss.r - input_txt2m $1 + txt2m $1 input #SUMMARY state state declaration -- default (txt) #$1_state.txt: # mtt $mtt_switches $1 struc txt; # mtt $mtt_switches $1 ss r; @@ -1519,11 +1528,11 @@ #SUMMARY def definitions - system orders etc. (m) #SUMMARY struc structure - list of inputs, outputs and states (txt) #SUMMARY struc structure - list of inputs, outputs and states (tex) #SUMMARY struc structure - list of inputs, outputs and states (view) #Elementary system equations + definitions -$1_ese.r: $1_cbg.m +$1_ese.r: $1_cbg.m $1_sympar.txt cbg2ese_m2r $info_switch $1; ese_tidy $1 $1_def.r: $1_ese.r touch $1_def.r $1_struc.txt: $1_ese.r touch $1_struc.txt @@ -1618,11 +1627,11 @@ $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 + mtt_p2c $info_switch $1 ode2odes #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) @@ -1845,21 +1854,23 @@ ode2odes_r2c $1 $1_sms.c: $1_sm.c $1_def.r $1_sympar.r sm2sms_r2c $1 ifeq ($computation,octave) -$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 +$1_odes.dat2: $1_ode2odes.m $1_ode.m $1_numpar.m \ + $1_def.m $1_input.m $1_state.m $1_simpar.m $1_smx.m + echo Creating $1_odes.dat2 + octave -q $1_ode2odes.m> $1_odes.dat2 endif ifeq ($computation,c) -$1_odes.m: $1_ode2odes.c +$1_odes.dat2: $1_ode2odes.c echo Creating $1_odes.m echo Creating $1_odeso.m echo 'Compiling ...' $CC $1_ode2odes.c -lm - echo 'Running ...'; time ./a.out; echo 'Done.' + echo 'Running ...'; time ./a.out>$1_odes.dat2 ; echo 'Done.' $1_sms.m: $1_sms.c $1_sm.c $1_numpar.c $1_simpar.h\ $1_sympar.c $1_sympar.h\ $1_numpar.c $1_input.c dsvdcmp.c @@ -1952,13 +1963,17 @@ #Generic conversion of txt files to tex files $1_$2.tex: $1_$2.txt txt2tex $1 $2 txt endif -#Generic conversion of data files from m to dat format -$1_$2.dat: $1_$2.m - m2dat $1_$2 +#Conversion of dat2 files to dat format +$1_odeso.dat: $1_odes.dat2 + echo Creating $1_odeso.dat + dat22dat $1 odeso +$1_odes.dat: $1_odes.dat2 + echo Creating $1_odes.dat + dat22dat $1 odes #Generic conversion of data files from dat to (gplot) gdat format $1_$2.gdat: $1_$2.dat $1_args.m $1_struc.txt dat2gdat $1 $2 $4