#!/bin/bash

Nlist="1000 2000 4000"
prw_list="0.00 0.01 0.10 0.5 1.0"

lmd1_list="0.0 0.1 0.2 0.5 1.0"
lmd2_list="0.0 0.5 1.0"

epsilon_list="0.2"

for prw in $prw_list; do
    for N in $Nlist; do
        for lmd1 in $lmd1_list; do
            for lmd2 in $lmd2_list; do
	            for epsilon in $epsilon_list; do
		            outfile=compute_${lmd1}_${lmd2}_${N}_${prw}_${epsilon}.py
		            cp compute.py $outfile
                    sed -i s/my_p_rw_/${prw}/g $outfile
		            sed -i s/myN_/${N}/g $outfile
		            sed -i s/mylambda1_/${lmd1}/g $outfile
	                sed -i s/mylambda2_/${lmd2}/g $outfile
	                sed -i s/myepsilon_/${epsilon}/g $outfile
		            sleep 2
		        done
	        done
	    done
    done
done
