/** Initializes an experiment run from an xml file */ void readExperimentRunFromNode(Node root) { try { Run run = new Run(); run.readFromNode((Element) root); expRunner = run.getExperimentRunner(); model = run.getModel(); expRunnerClass = expRunner.getClass(); modelClass = model.getClass(); expAccessPoints = new AccessPointTableModel(expRunner.getExperimentSettings()); modelAccessPoints = new AccessPointTableModel(expRunner.getModelParameters()); } catch (Exception e) { e.printStackTrace(); } }
/** * Inits a new experiment run from a given model and experiment runner class: model and experiment * runner are initialized. Parameter tables are connected to model parameter and experiment * setting access points. */ void initNewExperimentRun() { try { if (expRunnerClass != null && modelClass != null) { model = (Model) modelClass.newInstance(); if (this.modelConstants != null) { model .getParameterManager() .initializeModelParameter(String[].class, "cmdparam", this.modelConstants); } expRunner = (ExperimentRunner) expRunnerClass.newInstance(); expRunner.setModel(model); expAccessPoints = new AccessPointTableModel(expRunner.getExperimentSettings()); modelAccessPoints = new AccessPointTableModel(expRunner.getModelParameters()); } } catch (Exception e) { e.printStackTrace(); } }