]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Added GAME(x) Vensim function stub to Sysdyn (refs #4771).
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 18 Mar 2014 13:49:31 +0000 (13:49 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 18 Mar 2014 13:49:31 +0000 (13:49 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29163 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ontology/graph.tg
org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph
org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java

index 8f3e514e9f973f9c460afcf9f99032183af58a8b..b3619d0b2257ce3c33e7db0e739050165bf44dfd 100644 (file)
Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ
index 87c506f6b52034ffd1b6e5b69e0de8cd93e3a732..fdee797a5090bf5d70bbcd99354c12ad0a62b1f7 100644 (file)
@@ -511,4 +511,27 @@ In modelica log(x) is the natural logarighm and log10(x) is base 10 logarighm.""
     output Real z;\r
 algorithm\r
     z := log(x);"""  \r
-         
\ No newline at end of file
+         \r
+         \r
+         \r
+VF.GAME : SYSDYN.SysdynModelicaFunction\r
+    L0.HasDescription """GAME(x)\r
+\r
+Returns x during normal simulation with x being any expression.\r
+\r
+In Vensim, this function allows modifying the variable in game mode. However, this behavior is not implemented yet."""\r
+    SYSDYN.SysdynModelicaFunction.inputs _ : L0.List\r
+        @L0.list\r
+            VF.GAME.x : SYSDYN.SysdynModelicaFunction.Input\r
+                SYSDYN.Variable.type "Real"\r
+                SYSDYN.SysdynModelicaFunction.optional false\r
+                SYSDYN.SysdynModelicaFunction.unit "'p"\r
+    SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
+        @L0.list\r
+            VF.GAME.z : SYSDYN.SysdynModelicaFunction.Output\r
+                SYSDYN.Variable.type "Real"\r
+                SYSDYN.SysdynModelicaFunction.unit "'p"\r
+    SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """    input Real x;\r
+    output Real z;\r
+algorithm\r
+    z := x;""" 
\ No newline at end of file
index ef34edf7416250f2f2ef0860bbe077dfe08aa3e8..31d5529405ed17c1bf5ff2c5a86babf6889a8b58 100644 (file)
@@ -228,6 +228,9 @@ public class SysdynResource {
     public final Resource Built$in_Functions_Vensim_Functions_EXP;\r
     public final Resource Built$in_Functions_Vensim_Functions_EXP_x;\r
     public final Resource Built$in_Functions_Vensim_Functions_EXP_z;\r
+    public final Resource Built$in_Functions_Vensim_Functions_GAME;\r
+    public final Resource Built$in_Functions_Vensim_Functions_GAME_x;\r
+    public final Resource Built$in_Functions_Vensim_Functions_GAME_z;\r
     public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE;\r
     public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_cond;\r
     public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse;\r
@@ -996,6 +999,9 @@ public class SysdynResource {
         public static final String Built$in_Functions_Vensim_Functions_EXP = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/EXP";\r
         public static final String Built$in_Functions_Vensim_Functions_EXP_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/EXP/x";\r
         public static final String Built$in_Functions_Vensim_Functions_EXP_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/EXP/z";\r
+        public static final String Built$in_Functions_Vensim_Functions_GAME = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/GAME";\r
+        public static final String Built$in_Functions_Vensim_Functions_GAME_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/GAME/x";\r
+        public static final String Built$in_Functions_Vensim_Functions_GAME_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/GAME/z";\r
         public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE";\r
         public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE_cond = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE/cond";\r
         public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE/onfalse";\r
@@ -1774,6 +1780,9 @@ public class SysdynResource {
         Built$in_Functions_Vensim_Functions_EXP = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP);\r
         Built$in_Functions_Vensim_Functions_EXP_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP_x);\r
         Built$in_Functions_Vensim_Functions_EXP_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP_z);\r
+        Built$in_Functions_Vensim_Functions_GAME = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME);\r
+        Built$in_Functions_Vensim_Functions_GAME_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME_x);\r
+        Built$in_Functions_Vensim_Functions_GAME_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME_z);\r
         Built$in_Functions_Vensim_Functions_IFTHENELSE = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE);\r
         Built$in_Functions_Vensim_Functions_IFTHENELSE_cond = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_cond);\r
         Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse);\r