// // Mixing of SM and SR, when do solutions drop off? // public class MakeSMSRJob { public static void makeJob(int n,double p,int m,int p100) { //int p100 = (int)(p*100.0); String s = "-"; if (p100 < 10) s = "-0"; for (int i=0;i9) fname = fname + n + s + p100 +"-"+ i +".txt "; else fname = fname + n + s + p100 +"-0"+ i +".txt "; System.out.print("java RandomSMSR "+ n +" "); System.out.format("%.2f ",p); System.out.println("> instance.txt "); System.out.println("java SRNary instance.txt count > " + fname); } } public static void main(String[] args) { int n = Integer.parseInt(args[0]); // number of agents double pLo = Double.parseDouble(args[1]); // starting mixing probability double pHi = Double.parseDouble(args[2]); // ending mixing probability double pInc = Double.parseDouble(args[3]); // p increment int m = Integer.parseInt(args[4]); // number of instances at each setting double p = pLo; int p100 = (int)(p*100.0); int pInc100 = (int)(pInc*100.0); for (int i=0;p<=pHi+(pInc/2.0);i++){ makeJob(n,p,m,p100); p = p + pInc; p100 = p100 + pInc100; } } }