From 628892674d97a3c75298406fe9a25d7041cf6395 Mon Sep 17 00:00:00 2001 From: lempinen Date: Wed, 23 Mar 2011 11:25:21 +0000 Subject: [PATCH] First take on user-defined functions git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20188 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../simantics/modelica/ModelicaManager.java | 7 +- .../objmap/schema/SimpleLinkType.java | 8 +- .../simantics/objmap/schema/SimpleSchema.java | 6 +- org.simantics.sysdyn.ontology/graph.tg | Bin 50407 -> 53331 bytes .../graph/Sysdyn.pgraph | 26 ++ .../graph/SysdynFunctions.pgraph | 78 ++++ .../graph/WorkModel.pgraph | 7 +- .../org/simantics/sysdyn/SysdynResource.java | 363 ++---------------- org.simantics.sysdyn.ui/plugin.xml | 93 +++++ .../contributions/AbstractNodeImager.java | 3 +- .../ui/browser/contributions/Functions.java | 51 +++ .../contributions/FunctionsLabeler.java | 25 ++ .../ui/browser/contributions/Model.java | 2 + .../sysdyn/ui/browser/nodes/FunctionNode.java | 23 ++ .../ui/browser/nodes/FunctionsFolder.java | 30 ++ .../ExportExternalFunctionFilesHandler.java | 79 ++++ .../ImportExternalFunctionFilesHandler.java | 112 ++++++ .../ui/handlers/NewExperimentNodeHandler.java | 3 +- .../ui/handlers/NewFunctionHandler.java | 67 ++++ .../ui/handlers/NewModuleNodeHandler.java | 3 +- .../handlers/SysdynExperimentActivator.java | 4 +- .../sysdyn/ui/project/SysdynProject.java | 36 +- .../sysdyn/ui/properties/EquationTab.java | 2 + .../ui/properties/ExternalFilesTab.java | 109 ++++++ .../sysdyn/ui/properties/FunctionTab.java | 97 +++++ .../ResourceSelectionProcessor.java | 15 + .../properties/widgets/ChartTableWidget.java | 7 +- .../ui/properties/widgets/ChartWidget.java | 16 +- .../properties/widgets/ExpressionWidget.java | 3 +- .../widgets/FunctionLabelFactory.java | 49 +++ .../widgets/expressions/BasicExpression.java | 37 +- .../expressions/LookupInputOutputTable.java | 15 +- .../expressions/WithLookupExpression.java | 59 +-- .../externalFiles/ExternalFileImager.java | 28 ++ .../externalFiles/ExternalFileLabeler.java | 27 ++ .../externalFiles/ExternalFileNode.java | 69 ++++ .../widgets/externalFiles/ExternalFiles.java | 51 +++ org.simantics.sysdyn/META-INF/MANIFEST.MF | 3 +- .../sysdyn/manager/FunctionUtils.java | 147 +++++++ .../sysdyn/manager/SysdynExperiment.java | 3 +- .../simantics/sysdyn/manager/SysdynModel.java | 22 +- .../sysdyn/modelica/ModelicaWriter.java | 2 +- .../expressions/StockExpression.java | 4 +- .../expressions/WithLookupExpression.java | 34 +- 44 files changed, 1424 insertions(+), 401 deletions(-) create mode 100644 org.simantics.sysdyn.ontology/graph/SysdynFunctions.pgraph create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Functions.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/FunctionsLabeler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionNode.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionsFolder.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportExternalFunctionFilesHandler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ImportExternalFunctionFilesHandler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewFunctionHandler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExternalFilesTab.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/FunctionLabelFactory.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileImager.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileLabeler.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileNode.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFiles.java create mode 100644 org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java diff --git a/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java b/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java index 2cde76e9..2137e9e5 100644 --- a/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java +++ b/org.simantics.modelica/src/org/simantics/modelica/ModelicaManager.java @@ -165,7 +165,7 @@ public class ModelicaManager { } - public static SimulationLocation createInputFiles(File simulationDir, String modelName, String modelText, HashMap inits) throws IOException { + public static SimulationLocation createInputFiles(File simulationDir, String modelName, String modelText, HashMap inits, String additionalScript) throws IOException { System.out.println(simulationDir.getAbsolutePath()); modelName = modelName.replace(" ", ""); File modelFile = new File(simulationDir, modelName + ".mo"); @@ -179,11 +179,14 @@ public class ModelicaManager { { PrintStream s = new PrintStream(scriptFile); + if(additionalScript != null) + s.println(additionalScript); s.println("loadFile(\"" + modelName + ".mo\");"); s.print("buildModel("+modelName+ ",startTime="+inits.get("start value")+ ",stopTime="+inits.get("stop value")+ - ",method="+inits.get("method") + ",method="+inits.get("method")+ + ",outputFormat=\"plt\"" ); if(inits.containsKey("tolerance")) { s.print(",tolerance="+inits.get("tolerance")); diff --git a/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleLinkType.java b/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleLinkType.java index f0366ca4..3d7b4aad 100644 --- a/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleLinkType.java +++ b/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleLinkType.java @@ -17,8 +17,8 @@ import org.apache.log4j.Logger; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.objmap.IFunction; import org.simantics.objmap.ILinkType; import org.simantics.objmap.IMappingRule; @@ -79,7 +79,7 @@ public class SimpleLinkType implements ILinkType { if(LOGGER.isInfoEnabled()) try { LOGGER.info("SimpleLinkType.createRangeElement " + - GraphUtils.getReadableName(g, domainElement) + NameUtils.getSafeName(g, domainElement) ); } catch(DatabaseException e) { throw new MappingException(e); @@ -98,7 +98,7 @@ public class SimpleLinkType implements ILinkType { if(LOGGER.isInfoEnabled()) try { LOGGER.info("SimpleLinkType.updateDomain " + - GraphUtils.getReadableName(g, domainElement) + " " + + NameUtils.getSafeName(g, domainElement) + " " + rangeElement.toString() ); } catch(DatabaseException e) { @@ -117,7 +117,7 @@ public class SimpleLinkType implements ILinkType { if(LOGGER.isInfoEnabled()) try { LOGGER.info("SimpleLinkType.updateRange " + - GraphUtils.getReadableName(g, domainElement) + " " + + NameUtils.getSafeName(g, domainElement) + " " + rangeElement.toString() ); } catch(DatabaseException e) { diff --git a/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleSchema.java b/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleSchema.java index 9c779251..5c15c009 100644 --- a/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleSchema.java +++ b/org.simantics.objmap/src/org/simantics/objmap/schema/SimpleSchema.java @@ -13,12 +13,10 @@ package org.simantics.objmap.schema; import gnu.trove.THashMap; -import java.util.Set; - import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.objmap.ILinkType; import org.simantics.objmap.IMappingSchema; import org.simantics.objmap.MappingException; @@ -54,7 +52,7 @@ public class SimpleSchema implements IMappingSchema { } throw new MappingException("Didn't find a link type for " + - GraphUtils.getReadableName(g, element) + "."); + NameUtils.getSafeName(g, element) + "."); } catch (DatabaseException e) { throw new MappingException(e); diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 26fe477257822f243d7aa7329c77ccfe52678f94..4c21a0a3ef21d6786453dba68e6154776fe48aff 100644 GIT binary patch literal 53331 zcmc(|37B0)wf4XFKIzOO1QKMhWeS0ii9rO>4rHJa2#^3lKy%W45)O3tiKn|E0lhb% z;)pmfBZ#x82o5MJXdDona8|qmMlR@eym+0jc<=Xn*REBk&LR5s{eS=G`}%pR_kL@w zT2=L~RjX?6b2^!jg`aWLnziA^XtS?&d}DNIq{y<#_5Rw>NPVPU8=g49)ryI(CXN2u z#`+K%jiD)SX58tG#z;$j+)#C}HXh-)k*%BUX5xx1BemvGb)cm*esi@+S6Gbd6IXAR z*;1=(V((C^O;GqbL>gt|FRBiV{@qb_nRH@ajM$6@!RzLC7 zX5)fd-^egExz)_N_~MHf4%Y{(P|!ELu+iLvXuL%E^fmRt(SfSQcj%IZi>cZ}_2auv zZuHj%xcjBSnI}|-k8ccZtZy1^nsSy^K5vp)z3qb48)@_g6HQ*RWpk}r*W9R^pt^jj z*{u(43cdY7wG+mlT;066){oJT8{V6~hL{4QTH9D&uWo8q2U}INc#)}1!e?u?4sK{@ zpwG6dsSNbE>TvD!(SaHS6pvW#p-;1Mdaa!F+D6N+*J11-YqncyTsniB8$--vEsjTg zmx&K}npKHYi=}#A4sDm99?T8bM=(`+pd8@SN3oNMCj-3EnoaJDJYnj?<)GUJyS5Pt zI?}|umQ=eN0#Dg>CY(uR4%Ug(R!@~LnPeBUsxilL(c@Q5c0g_9-1@+G+ri{(T ziUA9K0%L>8_I`TP#6d9s6H}Y$Xvm(^!-%i z+b8r6T~uohD_|}$jhUx3nuFDWHp>^pwri_(;y8boRZQ$1UOhUpc~mQBhSluSOAIzg zYW=H+Mj8W+O{6kp^ULO?lU1?ADxOhJIk4I3?0+_$nI| z2nX!Gz$8T%rU)Cy+yOEya!o6B~doVPMVS^W6exXYR@{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pI2Dg3k|F18Kb%@bqZ-1vc@n0_n_BRZ6 l+jVTaFGO2O7YR@D*SFyxfX9~Cv$|1*gW*KL?J1Nz`+vVf#kK$d diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index 04b8db89..b0bdaa24 100644 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -296,6 +296,25 @@ SYSDYN.Redeclaration +SYSDYN = + +FL = : L0.Library + + +FL.xidz : SYSDYN.SysdynModelicaFunction + L0.HasDescription "X if divided by zero" + SYSDYN.HasModelicaFunctionCode """ input Real a; + input Real b; + input Real x; + output Real z; +algorithm + if b > 0.0 or b < 0.0 then + z := a / b; + else + z := x; + end if;""" + +FL.zidz : SYSDYN.SysdynModelicaFunction + L0.HasDescription "Zero if divided by zero" + SYSDYN.HasModelicaFunctionCode """ input Real a; + input Real b; + output Real z; +algorithm + z := xidz(a,b,0.0);""" + +FL.interpolate : SYSDYN.SysdynModelicaFunction + L0.HasDescription "Interpolate function for two-dimensional table" + SYSDYN.HasModelicaFunctionCode """ input Real u "input value (first column of table)"; + input Real table[:, :] "table to be interpolated"; + output Real y "interpolated input value (icol column of table)"; +algorithm + y := interpolateFull(u, table, 2);""" + + +FL.interpolateFull : SYSDYN.SysdynModelicaFunction + L0.HasDescription "The full interpolate function" + SYSDYN.HasModelicaFunctionCode """ input Real u "input value (first column of table)"; + input Real table[:, :] "table to be interpolated"; + input Integer icol "column of table to be interpolated"; + output Real y "interpolated input value (icol column of table)"; +protected + Integer i; + Integer n "number of rows of table"; + Real u1; + Real u2; + Real y1; + Real y2; +algorithm + n := size(table, 1); + if n <= 1 then + y := table[1, icol]; + else + /* Search interval */ + if u <= table[1, 1] then + i := 1; + else + i := 2; + while i < n and u > table[i, 1] loop + i := i + 1; + end while; + i := i - 1; + end if; + + /* Get interpolation data */ + u1 := table[i, 1]; + u2 := table[i + 1, 1]; + y1 := table[i, icol]; + y2 := table[i + 1, icol]; + /* Interpolate */ + if u1 >= u2 then + y := y1; + /* since not possible to throw error */ + else + y := y1 + (y2 - y1)*(u - u1)/(u2 - u1); + end if; + end if;""" \ No newline at end of file diff --git a/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph b/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph index f6f742ca..4670d952 100644 --- a/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph +++ b/org.simantics.sysdyn.ontology/graph/WorkModel.pgraph @@ -18,11 +18,16 @@ WM = : PROJ.Project L0.PartOf */ -WM = : PROJ.Project +WORKMODEL = : L0.Ontology + @L0.new + +WORKMODEL.WM : PROJ.Project PROJ.HasFeature _ : PROJ.FeatureSpec PROJ.HasGroupId "org.simantics.sysdyn.feature.group" L0.PartOf +WM = WORKMODEL.WM + TAGS = WM.Tags : L0.Library diff --git a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java index 789b2e70..ad496fe5 100644 --- a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java +++ b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java @@ -13,6 +13,11 @@ public class SysdynResource { public final Resource Auxiliary; public final Resource AuxiliarySymbol; public final Resource BasicExperiment; + public final Resource BasicFunctions; + public final Resource BasicFunctions_interpolate; + public final Resource BasicFunctions_interpolateFull; + public final Resource BasicFunctions_xidz; + public final Resource BasicFunctions_zidz; public final Resource Cloud; public final Resource CloudSymbol; public final Resource Configuration; @@ -22,116 +27,6 @@ public class SysdynResource { public final Resource DelayExpression; public final Resource Dependency; public final Resource DependencyConnection; - public final Resource DevelopmentProject; - public final Resource DevelopmentProject_Admin; - public final Resource DevelopmentProject_Tags; - public final Resource DevelopmentProject_Tags_AdminIsFocusable; - public final Resource DevelopmentProject_Tags_AdminIsVisible; - public final Resource DevelopmentProject_WorkModel; - public final Resource DevelopmentProject_WorkModel_Experiment; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_EnumerationTest; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed1; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed2; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeedTotal; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_TotalPossibleWorkingSpeedInput; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work1; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work1CompletionTime; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work1WorkDone; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work2; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work2Amount; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work2CompletionTime; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Work2WorkDone; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_Workforce; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d1; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d10; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d11; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d12; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d13; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d14; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d15; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d2; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d3; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d4; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d5; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d6; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d7; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d8; - public final Resource DevelopmentProject_WorkModel_WorkModelConfiguration_d9; - public final Resource DevelopmentProject_WorkModel_WorkModule; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_Errors; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundRate; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundTime; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsGenerated; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_MaximumWorkingSpeed; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_PossibleWorkingSpeedInput; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectIsReady; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectReadyness; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectWorkAmount; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeed; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeedTotalInput; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_TimeToDeadline; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkAllocation; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkCompletionTimeInput; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkDone; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkQuality; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkToDo; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkingSpeed; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_c31; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_c33; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d31; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d32; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d33; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d34; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d35; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d36; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d37; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d38; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d40; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d41; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d42; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d43; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d44; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d45; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d46; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d47; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d48; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_d49; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f31; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f32; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f33; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f34; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f35; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f36; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f37; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f40; - public final Resource DevelopmentProject_WorkModel_WorkModuleConfiguration_f41; - public final Resource DevelopmentProject_WorkModel_WorkforceModule; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_NetResources; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_PossibleWorkingSpeed; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_Productivity; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_RequiredWorkingSpeedInput; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_TimeToAllocateResources; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkForceRequired; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkforceStock; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_c21; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d21; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d22; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d23; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d24; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d25; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d26; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d27; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f21; - public final Resource DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f22; - public final Resource DevelopmentProject_WorkSymbol; - public final Resource DevelopmentProject_WorkforceSymbol; - public final Resource DevelopmentProject_conf_dependency; - public final Resource DevelopmentProject_conf_dependency_ref; - public final Resource DevelopmentProject_dependency; - public final Resource DevelopmentProject_flow; public final Resource DiagramToCompositeMapping; public final Resource Enumeration; public final Resource EnumerationIndex; @@ -141,6 +36,7 @@ public class SysdynResource { public final Resource Expression; public final Resource Expressions; public final Resource Expressions_Inverse; + public final Resource ExternalFunctionFile; public final Resource Flow; public final Resource FlowConnection; public final Resource GameExperiment; @@ -158,6 +54,8 @@ public class SysdynResource { public final Resource HasEquation_Inverse; public final Resource HasExpressions; public final Resource HasExpressions_Inverse; + public final Resource HasExternalFile; + public final Resource HasExternalFile_Inverse; public final Resource HasHead; public final Resource HasHeadTerminal; public final Resource HasInitialEquation; @@ -172,6 +70,8 @@ public class SysdynResource { public final Resource HasMinX_Inverse; public final Resource HasMinY; public final Resource HasMinY_Inverse; + public final Resource HasModelicaFunctionCode; + public final Resource HasModelicaFunctionCode_Inverse; public final Resource HasOutputInterval; public final Resource HasOutputInterval_Inverse; public final Resource HasParameterFile; @@ -236,6 +136,7 @@ public class SysdynResource { public final Resource SysdynConnectionType; public final Resource SysdynDiagramModelingRules; public final Resource SysdynModel; + public final Resource SysdynModelicaFunction; public final Resource SysdynTerminal; public final Resource Valve; public final Resource ValveSymbol; @@ -250,6 +151,11 @@ public class SysdynResource { public static final String Auxiliary = "http://www.simantics.org/Sysdyn-1.0/Auxiliary"; public static final String AuxiliarySymbol = "http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"; public static final String BasicExperiment = "http://www.simantics.org/Sysdyn-1.0/BasicExperiment"; + public static final String BasicFunctions = "http://www.simantics.org/Sysdyn-1.0/BasicFunctions"; + public static final String BasicFunctions_interpolate = "http://www.simantics.org/Sysdyn-1.0/BasicFunctions/interpolate"; + public static final String BasicFunctions_interpolateFull = "http://www.simantics.org/Sysdyn-1.0/BasicFunctions/interpolateFull"; + public static final String BasicFunctions_xidz = "http://www.simantics.org/Sysdyn-1.0/BasicFunctions/xidz"; + public static final String BasicFunctions_zidz = "http://www.simantics.org/Sysdyn-1.0/BasicFunctions/zidz"; public static final String Cloud = "http://www.simantics.org/Sysdyn-1.0/Cloud"; public static final String CloudSymbol = "http://www.simantics.org/Sysdyn-1.0/CloudSymbol"; public static final String Configuration = "http://www.simantics.org/Sysdyn-1.0/Configuration"; @@ -259,116 +165,6 @@ public class SysdynResource { public static final String DelayExpression = "http://www.simantics.org/Sysdyn-1.0/DelayExpression"; public static final String Dependency = "http://www.simantics.org/Sysdyn-1.0/Dependency"; public static final String DependencyConnection = "http://www.simantics.org/Sysdyn-1.0/DependencyConnection"; - public static final String DevelopmentProject = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject"; - public static final String DevelopmentProject_Admin = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/Admin"; - public static final String DevelopmentProject_Tags = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/Tags"; - public static final String DevelopmentProject_Tags_AdminIsFocusable = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/Tags/AdminIsFocusable"; - public static final String DevelopmentProject_Tags_AdminIsVisible = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/Tags/AdminIsVisible"; - public static final String DevelopmentProject_WorkModel = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel"; - public static final String DevelopmentProject_WorkModel_Experiment = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/Experiment"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_EnumerationTest = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/EnumerationTest"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed1 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/RequiredWorkingSpeed1"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed2 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/RequiredWorkingSpeed2"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeedTotal = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/RequiredWorkingSpeedTotal"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_TotalPossibleWorkingSpeedInput = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/TotalPossibleWorkingSpeedInput"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work1 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work1"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work1CompletionTime = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work1CompletionTime"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work1WorkDone = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work1WorkDone"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work2 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work2"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work2Amount = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work2Amount"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work2CompletionTime = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work2CompletionTime"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Work2WorkDone = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Work2WorkDone"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_Workforce = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/Workforce"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d1 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d1"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d10 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d10"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d11 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d11"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d12 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d12"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d13 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d13"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d14 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d14"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d15 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d15"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d2 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d2"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d3 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d3"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d4 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d4"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d5 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d5"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d6 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d6"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d7 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d7"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d8 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d8"; - public static final String DevelopmentProject_WorkModel_WorkModelConfiguration_d9 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModelConfiguration/d9"; - public static final String DevelopmentProject_WorkModel_WorkModule = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModule"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_Errors = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/Errors"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundRate = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ErrorsFoundRate"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundTime = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ErrorsFoundTime"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsGenerated = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ErrorsGenerated"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_MaximumWorkingSpeed = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/MaximumWorkingSpeed"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_PossibleWorkingSpeedInput = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/PossibleWorkingSpeedInput"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectIsReady = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ProjectIsReady"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectReadyness = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ProjectReadyness"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectWorkAmount = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/ProjectWorkAmount"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeed = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/RequiredWorkingSpeed"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeedTotalInput = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/RequiredWorkingSpeedTotalInput"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_TimeToDeadline = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/TimeToDeadline"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkAllocation = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkAllocation"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkCompletionTimeInput = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkCompletionTimeInput"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkDone = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkDone"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkQuality = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkQuality"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkToDo = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkToDo"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkingSpeed = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/WorkingSpeed"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_c31 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/c31"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_c33 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/c33"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d31 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d31"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d32 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d32"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d33 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d33"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d34 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d34"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d35 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d35"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d36 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d36"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d37 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d37"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d38 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d38"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d40 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d40"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d41 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d41"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d42 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d42"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d43 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d43"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d44 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d44"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d45 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d45"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d46 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d46"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d47 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d47"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d48 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d48"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_d49 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/d49"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f31 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f31"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f32 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f32"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f33 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f33"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f34 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f34"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f35 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f35"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f36 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f36"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f37 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f37"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f40 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f40"; - public static final String DevelopmentProject_WorkModel_WorkModuleConfiguration_f41 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkModuleConfiguration/f41"; - public static final String DevelopmentProject_WorkModel_WorkforceModule = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModule"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_NetResources = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/NetResources"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_PossibleWorkingSpeed = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/PossibleWorkingSpeed"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_Productivity = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/Productivity"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_RequiredWorkingSpeedInput = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/RequiredWorkingSpeedInput"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_TimeToAllocateResources = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/TimeToAllocateResources"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkForceRequired = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/WorkForceRequired"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkforceStock = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/WorkforceStock"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_c21 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/c21"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d21 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d21"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d22 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d22"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d23 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d23"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d24 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d24"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d25 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d25"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d26 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d26"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d27 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/d27"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f21 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/f21"; - public static final String DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f22 = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkModel/WorkforceModuleConfiguration/f22"; - public static final String DevelopmentProject_WorkSymbol = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkSymbol"; - public static final String DevelopmentProject_WorkforceSymbol = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/WorkforceSymbol"; - public static final String DevelopmentProject_conf_dependency = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/conf_dependency"; - public static final String DevelopmentProject_conf_dependency_ref = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/conf_dependency_ref"; - public static final String DevelopmentProject_dependency = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/dependency"; - public static final String DevelopmentProject_flow = "http://www.simantics.org/Sysdyn-1.0/DevelopmentProject/flow"; public static final String DiagramToCompositeMapping = "http://www.simantics.org/Sysdyn-1.0/DiagramToCompositeMapping"; public static final String Enumeration = "http://www.simantics.org/Sysdyn-1.0/Enumeration"; public static final String EnumerationIndex = "http://www.simantics.org/Sysdyn-1.0/EnumerationIndex"; @@ -378,6 +174,7 @@ public class SysdynResource { public static final String Expression = "http://www.simantics.org/Sysdyn-1.0/Expression"; public static final String Expressions = "http://www.simantics.org/Sysdyn-1.0/Expressions"; public static final String Expressions_Inverse = "http://www.simantics.org/Sysdyn-1.0/Expressions/Inverse"; + public static final String ExternalFunctionFile = "http://www.simantics.org/Sysdyn-1.0/ExternalFunctionFile"; public static final String Flow = "http://www.simantics.org/Sysdyn-1.0/Flow"; public static final String FlowConnection = "http://www.simantics.org/Sysdyn-1.0/FlowConnection"; public static final String GameExperiment = "http://www.simantics.org/Sysdyn-1.0/GameExperiment"; @@ -395,6 +192,8 @@ public class SysdynResource { public static final String HasEquation_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasEquation/Inverse"; public static final String HasExpressions = "http://www.simantics.org/Sysdyn-1.0/HasExpressions"; public static final String HasExpressions_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasExpressions/Inverse"; + public static final String HasExternalFile = "http://www.simantics.org/Sysdyn-1.0/HasExternalFile"; + public static final String HasExternalFile_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasExternalFile/Inverse"; public static final String HasHead = "http://www.simantics.org/Sysdyn-1.0/HasHead"; public static final String HasHeadTerminal = "http://www.simantics.org/Sysdyn-1.0/HasHeadTerminal"; public static final String HasInitialEquation = "http://www.simantics.org/Sysdyn-1.0/HasInitialEquation"; @@ -409,6 +208,8 @@ public class SysdynResource { public static final String HasMinX_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasMinX/Inverse"; public static final String HasMinY = "http://www.simantics.org/Sysdyn-1.0/HasMinY"; public static final String HasMinY_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasMinY/Inverse"; + public static final String HasModelicaFunctionCode = "http://www.simantics.org/Sysdyn-1.0/HasModelicaFunctionCode"; + public static final String HasModelicaFunctionCode_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasModelicaFunctionCode/Inverse"; public static final String HasOutputInterval = "http://www.simantics.org/Sysdyn-1.0/HasOutputInterval"; public static final String HasOutputInterval_Inverse = "http://www.simantics.org/Sysdyn-1.0/HasOutputInterval/Inverse"; public static final String HasParameterFile = "http://www.simantics.org/Sysdyn-1.0/HasParameterFile"; @@ -473,6 +274,7 @@ public class SysdynResource { public static final String SysdynConnectionType = "http://www.simantics.org/Sysdyn-1.0/SysdynConnectionType"; public static final String SysdynDiagramModelingRules = "http://www.simantics.org/Sysdyn-1.0/SysdynDiagramModelingRules"; public static final String SysdynModel = "http://www.simantics.org/Sysdyn-1.0/SysdynModel"; + public static final String SysdynModelicaFunction = "http://www.simantics.org/Sysdyn-1.0/SysdynModelicaFunction"; public static final String SysdynTerminal = "http://www.simantics.org/Sysdyn-1.0/SysdynTerminal"; public static final String Valve = "http://www.simantics.org/Sysdyn-1.0/Valve"; public static final String ValveSymbol = "http://www.simantics.org/Sysdyn-1.0/ValveSymbol"; @@ -497,6 +299,11 @@ public class SysdynResource { Auxiliary = getResourceOrNull(graph, URIs.Auxiliary); AuxiliarySymbol = getResourceOrNull(graph, URIs.AuxiliarySymbol); BasicExperiment = getResourceOrNull(graph, URIs.BasicExperiment); + BasicFunctions = getResourceOrNull(graph, URIs.BasicFunctions); + BasicFunctions_interpolate = getResourceOrNull(graph, URIs.BasicFunctions_interpolate); + BasicFunctions_interpolateFull = getResourceOrNull(graph, URIs.BasicFunctions_interpolateFull); + BasicFunctions_xidz = getResourceOrNull(graph, URIs.BasicFunctions_xidz); + BasicFunctions_zidz = getResourceOrNull(graph, URIs.BasicFunctions_zidz); Cloud = getResourceOrNull(graph, URIs.Cloud); CloudSymbol = getResourceOrNull(graph, URIs.CloudSymbol); Configuration = getResourceOrNull(graph, URIs.Configuration); @@ -506,116 +313,6 @@ public class SysdynResource { DelayExpression = getResourceOrNull(graph, URIs.DelayExpression); Dependency = getResourceOrNull(graph, URIs.Dependency); DependencyConnection = getResourceOrNull(graph, URIs.DependencyConnection); - DevelopmentProject = getResourceOrNull(graph, URIs.DevelopmentProject); - DevelopmentProject_Admin = getResourceOrNull(graph, URIs.DevelopmentProject_Admin); - DevelopmentProject_Tags = getResourceOrNull(graph, URIs.DevelopmentProject_Tags); - DevelopmentProject_Tags_AdminIsFocusable = getResourceOrNull(graph, URIs.DevelopmentProject_Tags_AdminIsFocusable); - DevelopmentProject_Tags_AdminIsVisible = getResourceOrNull(graph, URIs.DevelopmentProject_Tags_AdminIsVisible); - DevelopmentProject_WorkModel = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel); - DevelopmentProject_WorkModel_Experiment = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_Experiment); - DevelopmentProject_WorkModel_WorkModelConfiguration = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration); - DevelopmentProject_WorkModel_WorkModelConfiguration_EnumerationTest = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_EnumerationTest); - DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed1 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed1); - DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed2 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeed2); - DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeedTotal = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_RequiredWorkingSpeedTotal); - DevelopmentProject_WorkModel_WorkModelConfiguration_TotalPossibleWorkingSpeedInput = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_TotalPossibleWorkingSpeedInput); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work1 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work1); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work1CompletionTime = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work1CompletionTime); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work1WorkDone = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work1WorkDone); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work2 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work2); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work2Amount = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work2Amount); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work2CompletionTime = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work2CompletionTime); - DevelopmentProject_WorkModel_WorkModelConfiguration_Work2WorkDone = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Work2WorkDone); - DevelopmentProject_WorkModel_WorkModelConfiguration_Workforce = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_Workforce); - DevelopmentProject_WorkModel_WorkModelConfiguration_d1 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d1); - DevelopmentProject_WorkModel_WorkModelConfiguration_d10 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d10); - DevelopmentProject_WorkModel_WorkModelConfiguration_d11 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d11); - DevelopmentProject_WorkModel_WorkModelConfiguration_d12 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d12); - DevelopmentProject_WorkModel_WorkModelConfiguration_d13 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d13); - DevelopmentProject_WorkModel_WorkModelConfiguration_d14 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d14); - DevelopmentProject_WorkModel_WorkModelConfiguration_d15 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d15); - DevelopmentProject_WorkModel_WorkModelConfiguration_d2 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d2); - DevelopmentProject_WorkModel_WorkModelConfiguration_d3 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d3); - DevelopmentProject_WorkModel_WorkModelConfiguration_d4 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d4); - DevelopmentProject_WorkModel_WorkModelConfiguration_d5 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d5); - DevelopmentProject_WorkModel_WorkModelConfiguration_d6 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d6); - DevelopmentProject_WorkModel_WorkModelConfiguration_d7 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d7); - DevelopmentProject_WorkModel_WorkModelConfiguration_d8 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d8); - DevelopmentProject_WorkModel_WorkModelConfiguration_d9 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModelConfiguration_d9); - DevelopmentProject_WorkModel_WorkModule = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModule); - DevelopmentProject_WorkModel_WorkModuleConfiguration = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration); - DevelopmentProject_WorkModel_WorkModuleConfiguration_Errors = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_Errors); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundRate = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundRate); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundTime = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsFoundTime); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsGenerated = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ErrorsGenerated); - DevelopmentProject_WorkModel_WorkModuleConfiguration_MaximumWorkingSpeed = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_MaximumWorkingSpeed); - DevelopmentProject_WorkModel_WorkModuleConfiguration_PossibleWorkingSpeedInput = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_PossibleWorkingSpeedInput); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectIsReady = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectIsReady); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectReadyness = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectReadyness); - DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectWorkAmount = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_ProjectWorkAmount); - DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeed = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeed); - DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeedTotalInput = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_RequiredWorkingSpeedTotalInput); - DevelopmentProject_WorkModel_WorkModuleConfiguration_TimeToDeadline = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_TimeToDeadline); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkAllocation = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkAllocation); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkCompletionTimeInput = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkCompletionTimeInput); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkDone = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkDone); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkQuality = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkQuality); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkToDo = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkToDo); - DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkingSpeed = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_WorkingSpeed); - DevelopmentProject_WorkModel_WorkModuleConfiguration_c31 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_c31); - DevelopmentProject_WorkModel_WorkModuleConfiguration_c33 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_c33); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d31 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d31); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d32 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d32); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d33 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d33); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d34 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d34); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d35 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d35); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d36 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d36); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d37 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d37); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d38 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d38); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d40 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d40); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d41 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d41); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d42 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d42); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d43 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d43); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d44 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d44); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d45 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d45); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d46 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d46); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d47 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d47); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d48 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d48); - DevelopmentProject_WorkModel_WorkModuleConfiguration_d49 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_d49); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f31 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f31); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f32 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f32); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f33 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f33); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f34 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f34); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f35 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f35); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f36 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f36); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f37 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f37); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f40 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f40); - DevelopmentProject_WorkModel_WorkModuleConfiguration_f41 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkModuleConfiguration_f41); - DevelopmentProject_WorkModel_WorkforceModule = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModule); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_NetResources = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_NetResources); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_PossibleWorkingSpeed = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_PossibleWorkingSpeed); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_Productivity = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_Productivity); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_RequiredWorkingSpeedInput = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_RequiredWorkingSpeedInput); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_TimeToAllocateResources = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_TimeToAllocateResources); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkForceRequired = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkForceRequired); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkforceStock = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_WorkforceStock); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_c21 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_c21); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d21 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d21); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d22 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d22); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d23 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d23); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d24 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d24); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d25 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d25); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d26 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d26); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d27 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_d27); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f21 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f21); - DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f22 = getResourceOrNull(graph, URIs.DevelopmentProject_WorkModel_WorkforceModuleConfiguration_f22); - DevelopmentProject_WorkSymbol = getResourceOrNull(graph, URIs.DevelopmentProject_WorkSymbol); - DevelopmentProject_WorkforceSymbol = getResourceOrNull(graph, URIs.DevelopmentProject_WorkforceSymbol); - DevelopmentProject_conf_dependency = getResourceOrNull(graph, URIs.DevelopmentProject_conf_dependency); - DevelopmentProject_conf_dependency_ref = getResourceOrNull(graph, URIs.DevelopmentProject_conf_dependency_ref); - DevelopmentProject_dependency = getResourceOrNull(graph, URIs.DevelopmentProject_dependency); - DevelopmentProject_flow = getResourceOrNull(graph, URIs.DevelopmentProject_flow); DiagramToCompositeMapping = getResourceOrNull(graph, URIs.DiagramToCompositeMapping); Enumeration = getResourceOrNull(graph, URIs.Enumeration); EnumerationIndex = getResourceOrNull(graph, URIs.EnumerationIndex); @@ -625,6 +322,7 @@ public class SysdynResource { Expression = getResourceOrNull(graph, URIs.Expression); Expressions = getResourceOrNull(graph, URIs.Expressions); Expressions_Inverse = getResourceOrNull(graph, URIs.Expressions_Inverse); + ExternalFunctionFile = getResourceOrNull(graph, URIs.ExternalFunctionFile); Flow = getResourceOrNull(graph, URIs.Flow); FlowConnection = getResourceOrNull(graph, URIs.FlowConnection); GameExperiment = getResourceOrNull(graph, URIs.GameExperiment); @@ -642,6 +340,8 @@ public class SysdynResource { HasEquation_Inverse = getResourceOrNull(graph, URIs.HasEquation_Inverse); HasExpressions = getResourceOrNull(graph, URIs.HasExpressions); HasExpressions_Inverse = getResourceOrNull(graph, URIs.HasExpressions_Inverse); + HasExternalFile = getResourceOrNull(graph, URIs.HasExternalFile); + HasExternalFile_Inverse = getResourceOrNull(graph, URIs.HasExternalFile_Inverse); HasHead = getResourceOrNull(graph, URIs.HasHead); HasHeadTerminal = getResourceOrNull(graph, URIs.HasHeadTerminal); HasInitialEquation = getResourceOrNull(graph, URIs.HasInitialEquation); @@ -656,6 +356,8 @@ public class SysdynResource { HasMinX_Inverse = getResourceOrNull(graph, URIs.HasMinX_Inverse); HasMinY = getResourceOrNull(graph, URIs.HasMinY); HasMinY_Inverse = getResourceOrNull(graph, URIs.HasMinY_Inverse); + HasModelicaFunctionCode = getResourceOrNull(graph, URIs.HasModelicaFunctionCode); + HasModelicaFunctionCode_Inverse = getResourceOrNull(graph, URIs.HasModelicaFunctionCode_Inverse); HasOutputInterval = getResourceOrNull(graph, URIs.HasOutputInterval); HasOutputInterval_Inverse = getResourceOrNull(graph, URIs.HasOutputInterval_Inverse); HasParameterFile = getResourceOrNull(graph, URIs.HasParameterFile); @@ -720,6 +422,7 @@ public class SysdynResource { SysdynConnectionType = getResourceOrNull(graph, URIs.SysdynConnectionType); SysdynDiagramModelingRules = getResourceOrNull(graph, URIs.SysdynDiagramModelingRules); SysdynModel = getResourceOrNull(graph, URIs.SysdynModel); + SysdynModelicaFunction = getResourceOrNull(graph, URIs.SysdynModelicaFunction); SysdynTerminal = getResourceOrNull(graph, URIs.SysdynTerminal); Valve = getResourceOrNull(graph, URIs.Valve); ValveSymbol = getResourceOrNull(graph, URIs.ValveSymbol); diff --git a/org.simantics.sysdyn.ui/plugin.xml b/org.simantics.sysdyn.ui/plugin.xml index e44c5c49..b1e3e436 100644 --- a/org.simantics.sysdyn.ui/plugin.xml +++ b/org.simantics.sysdyn.ui/plugin.xml @@ -299,6 +299,22 @@ checkEnabled="true"> + + + + + + + + + + + + + + + + + + @@ -478,6 +517,19 @@ id="org.simantics.sysdyn.ui.importMdl" name="Import .mdl"> + + + + + + @@ -537,6 +589,10 @@ args="org.simantics.operating.ui.modelBrowser.CompositeNode" property="org.simantics.sysdyn.ui.nodeClass"> + + @@ -608,6 +664,14 @@ + + + + @@ -641,6 +705,10 @@ class="org.simantics.sysdyn.ui.browser.contributions.Configuration" preference="2.0"> + + @@ -675,6 +743,13 @@ preference="2.0"> + + + + @@ -720,6 +795,10 @@ class="org.simantics.sysdyn.ui.browser.contributions.ModuleTypeLabeler" preference="2.0"> + + @@ -753,6 +832,13 @@ preference="2.0"> + + + + @@ -771,6 +857,13 @@ + + + + diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java index 78e47e0b..82738b66 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java @@ -21,6 +21,7 @@ import org.simantics.sysdyn.ui.Activator; import org.simantics.sysdyn.ui.browser.nodes.ConfigurationNode; import org.simantics.sysdyn.ui.browser.nodes.ExperimentNode; import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; +import org.simantics.sysdyn.ui.browser.nodes.FunctionsFolder; import org.simantics.sysdyn.ui.browser.nodes.InputNode; import org.simantics.sysdyn.ui.browser.nodes.ModelNode; import org.simantics.sysdyn.ui.browser.nodes.ModuleNode; @@ -35,7 +36,7 @@ public class AbstractNodeImager extends ImagerContributor String image = null; if (node instanceof ExperimentsFolder || - node instanceof ModulesNode) + node instanceof ModulesNode || node instanceof FunctionsFolder) image = "icons/folder.png"; else if (node instanceof ModuleTypeNode || node instanceof ModuleNode || node instanceof ConfigurationNode) image = "icons/bricks.png"; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Functions.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Functions.java new file mode 100644 index 00000000..344f6af3 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Functions.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.browser.contributions; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Map; + +import org.simantics.browsing.ui.common.node.AbstractNode; +import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.scl.runtime.function.Function; +import org.simantics.sysdyn.ui.browser.nodes.FunctionNode; +import org.simantics.sysdyn.ui.browser.nodes.FunctionsFolder; + +public class Functions extends ViewpointContributor { + + @Override + public Collection getContribution(ReadGraph graph, FunctionsFolder functionsFolder) + throws DatabaseException { + + ArrayList> result = new ArrayList>(); + Function index = graph.adapt(L0.Dependencies, Function.class); + Collection> results = (Collection>)index.apply(graph, functionsFolder.data, "Types:SysdynModelicaFunction"); + for(Map r : results) { + Resource function = (Resource)r.get("Resource"); + if(function != null); + result.add(new FunctionNode(function)); + } + return result; + + } + + @Override + public String getViewpointId() { + return "Standard"; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/FunctionsLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/FunctionsLabeler.java new file mode 100644 index 00000000..35d2bec1 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/FunctionsLabeler.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.browser.contributions; + +import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.browser.nodes.FunctionsFolder; + +public class FunctionsLabeler extends LabelerContributor{ + + @Override + public String getLabel(ReadGraph graph, FunctionsFolder input) throws DatabaseException { + return "Functions"; + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Model.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Model.java index b6467546..bf6a2270 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Model.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Model.java @@ -24,6 +24,7 @@ import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.browser.nodes.ConfigurationNode; import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; +import org.simantics.sysdyn.ui.browser.nodes.FunctionsFolder; import org.simantics.sysdyn.ui.browser.nodes.ModelNode; import org.simantics.sysdyn.ui.browser.nodes.ModulesNode; @@ -41,6 +42,7 @@ public class Model extends ViewpointContributor { } result.add(new ExperimentsFolder(model.data)); result.add(new ModulesNode(model.data)); + result.add(new FunctionsFolder(model.data)); return result; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionNode.java new file mode 100644 index 00000000..31589a4c --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionNode.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.browser.nodes; + +import org.simantics.browsing.ui.common.node.IDeletable; +import org.simantics.db.Resource; + +public class FunctionNode extends VariableNode implements IDeletable { + + public FunctionNode(final Resource resource) { + super(resource); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionsFolder.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionsFolder.java new file mode 100644 index 00000000..c8c57352 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/FunctionsFolder.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.browser.nodes; + +import org.simantics.browsing.ui.common.node.AbstractNode; +import org.simantics.db.Resource; + +public class FunctionsFolder extends AbstractNode { + + public FunctionsFolder(Resource resource) { + super(resource); + } + + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class adapter) { + if(clazz == adapter) // There is no resource for this node.. + return null; + return super.getAdapter(adapter); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportExternalFunctionFilesHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportExternalFunctionFilesHandler.java new file mode 100644 index 00000000..84573763 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ExportExternalFunctionFilesHandler.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.handlers; + +import java.io.FileOutputStream; +import java.io.IOException; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.swt.widgets.DirectoryDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; +import org.simantics.databoard.Bindings; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ReadRequest; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.ui.SimanticsUI; +import org.simantics.ui.utils.ResourceAdaptionUtils; + +public class ExportExternalFunctionFilesHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + + + Shell shell = HandlerUtil.getActiveShellChecked(event); + ISelection sel = HandlerUtil.getCurrentSelection(event); + final Resource[] resources = ResourceAdaptionUtils.toResources(sel); + if (resources.length < 1) + return null; + + DirectoryDialog dd = new DirectoryDialog(shell); + dd.setFilterPath(Platform.getLocation().toOSString()); + dd.setText("Export files to..."); + dd.setMessage("Select a directory"); + final String dir = dd.open(); + if (dir == null) { + return null; + } + + SimanticsUI.getSession().asyncRequest(new ReadRequest() { + + @Override + public void run(ReadGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + for(Resource r : resources) { + try { + String name = NameUtils.getSafeName(graph, r); + FileOutputStream fos = new FileOutputStream(dir + "\\" + name); + byte[] fileBArray = graph.getPossibleRelatedValue(r, sr.HasExternalFile, Bindings.BYTE_ARRAY); + fos.write(fileBArray); + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + } + }); + + return null; + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ImportExternalFunctionFilesHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ImportExternalFunctionFilesHandler.java new file mode 100644 index 00000000..c8f30da2 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ImportExternalFunctionFilesHandler.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.handlers; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.Platform; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.handlers.HandlerUtil; +import org.simantics.browsing.ui.platform.PropertyPageView; +import org.simantics.databoard.Bindings; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.properties.SysdynPropertyPage; +import org.simantics.ui.SimanticsUI; +import org.simantics.utils.datastructures.Pair; + +public class ImportExternalFunctionFilesHandler extends AbstractHandler { + + public static final String[] C_EXTENSIONS = {"*.c","*.h","*.a","*.o"}; + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchPart part = HandlerUtil.getActivePart(event); + PropertyPageView ppv = (PropertyPageView)part; + SysdynPropertyPage page = (SysdynPropertyPage)ppv.getCurrentPage(); + Object o = page.getAdapter(Resource.class); + if (part == null) + return null; + + Shell shell = HandlerUtil.getActiveShellChecked(event); + Pair selected = importFiles(shell, "Import...", C_EXTENSIONS); + if(selected.second == null || selected.second.length < 1) return null; + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + // TODO: include files to database + } + }); + + return null; + } + + /** + * Import + * + * @param shell + * @return + */ + public static Pair importFiles(Shell shell, String text, String[] filter) { + FileDialog fd = new FileDialog(shell, SWT.OPEN); + fd.setText(text); + fd.setFilterPath(Platform.getLocation().toOSString()); + fd.setFilterExtensions(filter); + fd.open(); + return new Pair(fd.getFilterPath(), fd.getFileNames()); + } + + public static void addFilesToFunction(WriteGraph graph, Resource function, Pair files) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + + if(!graph.isInstanceOf(function, sr.SysdynModelicaFunction)) + return; + + for(String filename : files.second) { + File file = new File(files.first, filename); + + String name = file.getName(); + + Resource externalFile = GraphUtils.create2(graph, + sr.ExternalFunctionFile, + l0.PartOf, function, + l0.HasName, name); + + try { + byte[] fileBArray = new byte[(int)file.length()]; + FileInputStream fis = new FileInputStream(file); + fis.read(fileBArray); + graph.claimLiteral(externalFile, sr.HasExternalFile, fileBArray, Bindings.BYTE_ARRAY); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewExperimentNodeHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewExperimentNodeHandler.java index 303ea4b5..43508c9d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewExperimentNodeHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewExperimentNodeHandler.java @@ -20,6 +20,7 @@ import org.simantics.db.Builtins; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.simulation.ontology.SimulationResource; @@ -48,7 +49,7 @@ public class NewExperimentNodeHandler extends AbstractHandler { Builtins b = g.getBuiltins(); Resource report = GraphUtils.create2(g, b.Report, b.HasDocumentation, "===Report==="); - String name = GraphUtils.findFreshName(g, "Experiment", model, b.ConsistsOf, "%s%d"); + String name = NameUtils.findFreshName(g, "Experiment", model, b.ConsistsOf, "%s%d"); @SuppressWarnings("unused") Resource experiment = GraphUtils.create2(g, SimulationResource.getInstance(g).Experiment, diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewFunctionHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewFunctionHandler.java new file mode 100644 index 00000000..926cde5d --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewFunctionHandler.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.handlers.HandlerUtil; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.manager.FunctionUtils; +import org.simantics.sysdyn.ui.browser.nodes.FunctionsFolder; +import org.simantics.ui.SimanticsUI; +import org.simantics.ui.utils.AdaptionUtils; + +public class NewFunctionHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + + ISelection sel = HandlerUtil.getCurrentSelection(event); + + FunctionsFolder node = AdaptionUtils.adaptToSingle(sel, FunctionsFolder.class); + if (node == null) + return null; + + final Resource model = node.data; + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph g) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(g); + String name = NameUtils.findFreshName(g, "Function", model, l0.ConsistsOf, "%s%d"); + + SysdynResource sr = SysdynResource.getInstance(g); + GraphUtils.create2(g, sr.SysdynModelicaFunction, + l0.HasName, name, + l0.HasDescription, "", + sr.HasModelicaFunctionCode, "", + l0.PartOf, model); + + FunctionUtils.updateFunctionFileForLibrary(g, model); + } + }); + + return null; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewModuleNodeHandler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewModuleNodeHandler.java index 9c940ed1..048d6291 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewModuleNodeHandler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewModuleNodeHandler.java @@ -19,6 +19,7 @@ import org.eclipse.ui.handlers.HandlerUtil; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.diagram.DiagramConstants; @@ -58,7 +59,7 @@ public class NewModuleNodeHandler extends AbstractHandler { StructuralResource2 sr2 = StructuralResource2.getInstance(g); DiagramResource dr = DiagramResource.getInstance(g); - String name = GraphUtils.findFreshName(g, "ModuleType", model, l0.ConsistsOf, "%s%d"); + String name = NameUtils.findFreshName(g, "ModuleType", model, l0.ConsistsOf, "%s%d"); Resource moduleType = g.newResource(); g.claimLiteral(moduleType, l0.HasName, name); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java index 31591dc4..8fa80b3b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/SysdynExperimentActivator.java @@ -20,10 +20,10 @@ import org.eclipse.core.runtime.jobs.Job; import org.simantics.db.ReadGraph; import org.simantics.db.RequestProcessor; import org.simantics.db.Resource; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.AdaptionException; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; -import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.message.MessageService; import org.simantics.project.IProject; import org.simantics.simulation.experiment.IExperiment; @@ -83,7 +83,7 @@ public class SysdynExperimentActivator { try { return graph.adapt(resource, String.class); } catch (AdaptionException e) { - return GraphUtils.getReadableName(graph, resource); + return NameUtils.getSafeName(graph, resource); } } }); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java index d8db6fe4..23f182ed 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java @@ -20,20 +20,22 @@ import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PartInitException; import org.osgi.service.prefs.BackingStoreException; -import org.simantics.databoard.accessor.Accessor; import org.simantics.databoard.Bindings; +import org.simantics.databoard.accessor.Accessor; import org.simantics.db.Builtins; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; -import org.simantics.db.common.procedure.single.SingleSetListener; +import org.simantics.db.common.procedure.single.SingleSetSyncListener; import org.simantics.db.common.request.ObjectsWithType; import org.simantics.db.common.request.Queries; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.GenericRelationIndex; import org.simantics.db.layer0.adapter.RuntimeValuations; import org.simantics.db.layer0.adapter.TrendVariable; import org.simantics.db.layer0.service.ActivationManager; @@ -58,6 +60,7 @@ import org.simantics.project.ProjectElements; import org.simantics.project.ProjectKeys; import org.simantics.project.exception.ProjectException; import org.simantics.project.features.AbstractProjectFeature; +import org.simantics.project.ontology.ProjectResource; import org.simantics.simulation.experiment.IExperiment; import org.simantics.simulation.ontology.SimulationResource; import org.simantics.simulation.project.IExperimentManager; @@ -117,7 +120,7 @@ public class SysdynProject extends AbstractProjectFeature { ModelingResources mr = ModelingResources.getInstance(g); ModelingUtils mu = new ModelingUtils(g); - String modelName = GraphUtils.findFreshName(g, "Model", SimanticsUI.getProject().get(), l0.ConsistsOf, "%s%d"); + String modelName = NameUtils.findFreshName(g, "Model", SimanticsUI.getProject().get(), l0.ConsistsOf, "%s%d"); Resource model = g.newResource(); g.claimLiteral(model, l0.HasName, modelName); @@ -152,6 +155,23 @@ public class SysdynProject extends AbstractProjectFeature { l0.HasReportFactory, report, l0.PartOf, model); + ProjectResource PROJ = ProjectResource.getInstance(g); + for(Resource dep : g.getObjects(library, l0.IsLinkedTo)) { + if(g.isInstanceOf(dep, PROJ.NamespaceRequirement)) { + for(Resource req : g.getObjects(dep, PROJ.RequiresNamespace)) { + String uri = g.getPossibleValue(req, Bindings.STRING); + System.err.println("dep uri=" + uri); + if(uri != null) { + Resource target = g.getResource(uri); + if(target != null) { + g.claim(model, l0.IsLinkedTo, null, target); + } + } + } + } + } + + callback.run(model); } catch(Exception e) { errorCallback.run(e); @@ -222,10 +242,14 @@ public class SysdynProject extends AbstractProjectFeature { final VirtualGraph graph = session.getService(VirtualGraph.class); SysdynResource SYSDYN = SysdynResource.getInstance(session); - session.asyncRequest(new ObjectsWithType(projectResource, l0.ConsistsOf, SYSDYN.SysdynModel), new SingleSetListener() { + session.asyncRequest(new ObjectsWithType(projectResource, l0.ConsistsOf, SYSDYN.SysdynModel), new SingleSetSyncListener() { @Override - public void add(final Resource model) { + public void add(ReadGraph g, final Resource model) throws DatabaseException { + + GenericRelationIndex index = g.adapt(l0.DependenciesRelation, GenericRelationIndex.class); + index.trackAndIndex(g.getSession(), model); + // FIXME: Simantics.async(new Runnable() { @@ -245,7 +269,7 @@ public class SysdynProject extends AbstractProjectFeature { } @Override - public void exception(Throwable t) { + public void exception(ReadGraph graph, Throwable t) { t.printStackTrace(); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java index e1cabac3..21e8764e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java @@ -210,6 +210,8 @@ public class EquationTab extends PropertyTabContributorImpl implements Widget { @Override public void perform(WriteGraph graph) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(graph); + if(graph.hasStatement(variable, sr.HasActiveExpression)) + graph.deny(variable, sr.HasActiveExpression); graph.claim(variable, sr.HasActiveExpression, expression); } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExternalFilesTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExternalFilesTab.java new file mode 100644 index 00000000..7abe6142 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExternalFilesTab.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties; + +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.ui.IWorkbenchSite; +import org.simantics.browsing.ui.swt.PropertyTabContributorImpl; +import org.simantics.browsing.ui.swt.SingleSelectionInputSource; +import org.simantics.browsing.ui.swt.widgets.Button; +import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite; +import org.simantics.browsing.ui.swt.widgets.impl.SelectionListenerImpl; +import org.simantics.browsing.ui.swt.widgets.impl.Widget; +import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.management.ISessionContext; +import org.simantics.sysdyn.ui.handlers.ImportExternalFunctionFilesHandler; +import org.simantics.ui.SimanticsUI; +import org.simantics.utils.datastructures.ArrayMap; +import org.simantics.utils.datastructures.Pair; + +public class ExternalFilesTab extends PropertyTabContributorImpl implements Widget { + + GraphExplorerComposite externalFilesExplorer; + Button importButton; + + @Override + public void createControls(Composite body, IWorkbenchSite site, + final ISessionContext context, WidgetSupport support) { + support.register(this); + + Composite composite = new Composite(body, SWT.NONE); + GridDataFactory.fillDefaults().grab(true, true).applyTo(composite); + GridLayoutFactory.fillDefaults().margins(3, 3).applyTo(composite); + + externalFilesExplorer = new GraphExplorerComposite(ArrayMap.keys( + "displaySelectors", "displayFilter").values(false, false), site, composite, SWT.FULL_SELECTION | SWT.BORDER | SWT.MULTI); + + externalFilesExplorer + .setBrowseContexts("http://www.simantics.org/Sysdyn-1.0/ExternalFiles"); + externalFilesExplorer.setInputSource(new SingleSelectionInputSource( + Resource.class)); + + externalFilesExplorer.setContextMenuId("#ExternalFunctionFileBrowser"); + externalFilesExplorer.finish(); + + GridDataFactory.fillDefaults().grab(true, true).applyTo( + externalFilesExplorer); + + Control c = externalFilesExplorer.getExplorerControl(); + if (c instanceof Tree) + ((Tree) c).setLinesVisible(true); + + importButton = new Button(composite, support, SWT.NONE); + importButton.setText("Import"); + importButton.addSelectionListener(new SelectionListenerImpl(context) { + + @Override + public void apply(WriteGraph graph, final Resource input) + throws DatabaseException { + + importButton.getWidget().getDisplay().asyncExec(new Runnable() { + + @Override + public void run() { + Shell shell = importButton.getWidget().getShell(); + + final Pair importedFiles = ImportExternalFunctionFilesHandler.importFiles(shell, "Import files", ImportExternalFunctionFilesHandler.C_EXTENSIONS); + + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + ImportExternalFunctionFilesHandler.addFilesToFunction(graph, input, importedFiles); + } + }); + } + }); + + + } + }); + + } + + @Override + public void setInput(ISessionContext context, Object input) { + externalFilesExplorer.setInput(context, input); + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java new file mode 100644 index 00000000..c0b315bc --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties; + +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.ui.IWorkbenchSite; +import org.simantics.browsing.ui.swt.PropertyTabContributorImpl; +import org.simantics.browsing.ui.swt.widgets.Label; +import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory; +import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier; +import org.simantics.browsing.ui.swt.widgets.TrackedText; +import org.simantics.browsing.ui.swt.widgets.impl.TextModifyListenerImpl; +import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; +import org.simantics.db.Builtins; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.management.ISessionContext; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.manager.FunctionUtils; +import org.simantics.sysdyn.ui.properties.widgets.FunctionLabelFactory; + +public class FunctionTab extends PropertyTabContributorImpl { + + @Override + public void createControls(Composite body, IWorkbenchSite site, + ISessionContext context, WidgetSupport support) { + + Composite composite = new Composite(body, SWT.NONE); + GridDataFactory.fillDefaults().grab(true, true).applyTo(composite); + GridLayoutFactory.fillDefaults().numColumns(2).margins(3, 3).applyTo(composite); + + TrackedText nameText = new TrackedText(composite, support, SWT.BORDER); + nameText.setTextFactory(new StringPropertyFactory(Builtins.URIs.HasName)); + nameText.addModifyListener(new StringPropertyModifier(context, Builtins.URIs.HasName)); + nameText.addModifyListener(new TextModifyListenerImpl() { + + @Override + public void applyText(WriteGraph graph, Resource input, String text) + throws DatabaseException { + Resource library = graph.getSingleObject(input, Layer0.getInstance(graph).PartOf); + FunctionUtils.updateFunctionFileForLibrary(graph, library); + } + }); + GridDataFactory.fillDefaults().span(2, 1).grab(true, false).applyTo(nameText.getWidget()); + + + Group modelicaGroup = new Group(composite, SWT.SHADOW_ETCHED_IN); + modelicaGroup.setText("Modelica code"); + GridDataFactory.fillDefaults().grab(true, true).applyTo(modelicaGroup); + GridLayoutFactory.fillDefaults().spacing(0, 0).margins(3, 3).applyTo(modelicaGroup); + + Label startLabel = new Label(modelicaGroup, support, SWT.NONE); + startLabel.setTextFactory(new FunctionLabelFactory(Builtins.URIs.HasName, false)); + TrackedText modelicaCode = new TrackedText(modelicaGroup, support, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); + modelicaCode.setTextFactory(new StringPropertyFactory(SysdynResource.URIs.HasModelicaFunctionCode)); + modelicaCode.addModifyListener(new StringPropertyModifier(context, SysdynResource.URIs.HasModelicaFunctionCode)); + modelicaCode.addModifyListener(new TextModifyListenerImpl() { + + @Override + public void applyText(WriteGraph graph, Resource input, String text) + throws DatabaseException { + Resource library = graph.getSingleObject(input, Layer0.getInstance(graph).PartOf); + FunctionUtils.updateFunctionFileForLibrary(graph, library); + } + }); + + GridDataFactory.fillDefaults().grab(true, true).applyTo(modelicaCode.getWidget()); + Label endLabel = new Label(modelicaGroup, support, SWT.NONE); + endLabel.setTextFactory(new FunctionLabelFactory(Builtins.URIs.HasName, true)); + + Group documentationGroup = new Group(composite, SWT.SHADOW_ETCHED_IN); + documentationGroup.setText("Documentation"); + GridDataFactory.fillDefaults().grab(true, true).applyTo(documentationGroup); + GridLayoutFactory.fillDefaults().spacing(0, 0).margins(3, 3).applyTo(documentationGroup); + + TrackedText information = new TrackedText(documentationGroup, support, SWT.MULTI | SWT.BORDER); + information.setTextFactory(new StringPropertyFactory(Builtins.URIs.HasDescription)); + information.addModifyListener(new StringPropertyModifier(context, Builtins.URIs.HasDescription)); + GridDataFactory.fillDefaults().grab(true, true).applyTo(information.getWidget()); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java index 89668611..7c159ebb 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java @@ -231,6 +231,21 @@ public class ResourceSelectionProcessor implements SelectionProcessor() { @@ -221,7 +222,9 @@ public class ChartTableWidget implements Widget { private void tableModified() { StringBuilder b = new StringBuilder(); b.append("{"); - Iterator iterator = ((ArrayList)table.getTableViewer().getInput()).iterator(); + ArrayList inputOutputList = (ArrayList)table.getTableViewer().getInput(); + Collections.sort(inputOutputList, table.new InputOutputComparator()); + Iterator iterator = inputOutputList.iterator(); while(iterator.hasNext()){ InputOutput io = iterator.next(); b.append("{" + io.getInput(String.class) + "," + io.getOutput(String.class) + "}"); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ChartWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ChartWidget.java index 990bb3de..742264c1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ChartWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ChartWidget.java @@ -18,8 +18,10 @@ import java.awt.geom.Ellipse2D; import java.io.StringReader; import java.util.ArrayList; import java.util.Iterator; + import javax.swing.JComponent; import javax.swing.JPanel; + import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.SWT; @@ -102,11 +104,11 @@ public class ChartWidget implements Widget { if(!graph.isInstanceOf(expression, sr.WithLookupExpression)) return null; Auxiliary auxiliary = new Auxiliary(); - auxiliary.minX = graph.getRelatedValue(expression, sr.HasMinX); - auxiliary.maxX = graph.getRelatedValue(expression, sr.HasMaxX); - auxiliary.minY = graph.getRelatedValue(expression, sr.HasMinY); - auxiliary.maxY = graph.getRelatedValue(expression, sr.HasMaxY); - auxiliary.table = graph.getRelatedValue(expression, sr.HasLookup); + auxiliary.minX = graph.getPossibleRelatedValue(expression, sr.HasMinX); + auxiliary.maxX = graph.getPossibleRelatedValue(expression, sr.HasMaxX); + auxiliary.minY = graph.getPossibleRelatedValue(expression, sr.HasMinY); + auxiliary.maxY = graph.getPossibleRelatedValue(expression, sr.HasMaxY); + auxiliary.table = graph.getPossibleRelatedValue(expression, sr.HasLookup); return auxiliary; } }, new Listener() { @@ -126,9 +128,13 @@ public class ChartWidget implements Widget { XYPlot plot = (XYPlot) chart.getPlot(); ValueAxis rangeAxis = plot.getRangeAxis(); rangeAxis.setAutoRange(false); + if(result.minY == null) result.minY = rangeAxis.getLowerBound(); + if(result.maxY == null) result.maxY = rangeAxis.getUpperBound(); rangeAxis.setRange(result.minY, result.maxY); ValueAxis domainAxis = plot.getDomainAxis(); domainAxis.setAutoRange(false); + if(result.minX == null) result.minX = domainAxis.getLowerBound(); + if(result.maxX == null) result.maxX = domainAxis.getUpperBound(); domainAxis.setRange(result.minX, result.maxX); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java index 45062c66..ac2e1c8e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ExpressionWidget.java @@ -199,7 +199,8 @@ public class ExpressionWidget implements Widget { } public void save() { - this.expression.save(expr, data); + if(this.expression != null) + this.expression.save(expr, data); } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/FunctionLabelFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/FunctionLabelFactory.java new file mode 100644 index 00000000..2b4cdcbf --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/FunctionLabelFactory.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets; + +import org.simantics.browsing.ui.swt.widgets.impl.ReadFactoryImpl; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.utils.datastructures.Quad; + + + +public class FunctionLabelFactory extends ReadFactoryImpl { + + private final String propertyURI; + private boolean end; + + public FunctionLabelFactory(String propertyURI, boolean end) { + this.propertyURI = propertyURI; + this.end = end; + } + + @Override + public Object getIdentity(Object inputContents) { + return new Quad((Resource) inputContents, propertyURI, getClass(), end); + } + + + @Override + public String perform(ReadGraph graph, Resource resource) throws DatabaseException { + String value = graph.getPossibleRelatedValue(resource, graph.getResource(propertyURI)); + if(end) { + return "end " + value + ";"; + } else { + return "function " + value; + } + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java index 66dd8622..d1edbb2b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/BasicExpression.java @@ -27,13 +27,16 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; +import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; -import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.ui.utils.ExpressionUtils; import org.simantics.ui.SimanticsUI; @@ -135,13 +138,31 @@ public class BasicExpression implements IExpression { return; } - Layer0 l0 = Layer0.getInstance(g); - - g.deny(expression, l0.InstanceOf); - g.deny(expression, sr.HasEquation); - - g.claim(expression, l0.InstanceOf, null, expressionType); - g.claimLiteral(expression, sr.HasEquation, currentText); + if(!g.isInstanceOf(expression, expressionType)) { + Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); + final Resource newExpression = GraphUtils.create2(g, expressionType, + sr.HasEquation, currentText); + String arrayRange = g.getPossibleRelatedValue(expression, sr.HasArrayRange, Bindings.STRING); + if(arrayRange != null) + g.claimLiteral(newExpression, sr.HasArrayRange, arrayRange); + + OrderedSetUtils.replace(g, ownerList, expression, newExpression); + + final Resource activefor = g.getPossibleObject(expression, sr.HasActiveExpression_Inverse); + VirtualGraph runtime = g.getService(VirtualGraph.class); + g.syncRequest(new WriteRequest(runtime) { + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + if(graph.hasStatement(activefor, sr.HasActiveExpression)) + graph.deny(activefor, sr.HasActiveExpression); + graph.claim(activefor, sr.HasActiveExpression, newExpression); + } + } + ); + } else { + g.claimLiteral(expression, sr.HasEquation, currentText); + } } }); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupInputOutputTable.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupInputOutputTable.java index bbd5d254..e6eb4775 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupInputOutputTable.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/LookupInputOutputTable.java @@ -13,6 +13,7 @@ package org.simantics.sysdyn.ui.properties.widgets.expressions; import java.awt.geom.Point2D; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; import org.eclipse.jface.layout.GridDataFactory; @@ -197,19 +198,25 @@ public class LookupInputOutputTable extends Composite { } - class InputOutputComparator extends ViewerComparator { + public class InputOutputComparator extends ViewerComparator implements Comparator{ @Override public int compare(Viewer viewer, Object e1, Object e2) { if ((e1 instanceof InputOutput) && (e2 instanceof InputOutput)) { + return compare((InputOutput)e1, (InputOutput)e2); + } else { + return 0; + } + } + + @Override + public int compare(InputOutput e1, InputOutput e2) { InputOutput io1 = (InputOutput)e1; InputOutput io2 = (InputOutput)e2; Double d1 = (Double)io1.getInput((Double.class)); Double d2 = (Double)io2.getInput((Double.class)); return d1.compareTo(d2); - } - return 0; - } + } } public TableViewer getTableViewer() { diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java index d01c6ce0..c60fca19 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/WithLookupExpression.java @@ -47,17 +47,18 @@ import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYDataset; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; +import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; +import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.WriteRequest; import org.simantics.db.common.utils.OrderedSetUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.procedure.Listener; import org.simantics.db.request.Read; -import org.simantics.layer0.Layer0; +import org.simantics.layer0.utils.direct.GraphUtils; import org.simantics.sysdyn.SysdynResource; -import org.simantics.sysdyn.representation.Auxiliary; import org.simantics.sysdyn.tableParser.ParseException; import org.simantics.sysdyn.tableParser.TableParser; import org.simantics.sysdyn.tableParser.Token; @@ -149,7 +150,7 @@ public class WithLookupExpression implements IExpression { SysdynResource sr = SysdynResource.getInstance(graph); String result = ""; if (expr != null && graph.isInstanceOf(expr, sr.WithLookupExpression)) { - result = graph.getRelatedValue(expr, sr.HasLookup); + result = graph.getPossibleRelatedValue(expr, sr.HasLookup); } return result; } @@ -213,8 +214,8 @@ public class WithLookupExpression implements IExpression { Auxiliary results = new Auxiliary(); SysdynResource sr = SysdynResource.getInstance(graph); if (expression != null && graph.isInstanceOf(expression, sr.WithLookupExpression)) { - results.equation = graph.getRelatedValue(expression, sr.HasEquation); - results.lookup = graph.getRelatedValue(expression, sr.HasLookup); + results.equation = graph.getPossibleRelatedValue(expression, sr.HasEquation); + results.lookup = graph.getPossibleRelatedValue(expression, sr.HasLookup); } else { results.equation = ""; results.lookup = ""; @@ -225,8 +226,8 @@ public class WithLookupExpression implements IExpression { } catch (DatabaseException e1) { e1.printStackTrace(); } - data.put("equation", results.equation); - data.put("lookup", results.lookup); + data.put("equation", results.equation == null ? "" : results.equation); + data.put("lookup", results.lookup == null ? "" : results.lookup); } } @@ -246,8 +247,8 @@ public class WithLookupExpression implements IExpression { } @Override - public void save(final Resource variable, Map data) { - final String currentExpression = expression.getExpression(); + public void save(final Resource expression, Map data) { + final String currentExpression = this.expression.getExpression(); final String currentLookupTable = lookup.getExpression(); String oldExpression = (String)data.get("equation"); String oldLookupTable = (String)data.get("lookup"); @@ -264,20 +265,34 @@ public class WithLookupExpression implements IExpression { public void perform(WriteGraph g) throws DatabaseException { SysdynResource sr = SysdynResource.getInstance(g); - Layer0 l0 = Layer0.getInstance(g); if(!g.isInstanceOf(expr, sr.WithLookupExpression)) { - Resource expressionList = g.getSingleObject(expr, l0.HasNext); - Resource temp = g.newResource(); - OrderedSetUtils.replace(g, expressionList, expr, temp); - for(Resource predicate : g.getPredicates(expr)) { - g.deny(expr, predicate); - } - g.claim(expr, l0.InstanceOf, null, sr.WithLookupExpression); - g.claimLiteral(expr, sr.HasMinX, 0.0); - g.claimLiteral(expr, sr.HasMaxX, 10.0); - g.claimLiteral(expr, sr.HasMinY, 0.0); - g.claimLiteral(expr, sr.HasMaxY, 10.0); - OrderedSetUtils.replace(g, expressionList, temp, expr); + + + Resource ownerList = OrderedSetUtils.getSingleOwnerList(g, expression); + final Resource newExpression = GraphUtils.create2(g, sr.WithLookupExpression, + sr.HasMinX, 0.0, + sr.HasMaxX, 10.0, + sr.HasMinY, 0.0, + sr.HasMaxY, 10.0); + String arrayRange = g.getPossibleRelatedValue(expression, sr.HasArrayRange, Bindings.STRING); + if(arrayRange != null) + g.claimLiteral(newExpression, sr.HasArrayRange, arrayRange); + + OrderedSetUtils.replace(g, ownerList, expr, newExpression); + final Resource activefor = g.getPossibleObject(expression, sr.HasActiveExpression_Inverse); + VirtualGraph runtime = g.getService(VirtualGraph.class); + g.syncRequest(new WriteRequest(runtime) { + @Override + public void perform(WriteGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + if(graph.hasStatement(activefor, sr.HasActiveExpression)) + graph.deny(activefor, sr.HasActiveExpression); + graph.claim(activefor, sr.HasActiveExpression, newExpression); + } + } + ); + expr = newExpression; + } g.claimLiteral(expr, sr.HasEquation, currentExpression); g.claimLiteral(expr, sr.HasLookup, currentLookupTable); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileImager.java new file mode 100644 index 00000000..9af9a0d0 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileImager.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.externalFiles; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.swt.ImagerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; + +public class ExternalFileImager extends ImagerContributor { + + @Override + public ImageDescriptor getDescriptor(ReadGraph graph, ExternalFileNode input) + throws DatabaseException { + return null; + } + + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileLabeler.java new file mode 100644 index 00000000..ee94d5ad --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileLabeler.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.externalFiles; + +import org.simantics.browsing.ui.graph.impl.contributor.labeler.LabelerContributorImpl; +import org.simantics.db.ReadGraph; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; + +public class ExternalFileLabeler extends LabelerContributorImpl{ + + @Override + public String getLabel(ReadGraph graph, ExternalFileNode input) + throws DatabaseException { + return NameUtils.getSafeName(graph, input.data); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileNode.java new file mode 100644 index 00000000..493a574b --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFileNode.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.externalFiles; + +import org.simantics.browsing.ui.common.node.AbstractNode; +import org.simantics.browsing.ui.common.node.DeleteException; +import org.simantics.browsing.ui.common.node.IDeletableNode; +import org.simantics.browsing.ui.common.node.IModifiableNode; +import org.simantics.browsing.ui.content.Labeler.Modifier; +import org.simantics.browsing.ui.graph.impl.LabelModifier; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.ui.SimanticsUI; + +public class ExternalFileNode extends AbstractNode implements IModifiableNode, IDeletableNode { + + public ExternalFileNode(Resource data) { + super(data); + } + + @Override + public Modifier getModifier(String columnId) { + try { + Resource hasName = Layer0.getInstance(SimanticsUI.getSession()).HasName; + LabelModifier modifier = new LabelModifier(SimanticsUI.getSession(), data, hasName) { + @Override + public String isValid(String label) { + if (label.isEmpty()) + return "Empty label not allowed"; + if (label.contains(" ")) + return "Spaces are not allowed"; + return null; + } + }; + return modifier; + } catch (DatabaseException e) { + e.printStackTrace(); + } + return null; + } + + @Override + public void delete() throws DeleteException { + SimanticsUI.getSession().asyncRequest(new WriteRequest() { + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + Resource function = graph.getSingleObject(data, l0.PartOf); + if(function != null) { + graph.deny(data, l0.PartOf, function); + } + } + }); + } + +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFiles.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFiles.java new file mode 100644 index 00000000..59ad535e --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/externalFiles/ExternalFiles.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.sysdyn.ui.properties.widgets.externalFiles; + +import java.util.ArrayList; +import java.util.Collection; + +import org.simantics.browsing.ui.graph.impl.contributor.viewpoint.ViewpointContributorImpl; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; + +public class ExternalFiles extends ViewpointContributorImpl { + + @Override + public Collection getContribution(ReadGraph graph, Resource input) + throws DatabaseException { + + if(input == null) + return null; + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + + ArrayList result = new ArrayList(); + for(Resource r : graph.syncRequest(new ObjectsWithType(input, l0.ConsistsOf, sr.ExternalFunctionFile))) { + result.add(new ExternalFileNode(r)); + } + + return result; + } + + @Override + public String getViewpointId() { + return "External Files"; + } + + + +} diff --git a/org.simantics.sysdyn/META-INF/MANIFEST.MF b/org.simantics.sysdyn/META-INF/MANIFEST.MF index 2c91a130..1e115e11 100644 --- a/org.simantics.sysdyn/META-INF/MANIFEST.MF +++ b/org.simantics.sysdyn/META-INF/MANIFEST.MF @@ -20,7 +20,8 @@ Require-Bundle: org.simantics.objmap;bundle-version="0.1.0", org.simantics.sysdyn.ontology;bundle-version="1.0.0", org.simantics.modeling;bundle-version="1.1.1", org.simantics.diagram;bundle-version="1.1.1", - org.simantics.diagram.ontology;bundle-version="1.1.1" + org.simantics.diagram.ontology;bundle-version="1.1.1", + org.simantics.scl.runtime;bundle-version="0.1.3" Export-Package: org.simantics.sysdyn, org.simantics.sysdyn.expressionParser, org.simantics.sysdyn.manager, diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java new file mode 100644 index 00000000..b85894af --- /dev/null +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java @@ -0,0 +1,147 @@ +package org.simantics.sysdyn.manager; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.request.ReadRequest; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.scl.runtime.function.Function; +import org.simantics.simulation.ontology.SimulationResource; +import org.simantics.sysdyn.Activator; +import org.simantics.sysdyn.SysdynResource; + +public class FunctionUtils { + + public static List getLibraryPathsForModelica(final SysdynModel model) { + final ArrayList paths = new ArrayList(); + + try { + model.session.syncRequest(new ReadRequest() { + + @Override + public void run(ReadGraph graph) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + SimulationResource simu = SimulationResource.getInstance(graph); + + Set parents = getParents(graph, model); + for(Resource parent : parents) { + Resource partof = graph.getPossibleObject(parent, l0.PartOf); + if(graph.isInstanceOf(parent, sr.SysdynModel)) { + Resource configuration = graph.getPossibleObject(parent, simu.HasConfiguration); + if(configuration.equals(model.configurationResource)) { + paths.add(model.getConfiguration().getName().replace(" ", "") + "_functions.mo"); + } + } else if (graph.isInstanceOf(partof, sr.SysdynModel)) { + // TODO + } else { + String libraryname = NameUtils.getSafeName(graph, parent); + paths.add("..\\\\..\\\\libraries\\\\functions\\\\" + libraryname + ".mo"); + } + } + } + }); + } catch (DatabaseException e) { + e.printStackTrace(); + } + + return paths; + } + + private static Set getParents(ReadGraph graph, SysdynModel model) throws DatabaseException{ + HashSet parents = new HashSet(); + + Layer0 l0 = Layer0.getInstance(graph); + SimulationResource simu = SimulationResource.getInstance(graph); + Resource modelResource = graph.getPossibleObject(model.configurationResource, simu.IsConfigurationOf); + if(modelResource != null) { + Function index = graph.adapt(l0.Dependencies, Function.class); + Collection> results = (Collection>)index.apply(graph, modelResource, "Types:SysdynModelicaFunction"); + for(Map r : results) { + Resource function = (Resource)r.get("Resource"); + if(function != null) { + parents.add(graph.getSingleObject(function, l0.PartOf)); + } + } + } + + return parents; + + } + + public static void updateFunctionFilesForModel(ReadGraph graph, SysdynModel model) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + + Set parents = getParents(graph, model); + + for(Resource parent : parents) { + if(graph.isInstanceOf(parent, sr.SysdynModel)) { + String parentName = NameUtils.getSafeName(graph, parent); + File scriptFile = new File(model.getSimulationDir(), parentName + "_functions.mo"); + updateFunctionFile(graph, parent, scriptFile); + } else { + updateFunctionFileForLibrary(graph, parent); + } + } + return; + } + + public static void updateFunctionFileForLibrary(ReadGraph graph, Resource library) throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + if(graph.isInstanceOf(library, sr.SysdynModel)) { + SimulationResource simu = SimulationResource.getInstance(graph); + Resource configuration = graph.getSingleObject(library, simu.HasConfiguration); + SysdynModelManager smm = SysdynModelManager.getInstance(graph.getSession()); + SysdynModel model = smm.getModel(graph, configuration); + updateFunctionFilesForModel(graph, model); + } else { + File librariesDir = Activator.getBundleContext().getDataFile("libraries"); + if (!librariesDir.exists()) { + librariesDir.mkdir(); + } + File dir = new File(librariesDir, "functions"); + if (!dir.exists()) { + dir.mkdir(); + } + String parentName = NameUtils.getSafeName(graph, library); + File scriptFile = new File(dir, parentName + ".mo"); + updateFunctionFile(graph, library, scriptFile); + } + + + } + + private static void updateFunctionFile(ReadGraph graph, Resource library, File scriptFile) throws DatabaseException { + Layer0 l0 = Layer0.getInstance(graph); + SysdynResource sr = SysdynResource.getInstance(graph); + + PrintStream s; + try { + s = new PrintStream(scriptFile); + } catch (FileNotFoundException e) { + e.printStackTrace(); + return; + } + + for(Resource function : graph.syncRequest(new ObjectsWithType(library, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, function); + String functionCode = graph.getRelatedValue(function, sr.HasModelicaFunctionCode); + s.println("function " + name); + s.println(functionCode); + s.println("end " + name + ";\n"); + } + s.close(); + } +} diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java index df26b56f..8fc4baa8 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynExperiment.java @@ -23,6 +23,7 @@ import org.simantics.db.VirtualGraph; import org.simantics.db.WriteGraph; import org.simantics.db.common.request.ReadRequest; import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.service.VirtualGraphSupport; import org.simantics.layer0.Layer0; @@ -78,7 +79,7 @@ public class SysdynExperiment extends Experiment implements IDynamicExperiment { if(!projectRoot.isDirectory()) projectRoot.mkdir(); File file = new File( projectRoot, UUID.randomUUID().toString() + ".dbb"); - String name = GraphUtils.findFreshName(graph, "Result", model, l0.ConsistsOf, "%s%d"); + String name = NameUtils.findFreshName(graph, "Result", model, l0.ConsistsOf, "%s%d"); SysdynResource sr = SysdynResource.getInstance(graph); Resource res = GraphUtils.create2(graph, sr.Result, diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java index ea60079f..1b5df7ce 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java @@ -156,6 +156,14 @@ public class SysdynModel implements IMappingListener, IModel { if (!simulationDir.exists()) { simulationDir.mkdir(); } + + try { + FunctionUtils.updateFunctionFilesForModel(g, this); + } catch (DatabaseException e) { + System.err.println("Error creating functions"); + e.printStackTrace(); + } + } @@ -194,11 +202,19 @@ public class SysdynModel implements IMappingListener, IModel { if(model.getTolerance() != null) inits.put("tolerance", model.getTolerance().toString()); + StringBuilder functionscript = new StringBuilder(); + for(String path : FunctionUtils.getLibraryPathsForModelica(this)) { + System.out.println("loadFile(\"" + path + "\");\n"); + functionscript.append("loadFile(\"" + path + "\");\n"); + } + final SimulationLocation simulationLocation = ModelicaManager.createInputFiles( simulationDir, configuration.getName(), writer.toString(), - inits); + inits, + functionscript.toString()); + progressMonitor.worked(1); @@ -473,5 +489,9 @@ public class SysdynModel implements IMappingListener, IModel { } return inits; } + + public File getSimulationDir() { + return simulationDir; + } } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java index 9bfc195d..1c2bc559 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelica/ModelicaWriter.java @@ -43,7 +43,7 @@ public class ModelicaWriter { writeConfiguration(conf); - if(!functionsWritten) { + if(false) { b.append( "\nfunction interpolate\n" + diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java index 620c8b51..968041b3 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java @@ -53,7 +53,9 @@ public class StockExpression extends Expression { range = sb.toString(); } - String each = variable.getArrayIndexes().getEnumerations().isEmpty() ? "" : "each"; + String each = ""; + if(ai != null && !ai.getEnumerations().isEmpty()) + each = "each"; if (value == null) { return " " + variable.getType() + " " + variable.getName() + range + "(" + each + " fixed=false);\n"; } else { diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/WithLookupExpression.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/WithLookupExpression.java index 02ed6ba7..5eb54fdb 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/WithLookupExpression.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/WithLookupExpression.java @@ -11,9 +11,15 @@ *******************************************************************************/ package org.simantics.sysdyn.representation.expressions; +import java.util.ArrayList; +import java.util.Iterator; + import org.simantics.objmap.annotations.GraphType; import org.simantics.objmap.annotations.RelatedValue; +import org.simantics.sysdyn.representation.ArrayIndexes; +import org.simantics.sysdyn.representation.Enumeration; import org.simantics.sysdyn.representation.IndependentVariable; +import org.simantics.sysdyn.representation.utils.IndexUtils; @GraphType("http://www.simantics.org/Sysdyn-1.0/WithLookupExpression") @@ -26,13 +32,37 @@ public class WithLookupExpression extends Expression { @Override public String getDeclaration(IndependentVariable variable) { - return " " + variable.getType() + " " + variable.getName() + ";\n"; + ArrayIndexes ai = variable.getArrayIndexes(); + ArrayList enumerations = null; + if(ai != null) + enumerations = ai.getEnumerations(); + + String range = ""; + if(enumerations != null && enumerations.size() > 0) { + StringBuilder sb = new StringBuilder(); + sb.append("["); + Iterator iterator = enumerations.iterator(); + while(iterator.hasNext()) { + sb.append(iterator.next().getName() + ".size"); + if(iterator.hasNext()) { + sb.append(", "); + } + } + sb.append("]"); + range = sb.toString(); + } + + return " " + variable.getType() + " " + variable.getName() + range + ";\n"; + } @Override public String getEquation(IndependentVariable variable) { + String equation = IndexUtils.equationRangesToIndexes(variable, this.equation); + String range = IndexUtils.rangeToIndexes(variable, this.getArrayRange()); + return - " " + variable.getName() + " = interpolate(" + equation + ", " + lookupTable + ");\n"; + " " + variable.getName() + (range.equals("[:]") ? "" : range) + " = interpolate(" + equation + ", " + lookupTable + ");\n"; } } -- 2.47.1