From 6dacbcdd507647e80deb08ece6bfb1f6607a5a55 Mon Sep 17 00:00:00 2001 From: miettinen Date: Thu, 26 Sep 2013 10:44:22 +0000 Subject: [PATCH] Vary whitespaced variables in sensitivity analysis (refs #4441). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27892 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/adapter/SensitivityExperimentParameter.java | 10 ++++++---- .../manager/SysdynSensitivityAnalysisExperiment.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/SensitivityExperimentParameter.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/SensitivityExperimentParameter.java index 8dc6bdd1..73098986 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/SensitivityExperimentParameter.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/adapter/SensitivityExperimentParameter.java @@ -84,8 +84,6 @@ public class SensitivityExperimentParameter { return variableName; } - - public String[] getIndexes() { return indexes; } @@ -97,7 +95,11 @@ public class SensitivityExperimentParameter { public IDistribution getDistribution() { return distribution; } - - + public String getFullModelicaName() { + if (this.fullName == null) + return null; + return this.fullName.replace(' ', '_'); + } + } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynSensitivityAnalysisExperiment.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynSensitivityAnalysisExperiment.java index c543e95d..c4377654 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynSensitivityAnalysisExperiment.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynSensitivityAnalysisExperiment.java @@ -95,7 +95,7 @@ public class SysdynSensitivityAnalysisExperiment extends SysdynExperiment { // Get the random value double value = p.getDistribution().inverseCDF(randoms.get(j)); // Add the new parameter-value-pair - parameterMap.put(p.getFullName(), Double.toString(value)); + parameterMap.put(p.getFullModelicaName(), Double.toString(value)); } // Add the complete list of one individual run parameter-value-pairs. parameterMaps.add(parameterMap); -- 2.47.1