Example #1
0
 /** Creates an URL from the given Experiment's output path */
 protected URL getReportURL(Experiment exp) {
   try {
     String prefix = exp.getOutputPath();
     if (!prefix.equals("")) prefix += "/";
     return new URL("file:" + prefix + exp.getName());
   } catch (java.net.MalformedURLException e) {
     return null;
   }
 }
Example #2
0
 /** Called when experiment is stopped. Implemented for ExperimentListener */
 public void experimentStopped(SimRunEvent e) {
   Experiment exp = expRunner.getExperiment();
   Map expMap = expAccessPoints.getAccessPoints();
   Object[] expvalues = AccessUtil.getAccessPointValues(expMap);
   String currentTime = model.currentTime().toString(3);
   String experimentValues = expvalues[AccessUtil.getIndexof("name", expMap)].toString();
   String outputPath = exp.getOutputPath();
   List<List<String>> appendixes = exp.getOutputAppendixes();
   String[] appendixesUsed = {
     appendixes.get(0).get(0),
     appendixes.get(1).get(0),
     appendixes.get(2).get(0),
     appendixes.get(3).get(0)
   }; // only use the first one (GUI can only set one output file type per channel)
   experimentGUI.setStopped(currentTime, startTime, experimentValues, outputPath, appendixesUsed);
 }