\r
results = null;\r
// Simulate the model\r
+ \r
+ /* If the changes is altered, it affects also to the next simulation. So,\r
+ * All the parameters that are to be altered need to be defined explicitly\r
+ * before each new simulation. \r
+ */\r
+ \r
+ changes = new HashMap<String, String>();\r
+ changes.put("Auxiliary1", "444.0");\r
runModelica(simulationLocation, modelText, monitor, progressMonitor, experimentParameters, changes, 0);\r
-\r
+ changes.put("Auxiliary1", "333.0");\r
runModelica(simulationLocation, modelText, monitor, progressMonitor, experimentParameters, changes, 1);\r
-\r
+ changes.put("Auxiliary1", "222.0");\r
runModelica(simulationLocation, modelText, monitor, progressMonitor, experimentParameters, changes, 2);\r
}\r
if(canceled)\r
return this.results;\r
}\r
\r
+ @Override\r
+ public Collection<SysdynResult> getActiveResults() {\r
+ ArrayList<SysdynResult> result = new ArrayList<SysdynResult>();\r
+ result.addAll(getCurrentResults());\r
+ result.addAll(sysdynModel.getDisplayedResults());\r
+ return result;\r
+ }\r
+ \r
+ @Override\r
+ public MemoryResult getCurrentResult() {\r
+ if (this.results == null || this.results.size() < 1)\r
+ return null;\r
+ /* There should be a better alternative solution for this. Currently\r
+ * the return value is next to nonsense.\r
+ */\r
+ return this.results.get(0);\r
+ }\r
+ \r
+ @Override\r
+ public void saveState() {\r
+ if(results == null || !(results instanceof ArrayList<?>)) \r
+ return;\r
+ //SaveResultJob saveResultJob = new SaveResultJob(SysdynSensitivityAnalysisExperiment.this, session, results);\r
+ //saveResultJob.schedule();\r
+ }\r
+ \r
//this.results.add(new MemoryResult(null, null));\r
\r
\r