mem0 = 0; mem1 = 0;
} else {
System.out.println("Wrong input!!");
}
solver = new SolverMultiClosedLinearizer(classes, stations, pop, false);
algorithm = "Linearizer";
if (solver.input(name, type, servt, visits)) {
long start = System.currentTimeMillis();
solver.solve();
System.out.print(algorithm+",");
//System.out.print(maxDiff(pop, solver.getQueueLen(), mvaQueueLen)+",");
//System.out.println(algorithm);
//System.out.println("-------------------------------------");
//System.out.println(queueLength(stations, classes, solver));
long stop = System.currentTimeMillis();
System.out.print(((stop-start)/(double)1000) + ",");
//System.out.println("Elapsed time (ms) = " + (stop - start));
start = 0; stop = 0;
long mem0 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
solver = null;
System.gc(); System.gc(); System.gc(); System.gc();
System.gc(); System.gc(); System.gc(); System.gc();
System.gc(); System.gc(); System.gc(); System.gc();
System.gc(); System.gc(); System.gc(); System.gc();
System.gc(); System.gc(); System.gc(); System.gc();
long mem1 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
System.out.print(((mem0-mem1)/(double)1024) + ",");
System.out.print((mem0/(double)1024) + "\n");
// System.out.println("Memory Usage (KB) = " + ((mem0 - mem1)/(double)1024));
// System.out.println("Memory Usage w/o diff (KB) = " + ((mem0)/(double)1024));
// System.out.println("-------------------------------------");
mem0 = 0; mem1 = 0;
} else {
System.out.println("Wrong input!!");
}
solver = new SolverMultiClosedLinearizer(classes, stations, pop, true);
algorithm = "DeSouza-Muntz Linearizer";
if (solver.input(name, type, servt, visits)) {
long start = System.currentTimeMillis();
solver.solve();
System.out.print(algorithm+",");