@Override\r
public ArrayList<DataSet> getValue() {\r
ArrayList<DataSet> datasets = new ArrayList<DataSet>();\r
- \r
+\r
if(experiment == null)\r
- return datasets;\r
- \r
+ return datasets;\r
+\r
Collection<SysdynResult> results = experiment.getActiveResults();\r
ArrayList<String> variableNamesWithIndexes = getVariableNamesWithIndexNumbers();\r
ArrayList<String> variableNames = getVariableNames();\r
\r
for(int i = 0; i < variableNamesWithIndexes.size(); i++) {\r
- for(SysdynResult result : results) {\r
- SysdynDataSet ds = result.getDataSet(variableNamesWithIndexes.get(i));\r
- if(ds != null) {\r
- \r
- /* Change the name if necessary\r
- Name needs to be changed if it contains indexes. Dataset names\r
- contains indexes as numbers, asked names as index names.\r
- \r
- There are cases where dataset names could actually be different \r
- from asked names. HistoryDatasets are one example. In that case, show the \r
- datasetname.\r
- */\r
- String askedName = variableNames.get(i);\r
- if(askedName.contains("["))\r
- askedName = askedName.substring(0, askedName.indexOf("["));\r
- String datasetname = ds.name.replace("_", " ");\r
- if(datasetname.contains("["))\r
- datasetname = datasetname.substring(0, datasetname.indexOf("["));\r
- \r
- if(askedName.equals(datasetname.replace("_", " ")))\r
- ds.name = askedName;\r
- else\r
- ds.name = datasetname;\r
- \r
- datasets.add(ds);\r
- }\r
- }\r
+ for(SysdynResult result : results) {\r
+ SysdynDataSet ds = result.getDataSet(variableNamesWithIndexes.get(i));\r
+ if(ds != null) {\r
+ // NOTE: this method was changed to no longer remove\r
+ // remove enumeration indices from variable names as it\r
+ // seems unnecessary and makes different instances of the\r
+ // same variable with different enumeration indices\r
+ // indistinguishable from each other in simulation results\r
+ ds.name = variableNames.get(i);\r
+\r
+ datasets.add(ds);\r
+ }\r
+ }\r
}\r
return datasets;\r
}\r
@Override\r
public void setIndexedValue(WriteGraph graph, Object value)\r
throws DatabaseException {\r
- \r
+\r
}\r
\r
}\r