Index: mttroot/mtt/bin/mtt ================================================================== --- mttroot/mtt/bin/mtt +++ mttroot/mtt/bin/mtt @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ +## Revision 1.298 2001/04/02 17:36:20 gawthrop +## Resolved $sys name clash when using -s +## ## Revision 1.297 2001/03/29 19:20:45 gawthrop ## Can now use c representations of crs when using -c option ## ## Revision 1.296 2001/03/27 01:07:34 geraint ## Improved determination of Octave version for ode2odes.exe creation. @@ -1536,11 +1539,13 @@ if [ "$n_found" = "1" ]; then echo Copying $2 from $comp_path to $destination cp $comp_path/*_*.* $destination exit 0 elif [ "$n_found" = "0" ]; then - echo Component $2 not found - is MTT_COMPONENTS set correctly? + if [ "$quiet" != "quiet" ]; then + echo Component $2 not found - is MTT_COMPONENTS set correctly? + fi exit 1 elif [ "$n_found" > "1" ]; then echo "Multiple versions of $2 found (see below) - use a more explicit alias" mtt -q find $2 exit 2 @@ -1853,11 +1858,11 @@ ################################ # This is the main mtt programme ################################ -echo Target is $target, Subsystem is $Subsystem, options are $mtt_switches +#echo Target is $target, Subsystem is $Subsystem, options are $mtt_switches $MAKE -S $verbose -f - $target << EOF # Cancel implicit rules I don't want %.dvi: %.tex @@ -1898,11 +1903,11 @@ ifeq ("$level","0") $1_abg.fig: $sys_abg.fig abg2sensitivity_fig $sys_s else # Either find the sensitivity model or fetch the model and create sensitivity model $1_abg.fig: - mtt -q -u $mtt_switches compcopy $1 || abg2sensitivity_fig $sys + mtt -q -u $mtt_switches compcopy $1 || abg2sensitivity_fig $sys_s endif endif ifneq ("$sensitivity","sensitivity") ifneq ("$level","0") @@ -2163,15 +2168,11 @@ $1_numpar.c: $1_numpar.txt $1_sympar.c txt2c $1 numpar -#SUMMARY input numerical input declaration (m) -$1_input.m: $1_input.txt $1_sympars.txt - mtt_txt2m $1 input - -#SUMMARY input numerical input declaration (m) +#SUMMARY logic logic input declaration (m) $1_logic.m: $1_logic.txt $1_switch.txt mtt_txt2m $1 logic #SUMMARY state state declaration -- default (txt) #$1_state.txt: @@ -2503,14 +2504,19 @@ $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 +#SUMMARY input numerical input declaration (m) ifeq ($stdin,stdin) +$1_input.m : $1_def.r + make_stdin $1 m $1_input.p : $1_def.r make_stdin $1 p else +$1_input.m: $1_input.txt $1_sympars.txt + mtt_txt2m $1 input $1_input.p : $1_def.r $1_input.m mtt_m2p $1_input.m endif $1_ode.p : $1_def.r $1_ode.m ADDED mttroot/mtt/bin/trans/make_ssim Index: mttroot/mtt/bin/trans/make_ssim ================================================================== --- /dev/null +++ mttroot/mtt/bin/trans/make_ssim @@ -0,0 +1,47 @@ +#!/bin/sh + +## Makes the sensitivity simulation +## Copyright (C) 2001 by Peter J. Gawthrop + +sys=$1 +lang=$2 + +outfile=${sys}_ssim.${lang} + +echo Creating $outfile +make_m() { +mtt_header ${sys} ssim m > ${outfile} +cat >> ${outfile} < $1_input.$2 +## Pascal code +make_p() +{ +cat < $outfile PROCEDURE $1_input(VAR mttu : InputVector; - mttt : REAL; mttx : StateVector; - mtty : OutputVector); + mtty : OutputVector; + mttt : REAL; + par : ParameterVector); {Created by MTT on $date for standard input to simulation} VAR t : REAL; Start:BOOLEAN; @@ -39,5 +45,56 @@ readln; {Next line} END{$1_input}; EOF +} + +make_m() { +mtt_header $Sys input m stdin > $outfile +cat >> $outfile < $outfile <