Commit fe07ce51 authored by leberre's avatar leberre
Browse files

Added the possibility to compute both set minimal or card minimal muses.

git-svn-id: svn+ssh://svn.forge.ow2.org/svnroot/sat4j/maven/trunk@1685 ba638df5-4473-46d1-82f8-c3ae2a17a6e1
parent 90369f05
......@@ -153,7 +153,7 @@ public class MUSLauncher extends AbstractLauncher {
+ wallclocktime);
double beginmus = System.currentTimeMillis();
if (allMuses != null) {
allMuses.computeAllMUSes(new SolutionFoundListener() {
SolutionFoundListener listener = new SolutionFoundListener() {
public void onSolutionFound(int[] solution) {
}
......@@ -161,13 +161,20 @@ public class MUSLauncher extends AbstractLauncher {
System.out.println(solver.getLogPrefix()
+ "found mus number " + ++muscount);
out.print(ILauncherMode.SOLUTION_PREFIX);
reader.decode(solution.toArray(), out);
int[] localMus = new int[solution.size()];
solution.copyTo(localMus);
reader.decode(localMus, out);
out.println();
}
public void onUnsatTermination() {
}
});
};
if ("card".equals(System.getProperty("min"))) {
allMuses.computeAllMUSesOrdered(listener);
} else {
allMuses.computeAllMUSes(listener);
}
log("All MUSes computation wall clock time (in seconds) : "
+ (System.currentTimeMillis() - beginmus) / 1000.0);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment