//temp.delete();
return model;
}
private CSPSolution parseMinionOutput(BufferedReader reader) {
CSPSolution model = new CSPSolution();
boolean hasSolution = false;
int i = 0;
int j = 0;
String line;
String solutionPrefix = "Sol: ";
String hasSolutionPrefix = "Problem solvable?: ";
try {
while ((line = reader.readLine()) != null) {
//System.err.println(line);
if (line.startsWith(solutionPrefix)) {
hasSolution = true;
Integer value = Integer.parseInt(line.trim().substring(solutionPrefix.length()));
String variable = "";
if (i < dVars.size()) {
variable = dVars.get(i++).getName();
model.addVariable(variable, value);
} else if (j < eVars.size()) {
variable = eVars.get(j++).getName();
model.addVariable(variable, value);
}
} else if (line.startsWith(hasSolutionPrefix)) {
String solStatus = line.trim().substring(hasSolutionPrefix.length());
if(solStatus.equals("yes")) {
hasSolution = true;