Overview
Comment: | Now handles ss.r files with implicit zero values |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3be14e9ecf79b433fb2ba14ee499fe36 |
User & Date: | gawthrop@users.sourceforge.net on 2003-08-05 15:29:36 |
Other Links: | branch diff | manifest | tags |
Context
2003-08-06
| ||
10:33:42 | User now warned not to use -c which is unsupported. check-in: 917ad92651 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2003-08-05
| ||
15:29:36 | Now handles ss.r files with implicit zero values check-in: 3be14e9ecf user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
2003-08-04
| ||
09:15:09 | -ss switch reinstated check-in: 48d1c380c5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/mtt_update from [57a4091ca6] to [a732204ed3].
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.17 2002/04/28 18:41:27 geraint ## Fixed [ 549658 ] awk should be gawk. ## Replaced calls to awk with call to gawk. ## ## Revision 1.16 2000/10/17 13:45:18 peterg ## split up state and input - different defaults ## | > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.18 2003/08/04 09:10:30 gawthrop ## Now handles steady-state computation for _state.txt. ## ## Revision 1.17 2002/04/28 18:41:27 geraint ## Fixed [ 549658 ] awk should be gawk. ## Replaced calls to awk with call to gawk. ## ## Revision 1.16 2000/10/17 13:45:18 peterg ## split up state and input - different defaults ## |
︙ | ︙ | |||
79 80 81 82 83 84 85 86 87 88 | echo Usage mtt_update system representation [update] exit fi ## Extract initial value from steady-state information initial_value() { i=$1 ssfile=${sys}_ss.r if [ "${rep}" = "state" ]; then if [ -f "${ssfile}" ]; then | > > > | > > > | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | echo Usage mtt_update system representation [update] exit fi ## Extract initial value from steady-state information initial_value() { i=$1 default=$2 ssfile=${sys}_ss.r if [ "${rep}" = "state" ]; then if [ -f "${ssfile}" ]; then count=`grep -c "^MTTx($i" ${ssfile}`; # See if its there if [ $count = "1" ]; then value=`grep "^MTTx($i" ${ssfile}| sed 's/ //g' | gawk -F '=' '{print substr($2,1,length($2)-2)}'` else value="0.0" fi else value=${default} fi else value=${default} fi } |
︙ | ︙ | |||
148 149 150 151 152 153 154 | else echo Creating $textfile mtt_header $sys $rep $lang > $textfile info=`cut -f1 $infofile | sort` i=0; for new in $info; do let i=$i+1; | | | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | else echo Creating $textfile mtt_header $sys $rep $lang > $textfile info=`cut -f1 $infofile | sort` i=0; for new in $info; do let i=$i+1; initial_value $i ${default} echo $new $value |\ gawk '{printf("%s\t= %s; # Default\n",$1,$2)}' >> $textfile done exit fi # Remove tmp files |
︙ | ︙ |