]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Use old FMU if nothing has been changed in variables, equations or other significant...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 21 Mar 2013 11:29:37 +0000 (11:29 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 21 Mar 2013 11:29:37 +0000 (11:29 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27184 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ontology/graph.tg
org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph
org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/StockExpression.java
org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynGameExperiment.java
org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/Sheet.java
org.simantics.sysdyn/src/org/simantics/sysdyn/simulation/SimulationJob.java

index a7b7d77e4d60bc63d49fa91846c27fd24e7fbb2d..f2f401d69cedee0a64fcc9b5d2a2661ecec4484d 100644 (file)
Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ
index 30c5641a0035065c31020adbf6e4234c78f854ce..5838fb7ec5c3447aeb166b22dda2eae6f987b7cd 100644 (file)
@@ -44,6 +44,8 @@ SYSDYN.SysdynModel <T MOD.StructuralModel
     >-- SYSDYN.SysdynModel.tolerance --> L0.Double <R L0.HasProperty : L0.FunctionalRelation
     >-- SYSDYN.SysdynModel.solver --> L0.String <R L0.HasProperty : L0.FunctionalRelation
     >-- SYSDYN.SysdynModel.variableFilter --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+    >-- SYSDYN.SysdynModel.fmuFile --> L0.ByteArray <R L0.HasProperty
+//    >-- SYSDYN.SysdynModel.exeFile --> L0.ByteArray <R L0.HasProperty
     @L0.assert SYSDYN.SysdynModel.startTime 0.0
     @L0.assert SYSDYN.SysdynModel.stopTime 10.0
     @L0.assert SYSDYN.SysdynModel.solver "euler"
index 458c0d4826413c3f039700ec8879a560abc97ac2..4649d827f85cc95c0a86f230727d719e933f1c61 100644 (file)
@@ -432,6 +432,15 @@ public class SysdynResource {
     public final Resource LookupExpression;\r
     public final Resource LookupExpression_lookup;\r
     public final Resource LookupExpression_lookup_Inverse;\r
+    public final Resource Migration;\r
+    public final Resource Migration_from1$6to1$7;\r
+    public final Resource Migration_from1$6to1$7_Ontologies;\r
+    public final Resource Migration_from1$6to1$7_OrderedSetsToLists;\r
+    public final Resource Migration_from1$6to1$7_Spreadsheets;\r
+    public final Resource Migration_from1$6to1$7_SysdynChanges;\r
+    public final Resource Migration_fromFunctionLibrary1;\r
+    public final Resource Migration_fromModel1;\r
+    public final Resource Migration_fromModule1;\r
     public final Resource ModelBrowser;\r
     public final Resource ModelingActionContext;\r
     public final Resource ModelingActionContext_Actions;\r
@@ -535,6 +544,8 @@ public class SysdynResource {
     public final Resource SysdynConnectionType;\r
     public final Resource SysdynDiagramModelingRules;\r
     public final Resource SysdynModel;\r
+    public final Resource SysdynModel_fmuFile;\r
+    public final Resource SysdynModel_fmuFile_Inverse;\r
     public final Resource SysdynModel_outputInterval;\r
     public final Resource SysdynModel_outputInterval_Inverse;\r
     public final Resource SysdynModel_simulationStepLength;\r
@@ -660,11 +671,6 @@ public class SysdynResource {
     public final Resource WithLookupExpression_maxY;\r
     public final Resource WithLookupExpression_minX;\r
     public final Resource WithLookupExpression_minY;\r
-    public final Resource from1$6to1$7;\r
-    public final Resource from1$6to1$7_Ontologies;\r
-    public final Resource from1$6to1$7_OrderedSetsToLists;\r
-    public final Resource from1$6to1$7_Spreadsheets;\r
-    public final Resource from1$6to1$7_SysdynChanges;\r
         \r
     public static class URIs {\r
         public static final String AdditionalSymbols = "http://www.simantics.org/Sysdyn-1.1/AdditionalSymbols";\r
@@ -1090,6 +1096,15 @@ public class SysdynResource {
         public static final String LookupExpression = "http://www.simantics.org/Sysdyn-1.1/LookupExpression";\r
         public static final String LookupExpression_lookup = "http://www.simantics.org/Sysdyn-1.1/LookupExpression/lookup";\r
         public static final String LookupExpression_lookup_Inverse = "http://www.simantics.org/Sysdyn-1.1/LookupExpression/lookup/Inverse";\r
+        public static final String Migration = "http://www.simantics.org/Sysdyn-1.1/Migration";\r
+        public static final String Migration_from1$6to1$7 = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7";\r
+        public static final String Migration_from1$6to1$7_Ontologies = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7/Ontologies";\r
+        public static final String Migration_from1$6to1$7_OrderedSetsToLists = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7/OrderedSetsToLists";\r
+        public static final String Migration_from1$6to1$7_Spreadsheets = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7/Spreadsheets";\r
+        public static final String Migration_from1$6to1$7_SysdynChanges = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7/SysdynChanges";\r
+        public static final String Migration_fromFunctionLibrary1 = "http://www.simantics.org/Sysdyn-1.1/Migration/fromFunctionLibrary1";\r
+        public static final String Migration_fromModel1 = "http://www.simantics.org/Sysdyn-1.1/Migration/fromModel1";\r
+        public static final String Migration_fromModule1 = "http://www.simantics.org/Sysdyn-1.1/Migration/fromModule1";\r
         public static final String ModelBrowser = "http://www.simantics.org/Sysdyn-1.1/ModelBrowser";\r
         public static final String ModelingActionContext = "http://www.simantics.org/Sysdyn-1.1/ModelingActionContext";\r
         public static final String ModelingActionContext_Actions = "http://www.simantics.org/Sysdyn-1.1/ModelingActionContext/Actions";\r
@@ -1193,6 +1208,8 @@ public class SysdynResource {
         public static final String SysdynConnectionType = "http://www.simantics.org/Sysdyn-1.1/SysdynConnectionType";\r
         public static final String SysdynDiagramModelingRules = "http://www.simantics.org/Sysdyn-1.1/SysdynDiagramModelingRules";\r
         public static final String SysdynModel = "http://www.simantics.org/Sysdyn-1.1/SysdynModel";\r
+        public static final String SysdynModel_fmuFile = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/fmuFile";\r
+        public static final String SysdynModel_fmuFile_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/fmuFile/Inverse";\r
         public static final String SysdynModel_outputInterval = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/outputInterval";\r
         public static final String SysdynModel_outputInterval_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/outputInterval/Inverse";\r
         public static final String SysdynModel_simulationStepLength = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/simulationStepLength";\r
@@ -1318,11 +1335,6 @@ public class SysdynResource {
         public static final String WithLookupExpression_maxY = "http://www.simantics.org/Sysdyn-1.1/WithLookupExpression/maxY";\r
         public static final String WithLookupExpression_minX = "http://www.simantics.org/Sysdyn-1.1/WithLookupExpression/minX";\r
         public static final String WithLookupExpression_minY = "http://www.simantics.org/Sysdyn-1.1/WithLookupExpression/minY";\r
-        public static final String from1$6to1$7 = "http://www.simantics.org/Sysdyn-1.1/from1.6to1.7";\r
-        public static final String from1$6to1$7_Ontologies = "http://www.simantics.org/Sysdyn-1.1/from1.6to1.7/Ontologies";\r
-        public static final String from1$6to1$7_OrderedSetsToLists = "http://www.simantics.org/Sysdyn-1.1/from1.6to1.7/OrderedSetsToLists";\r
-        public static final String from1$6to1$7_Spreadsheets = "http://www.simantics.org/Sysdyn-1.1/from1.6to1.7/Spreadsheets";\r
-        public static final String from1$6to1$7_SysdynChanges = "http://www.simantics.org/Sysdyn-1.1/from1.6to1.7/SysdynChanges";\r
     }\r
     \r
     public static Resource getResourceOrNull(ReadGraph graph, String uri) {\r
@@ -1758,6 +1770,15 @@ public class SysdynResource {
         LookupExpression = getResourceOrNull(graph, URIs.LookupExpression);\r
         LookupExpression_lookup = getResourceOrNull(graph, URIs.LookupExpression_lookup);\r
         LookupExpression_lookup_Inverse = getResourceOrNull(graph, URIs.LookupExpression_lookup_Inverse);\r
+        Migration = getResourceOrNull(graph, URIs.Migration);\r
+        Migration_from1$6to1$7 = getResourceOrNull(graph, URIs.Migration_from1$6to1$7);\r
+        Migration_from1$6to1$7_Ontologies = getResourceOrNull(graph, URIs.Migration_from1$6to1$7_Ontologies);\r
+        Migration_from1$6to1$7_OrderedSetsToLists = getResourceOrNull(graph, URIs.Migration_from1$6to1$7_OrderedSetsToLists);\r
+        Migration_from1$6to1$7_Spreadsheets = getResourceOrNull(graph, URIs.Migration_from1$6to1$7_Spreadsheets);\r
+        Migration_from1$6to1$7_SysdynChanges = getResourceOrNull(graph, URIs.Migration_from1$6to1$7_SysdynChanges);\r
+        Migration_fromFunctionLibrary1 = getResourceOrNull(graph, URIs.Migration_fromFunctionLibrary1);\r
+        Migration_fromModel1 = getResourceOrNull(graph, URIs.Migration_fromModel1);\r
+        Migration_fromModule1 = getResourceOrNull(graph, URIs.Migration_fromModule1);\r
         ModelBrowser = getResourceOrNull(graph, URIs.ModelBrowser);\r
         ModelingActionContext = getResourceOrNull(graph, URIs.ModelingActionContext);\r
         ModelingActionContext_Actions = getResourceOrNull(graph, URIs.ModelingActionContext_Actions);\r
@@ -1861,6 +1882,8 @@ public class SysdynResource {
         SysdynConnectionType = getResourceOrNull(graph, URIs.SysdynConnectionType);\r
         SysdynDiagramModelingRules = getResourceOrNull(graph, URIs.SysdynDiagramModelingRules);\r
         SysdynModel = getResourceOrNull(graph, URIs.SysdynModel);\r
+        SysdynModel_fmuFile = getResourceOrNull(graph, URIs.SysdynModel_fmuFile);\r
+        SysdynModel_fmuFile_Inverse = getResourceOrNull(graph, URIs.SysdynModel_fmuFile_Inverse);\r
         SysdynModel_outputInterval = getResourceOrNull(graph, URIs.SysdynModel_outputInterval);\r
         SysdynModel_outputInterval_Inverse = getResourceOrNull(graph, URIs.SysdynModel_outputInterval_Inverse);\r
         SysdynModel_simulationStepLength = getResourceOrNull(graph, URIs.SysdynModel_simulationStepLength);\r
@@ -1986,11 +2009,6 @@ public class SysdynResource {
         WithLookupExpression_maxY = getResourceOrNull(graph, URIs.WithLookupExpression_maxY);\r
         WithLookupExpression_minX = getResourceOrNull(graph, URIs.WithLookupExpression_minX);\r
         WithLookupExpression_minY = getResourceOrNull(graph, URIs.WithLookupExpression_minY);\r
-        from1$6to1$7 = getResourceOrNull(graph, URIs.from1$6to1$7);\r
-        from1$6to1$7_Ontologies = getResourceOrNull(graph, URIs.from1$6to1$7_Ontologies);\r
-        from1$6to1$7_OrderedSetsToLists = getResourceOrNull(graph, URIs.from1$6to1$7_OrderedSetsToLists);\r
-        from1$6to1$7_Spreadsheets = getResourceOrNull(graph, URIs.from1$6to1$7_Spreadsheets);\r
-        from1$6to1$7_SysdynChanges = getResourceOrNull(graph, URIs.from1$6to1$7_SysdynChanges);\r
     }\r
     \r
     public static SysdynResource getInstance(ReadGraph graph) {\r
index 23ef6ea14767dc9f23292c7885723a37eb36b228..0c8d1c6343f41727b08c8197cb3c6c1ff0e4e083 100644 (file)
@@ -138,7 +138,7 @@ public class StockExpression implements IExpression {
     @Override\r
     public void save(final Resource expression, Map<String, Object> data) {\r
         final String currentText = this.expression.getExpression();\r
-        if(currentText != null) {\r
+        if(currentText != null && !currentText.equals(data.get("initialEquation"))) {\r
             SimanticsUI.getSession().asyncRequest(new WriteRequest() {\r
 \r
                 @Override\r
index dd8ffe26f74f7c58d73608bc4bc85c07bf6bdf2f..73cd72bbda167d32cee42a26b9ea8095c8e96a94 100644 (file)
  *******************************************************************************/\r
 package org.simantics.sysdyn.manager;\r
 \r
+import java.io.File;\r
+import java.io.FileInputStream;\r
+import java.io.FileNotFoundException;\r
+import java.io.FileOutputStream;\r
 import java.io.IOException;\r
 import java.util.ArrayList;\r
 import java.util.HashMap;\r
@@ -19,10 +23,13 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.core.runtime.Status;\r
 import org.eclipse.core.runtime.jobs.Job;\r
+import org.simantics.databoard.Bindings;\r
 import org.simantics.db.AsyncReadGraph;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.common.request.WriteRequest;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.procedure.AsyncListener;\r
 import org.simantics.db.request.Read;\r
@@ -175,13 +182,23 @@ public class SysdynGameExperiment extends SysdynExperiment {
                SimulationLocation simulationLocation = createSimulationFiles(sysdynModel, modelText, inits, additionalScript, true);\r
                progressMonitor.worked(1);\r
 \r
-\r
+               // Load precompiled fmu if structure has not changed and it has not yet been loaded\r
+               File fmu = null;\r
+               if(!sysdynModel.isStructureModified()) {\r
+                   if(!simulationLocation.executableFile.isFile()) {\r
+                       fmu = loadModelFmu(simulationLocation);\r
+                   } else {\r
+                       fmu = simulationLocation.executableFile;\r
+                   }\r
+               }\r
                // Build the model and store previous model structure and inits that affect the building\r
                // If there is no exe file OR the model structure has not changed, no need to build\r
-               if (!simulationLocation.executableFile.isFile() || hasStructureChanged(modelText)) {\r
+               if (fmu == null && (!simulationLocation.executableFile.isFile() || hasStructureChanged(modelText))) {\r
                        progressMonitor.subTask("Build model");\r
                        buildModel(simulationLocation, modelText, monitor);\r
                        previousModelStructure = modelText;\r
+                       \r
+                       saveModelFmu(simulationLocation);\r
                }\r
 \r
                progressMonitor.worked(1);\r
@@ -202,6 +219,81 @@ public class SysdynGameExperiment extends SysdynExperiment {
                simulate(false); \r
        }\r
 \r
+       /**\r
+        * Load fmu file from database, if it exists for the model of this experiment\r
+        * \r
+        * @param simulationLocation SimulationLocation indicating where the fmu should be loaded\r
+        * @return Loaded fmu or null if it was not loaded from database\r
+        */\r
+       private File loadModelFmu(SimulationLocation simulationLocation) {\r
+           File fmu = null;\r
+           try {\r
+               final String fmuLocation = simulationLocation.executableFile.getAbsolutePath();\r
+            fmu = session.syncRequest(new Read<File>() {\r
+                @Override\r
+                public File perform(ReadGraph graph) throws DatabaseException {\r
+                    File result = null;\r
+                    FileOutputStream fos;\r
+                    try {\r
+                        fos = new FileOutputStream(fmuLocation);\r
+                        byte[] fileBArray = graph.getPossibleRelatedValue(\r
+                                getModel(), SysdynResource.getInstance(graph).SysdynModel_fmuFile, Bindings.BYTE_ARRAY);\r
+                        \r
+                        if(fileBArray != null) {\r
+                            fos.write(fileBArray);\r
+                            fos.close();\r
+                            result = new File(fmuLocation);\r
+                        } else {\r
+                            fos.close();\r
+                            return null;\r
+                        }\r
+                        \r
+                    } catch (FileNotFoundException e) {\r
+                        e.printStackTrace();\r
+                    } catch (IOException e) {\r
+                        e.printStackTrace();\r
+                    }\r
+                    return result;\r
+                }\r
+            });\r
+        } catch (DatabaseException e) {\r
+            e.printStackTrace();\r
+        }\r
+           \r
+           return fmu;\r
+       }\r
+       \r
+       /**\r
+        * Save fmu file from simulationLocation to database\r
+        * @param simulationLocation Location for finding fmu\r
+        */\r
+       private void saveModelFmu(SimulationLocation simulationLocation) {\r
+           final String fmuLocation = simulationLocation.executableFile.getAbsolutePath();\r
+           session.asyncRequest(new WriteRequest() {\r
+\r
+               @Override\r
+               public void perform(WriteGraph graph) throws DatabaseException {\r
+                   File file = new File(fmuLocation);\r
+                   byte[] fileBArray = new byte[(int)file.length()];\r
+                   FileInputStream fis;\r
+                   try {\r
+                       fis = new FileInputStream(file);\r
+\r
+                       fis.read(fileBArray);\r
+                       graph.claimLiteral(\r
+                               getModel(), \r
+                               SysdynResource.getInstance(graph).SysdynModel_fmuFile, \r
+                               fileBArray, Bindings.BYTE_ARRAY);\r
+                       fis.close();\r
+                   } catch (FileNotFoundException e) {\r
+                       e.printStackTrace();\r
+                   } catch (IOException e) {\r
+                       e.printStackTrace();\r
+                   }\r
+            }\r
+        });\r
+       }\r
+\r
 \r
        @Override\r
        public void simulateDuration(double duration) {\r
index 55a72243c3c4849aec10f68dcabe48a9d08ccec6..29f9fc7291ebe1e74ce2ef830826476c67380d72 100644 (file)
@@ -53,6 +53,7 @@ import org.simantics.sysdyn.adapter.VariableValueSubscription;
 import org.simantics.sysdyn.representation.Configuration;\r
 import org.simantics.sysdyn.representation.IElement;\r
 import org.simantics.sysdyn.representation.IndependentVariable;\r
+import org.simantics.sysdyn.representation.Model;\r
 import org.simantics.sysdyn.representation.Module;\r
 import org.simantics.sysdyn.representation.ParameterOverride;\r
 import org.simantics.sysdyn.representation.Sheet;\r
@@ -271,10 +272,19 @@ public class SysdynModel implements IMappingListener, IModel, VariableSubscripti
      */\r
     public synchronized boolean update(ReadGraph graph) throws DatabaseException {\r
         if(mapping.isDomainModified()) {\r
-            structureModified = true;\r
+            \r
+\r
             \r
             try {\r
-                mapping.updateRange(graph);\r
+                Collection<Object> updated = mapping.updateRange(graph);\r
+                \r
+                for(Object o : updated) {\r
+                    if(!(o instanceof Model)) {\r
+                        setStructureModified(true);\r
+                        break;\r
+                    }\r
+                }\r
+                \r
             } catch (MappingException e) {\r
                 SysdynConsole.INSTANCE.message(\r
                         "Error: Mapping is broken! Find the problem, " +\r
@@ -305,7 +315,7 @@ public class SysdynModel implements IMappingListener, IModel, VariableSubscripti
         }\r
         else\r
             return false;\r
-    }\r
+    }        \r
 \r
     /**\r
      * Update mapping.\r
@@ -560,7 +570,7 @@ public class SysdynModel implements IMappingListener, IModel, VariableSubscripti
            return structureModified;\r
        }\r
 \r
-       public void setStructureModeified(boolean structureModified) {\r
+       public void setStructureModified(boolean structureModified) {\r
            this.structureModified = structureModified;\r
        }\r
 }\r
index 92226cc84f732ec068f51308700a77920f4f784d..db41a5bbb103a3e6bf44d7d3369aaf507ac87cfd 100644 (file)
  *******************************************************************************/\r
 package org.simantics.sysdyn.representation;\r
 \r
+import gnu.trove.map.hash.THashMap;\r
+import gnu.trove.set.hash.THashSet;\r
+\r
 import java.util.ArrayList;\r
-import java.util.HashMap;\r
 import java.util.HashSet;\r
 \r
 import org.simantics.Simantics;\r
@@ -41,8 +43,8 @@ public class Sheet extends org.simantics.sysdyn.representation.Variable {
     @RelatedElement(Layer0.URIs.PartOf)\r
     protected Book book;\r
     \r
-    HashMap<String, Object> cells = new HashMap<String, Object>();\r
-    HashSet<String> usedRanges = new HashSet<String>();\r
+    THashMap<String, Object> cells = new THashMap<String, Object>();\r
+    THashSet<String> usedRanges = new THashSet<String>();\r
     \r
     Resource resource;\r
 \r
@@ -52,12 +54,10 @@ public class Sheet extends org.simantics.sysdyn.representation.Variable {
     \r
     @UpdateMethod\r
     public boolean updateCells(ReadGraph g, Resource r) throws DatabaseException {\r
-        cells.clear();\r
-        usedRanges.clear();\r
-        this.resource = null;\r
-\r
         if(g.hasStatement(r)) {\r
             this.resource = r;\r
+            THashMap<String, Object> newCells = new THashMap<String, Object>();\r
+            \r
             g.getObjects(r, Layer0.getInstance(g).ConsistsOf);\r
             Variable v = g.adapt(r, Variable.class);\r
             for(Variable child : v.getChildren(g)) {\r
@@ -65,14 +65,33 @@ public class Sheet extends org.simantics.sysdyn.representation.Variable {
                 try {\r
                     SpreadsheetUtils.decodeCellAbsolute(name);\r
                     Variant value = child.getPropertyValue(g, SheetVariables.CONTENT, Bindings.VARIANT);\r
-                    cells.put(name, value.getValue());\r
+                    newCells.put(name, value.getValue());\r
                 } catch (CellParseException e) {\r
                 } catch (MissingVariableException e) {\r
                     System.out.println("missing content for: " + name);\r
                 }\r
             }\r
+            \r
+            boolean update = false;\r
+            if(newCells.size() == this.cells.size()) {\r
+                // Cells are the same size. There might not be changes. Next up: content\r
+                for(String key : this.cells.keySet()) {\r
+                    if(!this.cells.get(key).equals(newCells.get(key))) {\r
+                        update = true;\r
+                        break;\r
+                    }\r
+                }\r
+            } else {\r
+                update = true;\r
+            }\r
+            \r
+            if(update) {\r
+                this.cells = newCells;\r
+                this.usedRanges.clear();\r
+                return true;\r
+            }\r
         }\r
-        return true;\r
+        return false;\r
     }\r
     \r
     public String getStringRepresentation() {\r
@@ -200,7 +219,7 @@ public class Sheet extends org.simantics.sysdyn.representation.Variable {
     }\r
 \r
     \r
-    public HashMap<String, Object> getCells() {\r
+    public THashMap<String, Object> getCells() {\r
         return cells;\r
     }\r
     \r
index f61c40c1fe0daf84f189a24ef5eb63a822f1f952..b5736f876749e1450bed7fe980853c44d50a0f34 100644 (file)
@@ -49,9 +49,10 @@ public class SimulationJob extends Job {
         this.monitor.message("Simulate " + model.getConfiguration().getLabel());\r
         try {\r
             model.update();\r
-            if(experiment instanceof SysdynExperiment)\r
+            if(experiment instanceof SysdynExperiment) {\r
                ((SysdynExperiment)experiment).simulate(this.monitor, monitor);\r
-//            model.simulate(this.monitor, monitor, experiment);\r
+               model.setStructureModified(false);\r
+            }\r
         } catch (Exception e) {\r
             e.printStackTrace();\r
             this.monitor.showConsole();\r