import choco.kernel.solver.ContradictionException; public class MorphExperiment { public static void main(String[] args) throws ContradictionException { int n = Integer.parseInt(args[0]); // must be even double pLo = Double.parseDouble(args[1]); double pHi = Double.parseDouble(args[2]); double pInc = Double.parseDouble(args[3]); int m = Integer.parseInt(args[4]); // sample size String model = args[5]; // A or B SMSRInstance inst = new SMSRInstance(n); double p = pLo; // (1.0-p) from SM (p=0 <-> SM), p from SR (p=1 <-> SR) while (p < (pHi + pInc)){ for (int j=0;j<m;j++){ inst.build(model,p); SRNary sr = new SRNary(inst); sr.build(); sr.solve("count"); System.out.format("n: %d p: %.3f inst: %d ",n,p,j); sr.shortStats(); } p = p + pInc; } } }