#!/usr/bin/perl

$colors = 3;
$multiplier = 2;
@cases = (30);
$TYPE = "APO";
foreach $i (@cases){
  for ($g = 1; $g <=1; $g++) {
    for($c = 1; $c <=1; $c++) {
      run($i, $i * $multiplier, $colors, $g, $c);
    }
  }
}

sub run {
	($NODES, $EDGES, $COLORS, $GNUM, $CASENUM) = @_;

	$CMD = "./rungraphcolor -type $TYPE -nodes $NODES -edges $EDGES -colors 3 -vfile ./cases/$NODES-$EDGES-$COLORS-$GNUM-$CASENUM.txt -gfile ./cases/$NODES-$EDGES-$COLORS-$GNUM.txt";

	print "$CMD\n";
	`$CMD`;
	#`cp ../simulator/simulator.sav ./$TYPE.$NODES.$EDGES.$COLORS.$GNUM.$CASENUM.sav`;
	`killall -9 rmiregistry`;
	sleep(10);
}
