Commit f72006c1 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

testing processbuilder to get output from lingeling; getting rid of annoying stdout message

parent 8bd710a3
......@@ -53,10 +53,10 @@ public class EpochHistory {
*/
if (_latestPlacementMap != null) {
_latestNumberOfMoves = _latestPlacementMap.countNumberOfMoves(placementMap);
System.out.println("Number of Moves: " + _latestNumberOfMoves);
// System.out.println("Number of Moves: " + _latestNumberOfMoves);
} else {
_latestNumberOfMoves = 0;
System.out.println("[NULL] Number of Moves: " + _latestNumberOfMoves);
// System.out.println("[NULL] Number of Moves: " + _latestNumberOfMoves);
}
// System.out.println("_latest: " + _latestPlacementMap);
// System.out.println("placementMap: " + placementMap);
......@@ -107,8 +107,8 @@ public class EpochHistory {
if (epochHistory == null) { throw new IllegalArgumentException("PlacementMap cannot be NULL!"); }
if (epochHistory.size() == 0) {
logger.info("Adding 0 PlacementMaps to this EpochHistory object because there are no PlacementMap" +
" to add from this EpochHistory object: " + epochHistory);
logger.info("Adding 0 PlacementMaps to this EpochHistory object because there are no PlacementMap"
+ " to add from this EpochHistory object: " + epochHistory);
}
/**
......
......@@ -149,9 +149,20 @@ public class RunSolverCNFSAT implements RunSolver {
// TODO Delete objects?
/*TIMING*/ timing.toggleTimer(tp + "RunSolverCNFSAT::run::binarySearch::exec::" + searchVal);
String[] exec_cmd = {solverloc, commands, cnfloc};
logger.log(Level.INFO, "[CNF Solver " + tp + "] Executing command: " + Arrays.toString(exec_cmd));
Process p = Runtime.getRuntime().exec(exec_cmd);
ArrayList<String> exec_cmd = new ArrayList<>();
exec_cmd.add(solverloc);
if (commands.isEmpty()) {
exec_cmd.add(commands);
}
exec_cmd.add(cnfloc);
logger.log(Level.INFO, "[CNF Solver " + tp + "] Executing command: " + exec_cmd);
// OLD COMMAND
// Process p = Runtime.getRuntime().exec(exec_cmd);
ProcessBuilder pb = new ProcessBuilder(exec_cmd);
Process p = pb.start();
// Activate the following 'if,' if we want to put in a time-limit for every decision instance.
if (mid < hi && EACH_DECISION_INSTANCE_TIMEOUT > 0
......
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