#!/bin/bash
cd /var/log/freenet-experimental/simulator

# Old style

#for x in "pcaching smoothing newbie" "pcaching newbie" "pcaching nonewbie" "nopcaching newbie" "fastestimators pcaching nonewbie" "fastestimators pcaching smoothing nonewbie" "fastestimators pcaching smoothing newbie" "fastestimators pcaching newbie" "fastestimators nopcaching newbie" "fastestimators pcaching smoothing nonewbie noannounce" "fastestimators pcaching smoothing nonewbie announce" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.2" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.1" "fastestimators pcaching nonewbie noannounce probeinexperience" "fastestimators pcaching nonewbie altannounce"  "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.025" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal smoothing"; do 
#for x in "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected random nonewbie pcaching htl=20" "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected fastestimators pcaching nonewbie noannounce probeinexperience randomizewhenequal htl=20"; do
# "pcaching random" "nopcaching random newbie"
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie noannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 random htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=25" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=30" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=25" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=27" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28" "nonfullyconnected nfcnodes=800 nfcrt=100 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=45" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=11" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=13" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=9" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=11" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=13" "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=17" "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=18" "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.05" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.1" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20 fetchfrac=0.05" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=13 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=9 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=8 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=7 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=13 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=18 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=17 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=21 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=30 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=75 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=85 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=100 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=75 fetchfrac=0.025"
#do
#echo Results for $x
#SUBNAME=`echo "$x" | tr " " "-"`
#FILEROOT="simulator-$SUBNAME-"
#FILENAME=`ls $FILEROOT[0-9]* | tail -n1`
#echo Filename of logfile: $FILENAME
#echo Output filename: results-$SUBNAME
## Now process it
#if [[ -z $FILENAME ]] ; then echo Log for $SUBNAME does not exist
#else cat $FILENAME | ~/bin/process-simlog > results-$SUBNAME
#fi
#done

# New style

#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=8 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=6 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=7 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=9 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=5 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=4 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=3 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=2 fetchfrac=0.025"  "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025" "nonfullyconnected  nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025" 
for x in "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 offlinert fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 offlinert fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 offlinert fetchfrac=0.025" "nonfullyconnected  nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025"
#for x in "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025 newbiehits=500" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025 newbiehits=100" 
#for x in "nonfullyconnected nfcnodes=800 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected  nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=29 fetchfrac=0.025" "nonfullyconnected   nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=29 fetchfrac=0.025" 
do
echo Results for $x
SUBNAME=`echo "$x" | tr " " "-"`
FILEROOT="simulator-$SUBNAME-"
FILENAME=`ls $FILEROOT[0-9]* | tail -n1`
echo Filename of logfile: $FILENAME
echo Output filename: results-$SUBNAME
# Now process it
if [[ -z $FILENAME ]] ; then echo Log for $SUBNAME does not exist
else 
cat $FILENAME | ~/bin/process-simlog-reavg100 > results-$SUBNAME
#cat $FILENAME | ~/bin/process-simlog-new > results-$SUBNAME
#cat $FILENAME | ~/bin/process-simlog > results-$SUBNAME
cat $FILENAME | ~/bin/process-simlog-load > loadresults-$SUBNAME
fi
done

echo Processed results. Graphing...
rm /root/simulations.png
# Now draw the actual graphs
for z in "" "load"; do
export z
(echo "set terminal png size 1280,1024";
 echo "set output \"/root/${z}simulations.png\"";
 echo -n "plot ";
 y=0;
 first=true
# Old graphs

#for x in "fastestimators pcaching nonewbie noannounce probeinexperience" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal smoothing"; do
#for x in "fastestimators pcaching nonewbie" "pcaching nonewbie" "fastestimators pcaching smoothing nonewbie" "fastestimators pcaching smoothing nonewbie noannounce" "fastestimators pcaching smoothing nonewbie announce" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.2" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.1" "fastestimators pcaching nonewbie altannounce" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.025" "fastestimators pcaching nonewbie noannounce probeinexperience" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal smoothing"; do
#for x in "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.2" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.1"; do
#for x in "fastestimators pcaching nonewbie" "pcaching nonewbie" "fastestimators pcaching smoothing nonewbie"; do
#for x in "pcaching smoothing newbie" "pcaching newbie" "nopcaching newbie" "fastestimators pcaching smoothing newbie" "fastestimators pcaching newbie" "fastestimators nopcaching newbie"; do 
#for x in "pcaching smoothing newbie" "pcaching newbie" "nopcaching newbie" "fastestimators pcaching smoothing newbie" "fastestimators pcaching newbie" "fastestimators nopcaching newbie" "fastestimators pcaching nonewbie" "pcaching nonewbie" "fastestimators pcaching smoothing nonewbie" "fastestimators pcaching smoothing nonewbie noannounce" "fastestimators pcaching smoothing nonewbie announce" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.2" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.1" "pcaching random" "nopcaching random newbie" "fastestimators pcaching nonewbie altannounce" "fastestimators pcaching smoothing nonewbie noannounce movementfactor=0.025" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal" "fastestimators pcaching nonewbie probeinexperience randomizewhenequal sparseprobe" "fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal sparseprobe"; do 
# "pcaching random" "nopcaching random newbie" "fastestimators pcaching nonewbie noannounce probeinexperience"
#for x in "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected random nonewbie pcaching htl=20" "nonfullyconnected fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected fastestimators pcaching nonewbie noannounce probeinexperience randomizewhenequal htl=20"; do
#  "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=5" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie noannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 random htl=10" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" 
#for x in  "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=25" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=30" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=25" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=27" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28" "nonfullyconnected nfcnodes=800 nfcrt=100 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=45" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" ; do
#"nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=11" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=13"
#for x in "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=11" "nonfullyconnected nfcnodes=75 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=13"; do
#for x in "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=9" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=11"
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie noannounce probeinexperience randomizewhenequal htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 random htl=10" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14"
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperiencerandomizewhenequal htl=13"
#for x in "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=17" "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=18" "nonfullyconnected nfcnodes=150 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16"
#"nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=5"
# "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15" 
#for x in "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20" "nonfullyconnected nfcnodes=200 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20"
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.05" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.1" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=20 fetchfrac=0.05"
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=13 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025"
#for x in "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=9 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=8 fetchfrac=0.025" "nonfullyconnected nfcnodes=50 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=7 fetchfrac=0.025"
#for x in "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=13 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=18 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=17 fetchfrac=0.025"
#for x in "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=21 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=35 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=30 fetchfrac=0.025" 
#for x in "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=75 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=85 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=100 fastestimators pcaching nonewbie altannounce randomizewhenequal htl=75 fetchfrac=0.025"
# "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=9 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=8 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=7 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=6 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=5 fetchfrac=0.025" 
#"nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=4 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=3 fetchfrac=0.025"
#"nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=2 fetchfrac=0.025"

# New graphs
#for x in "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=12 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=11 fetchfrac=0.025"    "nonfullyconnected  nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025" "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=10 fetchfrac=0.025"   "nonfullyconnected nfcnodes=100 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=9 fetchfrac=0.025"
for x in "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 offlinert fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 offlinert fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=15 fetchfrac=0.025" "nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=14 offlinert fetchfrac=0.025" "nonfullyconnected  nfcnodes=200 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=16 fetchfrac=0.025"
#for x in "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=400 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025 newbiehits=500" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025 newbiehits=100" 
#for x in "nonfullyconnected nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected  nfcnodes=400 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025 newbiehits=100"
#for x in "nonfullyconnected nfcnodes=800 nfcrt=25 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=22 fetchfrac=0.025" "nonfullyconnected nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=28 fetchfrac=0.025" "nonfullyconnected  nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=29 fetchfrac=0.025"  "nonfullyconnected   nfcnodes=800 nfcrt=50 estimatorpassing fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=29 fetchfrac=0.025" 
#for htl in 16; do
#x="nonfullyconnected nfcnodes=200 nfcrt=25 estimatorpassing offlinert fastestimators pcaching nonewbie altannounce probeinexperience randomizewhenequal htl=$htl fetchfrac=0.025"
do
  if [[ ! -n "$first" ]] ; then echo -n ", " ; fi
  first=
  SUBNAME=`echo "$x" | tr " " "-"`
  echo -n "\"${z}results-$SUBNAME\""
  y=$((y+1))
  echo -n " with lines lt $y title \"$x\""
done
echo
) | gnuplot
done
