/**
* Solves the model in file.
* @throws jmt.common.exception.SolverException if there were errors operation was not successful
*/
public void solve(File file) throws SolverException, InputDataException {
ExactModel model = new ExactModel();
try {
if (!model.loadDocument(xmlUtils.loadXML(file))) {
fail("Error loading model from tempfile", null);
}
} catch (SAXException e) {
fail("XML parse error in tempfile", e);
} catch (Exception e) {
fail("Error loading model from tempfile", e);
}
if (PRINTMODEL) {
System.out.println(model);
}
solve(model);
if (PRINTMODEL) {
System.out.println(model);
}
try {
if (!xmlUtils.saveXML(model.createDocument(), file)) {
fail("Error saving solved model to tempfile", null);
}
} catch (SAXException e) {
fail("XML parse error in tempfile", e);
} catch (Exception e) {