From: miettinen Date: Tue, 18 Mar 2014 13:49:31 +0000 (+0000) Subject: Added GAME(x) Vensim function stub to Sysdyn (refs #4771). X-Git-Tag: 1.8.1~114 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=818044aaf1038113051b42b70b7849860c0ac0bb;p=simantics%2Fsysdyn.git Added GAME(x) Vensim function stub to Sysdyn (refs #4771). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29163 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 8f3e514e..b3619d0b 100644 Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ diff --git a/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph b/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph index 87c506f6..fdee797a 100644 --- a/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph +++ b/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph @@ -511,4 +511,27 @@ In modelica log(x) is the natural logarighm and log10(x) is base 10 logarighm."" output Real z; algorithm z := log(x);""" - \ No newline at end of file + + + +VF.GAME : SYSDYN.SysdynModelicaFunction + L0.HasDescription """GAME(x) + +Returns x during normal simulation with x being any expression. + +In Vensim, this function allows modifying the variable in game mode. However, this behavior is not implemented yet.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.GAME.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.unit "'p" + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.GAME.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.unit "'p" + SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; + output Real z; +algorithm + z := x;""" \ No newline at end of file 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 ef34edf7..31d55294 100644 --- a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java +++ b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java @@ -228,6 +228,9 @@ public class SysdynResource { public final Resource Built$in_Functions_Vensim_Functions_EXP; public final Resource Built$in_Functions_Vensim_Functions_EXP_x; public final Resource Built$in_Functions_Vensim_Functions_EXP_z; + public final Resource Built$in_Functions_Vensim_Functions_GAME; + public final Resource Built$in_Functions_Vensim_Functions_GAME_x; + public final Resource Built$in_Functions_Vensim_Functions_GAME_z; public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE; public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_cond; public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse; @@ -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"; 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"; 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"; + public static final String Built$in_Functions_Vensim_Functions_GAME = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/GAME"; + 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"; + 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"; public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE"; 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"; 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"; @@ -1774,6 +1780,9 @@ public class SysdynResource { Built$in_Functions_Vensim_Functions_EXP = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP); Built$in_Functions_Vensim_Functions_EXP_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP_x); Built$in_Functions_Vensim_Functions_EXP_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_EXP_z); + Built$in_Functions_Vensim_Functions_GAME = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME); + Built$in_Functions_Vensim_Functions_GAME_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME_x); + Built$in_Functions_Vensim_Functions_GAME_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_GAME_z); Built$in_Functions_Vensim_Functions_IFTHENELSE = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE); Built$in_Functions_Vensim_Functions_IFTHENELSE_cond = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_cond); Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse);