# -*- sh -*- Repeats=1 M=`basename $0` There=/tmp/$USER Sandbox=$There/$M/$$ Here=$HOME/eg/xomo Safe=$Here/safe15 dirs() { mkdir -p $Sandbox mkdir -p $Safe rm -rf $There/$M/last ln -sf $Sandbox $There/$M/last } clean() { rm -fr $Sandbox } update() { (cd ~/src/nbins; am -f -b nbins) (cd ~/src/delta; am -f -b delta) (cd ~/src/xomo2; am -f -b xomo) } eden() { cat <<-EOF system with autonomy autonomy with 0 ksloc just 75 125 prec just 3 5 flex = 3 resl = 4 team = 3 # was 2 pmat just 4 5 # was 5 6 rely = 5 data = 4 cplx = 4 ruse = 4 docu just 3 4 time = 3 stor = 3 # was 2 pvol = 3 acap = 4 pcap = 3 pcon = 3 aexp = 4 plex = 4 ltex just 2 5 tool = 5 site = 6 sced = 2 4 EOF } gen() { Round=$1 blab $Round echo "" echo "%< round $Round" nice -19 xomo -S $RANDOM -b 200 -l -R 1000 \ -d $Here/defaults.dat -p ${Round}.dat -P $Round \ -s '<$defects,<$effort,<$risk,?$A,?$B,$ksloc' | tee ${M}xomo.out | nbins -V -d /dev/stdout -b 5 -p "" | tee ${M}nbins.out | delta -e 0.67 | > ${M}delta.out tuc What="-3,-2,-1" ${M}xomo.out | stats | malign | sed 's/^/%/' echo "" cat ${M}delta.out } main() { cd $Sandbox update eden > 0.dat for((i=0;i<$Repeats;i++)) do j=$((i+1)) ( cat ${i}.dat echo "$i with $j" gen $i ) | tee ${j}.dat > last.dat done cp last.dat $Safe/last.dat } dirs ( main ) echo "" (echo "what","n","min","mean","max","sd","sd/mean%"; fgrep "<" $Sandbox/${Repeats}.dat) | malign pwd #%< round 0 #% <$defects, 1000, 1.03, 30.1733, 246.33, 42.9747, 142 #% <$effort, 1000, 491.03, 4500.61, 42105.23, 5549.13, 123 #% <$risk, 1000, 0.00, 13.982, 82.35, 18.3127, 130 #%< round 1 #% <$defects, 1000, 1.61, 21.9484, 207.60, 30.6185, 139 #% <$effort, 1000, 577.27, 3248.16, 15658.85, 3772.69, 116 #% <$risk, 1000, 0.00, 8.39357, 37.37, 11.0788, 131 #%< round 2 #% <$defects, 1000, 1.71, 20.3173, 201.50, 27.5719, 135 #% <$effort, 1000, 635.62, 3371.17, 14056.11, 3829.79, 113 #% <$risk, 1000, 0.00, 7.95581, 36.00, 10.5863, 133 #%< round 3 #% <$defects, 1000, 1.35, 20.9994, 175.25, 28.9713, 137 #% <$effort, 1000, 497.50, 3420.35, 14766.71, 3927.15, 114 #% <$risk, 1000, 0.00, 7.99617, 34.08, 10.4405, 130 #%< round 4 #% <$defects, 1000, 1.25, 21.6405, 235.11, 30.7589, 142 #% <$effort, 1000, 647.88, 3333.63, 17994.49, 3840.72, 115 #% <$risk, 1000, 0.00, 8.60829, 36.79, 11.184, 129