#!/usr/bin/perl -w

# prior dist'n
$upper = 1;
$lower = 0.01;
$numRep = 10;  # Number of simulation runs

$msExe = "ms";

for($i = 0; $i < $numRep; $i++) {

    # draw a uniform rand between $lower (inlcuded) and $upper (excluded)
    # rand(10) returns a rand num X; 0 <= X < 10
    $thisRandNum = rand ($upper - $lower) + $lower;

    $migOpt = "";
    $model = 0;
    if (rand(1) < 0.5) {
	$model = 0;
	$migOpt = "-ma x 8.0 16.0 x";
    } else {
	$model = 1;
	$migOpt = "-ma x 8.0 0.0 x";
    }
    
    $ssVect = `$msExe 8 1 -t 8 -I 2 3 5 $migOpt -n 1 0.5 -n 2 0.25  -en $thisRandNum 1 1.0  -ej $thisRandNum 2 1 | sample_stats  |./cleanSampleStats.pl`;

    print "$model\t$thisRandNum\t$ssVect";
    
}

exit;
