Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.240 2000/05/10 09:38:58 peterg +## Added Make to list of copied files. +## ## Revision 1.239 2000/04/11 18:08:33 peterg ## Fixed cse.tex bug ## ## Revision 1.238 2000/04/10 10:06:41 peterg ## Sorted out implicit rules for p2oct conversion @@ -865,10 +868,11 @@ -p ) mtt_switches="$mtt_switches $1"; print='-p';; -c ) mtt_switches="$mtt_switches $1"; + matrix_smxa="-matrix"; computation=c ;; -o ) mtt_switches="$mtt_switches $1"; dae_is_ode=1 ;; -i ) @@ -1707,32 +1711,33 @@ echo '# -*-octave-*- Put Emacs into octave-mode'; \ echo "# Simulation parameters for system $1 ($1_simpar.txt)"; \ echo "# Generated by MTT on" `date`.; \ cat $MTTPATH/trans/rcs_header.sh; \ echo ;\ - echo 'LAST = 10.0; # Last time in simulation'; \ + echo 'FIRST = 0.0; # First time in simulation output'; \ echo 'DT = 0.1; # Print interval'; \ + echo 'LAST = 10.0; # Last time in simulation'; \ echo 'STEPFACTOR = 1; # Integration steps per print interval'; \ echo 'WMIN = -1; # Minimum frequency = 10^WMIN'; \ echo 'WMAX = 2; # Maximum frequency = 10^WMAX'; \ echo 'WSTEPS = 100; # Number of frequency steps'; \ echo 'INPUT = 1; # Index of the input'; \ )> $1_simpar.txt #SUMMARY simpar simulation information (m) $1_simpar.m: $1_simpar.txt - txt2m $1 simpar + mtt_txt2m $1 simpar #SUMMARY numpar numerical parameter declaration -- default (txt) $1_numpar.txt: mtt $mtt_switches -q -u $1 sympar txt; sympar2numpar_txt2txt $1 #SUMMARY numpar numerical parameter declaration (m) $1_numpar.m: $1_numpar.txt $1_sympars.txt - txt2m $1 numpar + mtt_txt2m $1 numpar #SUMMARY numpar numerical parameter declaration (c) #SUMMARY numpar numerical parameter declaration (view) $1_numpar.c: $1_numpar.txt $1_sympar.c txt2c $1 numpar @@ -1775,21 +1780,21 @@ #endif #SUMMARY input numerical input declaration (m) $1_input.m: $1_input.txt $1_sympars.txt - txt2m $1 input + mtt_txt2m $1 input #SUMMARY state state declaration -- default (txt) #$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_sympars.txt - txt2m $1 state + mtt_txt2m $1 state #SUMMARY state state declaration (c) #$1_state.c: $1_state.txt $1_sympar.txt # txt2c $1 state @@ -1947,11 +1952,11 @@ dae2cse_r $Solve $1; tidy $1_cse.r $1_subs.r #$1_cse.m: $1_def.r $1_cse.r $1_sympar.r $1_subs.r # cse_r2m $1; matlab_tidy $1_cse.m $1_cse.m: $1_def.m $1_cse.r $1_sympars.txt - mtt_r2m -parameters -noglobal $1 cse; matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; + mtt_r2m -parameters $1 cse; matlab_tidy $1_cse.m; matlab_tidy $1_cseo.m; $1_cseo.m: $1_cse.m touch $1_cseo.m $1_cse.tex: $1_cse.r $1_sympar.r $1_simp.r cse_r2tex $1 $2; latex_tidy $1_cse.tex @@ -2011,13 +2016,13 @@ $1_ode.tex: $1_ode.r $1_sympar.r $1_simp.r ode_r2tex $1; latex_tidy $1_ode.tex # The main simulation programme ifeq ($integration_method,implicit) -$1_ode2odes.m : $1_def.r $1_sympars.txt $1_smx.m\ +$1_ode2odes.m : $1_def.r $1_sympars.txt $1_smxa.$m $1_smxax.$m\ $1_simpar.m $1_numpar.m $1_state.m $1_input.m \ - $1_cse.m $1_cseo.m $1_switchopen.m + $1_cse.$m $1_cseo.$m $1_switchopen.m make_ode2odes $1 $integration_method endif ifeq ($integration_method,euler) $1_ode2odes.m : $1_def.r $1_sympars.txt\ $1_simpar.m $1_numpar.m $1_state.m $1_input.m \ @@ -2062,11 +2067,11 @@ mtt_m2p $1_smxax.m $1_switchopen.p : $1_def.r $1_switchopen.m mtt_m2p $1_switchopen.m ifeq ($integration_method,implicit) -$1_ode2odes.p : $1_ode2odes.m $1_def.r $1_smx.p\ +$1_ode2odes.p : $1_ode2odes.m $1_def.r $1_smxa.p $1_smxax.p\ $1_simpar.p $1_numpar.p $1_state.p $1_input.p \ $1_cse.p $1_cseo.p $1_switchopen.p mtt_m2p $1_ode2odes.m $integration_method $stdin endif ifeq ($integration_method,euler) @@ -2078,13 +2083,20 @@ $1_ode2odes.c: $1_ode2odes.p mtt_p2c $info_switch $1 ode2odes #SUMMARY sim Octave simulation function (m) -$1_sim.m: $1_def.r $1_cse.$m $1_cseo.$m $1_smxa.$m $1_smxax.$m - mtt_make_sim $1; cp -v $1_cse.$m $1_cseo.$m $1_smxa.$m $1_smxax.$m .. +ifeq ($computation,octave) +$1_sim.m: $1_def.r $1_sympar.txt $1_cse.$m $1_cseo.$m $1_smxa.$m $1_smxax.$m $1_numpar.m $1_state.m + mtt_make_sim $1 $integration_method $computation +endif + +ifeq ($computation,c) +$1_sim.m: $1_def.r $1_sympar.txt $1_ode2odes.out $1_numpar.m $1_state.m + mtt_make_sim $1 $integration_method $computation +endif #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) @@ -2200,17 +2212,17 @@ #SUMMARY smxtx Sparse computation of ATx (m) $1_smx.r: $1_def.r $1_def.m $1_ode.r $1_subs.r ode2smx_lang $1 r; tidy $1_smx.r $1_smx.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r - cse2smx_lang -parameters -noglobal $1 smx m + cse2smx_lang -parameters $1 smx m $1_smxa.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r - cse2smx_lang $1 smxa m + cse2smx_lang -parameters $matrix_smxa $1 smxa m $1_smxax.m: $1_def.r $1_def.m $1_cse.r $1_sympars.txt $1_subs.r - cse2smx_lang $1 smxax m + cse2smx_lang -parameters $1 smxax m #SUMMARY smc controller form state matrices etc. - siso only (r) #SUMMARY smc controller form state matrices etc. - siso only (tex) #SUMMARY smc* controller form state matrices etc. - siso only (m) #SUMMARY smc* controller form state matrices etc. - siso only (view) @@ -2369,11 +2381,11 @@ endif ifeq ($computation,c) $1_ode2odes.out: $1_ode2odes.c echo Creating $1_odes.out - $CC $1_ode2odes.c -lm -o $1_ode2odes.out + $CC $1_ode2odes.c /usr/lib/libp2c.a -lm -o $1_ode2odes.out $1_odes.dat2: $1_ode2odes.out echo Creating $1_odes.dat2 time ./$1_ode2odes.out>$1_odes.dat2 endif