/** * Resets the currently active model by creating a new model instance of the current model class. * Inits all model- and experiment parameters according to the current experiment runner. */ void resetModel() { try { if (docNode != null) { if (docNode.getNodeName().equals("run")) readExperimentRunFromNode(docNode); } else initNewExperimentRun(); experimentGUI.resetGUI( filename, runsBatch, modelAccessPoints, expAccessPoints, model.getName()); } catch (Exception e) { e.printStackTrace(); } }
/** Loads the DOM node representing the document currently open in the experiment launcher */ void loadDocNode() { try { Document d = DocumentReader.getInstance().readDoc(filename); docNode = d.getDocumentElement(); if (docNode.getNodeName().equals("run")) { runsBatch = false; readExperimentRunFromNode(docNode); } else if (docNode.getNodeName().equals("batch")) { runsBatch = true; } experimentGUI.resetGUI( filename, runsBatch, modelAccessPoints, expAccessPoints, model.getName()); } catch (Exception e) { e.printStackTrace(); filename = null; docNode = null; runsBatch = false; } }