long seed = System.currentTimeMillis();
System.out.println("seed:" + seed);
Randomness.reset(seed);
for (int i = 0; i < 100; i++){
Hampi h = new Hampi();
h.setSolver(new STPSolver());
Constraint c = null;
Solution solSTP = null;
Solution solMona = null;
try{
// System.out.println("-------------------------------------------");
System.out.println(" " + i);
int size = 1 + Randomness.nextRandomInt(2);
Constraint[] cs = new Constraint[size];
int varNum = 1;//just 1 var
cs[0] = randomConstraint(varNum, h);
for (int j = 1; j < cs.length; j++){
cs[j] = randomConstraint(varNum, h);
}
c = h.andConstraint(cs);
System.out.println("-----------------------------------------------");
System.out.println(c.toJavaCode("h"));
System.out.println();
h.setSolver(new STPSolver());
StopWatch sw = new StopWatch("Solving");
sw.start();
solSTP = h.solve(c, 10);
sw.stop();
System.out.println(sw);