#!/bin/bash
p="0.20,0.80"
n_min=4
n_max=4
w_min=18
w_max=24
l_min=50
l_max=50

for ((n=${n_min}; n<=${n_max}; n++))
do
	for ((w=${w_min}; w<=${w_max}; w+=2))
	do
		for ((l=${l_min}; l<=${l_max}; l++))
		do
			s=$(($w + 20));
	                if [ ${s}  -gt  ${l} ];
        	        then
			    s=${l}
	                fi

			if [ ${s} -le ${w} ];
			then
			    continue
			fi

        	        outfile="_n${n}_w${w}_l${l}.ied";
			echo "- ${outfile} -> probability \"${p}\""
			./iedera -spaced -BSymbols '01' -f ${p} -b 0.5,0.5 -n ${n} -w ${w},${w} -s ${w},${s} -l ${l} -r 1 -e ./experiments_current_1/${outfile} -e ./experiments_current_2/${outfile} -e ${outfile} -o ${outfile} -p 2> /dev/null
			mv -f ${outfile} ./experiments_current_2
		done
	done
done
