From: villberg Date: Sat, 13 Sep 2014 19:52:39 +0000 (+0000) Subject: Fixed storing of array parameters into ICs X-Git-Tag: v1.29.0~179 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=59968408c227cfb8ce82ef706fb78be0b16ac339;p=simantics%2Fsysdyn.git Fixed storing of array parameters into ICs refs #5301 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30272 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiments.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiments.java index 7b918f14..a2d35c7d 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiments.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiments.java @@ -155,7 +155,6 @@ public class SysdynExperiments { private static void processChild(ReadGraph graph, Variable child, PartialIC IC) throws DatabaseException { - System.err.println("processChild " + child.getURI(graph)); StructuralResource2 STR = StructuralResource2.getInstance(graph); for(Variable c : child.getChildren(graph)) { @@ -174,7 +173,9 @@ public class SysdynExperiments { SysdynResource SYSDYN = SysdynResource.getInstance(graph); Collection exprs = graph.syncRequest(new ObjectsWithType(represents, L0.ConsistsOf, SYSDYN.ParameterExpression)); - if(exprs.size() == 0) return; + if(exprs.size() == 0) { + if(graph.hasStatement(represents, SYSDYN.Variable_isHeadOf)) return; + } Variable v = values.getPossibleProperty(graph, ""); if(v == null) return; @@ -188,7 +189,7 @@ public class SysdynExperiments { if(target != null && ds.length > 0) { RVI rvi = target.getRVI(graph); double initial = ds[0]; - System.err.println("rvi=" + rvi + " value=" + initial); +// System.err.println("rvi=" + rvi + " value=" + initial); IC.add(rvi, Variant.ofInstance(initial)); } } @@ -301,8 +302,6 @@ public class SysdynExperiments { public static void applyIC(WriteGraph graph, Variable experiment, String name) throws DatabaseException { - System.err.println("applyIC " + experiment.getURI(graph)); - Layer0 L0 = Layer0.getInstance(graph); SysdynResource SYSDYN = SysdynResource.getInstance(graph);