From: miettinen Date: Tue, 19 Feb 2013 14:25:17 +0000 (+0000) Subject: A huge commit for Functions in equation tab (refs #4030) and expecially for Expressio... X-Git-Tag: simantics-1.10.1~33 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=6735fa2b199a186a9336e15df2abb3d859415f84;p=simantics%2Fsysdyn.git A huge commit for Functions in equation tab (refs #4030) and expecially for Expression parser: built-in function arguments assistive text feed (refs #3965): * Function parameters are shown in the text feed assistant and printed to the expression when the function is selected or when a function is selected in ShortcutTabWidget. * Added almost all Modelica functions under the model browser, that is, those which seem to work correctly or might be useful. All functions have their interface variables defined in the database as well. Updated also the definitions of the built-in functions. * Added the interfaces of built-in Modelica functions to be shown similarly to the Modelica codes of all other function. * Created another representation for a Modelica function in another Function.java: it is used to store and provide with the name, the type, and the parameterlist of a modelica function, and can easily be expanded to do more such stuff as well. * Added fun icons for different types of functions to the ShortcutTabWidget and the text feed assistant. * In parsing modelica (user defined) functions, the interface variables are recognized. They are not yet used, though. * Size of the modelica code viewer (or modelica interface) of a function in user defined or built-in functions is limited to the minimum of 150 px; otherwise the long lines in the description make the code / interface viewer disappear. * Added auto-generated doc of ModelicaParser. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26807 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 23edcbc9..138c666d 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/ModelicaArrayFunctions.pgraph b/org.simantics.sysdyn.ontology/graph/ModelicaArrayFunctions.pgraph new file mode 100644 index 00000000..aefaea03 --- /dev/null +++ b/org.simantics.sysdyn.ontology/graph/ModelicaArrayFunctions.pgraph @@ -0,0 +1,489 @@ +L0 = +SYSDYN = + +MAF = : SYSDYN.SysdynModelicaFunctionLibrary + + + +MAF.scalar : SYSDYN.SysdynModelicaFunction + L0.HasDescription """scalar(A) + +Returns a one-element array as scalar. + +Returns the single element of array A. size(A,i) = 1 is required for 1 <= i <= ndims(A).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.scalar.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.scalar.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.vector : SYSDYN.SysdynModelicaFunction + L0.HasDescription """vector(A) + +Returns an array with one non-singleton dimension as vector. + +Returns a 1-vector, if A is a scalar and otherwise returns a vector containing all the elements of the array, provided there is at most one dimension size > 1. + +Examples: +Real A[1,2,1] = {{{3},{4}}}; +Real v[2] = vector(A); // = {3,4}""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.vector.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.vector.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.matrix : SYSDYN.SysdynModelicaFunction + L0.HasDescription """matrix(A) + +Returns the first two dimensions of an array as matrix. + +Returns promote(A,2), if A is a scalar or vector and otherwise returns the elements of the first two dimensions as a matrix. size(A,i) = 1 is required for 2 < i <= ndims(A). +Function promote(A,n) fills dimensions of size 1 from the right to array A upto dimension n, where "n > ndims(A)" is required. Let C = promote(A,n), with nA = ndims(A), then +ndims(C) = n, +size(C,j) = size(A,j) for 1 <= j <= nA, +size(C,j) = 1 for nA+1 <= j <= n, +C[i_1, ..., i_nA, 1, ..., 1] = A[i_1, ..., i_nA].""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.matrix.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.matrix.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.ndims : SYSDYN.SysdynModelicaFunction + L0.HasDescription """ndims(A) + +Return number of array dimensions. + +Returns the number of dimensions k of array expression A, with k >= 0.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.ndims.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.ndims.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Integer" + + + +MAF.size : SYSDYN.SysdynModelicaFunction + L0.HasDescription """size(A,i) +size(A) + +Returns dimensions of an array. + +The first form returns the size of dimension i of array expression A where i shall be > 0 and <= ndims(A). + +The second form returns a vector of length ndims(A) containing the dimension sizes of A. + +Examples: +Real A[8,4,5]; +Integer n3 = size(A,3); // = 5 +Integer n[:] = size(A); // = {8,4,5}""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.size.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.size.i : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional true + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.size.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.array : SYSDYN.SysdynModelicaFunction + L0.HasDescription """array(A,B,C,...) + +The constructor function array(A,B,C,...) constructs an array from its arguments. + +The constructor function array(A,B,C,...) constructs an array from its arguments according to the following rules: + * Size matching: All arguments must have the same sizes, i.e., size(A)=size(B)=size(C)=... + * All arguments must be type compatible expressions giving the type of the elements. The data type of the result array is the maximally expanded type of the arguments. Real and Integer subtypes can be mixed resulting in a Real result array where the Integer numbers have been transformed to Real numbers. + * Each application of this constructor function adds a one-sized dimension to the left in the result compared to the dimensions of the argument arrays, i.e., ndims(array(A,B,C)) = ndims(A) + 1 = ndims(B) + 1, ... + * {A, B, C, ...} is a shorthand notation for array(A, B, C, ...). + * There must be at least one argument [i.e., array() or {} are not defined].""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.array.A : SYSDYN.SysdynModelicaFunction.VariableLengthInput + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List + @L0.list + MAF.array.A.A : L0.String + MAF.array.A.B : L0.String + MAF.array.A.C : L0.String + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.array.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.cat : SYSDYN.SysdynModelicaFunction + L0.HasDescription """cat(k,A,B,C,...) + +The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k. + +The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k according to the following rules: + * Arrays A, B, C, ... must have the same number of dimensions, i.e., ndims(A) = ndims(B) = ... + * Arrays A, B, C, ... must be type compatible expressions giving the type of the elements of the result. The maximally expanded types should be equivalent. Real and Integer subtypes can be mixed resulting in a Real result array where the Integer numbers have been transformed to Real numbers. + * k has to characterize an existing dimension, i.e., 1 <= k <= ndims(A) = ndims(B) = ndims(C); k shall be an integer number. + * Size matching: Arrays A, B, C, ... must have identical array sizes with the exception of the size of dimension k, i.e., size(A,j) = size(B,j), for 1 <= j <= ndims(A) and j <> k. + +Examples: +Real[2,3] r1 = cat(1, {{1.0, 2.0, 3}}, {{4, 5, 6}}); +Real[2,6] r2 = cat(2, r1, 2*r1);""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.cat.k : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.cat.A : SYSDYN.SysdynModelicaFunction.VariableLengthInput + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List + @L0.list + MAF.cat.A.A : L0.String + MAF.cat.A.B : L0.String + MAF.cat.A.C : L0.String + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.cat.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.zeros : SYSDYN.SysdynModelicaFunction + L0.HasDescription """zeros(n1, n2, n3, ...) + +Returns a zero array. + +Returns the n1 x n2 x n3 x ... Integer array with all elements equal to zero (ni >= 0).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.zeros.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List + @L0.list + MAF.zeros.n.n1 : L0.String + MAF.zeros.n.n2 : L0.String + MAF.zeros.n.n3 : L0.String + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.zeros.o : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n annotation(__OpenModelica_varArgs = true); + output Integer o[:];""" + + + +MAF.ones : SYSDYN.SysdynModelicaFunction + L0.HasDescription """ones(n1, n2, n3, ...) + +Returns an array with "1" elements. + +Return the n1 x n2 x n3 x ... Integer array with all elements equal to one (ni >=0 ).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.ones.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List + @L0.list + MAF.ones.n.n1 : L0.String + MAF.ones.n.n2 : L0.String + MAF.ones.n.n3 : L0.String + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.ones.o : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n annotation(__OpenModelica_varArgs = true); + output Integer o[:];""" + + + +MAF.fill : SYSDYN.SysdynModelicaFunction + L0.HasDescription """fill(s, n1, n2, n3, ...) + +Return a Real, Integer, Boolean or String array with all elements equal + +Returns the n1 x n2 x n3 x ... array with all elements equal to scalar or array expression s (ni >= 0). The returned array has the same type as s. Recursive definition: +fill(s,n1,n2,n3, ...) = fill(fill(s,n2,n3, ...), n1); +fill(s,n) = {s,s,..., s} + +Examples: +Real mr[2,2] = fill(-1,2,2); // = [-1,-1;-1,-1] +Boolean vb[3] = fill(true,3); // = {true, true, true}""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.fill.s : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.fill.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List + @L0.list + MAF.fill.n.n1 : L0.String + MAF.fill.n.n2 : L0.String + MAF.fill.n.n3 : L0.String + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.fill.o : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input OpenModelica.Internal.BuiltinType s; + input Integer n annotation(__OpenModelica_varArgs = true); + output OpenModelica.Internal.BuiltinType o[:];""" + + + +MAF.identity : SYSDYN.SysdynModelicaFunction + L0.HasDescription """identity(n) + +Returns the identity matrix of the desired size. + +Returns the n x n Integer identity matrix, with ones on the diagonal and zeros at the other places.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.identity.n : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Integer " + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.identity.outArray : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Integer " + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n; + output Integer[n,n] outArray;""" + + + +MAF.diagonal : SYSDYN.SysdynModelicaFunction + L0.HasDescription """diagonal(v) + +Returns a diagonal matrix. + +Returns a square matrix with the elements of vector v on the diagonal and all other elements zero.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.diagonal.v : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.diagonal.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.linspace : SYSDYN.SysdynModelicaFunction + L0.HasDescription """linspace(x1, x2, n) + +Return Real vector with equally spaced elements. + +Returns a Real vector with n equally spaced elements, such that +v[i] = x1 + (x2-x1)*(i-1)/(n-1) for 1 <= i <= n. +It is required that n >= 2. The arguments x1 and x2 shall be Real or Integer scalar expressions. + +Example: +Real v[:] = linspace(1,7,4); // = {1, 3, 5, 7}""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.linspace.x1 : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.linspace.x2 : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.linspace.n : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.linspace.v : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x1 "start"; + input Real x2 "end"; + input Integer n "number"; + output Real v[n];""" + + + +MAF.min : SYSDYN.SysdynModelicaFunction + L0.HasDescription """min(A) + +Returns the smallest element. + +Returns the smallest element of array expression A.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.min.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.min.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.max : SYSDYN.SysdynModelicaFunction + L0.HasDescription """max(A) + +Returns the largest element. + +Returns the largest element of array expression A.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.max.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.max.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.sum : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sum(A) +sum(e(i, ..., j) for i in u, ..., j in v) + +Returns the scalar sum. + +The first form returns the scalar sum of all the elements of array expression A: +A[1,...,1]+A[2,...,1]+....+A[end,...,1]+A[end,...,end] + +The second form is a reduction expression and returns the sum of the expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v: +e(u[1],...,v[1]) + e(u[2],...,v[1]) + ... + +e(u[end],...,v[1]) + ... + e(u[end],...,v[end]) +The type of sum(e(i, ..., j) for i in u, ..., j in v) is the same as the type of e(i,...j). + +Example: +sum(i for i in 1:10) // Gives 1+2+...+10=55 + // Read it as: compute the sum of i for i in the range 1 to 10.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.sum.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.sum.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.product : SYSDYN.SysdynModelicaFunction + L0.HasDescription """product(A) +product(e(i, ..., j) for i in u, ..., j in v) + +Returns the scalar product + +The first form returns the scalar product of all the elements of array expression A: +A[1,...,1]*A[2,...,1]*....*A[end,...,1]*A[end,...,end] + +The second form is a reduction expression and returns the product of the expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v: +e(u[1],...,v[1]) * e(u[2],...,v[1]) * ... * +e(u[end],...,v[1]) * ... * e(u[end],...,v[end]) +The type of product(e(i, ..., j) for i in u, ..., j in v) is the same as the type of e(i,...j). + +Example: +{product(j for j in 1:i) for i in 0:4} // = {1,1,2,6,24}""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.product.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.product.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.transpose : SYSDYN.SysdynModelicaFunction + L0.HasDescription """transpose(A) + +Transpose of a matrix or permutation of the first two dimensions of an array + +Permutes the first two dimensions of array A. It is an error, if array A does not have at least 2 dimensions.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.transpose.A : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.transpose.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.cross : SYSDYN.SysdynModelicaFunction + L0.HasDescription """cross(x,y) + +Return cross product of two vectors. + +Returns the 3-vector cross product of the 3-vectors x and y. +cross(x,y) = vector( [ x[2]*y[3]-x[3]*y[2]; + x[3]*y[1]-x[1]*y[3]; + x[1]*y[2]-x[2]*y[1] ] );""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.cross.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MAF.cross.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.cross.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MAF.skew : SYSDYN.SysdynModelicaFunction + L0.HasDescription """skew(x) + +Returns the skew matrix that is associated with a vector + +Returns the 3 x 3 skew symmetric matrix associated with a 3-vector, i.e., +cross(x,y) = skew(x)*y; +skew(x) = [ 0 , -x[3], x[2]; + x[3], 0 , -x[1]; + -x[2], x[1], 0 ];""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MAF.skew.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MAF.skew.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" diff --git a/org.simantics.sysdyn.ontology/graph/ModelicaFunctions.pgraph b/org.simantics.sysdyn.ontology/graph/ModelicaFunctions.pgraph new file mode 100644 index 00000000..21e2f7d2 --- /dev/null +++ b/org.simantics.sysdyn.ontology/graph/ModelicaFunctions.pgraph @@ -0,0 +1,726 @@ +L0 = +SYSDYN = + +MF = : SYSDYN.SysdynModelicaFunctionLibrary + + + +MF.abs : SYSDYN.SysdynModelicaFunction + L0.HasDescription """abs(v) + +Absolute value. + +Returns the absolute value of v. Is expanded into "(if v >= 0 then v else -v)" (into "noEvent(if v >= 0 then v else -v)", to be precise). Argument v needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.abs.v : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.abs.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.acos : SYSDYN.SysdynModelicaFunction + L0.HasDescription """acos(u) + +Inverse cosine. + +Returns the inverse of cos of u, with -1 <= u <= +1. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.acos.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.acos.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.asin : SYSDYN.SysdynModelicaFunction + L0.HasDescription """asin(u) + +Inverse sine. + +Returns the inverse of sin of u, with -1 <= u <= +1. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.asin.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.asin.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.atan : SYSDYN.SysdynModelicaFunction + L0.HasDescription """atan(u) + +Inverse tangent. + +Returns the inverse of tan of u, with -INF < u < INF. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.atan.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.atan.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.atan2 : SYSDYN.SysdynModelicaFunction + L0.HasDescription """atan2(u1,u2) + +Four quadrant inverse tangent. + +Returns y = atan2(u1,u2) such that tan(y) = u1/u2 and y is in the range -pi < y <= pi. u2 may be zero, provided u1 is not zero. Usually u1, u2 is provided in such a form that u1 = sin(y) and u2 = cos(y). Arguments u1 and u2 need to be Integer or Real expressions.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.atan2.u1 : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.atan2.u2 : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.atan2.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u1; + input Real u2; + output Real z;""" + + + +MF.ceil : SYSDYN.SysdynModelicaFunction + L0.HasDescription """ceil(x) + +Round a Real number towards plus infinity + +Returns the smallest integer not less than x (i.e. the closest integer above x).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.ceil.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.ceil.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + output Real y;""" + + + +MF.cos : SYSDYN.SysdynModelicaFunction + L0.HasDescription """cos(u) + +Cosine. + +Returns the cosine of u, with -INF < u < INF Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.ceil.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.ceil.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.cosh : SYSDYN.SysdynModelicaFunction + L0.HasDescription """cosh(u) + +Hyperbolic cosine. + +Returns the cosh of u, with -INF < u < INF. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.cosh.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.cosh.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.delay : SYSDYN.SysdynModelicaFunction + L0.HasDescription """delay(expr, delayTime, delayMax) +delay(expr, delayTime) + +Returns the value of expr at the time time-delayTime. The value of expr is returned when time <= time.start + delayTime. + +Returns "expr(time - delayTime)" for time > time.start + delayTime and "expr(time.start)" for time <= time.start + delayTime. The arguments, i.e., expr, delayTime and delayMax, need to be subtypes of Real. delayMax needs to be additionally a parameter expression. The following relation shall hold: 0 <= delayTime <= delayMax, otherwise an error occurs. If delayMax is not supplied in the argument list, delayTime need to be a parameter expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.delay.expr : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.delay.delayTime : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.delay.delayMax : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional true + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.delay.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.der : SYSDYN.SysdynModelicaFunction + L0.HasDescription """der(expr) + +Time derivative of expr. expr must be have continuous-time variability. + +The time derivative of expression expr. If the expression expr is a scalar it needs to be a subtype of Real. The expression and all its subexpressions must be differentiable. If expr is an array, the operator is applied to all elements of the array. For Real parameters and constants the result is a zero scalar or array of the same size as the variable. + +Example: + Real x, xdot1, xdot2; +equation + xdot1 = der(x); + xdot2 = der(x*sin(x));""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.der.expr : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.der.dexpr : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real expr(unit = "'p"); + output Real dexpr(unit = "'p/s");""" + + + +MF.div : SYSDYN.SysdynModelicaFunction + L0.HasDescription """div(x, y) + +Integer part of division of two Real numbers. + +Returns the algebraic quotient x/y with any fractional part discarted (also known as truncation toward zero). E.g. div(10,3) = 3.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.div.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.div.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.div.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.edge : SYSDYN.SysdynModelicaFunction + L0.HasDescription """edge(b) + +Indicate rising edge + +Returns true when the value of the boolean expression b changes. Expanded into (b and not pre(b)).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.edge.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Boolean" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.edge.edgeEvent : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Boolean" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Boolean b; + output Boolean edgeEvent;""" + + + +MF.exp : SYSDYN.SysdynModelicaFunction + L0.HasDescription """exp(u) + +Exponential, base e. + +Returns the base e exponential of u, with -INF < u < INF Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.exp.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.exp.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1"); + output Real y(unit = "1");""" + + + +MF.floor : SYSDYN.SysdynModelicaFunction + L0.HasDescription """floor(x) + +Round Real number towards minus infinity + +Returns the largest integer not greater than x (i.e. the closest integer below x).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.floor.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.floor.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + output Real y;""" + + + +MF.initial : SYSDYN.SysdynModelicaFunction + L0.HasDescription """initial() + +True during initialization. + +Returns true during the initialization phase and false otherwise.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.initial.isInitial : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Boolean" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ output Boolean isInitial;""" + + + +MF.log : SYSDYN.SysdynModelicaFunction + L0.HasDescription """log(u) + +Natural (base e) logarithm. + +Returns the base e logarithm of u, with u > 0. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.log.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.log.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1"); + output Real y(unit = "1");""" + + + +MF.log10 : SYSDYN.SysdynModelicaFunction + L0.HasDescription """log10(u) + +Base 10 logarithm. (u > 0) + +Returns the base 10 logarithm of u, with u > 0. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.log10.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.log10.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1"); + output Real y(unit = "1");""" + + + +MF.max : SYSDYN.SysdynModelicaFunction + L0.HasDescription """max(x,y) +max(e(i, ..., j) for i in u, ..., j in v) + +Returns the largest element. + +The first form returns the largest element of the scalars x and y. + +The second form is a reduction expression and returns the largest value of the scalar expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v + +Example: +max(i^2 for i in {3,7,6}) // = 49""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.max.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.max.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.max.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.min : SYSDYN.SysdynModelicaFunction + L0.HasDescription """min(x,y) +min(e(i, ..., j) for i in u, ..., j in v) + +Returns the smallest element. + +The first form returns the smallest element of the scalars x and y. + +The second form is a reduction expression and returns the smallest value of the scalar expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v + +Example: +min(i^2 for i in {3,7,6}) // = 9""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.min.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.min.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.min.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.mod : SYSDYN.SysdynModelicaFunction + L0.HasDescription """mod(x, y) + +Integer modulus of a division of two Real numbers. + +Returns the integer modulus of x/y: mod(x,y) = x - floor(x/y) * y.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.mod.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.mod.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.mod.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.noEvent : SYSDYN.SysdynModelicaFunction + L0.HasDescription """noEvent(expr) + +Turn off event triggering. + +noEvent around an expression causes the expression to NOT generate event. +Important: +If you want a condition to be checked only on time steps, use noEvent. +(e.g. if noEvent(value >= 1) then ... else ...)""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.noEvent.expr : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.noEvent.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.pre : SYSDYN.SysdynModelicaFunction + L0.HasDescription """pre(y) + +Returns the preceding value of y from time event that has occured before current time. + +Returns the "left limit" y(tpre) of variable y(t) at a time instant t. At an event instant, y(tpre) is the value of y after the last event iteration at time instant t. The pre operator can be applied if the following three conditions are fulfilled simultaneously: + * variable y is a subtype of a simple type + * y is a discrete-time expression + * the operator is not applied in a function class +The first value of pre(y) is determined in the initialization phase. +A new event is triggered if at least for one variable v "pre(v) <> v" after the active model equations are evaluated at an event instant. In this case the model is at once reevaluated. This evaluation sequence is called "event iteration". The integration is restarted, if for all v used in pre-operators the following condition holds: "pre(v) == v".""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.pre.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.pre.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + +MF.rem : SYSDYN.SysdynModelicaFunction + L0.HasDescription """rem(x, y) + +Integer remainder of the division of two Real numbers. + +Returns the integer remainder of x/y: rem(x,y) = x - div(x,y) * y.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.rem.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.rem.y : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.rem.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.sample : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sample(start, interval) + +Trigger time events. + +Returns true and triggers time events at times start + i * interval (i=0,1,...).""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.sample.start : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.sample.interval : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.sample.isSample : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Boolean" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ parameter input Real start(fixed = false); + parameter input Real interval(fixed = false); + output Boolean isSample;""" + + + +MF.semiLinear : SYSDYN.SysdynModelicaFunction + L0.HasDescription """semiLinear(x, positiveSlope, negativeSlope) + +Returns "if x >= 0 then positiveSlope*x else negativeSlope*x" and handle x=0 in a meaningful way. + +Returns "if x >= 0 then positiveSlope*x else negativeSlope*x". In some situations, equations with the semiLinear function become underdetermined if the first argument (x) becomes zero, i.e., there are an infinite number of solutions. It is recommended that the following rules are used to transform the equations during the translation phase in order to select one meaningful solution in such cases: + +Rule 1: The equations +y = semiLinear(x, sa, s1); +y = semiLinear(x, s1, s2); +y = semiLinear(x, s2, s3); + ... +y = semiLinear(x, sN, sb); +may be replaced by +s1 = if x >= 0 then sa else sb +s2 = s1; +s3 = s2; + ... +sN = sN-1; +y = semiLinear(x, sa, sb); + +Rule 2: The equations +x = 0; +y = 0; +y = semiLinear(x, sa, sb); +may be replaced by +x = 0 +y = 0; +sa = sb;""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.semiLinear.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.semiLinear.positiveSlope : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.semiLinear.negativeSlope : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.semiLinear.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + input Real positiveSlope; + input Real negativeSlope; + output Real result;""" + + + +MF.sign : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sign(v) + +Sign function of a Real or Integer number. + +Returns -1 if v is negative, 1 if v is positive. Expanded into "(if v > 0 then 1 else if v < 0 then -1 else 0)".""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.sign.v : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.sign.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real v; + output Integer result;""" + + + +MF.sin : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sin(u) + +Sine. + +Returns the sine of u, with -INF < u < INF. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.sin.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.sin.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + output Real y;""" + + + +MF.sinh : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sinh(u) + +Hyperbolic sine. + +Returns the sinh of u, with -INF < u < INF. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.sinh.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.sinh.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + output Real y;""" + + + +MF.smooth : SYSDYN.SysdynModelicaFunction + L0.HasDescription """smooth(p, expr) + +Indicate smoothness of expression. + +If p>=0 smooth(p, expr) returns expr and states that expr is p times continuously differentiable, i.e.: expr is continuous in all real variables appearing in the expression and all partial derivatives with respect to all appearing real variables exist and are continuous up to order p. +The only allowed types for expr in smooth are: real expressions, arrays of allowed expressions, and records containing only components of allowed expressions.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.smooth.p : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + MF.smooth.expr : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.smooth.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + + + +MF.sqrt : SYSDYN.SysdynModelicaFunction + L0.HasDescription """sqrt(v) + +Square root. + +Square root of v. The value of v must be greater or equal to 0 or an assertion error occurs.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.sqrt.v : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.sqrt.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real v(unit = "'p"); + output Real y(unit = "'p(1/2)");""" + + + +MF.tan : SYSDYN.SysdynModelicaFunction + L0.HasDescription """tan(u) + +Tangent. + +Returns the tangent of u, with -INF < u < INF (if u is a multiple of (2n-1)*pi/2, y = tan(u) is +/- infinity). Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.tan.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.tan.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u; + output Real y;""" + + + +MF.tanh : SYSDYN.SysdynModelicaFunction + L0.HasDescription """tanh(u) + +Hyperbolic tangent. + +Returns the tanh of u, with -INF < u < INF. Argument u needs to be an Integer or Real expression.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + MF.tanh.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.tanh.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x; + output Real y;""" + + + +MF.terminal : SYSDYN.SysdynModelicaFunction + L0.HasDescription """terminal() + +True after successful analysis + +Returns true at the end of a successful simulation.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + MF.terminal.isTerminal : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Boolean" + SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ output Boolean isTerminal;""" + \ No newline at end of file diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index 11bd59fe..12ada0e5 100644 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -293,7 +293,10 @@ SYSDYN.Redeclaration -- SYSDYN.SysdynModelicaFunction.modelicaFunctionCode --> L0.String -- SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface --> L0.String -- SYSDYN.SysdynModelicaFunction.inputs --> L0.List -- SYSDYN.SysdynModelicaFunction.outputs --> L0.List -- SYSDYN.ExternalFunctionFile.externalFile --> L0.ByteArray -- SYSDYN.SysdynModelicaFunction.definition --> L0.String -- SYSDYN.SysdynModelicaFunction.optional --> L0.Boolean -- SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels --> L0.List FL = : SYSDYN.SysdynModelicaFunctionLibrary + + FL.minmax : SYSDYN.SysdynModelicaFunction - L0.HasDescription "Limits the result of an equation to between the given minimum and maximum values." + L0.HasDescription """minmax(expression, minimum, maximum) + +Limits the result of an equation to between the given minimum and maximum values.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + FL.minmax.expression : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + FL.minmax.minimum : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + FL.minmax.maximum : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + FL.minmax.result : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real expression; input Real minimum; input Real maximum; @@ -13,29 +32,82 @@ algorithm result := min(maximum, max(minimum, expression));""" + FL.xidz : SYSDYN.SysdynModelicaFunction - L0.HasDescription "X if divided by zero" - SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; - input Real b; - input Real x; - output Real z; + L0.HasDescription """xidz(divident, divisor, x) + +x if divided by zero, divident/divisor otherwise""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + FL.xidz.divident : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + FL.xidz.divisor : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + FL.xidz.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "Result if divisor = 0" + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + FL.xidz.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real divident; + input Real divisor; + input Real x; + output Real z; algorithm - if b > 0.0 or b < 0.0 then - z := a / b; - else - z := x; - end if;""" + if divisor > 0.0 or divisor < 0.0 then + z := divident / divisor; + else + z := x; + end if;""" + + FL.zidz : SYSDYN.SysdynModelicaFunction - L0.HasDescription "Zero if divided by zero" - SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; - input Real b; + L0.HasDescription "zidz(divident, divisor) + +Zero if divided by zero, divident/divisor otherwise" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + FL.zidz.divident : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + FL.zidz.divisor : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + FL.zidz.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real divident; + input Real divisor; output Real z; algorithm - z := xidz(a,b,0.0);""" + z := xidz(divident,divisor,0.0);""" + + FL.interpolate : SYSDYN.SysdynModelicaFunction - L0.HasDescription "Interpolate function for two-dimensional table" + L0.HasDescription """interpolate(u, table) + +Interpolate function for two-dimensional table""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + FL.interpolate.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "input value (first column of table)" + FL.interpolate.table : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "table to be interpolated" + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + FL.interpolate.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ 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)"; @@ -43,8 +115,29 @@ algorithm y := interpolateFull(u, table, 2);""" + FL.interpolateFull : SYSDYN.SysdynModelicaFunction - L0.HasDescription "The full interpolate function" + L0.HasDescription """interpolateFull(u, table, icol) + +The full interpolate function""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + FL.interpolateFull.u : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "input value (first column of table)" + FL.interpolateFull.table : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "table to be interpolated" + FL.interpolateFull.icol : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Integer" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.definition "column of table to be interpolated" + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + FL.interpolateFull.y : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ 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"; diff --git a/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph b/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph index 3e097bc5..f40dfc05 100644 --- a/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph +++ b/org.simantics.sysdyn.ontology/graph/VensimFunctions.pgraph @@ -20,9 +20,27 @@ algorithm z := if time < parameterDTime then init else delay(inputVar, parameterDTime);""" */ + + VF.IFTHENELSE : SYSDYN.SysdynModelicaFunction - L0.HasDescription """IF THEN ELSE( cond , ontrue , onfalse ) - -> if cond then ontrue else onfalse""" + L0.HasDescription """IFTHENELSE( cond , ontrue , onfalse ) + +Returns ontrue if cond, otherwise onfalse""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.IFTHENELSE.cond : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.IFTHENELSE.ontrue : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.IFTHENELSE.onfalse : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.IFTHENELSE.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Boolean cond; input Real ontrue; input Real onfalse; @@ -30,27 +48,75 @@ VF.IFTHENELSE : SYSDYN.SysdynModelicaFunction algorithm z := if cond then ontrue else onfalse;""" + + VF.MAX : SYSDYN.SysdynModelicaFunction L0.HasDescription """MAX(a, b) - Returns the larger of a and b.""" + +Returns the larger of a and b.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.MAX.a : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.MAX.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.MAX.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; input Real b; output Real z; algorithm z := if a > b then a else b;""" + + VF.MIN : SYSDYN.SysdynModelicaFunction L0.HasDescription """MIN(a, b) - Returns the smaller of a and b.""" + +Returns the smaller of a and b.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.MIN.a : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.MIN.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.MIN.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; input Real b; output Real z; algorithm z := if a < b then a else b;""" + + VF.XIDZ : SYSDYN.SysdynModelicaFunction L0.HasDescription """XIDZ(a, b, x) - x if divided by zero, a/b otherwise.""" + +x if divided by zero, a/b otherwise.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.XIDZ.a : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.XIDZ.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.XIDZ.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.XIDZ.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; input Real b; input Real x; @@ -58,43 +124,112 @@ VF.XIDZ : SYSDYN.SysdynModelicaFunction algorithm z := xidz(a, b, x);""" + + VF.ZIDZ : SYSDYN.SysdynModelicaFunction - L0.HasDescription """XIDZ(a, b) - Zero if divided by zero, a/b otherwise.""" + L0.HasDescription """ZIDZ(a, b) + +Zero if divided by zero, a/b otherwise.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.ZIDZ.a : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.ZIDZ.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.ZIDZ.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; input Real b; output Real z; algorithm z := zidz(a, b);""" + + VF.ABS : SYSDYN.SysdynModelicaFunction L0.HasDescription """ABS(x) - Returns the absolute value of x.""" + +Returns the absolute value of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.ABS.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.ABS.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := abs(x);""" + + VF.SQRT : SYSDYN.SysdynModelicaFunction L0.HasDescription """SQRT(x) - Returns the square root of x.""" + +Returns the square root of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.SQRT.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.SQRT.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := sqrt(x);""" + + VF.MODULO : SYSDYN.SysdynModelicaFunction L0.HasDescription """MODULO(a, b) - Returns the remainder when a is divided by b. """ + +Returns the remainder when a is divided by b. """ + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.MODULO.a : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.MODULO.b : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.MODULO.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a; input Real b; output Real z; algorithm z := mod(a, b);""" + + VF.PULSE : SYSDYN.SysdynModelicaFunction L0.HasDescription """PULSE(start, width) - Returns 1.0 starting at time start and lasting for interval width. 0.0 is returned at other times.""" + +Returns 1.0 starting at time start and lasting for interval width. 0.0 is returned at other times.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.PULSE.start : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.PULSE.width : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.PULSE.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real start; input Real width; input Real t = time; @@ -102,9 +237,27 @@ VF.PULSE : SYSDYN.SysdynModelicaFunction algorithm z := if t >= start and (t - start) <= width then 1.0 else 0.0;""" + + VF.RAMP : SYSDYN.SysdynModelicaFunction L0.HasDescription """RAMP(slope, startTime, endTime) - Returns 0 until the start time and then slopes upward until end time and then holds constant.""" + +Returns 0 until the start time and then slopes upward until end time and then holds constant.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.RAMP.slope : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.RAMP.startTime : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.RAMP.endTime : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.RAMP.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real slope; input Real startTime; input Real endTime; @@ -120,9 +273,24 @@ algorithm else 0;""" + + VF.STEP : SYSDYN.SysdynModelicaFunction L0.HasDescription """STEP(height, stepTime) - Returns 0.0 until the step time and then returns height.""" + +Returns 0.0 until the step time and then returns height.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.STEP.height : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + VF.STEP.stepTime : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.STEP.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real height; input Real stepTime; input Real t = time; @@ -130,68 +298,165 @@ VF.STEP : SYSDYN.SysdynModelicaFunction algorithm z := if t >= stepTime then height else 0.0;""" + + /* Continuous built-in common mathematical functions */ VF.EXP : SYSDYN.SysdynModelicaFunction - L0.HasDescription """ - """ + L0.HasDescription """EXP(x) + +Exponential, base e.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.EXP.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.EXP.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := exp(x);""" + + VF.SIN : SYSDYN.SysdynModelicaFunction L0.HasDescription """SIN(x) - Returns the sine of x.""" + +Returns the sine of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.SIN.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.SIN.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := sin(x);""" + + VF.SINH : SYSDYN.SysdynModelicaFunction L0.HasDescription """SINH(x) - Returns the hyperbolic sine of x.""" + +Returns the hyperbolic sine of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.SINH.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.SINH.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := sinh(x);""" + + VF.COS : SYSDYN.SysdynModelicaFunction L0.HasDescription """COS(x) - Returns the cosine of x.""" + +Returns the cosine of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.COS.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.COS.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := cos(x);""" + + VF.COSH : SYSDYN.SysdynModelicaFunction L0.HasDescription """COSH(x) - Returns the hyperbolic cosine of x.""" + +Returns the hyperbolic cosine of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.COSH.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.COSH.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := cosh(x);""" + + VF.TAN : SYSDYN.SysdynModelicaFunction L0.HasDescription """TAN(x) - Returns the tangent of x.""" + +Returns the tangent of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.TAN.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.TAN.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := tan(x);""" + + VF.TANH : SYSDYN.SysdynModelicaFunction L0.HasDescription """TANH(x) - Returns the hyperbolic tangent of x.""" + +Returns the hyperbolic tangent of x.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.TANH.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.TANH.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm z := tanh(x);""" + + VF.LN : SYSDYN.SysdynModelicaFunction L0.HasDescription """LN(x) - Returns the natural logarithm of x. - In modelica log(x) is the natural logarighm and log10(x) is base 10 logarighm.""" + +Returns the natural logarithm of x. + +In modelica log(x) is the natural logarighm and log10(x) is base 10 logarighm.""" + SYSDYN.SysdynModelicaFunction.inputs _ : L0.List + @L0.list + VF.LN.x : SYSDYN.SysdynModelicaFunction.Input + SYSDYN.Variable.type "Real" + SYSDYN.SysdynModelicaFunction.optional false + SYSDYN.SysdynModelicaFunction.outputs _ : L0.List + @L0.list + VF.LN.z : SYSDYN.SysdynModelicaFunction.Output + SYSDYN.Variable.type "Real" SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x; output Real z; algorithm 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 e4487707..3b6a342f 100644 --- a/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java +++ b/org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java @@ -22,31 +22,290 @@ public class SysdynResource { public final Resource Bottom; public final Resource Browser; public final Resource Built$in_Functions; + public final Resource Built$in_Functions_Modelica_Array_Functions; + public final Resource Built$in_Functions_Modelica_Array_Functions_array; + public final Resource Built$in_Functions_Modelica_Array_Functions_array_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_array_A_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_array_A_B; + public final Resource Built$in_Functions_Modelica_Array_Functions_array_A_C; + public final Resource Built$in_Functions_Modelica_Array_Functions_array_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_A_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_A_B; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_A_C; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_k; + public final Resource Built$in_Functions_Modelica_Array_Functions_cat_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_cross; + public final Resource Built$in_Functions_Modelica_Array_Functions_cross_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_cross_x; + public final Resource Built$in_Functions_Modelica_Array_Functions_cross_y; + public final Resource Built$in_Functions_Modelica_Array_Functions_diagonal; + public final Resource Built$in_Functions_Modelica_Array_Functions_diagonal_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_diagonal_v; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_n; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_n_n1; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_n_n2; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_n_n3; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_o; + public final Resource Built$in_Functions_Modelica_Array_Functions_fill_s; + public final Resource Built$in_Functions_Modelica_Array_Functions_identity; + public final Resource Built$in_Functions_Modelica_Array_Functions_identity_n; + public final Resource Built$in_Functions_Modelica_Array_Functions_identity_outArray; + public final Resource Built$in_Functions_Modelica_Array_Functions_linspace; + public final Resource Built$in_Functions_Modelica_Array_Functions_linspace_n; + public final Resource Built$in_Functions_Modelica_Array_Functions_linspace_v; + public final Resource Built$in_Functions_Modelica_Array_Functions_linspace_x1; + public final Resource Built$in_Functions_Modelica_Array_Functions_linspace_x2; + public final Resource Built$in_Functions_Modelica_Array_Functions_matrix; + public final Resource Built$in_Functions_Modelica_Array_Functions_matrix_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_matrix_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_max; + public final Resource Built$in_Functions_Modelica_Array_Functions_max_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_max_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_min; + public final Resource Built$in_Functions_Modelica_Array_Functions_min_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_min_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_ndims; + public final Resource Built$in_Functions_Modelica_Array_Functions_ndims_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_ndims_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones_n; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones_n_n1; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones_n_n2; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones_n_n3; + public final Resource Built$in_Functions_Modelica_Array_Functions_ones_o; + public final Resource Built$in_Functions_Modelica_Array_Functions_product; + public final Resource Built$in_Functions_Modelica_Array_Functions_product_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_product_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_scalar; + public final Resource Built$in_Functions_Modelica_Array_Functions_scalar_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_scalar_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_size; + public final Resource Built$in_Functions_Modelica_Array_Functions_size_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_size_i; + public final Resource Built$in_Functions_Modelica_Array_Functions_size_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_skew; + public final Resource Built$in_Functions_Modelica_Array_Functions_skew_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_skew_x; + public final Resource Built$in_Functions_Modelica_Array_Functions_sum; + public final Resource Built$in_Functions_Modelica_Array_Functions_sum_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_sum_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_transpose; + public final Resource Built$in_Functions_Modelica_Array_Functions_transpose_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_transpose_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_vector; + public final Resource Built$in_Functions_Modelica_Array_Functions_vector_A; + public final Resource Built$in_Functions_Modelica_Array_Functions_vector_result; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros_n; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros_n_n1; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros_n_n2; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros_n_n3; + public final Resource Built$in_Functions_Modelica_Array_Functions_zeros_o; + public final Resource Built$in_Functions_Modelica_Functions; + public final Resource Built$in_Functions_Modelica_Functions_abs; + public final Resource Built$in_Functions_Modelica_Functions_abs_result; + public final Resource Built$in_Functions_Modelica_Functions_abs_v; + public final Resource Built$in_Functions_Modelica_Functions_acos; + public final Resource Built$in_Functions_Modelica_Functions_acos_u; + public final Resource Built$in_Functions_Modelica_Functions_acos_y; + public final Resource Built$in_Functions_Modelica_Functions_asin; + public final Resource Built$in_Functions_Modelica_Functions_asin_u; + public final Resource Built$in_Functions_Modelica_Functions_asin_y; + public final Resource Built$in_Functions_Modelica_Functions_atan; + public final Resource Built$in_Functions_Modelica_Functions_atan2; + public final Resource Built$in_Functions_Modelica_Functions_atan2_u1; + public final Resource Built$in_Functions_Modelica_Functions_atan2_u2; + public final Resource Built$in_Functions_Modelica_Functions_atan2_y; + public final Resource Built$in_Functions_Modelica_Functions_atan_u; + public final Resource Built$in_Functions_Modelica_Functions_atan_y; + public final Resource Built$in_Functions_Modelica_Functions_ceil; + public final Resource Built$in_Functions_Modelica_Functions_ceil_u; + public final Resource Built$in_Functions_Modelica_Functions_ceil_x; + public final Resource Built$in_Functions_Modelica_Functions_ceil_y; + public final Resource Built$in_Functions_Modelica_Functions_cos; + public final Resource Built$in_Functions_Modelica_Functions_cosh; + public final Resource Built$in_Functions_Modelica_Functions_cosh_u; + public final Resource Built$in_Functions_Modelica_Functions_cosh_y; + public final Resource Built$in_Functions_Modelica_Functions_delay; + public final Resource Built$in_Functions_Modelica_Functions_delay_delayMax; + public final Resource Built$in_Functions_Modelica_Functions_delay_delayTime; + public final Resource Built$in_Functions_Modelica_Functions_delay_expr; + public final Resource Built$in_Functions_Modelica_Functions_delay_result; + public final Resource Built$in_Functions_Modelica_Functions_der; + public final Resource Built$in_Functions_Modelica_Functions_der_dexpr; + public final Resource Built$in_Functions_Modelica_Functions_der_expr; + public final Resource Built$in_Functions_Modelica_Functions_div; + public final Resource Built$in_Functions_Modelica_Functions_div_result; + public final Resource Built$in_Functions_Modelica_Functions_div_x; + public final Resource Built$in_Functions_Modelica_Functions_div_y; + public final Resource Built$in_Functions_Modelica_Functions_edge; + public final Resource Built$in_Functions_Modelica_Functions_edge_b; + public final Resource Built$in_Functions_Modelica_Functions_edge_edgeEvent; + public final Resource Built$in_Functions_Modelica_Functions_exp; + public final Resource Built$in_Functions_Modelica_Functions_exp_u; + public final Resource Built$in_Functions_Modelica_Functions_exp_y; + public final Resource Built$in_Functions_Modelica_Functions_floor; + public final Resource Built$in_Functions_Modelica_Functions_floor_x; + public final Resource Built$in_Functions_Modelica_Functions_floor_y; + public final Resource Built$in_Functions_Modelica_Functions_initial; + public final Resource Built$in_Functions_Modelica_Functions_initial_isInitial; + public final Resource Built$in_Functions_Modelica_Functions_log; + public final Resource Built$in_Functions_Modelica_Functions_log10; + public final Resource Built$in_Functions_Modelica_Functions_log10_u; + public final Resource Built$in_Functions_Modelica_Functions_log10_y; + public final Resource Built$in_Functions_Modelica_Functions_log_u; + public final Resource Built$in_Functions_Modelica_Functions_log_y; + public final Resource Built$in_Functions_Modelica_Functions_max; + public final Resource Built$in_Functions_Modelica_Functions_max_result; + public final Resource Built$in_Functions_Modelica_Functions_max_x; + public final Resource Built$in_Functions_Modelica_Functions_max_y; + public final Resource Built$in_Functions_Modelica_Functions_min; + public final Resource Built$in_Functions_Modelica_Functions_min_result; + public final Resource Built$in_Functions_Modelica_Functions_min_x; + public final Resource Built$in_Functions_Modelica_Functions_min_y; + public final Resource Built$in_Functions_Modelica_Functions_mod; + public final Resource Built$in_Functions_Modelica_Functions_mod_result; + public final Resource Built$in_Functions_Modelica_Functions_mod_x; + public final Resource Built$in_Functions_Modelica_Functions_mod_y; + public final Resource Built$in_Functions_Modelica_Functions_noEvent; + public final Resource Built$in_Functions_Modelica_Functions_noEvent_expr; + public final Resource Built$in_Functions_Modelica_Functions_noEvent_result; + public final Resource Built$in_Functions_Modelica_Functions_pre; + public final Resource Built$in_Functions_Modelica_Functions_pre_result; + public final Resource Built$in_Functions_Modelica_Functions_pre_y; + public final Resource Built$in_Functions_Modelica_Functions_rem; + public final Resource Built$in_Functions_Modelica_Functions_rem_result; + public final Resource Built$in_Functions_Modelica_Functions_rem_x; + public final Resource Built$in_Functions_Modelica_Functions_rem_y; + public final Resource Built$in_Functions_Modelica_Functions_sample; + public final Resource Built$in_Functions_Modelica_Functions_sample_interval; + public final Resource Built$in_Functions_Modelica_Functions_sample_isSample; + public final Resource Built$in_Functions_Modelica_Functions_sample_start; + public final Resource Built$in_Functions_Modelica_Functions_semiLinear; + public final Resource Built$in_Functions_Modelica_Functions_semiLinear_negativeSlope; + public final Resource Built$in_Functions_Modelica_Functions_semiLinear_positiveSlope; + public final Resource Built$in_Functions_Modelica_Functions_semiLinear_result; + public final Resource Built$in_Functions_Modelica_Functions_semiLinear_x; + public final Resource Built$in_Functions_Modelica_Functions_sign; + public final Resource Built$in_Functions_Modelica_Functions_sign_result; + public final Resource Built$in_Functions_Modelica_Functions_sign_v; + public final Resource Built$in_Functions_Modelica_Functions_sin; + public final Resource Built$in_Functions_Modelica_Functions_sin_u; + public final Resource Built$in_Functions_Modelica_Functions_sin_y; + public final Resource Built$in_Functions_Modelica_Functions_sinh; + public final Resource Built$in_Functions_Modelica_Functions_sinh_u; + public final Resource Built$in_Functions_Modelica_Functions_sinh_y; + public final Resource Built$in_Functions_Modelica_Functions_smooth; + public final Resource Built$in_Functions_Modelica_Functions_smooth_expr; + public final Resource Built$in_Functions_Modelica_Functions_smooth_p; + public final Resource Built$in_Functions_Modelica_Functions_smooth_result; + public final Resource Built$in_Functions_Modelica_Functions_sqrt; + public final Resource Built$in_Functions_Modelica_Functions_sqrt_v; + public final Resource Built$in_Functions_Modelica_Functions_sqrt_y; + public final Resource Built$in_Functions_Modelica_Functions_tan; + public final Resource Built$in_Functions_Modelica_Functions_tan_u; + public final Resource Built$in_Functions_Modelica_Functions_tan_y; + public final Resource Built$in_Functions_Modelica_Functions_tanh; + public final Resource Built$in_Functions_Modelica_Functions_tanh_u; + public final Resource Built$in_Functions_Modelica_Functions_tanh_y; + public final Resource Built$in_Functions_Modelica_Functions_terminal; + public final Resource Built$in_Functions_Modelica_Functions_terminal_isTerminal; public final Resource Built$in_Functions_Vensim_Functions; public final Resource Built$in_Functions_Vensim_Functions_ABS; + public final Resource Built$in_Functions_Vensim_Functions_ABS_x; + public final Resource Built$in_Functions_Vensim_Functions_ABS_z; public final Resource Built$in_Functions_Vensim_Functions_COS; public final Resource Built$in_Functions_Vensim_Functions_COSH; + public final Resource Built$in_Functions_Vensim_Functions_COSH_x; + public final Resource Built$in_Functions_Vensim_Functions_COSH_z; + public final Resource Built$in_Functions_Vensim_Functions_COS_x; + public final Resource Built$in_Functions_Vensim_Functions_COS_z; 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_IFTHENELSE; + public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_cond; + public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_onfalse; + public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_ontrue; + public final Resource Built$in_Functions_Vensim_Functions_IFTHENELSE_z; public final Resource Built$in_Functions_Vensim_Functions_LN; + public final Resource Built$in_Functions_Vensim_Functions_LN_x; + public final Resource Built$in_Functions_Vensim_Functions_LN_z; public final Resource Built$in_Functions_Vensim_Functions_MAX; + public final Resource Built$in_Functions_Vensim_Functions_MAX_a; + public final Resource Built$in_Functions_Vensim_Functions_MAX_b; + public final Resource Built$in_Functions_Vensim_Functions_MAX_z; public final Resource Built$in_Functions_Vensim_Functions_MIN; + public final Resource Built$in_Functions_Vensim_Functions_MIN_a; + public final Resource Built$in_Functions_Vensim_Functions_MIN_b; + public final Resource Built$in_Functions_Vensim_Functions_MIN_z; public final Resource Built$in_Functions_Vensim_Functions_MODULO; + public final Resource Built$in_Functions_Vensim_Functions_MODULO_a; + public final Resource Built$in_Functions_Vensim_Functions_MODULO_b; + public final Resource Built$in_Functions_Vensim_Functions_MODULO_z; public final Resource Built$in_Functions_Vensim_Functions_PULSE; + public final Resource Built$in_Functions_Vensim_Functions_PULSE_start; + public final Resource Built$in_Functions_Vensim_Functions_PULSE_width; + public final Resource Built$in_Functions_Vensim_Functions_PULSE_z; public final Resource Built$in_Functions_Vensim_Functions_RAMP; + public final Resource Built$in_Functions_Vensim_Functions_RAMP_endTime; + public final Resource Built$in_Functions_Vensim_Functions_RAMP_slope; + public final Resource Built$in_Functions_Vensim_Functions_RAMP_startTime; + public final Resource Built$in_Functions_Vensim_Functions_RAMP_z; public final Resource Built$in_Functions_Vensim_Functions_SIN; public final Resource Built$in_Functions_Vensim_Functions_SINH; + public final Resource Built$in_Functions_Vensim_Functions_SINH_x; + public final Resource Built$in_Functions_Vensim_Functions_SINH_z; + public final Resource Built$in_Functions_Vensim_Functions_SIN_x; + public final Resource Built$in_Functions_Vensim_Functions_SIN_z; public final Resource Built$in_Functions_Vensim_Functions_SQRT; + public final Resource Built$in_Functions_Vensim_Functions_SQRT_x; + public final Resource Built$in_Functions_Vensim_Functions_SQRT_z; public final Resource Built$in_Functions_Vensim_Functions_STEP; + public final Resource Built$in_Functions_Vensim_Functions_STEP_height; + public final Resource Built$in_Functions_Vensim_Functions_STEP_stepTime; + public final Resource Built$in_Functions_Vensim_Functions_STEP_z; public final Resource Built$in_Functions_Vensim_Functions_TAN; public final Resource Built$in_Functions_Vensim_Functions_TANH; + public final Resource Built$in_Functions_Vensim_Functions_TANH_x; + public final Resource Built$in_Functions_Vensim_Functions_TANH_z; + public final Resource Built$in_Functions_Vensim_Functions_TAN_x; + public final Resource Built$in_Functions_Vensim_Functions_TAN_z; public final Resource Built$in_Functions_Vensim_Functions_XIDZ; + public final Resource Built$in_Functions_Vensim_Functions_XIDZ_a; + public final Resource Built$in_Functions_Vensim_Functions_XIDZ_b; + public final Resource Built$in_Functions_Vensim_Functions_XIDZ_x; + public final Resource Built$in_Functions_Vensim_Functions_XIDZ_z; public final Resource Built$in_Functions_Vensim_Functions_ZIDZ; + public final Resource Built$in_Functions_Vensim_Functions_ZIDZ_a; + public final Resource Built$in_Functions_Vensim_Functions_ZIDZ_b; + public final Resource Built$in_Functions_Vensim_Functions_ZIDZ_z; public final Resource Built$in_Functions_interpolate; public final Resource Built$in_Functions_interpolateFull; + public final Resource Built$in_Functions_interpolateFull_icol; + public final Resource Built$in_Functions_interpolateFull_table; + public final Resource Built$in_Functions_interpolateFull_u; + public final Resource Built$in_Functions_interpolateFull_y; + public final Resource Built$in_Functions_interpolate_table; + public final Resource Built$in_Functions_interpolate_u; + public final Resource Built$in_Functions_interpolate_y; public final Resource Built$in_Functions_minmax; + public final Resource Built$in_Functions_minmax_expression; + public final Resource Built$in_Functions_minmax_maximum; + public final Resource Built$in_Functions_minmax_minimum; + public final Resource Built$in_Functions_minmax_result; public final Resource Built$in_Functions_xidz; + public final Resource Built$in_Functions_xidz_divident; + public final Resource Built$in_Functions_xidz_divisor; + public final Resource Built$in_Functions_xidz_x; + public final Resource Built$in_Functions_xidz_z; public final Resource Built$in_Functions_zidz; + public final Resource Built$in_Functions_zidz_divident; + public final Resource Built$in_Functions_zidz_divisor; + public final Resource Built$in_Functions_zidz_z; public final Resource Center; public final Resource Cloud; public final Resource CloudSymbol; @@ -281,8 +540,24 @@ public class SysdynResource { public final Resource SysdynModel_variableFilter_Inverse; public final Resource SysdynModelicaFunction; public final Resource SysdynModelicaFunctionLibrary; + public final Resource SysdynModelicaFunction_Input; + public final Resource SysdynModelicaFunction_InterfaceVariable; + public final Resource SysdynModelicaFunction_Output; + public final Resource SysdynModelicaFunction_VariableLengthInput; + public final Resource SysdynModelicaFunction_VariableLengthInput_shownLabels; + public final Resource SysdynModelicaFunction_VariableLengthInput_shownLabels_Inverse; + public final Resource SysdynModelicaFunction_definition; + public final Resource SysdynModelicaFunction_definition_Inverse; + public final Resource SysdynModelicaFunction_inputs; + public final Resource SysdynModelicaFunction_inputs_Inverse; public final Resource SysdynModelicaFunction_modelicaFunctionCode; public final Resource SysdynModelicaFunction_modelicaFunctionCode_Inverse; + public final Resource SysdynModelicaFunction_modelicaFunctionInterface; + public final Resource SysdynModelicaFunction_modelicaFunctionInterface_Inverse; + public final Resource SysdynModelicaFunction_optional; + public final Resource SysdynModelicaFunction_optional_Inverse; + public final Resource SysdynModelicaFunction_outputs; + public final Resource SysdynModelicaFunction_outputs_Inverse; public final Resource SysdynModuleLibrary; public final Resource SysdynOperationBrowser; public final Resource SysdynTerminal; @@ -394,31 +669,290 @@ public class SysdynResource { public static final String Bottom = "http://www.simantics.org/Sysdyn-1.1/Bottom"; public static final String Browser = "http://www.simantics.org/Sysdyn-1.1/Browser"; public static final String Built$in_Functions = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions"; + public static final String Built$in_Functions_Modelica_Array_Functions = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions"; + public static final String Built$in_Functions_Modelica_Array_Functions_array = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array"; + public static final String Built$in_Functions_Modelica_Array_Functions_array_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_array_A_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array/A/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_array_A_B = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array/A/B"; + public static final String Built$in_Functions_Modelica_Array_Functions_array_A_C = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array/A/C"; + public static final String Built$in_Functions_Modelica_Array_Functions_array_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/array/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_A_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/A/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_A_B = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/A/B"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_A_C = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/A/C"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_k = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/k"; + public static final String Built$in_Functions_Modelica_Array_Functions_cat_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cat/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_cross = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cross"; + public static final String Built$in_Functions_Modelica_Array_Functions_cross_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cross/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_cross_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cross/x"; + public static final String Built$in_Functions_Modelica_Array_Functions_cross_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/cross/y"; + public static final String Built$in_Functions_Modelica_Array_Functions_diagonal = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/diagonal"; + public static final String Built$in_Functions_Modelica_Array_Functions_diagonal_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/diagonal/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_diagonal_v = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/diagonal/v"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_n = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/n"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_n_n1 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/n/n1"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_n_n2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/n/n2"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_n_n3 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/n/n3"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_o = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/o"; + public static final String Built$in_Functions_Modelica_Array_Functions_fill_s = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/fill/s"; + public static final String Built$in_Functions_Modelica_Array_Functions_identity = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/identity"; + public static final String Built$in_Functions_Modelica_Array_Functions_identity_n = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/identity/n"; + public static final String Built$in_Functions_Modelica_Array_Functions_identity_outArray = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/identity/outArray"; + public static final String Built$in_Functions_Modelica_Array_Functions_linspace = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/linspace"; + public static final String Built$in_Functions_Modelica_Array_Functions_linspace_n = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/linspace/n"; + public static final String Built$in_Functions_Modelica_Array_Functions_linspace_v = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/linspace/v"; + public static final String Built$in_Functions_Modelica_Array_Functions_linspace_x1 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/linspace/x1"; + public static final String Built$in_Functions_Modelica_Array_Functions_linspace_x2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/linspace/x2"; + public static final String Built$in_Functions_Modelica_Array_Functions_matrix = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/matrix"; + public static final String Built$in_Functions_Modelica_Array_Functions_matrix_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/matrix/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_matrix_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/matrix/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_max = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/max"; + public static final String Built$in_Functions_Modelica_Array_Functions_max_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/max/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_max_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/max/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_min = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/min"; + public static final String Built$in_Functions_Modelica_Array_Functions_min_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/min/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_min_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/min/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_ndims = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ndims"; + public static final String Built$in_Functions_Modelica_Array_Functions_ndims_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ndims/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_ndims_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ndims/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones_n = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones/n"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones_n_n1 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones/n/n1"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones_n_n2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones/n/n2"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones_n_n3 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones/n/n3"; + public static final String Built$in_Functions_Modelica_Array_Functions_ones_o = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/ones/o"; + public static final String Built$in_Functions_Modelica_Array_Functions_product = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/product"; + public static final String Built$in_Functions_Modelica_Array_Functions_product_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/product/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_product_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/product/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_scalar = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/scalar"; + public static final String Built$in_Functions_Modelica_Array_Functions_scalar_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/scalar/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_scalar_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/scalar/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_size = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/size"; + public static final String Built$in_Functions_Modelica_Array_Functions_size_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/size/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_size_i = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/size/i"; + public static final String Built$in_Functions_Modelica_Array_Functions_size_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/size/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_skew = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/skew"; + public static final String Built$in_Functions_Modelica_Array_Functions_skew_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/skew/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_skew_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/skew/x"; + public static final String Built$in_Functions_Modelica_Array_Functions_sum = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/sum"; + public static final String Built$in_Functions_Modelica_Array_Functions_sum_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/sum/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_sum_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/sum/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_transpose = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/transpose"; + public static final String Built$in_Functions_Modelica_Array_Functions_transpose_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/transpose/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_transpose_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/transpose/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_vector = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/vector"; + public static final String Built$in_Functions_Modelica_Array_Functions_vector_A = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/vector/A"; + public static final String Built$in_Functions_Modelica_Array_Functions_vector_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/vector/result"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros_n = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros/n"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros_n_n1 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros/n/n1"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros_n_n2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros/n/n2"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros_n_n3 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros/n/n3"; + public static final String Built$in_Functions_Modelica_Array_Functions_zeros_o = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Array%20Functions/zeros/o"; + public static final String Built$in_Functions_Modelica_Functions = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions"; + public static final String Built$in_Functions_Modelica_Functions_abs = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/abs"; + public static final String Built$in_Functions_Modelica_Functions_abs_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/abs/result"; + public static final String Built$in_Functions_Modelica_Functions_abs_v = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/abs/v"; + public static final String Built$in_Functions_Modelica_Functions_acos = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/acos"; + public static final String Built$in_Functions_Modelica_Functions_acos_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/acos/u"; + public static final String Built$in_Functions_Modelica_Functions_acos_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/acos/y"; + public static final String Built$in_Functions_Modelica_Functions_asin = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/asin"; + public static final String Built$in_Functions_Modelica_Functions_asin_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/asin/u"; + public static final String Built$in_Functions_Modelica_Functions_asin_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/asin/y"; + public static final String Built$in_Functions_Modelica_Functions_atan = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan"; + public static final String Built$in_Functions_Modelica_Functions_atan2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan2"; + public static final String Built$in_Functions_Modelica_Functions_atan2_u1 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan2/u1"; + public static final String Built$in_Functions_Modelica_Functions_atan2_u2 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan2/u2"; + public static final String Built$in_Functions_Modelica_Functions_atan2_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan2/y"; + public static final String Built$in_Functions_Modelica_Functions_atan_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan/u"; + public static final String Built$in_Functions_Modelica_Functions_atan_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/atan/y"; + public static final String Built$in_Functions_Modelica_Functions_ceil = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/ceil"; + public static final String Built$in_Functions_Modelica_Functions_ceil_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/ceil/u"; + public static final String Built$in_Functions_Modelica_Functions_ceil_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/ceil/x"; + public static final String Built$in_Functions_Modelica_Functions_ceil_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/ceil/y"; + public static final String Built$in_Functions_Modelica_Functions_cos = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/cos"; + public static final String Built$in_Functions_Modelica_Functions_cosh = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/cosh"; + public static final String Built$in_Functions_Modelica_Functions_cosh_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/cosh/u"; + public static final String Built$in_Functions_Modelica_Functions_cosh_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/cosh/y"; + public static final String Built$in_Functions_Modelica_Functions_delay = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/delay"; + public static final String Built$in_Functions_Modelica_Functions_delay_delayMax = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/delay/delayMax"; + public static final String Built$in_Functions_Modelica_Functions_delay_delayTime = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/delay/delayTime"; + public static final String Built$in_Functions_Modelica_Functions_delay_expr = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/delay/expr"; + public static final String Built$in_Functions_Modelica_Functions_delay_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/delay/result"; + public static final String Built$in_Functions_Modelica_Functions_der = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/der"; + public static final String Built$in_Functions_Modelica_Functions_der_dexpr = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/der/dexpr"; + public static final String Built$in_Functions_Modelica_Functions_der_expr = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/der/expr"; + public static final String Built$in_Functions_Modelica_Functions_div = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/div"; + public static final String Built$in_Functions_Modelica_Functions_div_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/div/result"; + public static final String Built$in_Functions_Modelica_Functions_div_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/div/x"; + public static final String Built$in_Functions_Modelica_Functions_div_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/div/y"; + public static final String Built$in_Functions_Modelica_Functions_edge = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/edge"; + public static final String Built$in_Functions_Modelica_Functions_edge_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/edge/b"; + public static final String Built$in_Functions_Modelica_Functions_edge_edgeEvent = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/edge/edgeEvent"; + public static final String Built$in_Functions_Modelica_Functions_exp = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/exp"; + public static final String Built$in_Functions_Modelica_Functions_exp_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/exp/u"; + public static final String Built$in_Functions_Modelica_Functions_exp_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/exp/y"; + public static final String Built$in_Functions_Modelica_Functions_floor = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/floor"; + public static final String Built$in_Functions_Modelica_Functions_floor_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/floor/x"; + public static final String Built$in_Functions_Modelica_Functions_floor_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/floor/y"; + public static final String Built$in_Functions_Modelica_Functions_initial = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/initial"; + public static final String Built$in_Functions_Modelica_Functions_initial_isInitial = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/initial/isInitial"; + public static final String Built$in_Functions_Modelica_Functions_log = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log"; + public static final String Built$in_Functions_Modelica_Functions_log10 = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log10"; + public static final String Built$in_Functions_Modelica_Functions_log10_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log10/u"; + public static final String Built$in_Functions_Modelica_Functions_log10_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log10/y"; + public static final String Built$in_Functions_Modelica_Functions_log_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log/u"; + public static final String Built$in_Functions_Modelica_Functions_log_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/log/y"; + public static final String Built$in_Functions_Modelica_Functions_max = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/max"; + public static final String Built$in_Functions_Modelica_Functions_max_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/max/result"; + public static final String Built$in_Functions_Modelica_Functions_max_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/max/x"; + public static final String Built$in_Functions_Modelica_Functions_max_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/max/y"; + public static final String Built$in_Functions_Modelica_Functions_min = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/min"; + public static final String Built$in_Functions_Modelica_Functions_min_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/min/result"; + public static final String Built$in_Functions_Modelica_Functions_min_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/min/x"; + public static final String Built$in_Functions_Modelica_Functions_min_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/min/y"; + public static final String Built$in_Functions_Modelica_Functions_mod = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/mod"; + public static final String Built$in_Functions_Modelica_Functions_mod_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/mod/result"; + public static final String Built$in_Functions_Modelica_Functions_mod_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/mod/x"; + public static final String Built$in_Functions_Modelica_Functions_mod_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/mod/y"; + public static final String Built$in_Functions_Modelica_Functions_noEvent = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/noEvent"; + public static final String Built$in_Functions_Modelica_Functions_noEvent_expr = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/noEvent/expr"; + public static final String Built$in_Functions_Modelica_Functions_noEvent_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/noEvent/result"; + public static final String Built$in_Functions_Modelica_Functions_pre = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/pre"; + public static final String Built$in_Functions_Modelica_Functions_pre_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/pre/result"; + public static final String Built$in_Functions_Modelica_Functions_pre_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/pre/y"; + public static final String Built$in_Functions_Modelica_Functions_rem = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/rem"; + public static final String Built$in_Functions_Modelica_Functions_rem_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/rem/result"; + public static final String Built$in_Functions_Modelica_Functions_rem_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/rem/x"; + public static final String Built$in_Functions_Modelica_Functions_rem_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/rem/y"; + public static final String Built$in_Functions_Modelica_Functions_sample = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sample"; + public static final String Built$in_Functions_Modelica_Functions_sample_interval = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sample/interval"; + public static final String Built$in_Functions_Modelica_Functions_sample_isSample = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sample/isSample"; + public static final String Built$in_Functions_Modelica_Functions_sample_start = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sample/start"; + public static final String Built$in_Functions_Modelica_Functions_semiLinear = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/semiLinear"; + public static final String Built$in_Functions_Modelica_Functions_semiLinear_negativeSlope = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/semiLinear/negativeSlope"; + public static final String Built$in_Functions_Modelica_Functions_semiLinear_positiveSlope = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/semiLinear/positiveSlope"; + public static final String Built$in_Functions_Modelica_Functions_semiLinear_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/semiLinear/result"; + public static final String Built$in_Functions_Modelica_Functions_semiLinear_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/semiLinear/x"; + public static final String Built$in_Functions_Modelica_Functions_sign = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sign"; + public static final String Built$in_Functions_Modelica_Functions_sign_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sign/result"; + public static final String Built$in_Functions_Modelica_Functions_sign_v = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sign/v"; + public static final String Built$in_Functions_Modelica_Functions_sin = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sin"; + public static final String Built$in_Functions_Modelica_Functions_sin_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sin/u"; + public static final String Built$in_Functions_Modelica_Functions_sin_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sin/y"; + public static final String Built$in_Functions_Modelica_Functions_sinh = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sinh"; + public static final String Built$in_Functions_Modelica_Functions_sinh_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sinh/u"; + public static final String Built$in_Functions_Modelica_Functions_sinh_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sinh/y"; + public static final String Built$in_Functions_Modelica_Functions_smooth = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/smooth"; + public static final String Built$in_Functions_Modelica_Functions_smooth_expr = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/smooth/expr"; + public static final String Built$in_Functions_Modelica_Functions_smooth_p = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/smooth/p"; + public static final String Built$in_Functions_Modelica_Functions_smooth_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/smooth/result"; + public static final String Built$in_Functions_Modelica_Functions_sqrt = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sqrt"; + public static final String Built$in_Functions_Modelica_Functions_sqrt_v = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sqrt/v"; + public static final String Built$in_Functions_Modelica_Functions_sqrt_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/sqrt/y"; + public static final String Built$in_Functions_Modelica_Functions_tan = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tan"; + public static final String Built$in_Functions_Modelica_Functions_tan_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tan/u"; + public static final String Built$in_Functions_Modelica_Functions_tan_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tan/y"; + public static final String Built$in_Functions_Modelica_Functions_tanh = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tanh"; + public static final String Built$in_Functions_Modelica_Functions_tanh_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tanh/u"; + public static final String Built$in_Functions_Modelica_Functions_tanh_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/tanh/y"; + public static final String Built$in_Functions_Modelica_Functions_terminal = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/terminal"; + public static final String Built$in_Functions_Modelica_Functions_terminal_isTerminal = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Modelica%20Functions/terminal/isTerminal"; public static final String Built$in_Functions_Vensim_Functions = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions"; public static final String Built$in_Functions_Vensim_Functions_ABS = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ABS"; + public static final String Built$in_Functions_Vensim_Functions_ABS_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ABS/x"; + public static final String Built$in_Functions_Vensim_Functions_ABS_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ABS/z"; public static final String Built$in_Functions_Vensim_Functions_COS = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COS"; public static final String Built$in_Functions_Vensim_Functions_COSH = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COSH"; + public static final String Built$in_Functions_Vensim_Functions_COSH_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COSH/x"; + public static final String Built$in_Functions_Vensim_Functions_COSH_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COSH/z"; + public static final String Built$in_Functions_Vensim_Functions_COS_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COS/x"; + public static final String Built$in_Functions_Vensim_Functions_COS_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/COS/z"; 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_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"; + public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE_ontrue = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE/ontrue"; + public static final String Built$in_Functions_Vensim_Functions_IFTHENELSE_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/IFTHENELSE/z"; public static final String Built$in_Functions_Vensim_Functions_LN = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/LN"; + public static final String Built$in_Functions_Vensim_Functions_LN_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/LN/x"; + public static final String Built$in_Functions_Vensim_Functions_LN_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/LN/z"; public static final String Built$in_Functions_Vensim_Functions_MAX = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MAX"; + public static final String Built$in_Functions_Vensim_Functions_MAX_a = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MAX/a"; + public static final String Built$in_Functions_Vensim_Functions_MAX_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MAX/b"; + public static final String Built$in_Functions_Vensim_Functions_MAX_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MAX/z"; public static final String Built$in_Functions_Vensim_Functions_MIN = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MIN"; + public static final String Built$in_Functions_Vensim_Functions_MIN_a = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MIN/a"; + public static final String Built$in_Functions_Vensim_Functions_MIN_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MIN/b"; + public static final String Built$in_Functions_Vensim_Functions_MIN_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MIN/z"; public static final String Built$in_Functions_Vensim_Functions_MODULO = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MODULO"; + public static final String Built$in_Functions_Vensim_Functions_MODULO_a = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MODULO/a"; + public static final String Built$in_Functions_Vensim_Functions_MODULO_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MODULO/b"; + public static final String Built$in_Functions_Vensim_Functions_MODULO_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/MODULO/z"; public static final String Built$in_Functions_Vensim_Functions_PULSE = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/PULSE"; + public static final String Built$in_Functions_Vensim_Functions_PULSE_start = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/PULSE/start"; + public static final String Built$in_Functions_Vensim_Functions_PULSE_width = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/PULSE/width"; + public static final String Built$in_Functions_Vensim_Functions_PULSE_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/PULSE/z"; public static final String Built$in_Functions_Vensim_Functions_RAMP = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/RAMP"; + public static final String Built$in_Functions_Vensim_Functions_RAMP_endTime = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/RAMP/endTime"; + public static final String Built$in_Functions_Vensim_Functions_RAMP_slope = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/RAMP/slope"; + public static final String Built$in_Functions_Vensim_Functions_RAMP_startTime = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/RAMP/startTime"; + public static final String Built$in_Functions_Vensim_Functions_RAMP_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/RAMP/z"; public static final String Built$in_Functions_Vensim_Functions_SIN = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SIN"; public static final String Built$in_Functions_Vensim_Functions_SINH = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SINH"; + public static final String Built$in_Functions_Vensim_Functions_SINH_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SINH/x"; + public static final String Built$in_Functions_Vensim_Functions_SINH_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SINH/z"; + public static final String Built$in_Functions_Vensim_Functions_SIN_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SIN/x"; + public static final String Built$in_Functions_Vensim_Functions_SIN_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SIN/z"; public static final String Built$in_Functions_Vensim_Functions_SQRT = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SQRT"; + public static final String Built$in_Functions_Vensim_Functions_SQRT_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SQRT/x"; + public static final String Built$in_Functions_Vensim_Functions_SQRT_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/SQRT/z"; public static final String Built$in_Functions_Vensim_Functions_STEP = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/STEP"; + public static final String Built$in_Functions_Vensim_Functions_STEP_height = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/STEP/height"; + public static final String Built$in_Functions_Vensim_Functions_STEP_stepTime = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/STEP/stepTime"; + public static final String Built$in_Functions_Vensim_Functions_STEP_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/STEP/z"; public static final String Built$in_Functions_Vensim_Functions_TAN = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TAN"; public static final String Built$in_Functions_Vensim_Functions_TANH = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TANH"; + public static final String Built$in_Functions_Vensim_Functions_TANH_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TANH/x"; + public static final String Built$in_Functions_Vensim_Functions_TANH_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TANH/z"; + public static final String Built$in_Functions_Vensim_Functions_TAN_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TAN/x"; + public static final String Built$in_Functions_Vensim_Functions_TAN_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/TAN/z"; public static final String Built$in_Functions_Vensim_Functions_XIDZ = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/XIDZ"; + public static final String Built$in_Functions_Vensim_Functions_XIDZ_a = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/XIDZ/a"; + public static final String Built$in_Functions_Vensim_Functions_XIDZ_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/XIDZ/b"; + public static final String Built$in_Functions_Vensim_Functions_XIDZ_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/XIDZ/x"; + public static final String Built$in_Functions_Vensim_Functions_XIDZ_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/XIDZ/z"; public static final String Built$in_Functions_Vensim_Functions_ZIDZ = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ZIDZ"; + public static final String Built$in_Functions_Vensim_Functions_ZIDZ_a = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ZIDZ/a"; + public static final String Built$in_Functions_Vensim_Functions_ZIDZ_b = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ZIDZ/b"; + public static final String Built$in_Functions_Vensim_Functions_ZIDZ_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/Vensim%20Functions/ZIDZ/z"; public static final String Built$in_Functions_interpolate = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolate"; public static final String Built$in_Functions_interpolateFull = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolateFull"; + public static final String Built$in_Functions_interpolateFull_icol = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolateFull/icol"; + public static final String Built$in_Functions_interpolateFull_table = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolateFull/table"; + public static final String Built$in_Functions_interpolateFull_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolateFull/u"; + public static final String Built$in_Functions_interpolateFull_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolateFull/y"; + public static final String Built$in_Functions_interpolate_table = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolate/table"; + public static final String Built$in_Functions_interpolate_u = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolate/u"; + public static final String Built$in_Functions_interpolate_y = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/interpolate/y"; public static final String Built$in_Functions_minmax = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/minmax"; + public static final String Built$in_Functions_minmax_expression = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/minmax/expression"; + public static final String Built$in_Functions_minmax_maximum = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/minmax/maximum"; + public static final String Built$in_Functions_minmax_minimum = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/minmax/minimum"; + public static final String Built$in_Functions_minmax_result = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/minmax/result"; public static final String Built$in_Functions_xidz = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/xidz"; + public static final String Built$in_Functions_xidz_divident = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/xidz/divident"; + public static final String Built$in_Functions_xidz_divisor = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/xidz/divisor"; + public static final String Built$in_Functions_xidz_x = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/xidz/x"; + public static final String Built$in_Functions_xidz_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/xidz/z"; public static final String Built$in_Functions_zidz = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/zidz"; + public static final String Built$in_Functions_zidz_divident = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/zidz/divident"; + public static final String Built$in_Functions_zidz_divisor = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/zidz/divisor"; + public static final String Built$in_Functions_zidz_z = "http://www.simantics.org/Sysdyn-1.1/Built-in%20Functions/zidz/z"; public static final String Center = "http://www.simantics.org/Sysdyn-1.1/Center"; public static final String Cloud = "http://www.simantics.org/Sysdyn-1.1/Cloud"; public static final String CloudSymbol = "http://www.simantics.org/Sysdyn-1.1/CloudSymbol"; @@ -653,8 +1187,24 @@ public class SysdynResource { public static final String SysdynModel_variableFilter_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModel/variableFilter/Inverse"; public static final String SysdynModelicaFunction = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction"; public static final String SysdynModelicaFunctionLibrary = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunctionLibrary"; + public static final String SysdynModelicaFunction_Input = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/Input"; + public static final String SysdynModelicaFunction_InterfaceVariable = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/InterfaceVariable"; + public static final String SysdynModelicaFunction_Output = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/Output"; + public static final String SysdynModelicaFunction_VariableLengthInput = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/VariableLengthInput"; + public static final String SysdynModelicaFunction_VariableLengthInput_shownLabels = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/VariableLengthInput/shownLabels"; + public static final String SysdynModelicaFunction_VariableLengthInput_shownLabels_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/VariableLengthInput/shownLabels/Inverse"; + public static final String SysdynModelicaFunction_definition = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/definition"; + public static final String SysdynModelicaFunction_definition_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/definition/Inverse"; + public static final String SysdynModelicaFunction_inputs = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/inputs"; + public static final String SysdynModelicaFunction_inputs_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/inputs/Inverse"; public static final String SysdynModelicaFunction_modelicaFunctionCode = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/modelicaFunctionCode"; public static final String SysdynModelicaFunction_modelicaFunctionCode_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/modelicaFunctionCode/Inverse"; + public static final String SysdynModelicaFunction_modelicaFunctionInterface = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/modelicaFunctionInterface"; + public static final String SysdynModelicaFunction_modelicaFunctionInterface_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/modelicaFunctionInterface/Inverse"; + public static final String SysdynModelicaFunction_optional = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/optional"; + public static final String SysdynModelicaFunction_optional_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/optional/Inverse"; + public static final String SysdynModelicaFunction_outputs = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/outputs"; + public static final String SysdynModelicaFunction_outputs_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/outputs/Inverse"; public static final String SysdynModuleLibrary = "http://www.simantics.org/Sysdyn-1.1/SysdynModuleLibrary"; public static final String SysdynOperationBrowser = "http://www.simantics.org/Sysdyn-1.1/SysdynOperationBrowser"; public static final String SysdynTerminal = "http://www.simantics.org/Sysdyn-1.1/SysdynTerminal"; @@ -776,31 +1326,290 @@ public class SysdynResource { Bottom = getResourceOrNull(graph, URIs.Bottom); Browser = getResourceOrNull(graph, URIs.Browser); Built$in_Functions = getResourceOrNull(graph, URIs.Built$in_Functions); + Built$in_Functions_Modelica_Array_Functions = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions); + Built$in_Functions_Modelica_Array_Functions_array = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array); + Built$in_Functions_Modelica_Array_Functions_array_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array_A); + Built$in_Functions_Modelica_Array_Functions_array_A_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array_A_A); + Built$in_Functions_Modelica_Array_Functions_array_A_B = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array_A_B); + Built$in_Functions_Modelica_Array_Functions_array_A_C = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array_A_C); + Built$in_Functions_Modelica_Array_Functions_array_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_array_result); + Built$in_Functions_Modelica_Array_Functions_cat = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat); + Built$in_Functions_Modelica_Array_Functions_cat_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_A); + Built$in_Functions_Modelica_Array_Functions_cat_A_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_A_A); + Built$in_Functions_Modelica_Array_Functions_cat_A_B = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_A_B); + Built$in_Functions_Modelica_Array_Functions_cat_A_C = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_A_C); + Built$in_Functions_Modelica_Array_Functions_cat_k = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_k); + Built$in_Functions_Modelica_Array_Functions_cat_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cat_result); + Built$in_Functions_Modelica_Array_Functions_cross = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cross); + Built$in_Functions_Modelica_Array_Functions_cross_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cross_result); + Built$in_Functions_Modelica_Array_Functions_cross_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cross_x); + Built$in_Functions_Modelica_Array_Functions_cross_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_cross_y); + Built$in_Functions_Modelica_Array_Functions_diagonal = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_diagonal); + Built$in_Functions_Modelica_Array_Functions_diagonal_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_diagonal_result); + Built$in_Functions_Modelica_Array_Functions_diagonal_v = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_diagonal_v); + Built$in_Functions_Modelica_Array_Functions_fill = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill); + Built$in_Functions_Modelica_Array_Functions_fill_n = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_n); + Built$in_Functions_Modelica_Array_Functions_fill_n_n1 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_n_n1); + Built$in_Functions_Modelica_Array_Functions_fill_n_n2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_n_n2); + Built$in_Functions_Modelica_Array_Functions_fill_n_n3 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_n_n3); + Built$in_Functions_Modelica_Array_Functions_fill_o = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_o); + Built$in_Functions_Modelica_Array_Functions_fill_s = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_fill_s); + Built$in_Functions_Modelica_Array_Functions_identity = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_identity); + Built$in_Functions_Modelica_Array_Functions_identity_n = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_identity_n); + Built$in_Functions_Modelica_Array_Functions_identity_outArray = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_identity_outArray); + Built$in_Functions_Modelica_Array_Functions_linspace = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_linspace); + Built$in_Functions_Modelica_Array_Functions_linspace_n = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_linspace_n); + Built$in_Functions_Modelica_Array_Functions_linspace_v = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_linspace_v); + Built$in_Functions_Modelica_Array_Functions_linspace_x1 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_linspace_x1); + Built$in_Functions_Modelica_Array_Functions_linspace_x2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_linspace_x2); + Built$in_Functions_Modelica_Array_Functions_matrix = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_matrix); + Built$in_Functions_Modelica_Array_Functions_matrix_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_matrix_A); + Built$in_Functions_Modelica_Array_Functions_matrix_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_matrix_result); + Built$in_Functions_Modelica_Array_Functions_max = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_max); + Built$in_Functions_Modelica_Array_Functions_max_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_max_A); + Built$in_Functions_Modelica_Array_Functions_max_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_max_result); + Built$in_Functions_Modelica_Array_Functions_min = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_min); + Built$in_Functions_Modelica_Array_Functions_min_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_min_A); + Built$in_Functions_Modelica_Array_Functions_min_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_min_result); + Built$in_Functions_Modelica_Array_Functions_ndims = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ndims); + Built$in_Functions_Modelica_Array_Functions_ndims_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ndims_A); + Built$in_Functions_Modelica_Array_Functions_ndims_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ndims_result); + Built$in_Functions_Modelica_Array_Functions_ones = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones); + Built$in_Functions_Modelica_Array_Functions_ones_n = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones_n); + Built$in_Functions_Modelica_Array_Functions_ones_n_n1 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones_n_n1); + Built$in_Functions_Modelica_Array_Functions_ones_n_n2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones_n_n2); + Built$in_Functions_Modelica_Array_Functions_ones_n_n3 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones_n_n3); + Built$in_Functions_Modelica_Array_Functions_ones_o = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_ones_o); + Built$in_Functions_Modelica_Array_Functions_product = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_product); + Built$in_Functions_Modelica_Array_Functions_product_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_product_A); + Built$in_Functions_Modelica_Array_Functions_product_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_product_result); + Built$in_Functions_Modelica_Array_Functions_scalar = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_scalar); + Built$in_Functions_Modelica_Array_Functions_scalar_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_scalar_A); + Built$in_Functions_Modelica_Array_Functions_scalar_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_scalar_result); + Built$in_Functions_Modelica_Array_Functions_size = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_size); + Built$in_Functions_Modelica_Array_Functions_size_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_size_A); + Built$in_Functions_Modelica_Array_Functions_size_i = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_size_i); + Built$in_Functions_Modelica_Array_Functions_size_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_size_result); + Built$in_Functions_Modelica_Array_Functions_skew = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_skew); + Built$in_Functions_Modelica_Array_Functions_skew_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_skew_result); + Built$in_Functions_Modelica_Array_Functions_skew_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_skew_x); + Built$in_Functions_Modelica_Array_Functions_sum = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_sum); + Built$in_Functions_Modelica_Array_Functions_sum_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_sum_A); + Built$in_Functions_Modelica_Array_Functions_sum_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_sum_result); + Built$in_Functions_Modelica_Array_Functions_transpose = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_transpose); + Built$in_Functions_Modelica_Array_Functions_transpose_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_transpose_A); + Built$in_Functions_Modelica_Array_Functions_transpose_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_transpose_result); + Built$in_Functions_Modelica_Array_Functions_vector = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_vector); + Built$in_Functions_Modelica_Array_Functions_vector_A = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_vector_A); + Built$in_Functions_Modelica_Array_Functions_vector_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_vector_result); + Built$in_Functions_Modelica_Array_Functions_zeros = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros); + Built$in_Functions_Modelica_Array_Functions_zeros_n = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros_n); + Built$in_Functions_Modelica_Array_Functions_zeros_n_n1 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros_n_n1); + Built$in_Functions_Modelica_Array_Functions_zeros_n_n2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros_n_n2); + Built$in_Functions_Modelica_Array_Functions_zeros_n_n3 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros_n_n3); + Built$in_Functions_Modelica_Array_Functions_zeros_o = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Array_Functions_zeros_o); + Built$in_Functions_Modelica_Functions = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions); + Built$in_Functions_Modelica_Functions_abs = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_abs); + Built$in_Functions_Modelica_Functions_abs_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_abs_result); + Built$in_Functions_Modelica_Functions_abs_v = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_abs_v); + Built$in_Functions_Modelica_Functions_acos = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_acos); + Built$in_Functions_Modelica_Functions_acos_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_acos_u); + Built$in_Functions_Modelica_Functions_acos_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_acos_y); + Built$in_Functions_Modelica_Functions_asin = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_asin); + Built$in_Functions_Modelica_Functions_asin_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_asin_u); + Built$in_Functions_Modelica_Functions_asin_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_asin_y); + Built$in_Functions_Modelica_Functions_atan = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan); + Built$in_Functions_Modelica_Functions_atan2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan2); + Built$in_Functions_Modelica_Functions_atan2_u1 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan2_u1); + Built$in_Functions_Modelica_Functions_atan2_u2 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan2_u2); + Built$in_Functions_Modelica_Functions_atan2_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan2_y); + Built$in_Functions_Modelica_Functions_atan_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan_u); + Built$in_Functions_Modelica_Functions_atan_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_atan_y); + Built$in_Functions_Modelica_Functions_ceil = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_ceil); + Built$in_Functions_Modelica_Functions_ceil_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_ceil_u); + Built$in_Functions_Modelica_Functions_ceil_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_ceil_x); + Built$in_Functions_Modelica_Functions_ceil_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_ceil_y); + Built$in_Functions_Modelica_Functions_cos = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_cos); + Built$in_Functions_Modelica_Functions_cosh = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_cosh); + Built$in_Functions_Modelica_Functions_cosh_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_cosh_u); + Built$in_Functions_Modelica_Functions_cosh_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_cosh_y); + Built$in_Functions_Modelica_Functions_delay = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_delay); + Built$in_Functions_Modelica_Functions_delay_delayMax = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_delay_delayMax); + Built$in_Functions_Modelica_Functions_delay_delayTime = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_delay_delayTime); + Built$in_Functions_Modelica_Functions_delay_expr = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_delay_expr); + Built$in_Functions_Modelica_Functions_delay_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_delay_result); + Built$in_Functions_Modelica_Functions_der = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_der); + Built$in_Functions_Modelica_Functions_der_dexpr = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_der_dexpr); + Built$in_Functions_Modelica_Functions_der_expr = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_der_expr); + Built$in_Functions_Modelica_Functions_div = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_div); + Built$in_Functions_Modelica_Functions_div_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_div_result); + Built$in_Functions_Modelica_Functions_div_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_div_x); + Built$in_Functions_Modelica_Functions_div_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_div_y); + Built$in_Functions_Modelica_Functions_edge = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_edge); + Built$in_Functions_Modelica_Functions_edge_b = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_edge_b); + Built$in_Functions_Modelica_Functions_edge_edgeEvent = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_edge_edgeEvent); + Built$in_Functions_Modelica_Functions_exp = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_exp); + Built$in_Functions_Modelica_Functions_exp_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_exp_u); + Built$in_Functions_Modelica_Functions_exp_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_exp_y); + Built$in_Functions_Modelica_Functions_floor = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_floor); + Built$in_Functions_Modelica_Functions_floor_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_floor_x); + Built$in_Functions_Modelica_Functions_floor_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_floor_y); + Built$in_Functions_Modelica_Functions_initial = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_initial); + Built$in_Functions_Modelica_Functions_initial_isInitial = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_initial_isInitial); + Built$in_Functions_Modelica_Functions_log = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log); + Built$in_Functions_Modelica_Functions_log10 = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log10); + Built$in_Functions_Modelica_Functions_log10_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log10_u); + Built$in_Functions_Modelica_Functions_log10_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log10_y); + Built$in_Functions_Modelica_Functions_log_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log_u); + Built$in_Functions_Modelica_Functions_log_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_log_y); + Built$in_Functions_Modelica_Functions_max = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_max); + Built$in_Functions_Modelica_Functions_max_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_max_result); + Built$in_Functions_Modelica_Functions_max_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_max_x); + Built$in_Functions_Modelica_Functions_max_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_max_y); + Built$in_Functions_Modelica_Functions_min = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_min); + Built$in_Functions_Modelica_Functions_min_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_min_result); + Built$in_Functions_Modelica_Functions_min_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_min_x); + Built$in_Functions_Modelica_Functions_min_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_min_y); + Built$in_Functions_Modelica_Functions_mod = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_mod); + Built$in_Functions_Modelica_Functions_mod_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_mod_result); + Built$in_Functions_Modelica_Functions_mod_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_mod_x); + Built$in_Functions_Modelica_Functions_mod_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_mod_y); + Built$in_Functions_Modelica_Functions_noEvent = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_noEvent); + Built$in_Functions_Modelica_Functions_noEvent_expr = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_noEvent_expr); + Built$in_Functions_Modelica_Functions_noEvent_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_noEvent_result); + Built$in_Functions_Modelica_Functions_pre = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_pre); + Built$in_Functions_Modelica_Functions_pre_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_pre_result); + Built$in_Functions_Modelica_Functions_pre_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_pre_y); + Built$in_Functions_Modelica_Functions_rem = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_rem); + Built$in_Functions_Modelica_Functions_rem_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_rem_result); + Built$in_Functions_Modelica_Functions_rem_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_rem_x); + Built$in_Functions_Modelica_Functions_rem_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_rem_y); + Built$in_Functions_Modelica_Functions_sample = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sample); + Built$in_Functions_Modelica_Functions_sample_interval = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sample_interval); + Built$in_Functions_Modelica_Functions_sample_isSample = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sample_isSample); + Built$in_Functions_Modelica_Functions_sample_start = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sample_start); + Built$in_Functions_Modelica_Functions_semiLinear = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_semiLinear); + Built$in_Functions_Modelica_Functions_semiLinear_negativeSlope = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_semiLinear_negativeSlope); + Built$in_Functions_Modelica_Functions_semiLinear_positiveSlope = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_semiLinear_positiveSlope); + Built$in_Functions_Modelica_Functions_semiLinear_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_semiLinear_result); + Built$in_Functions_Modelica_Functions_semiLinear_x = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_semiLinear_x); + Built$in_Functions_Modelica_Functions_sign = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sign); + Built$in_Functions_Modelica_Functions_sign_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sign_result); + Built$in_Functions_Modelica_Functions_sign_v = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sign_v); + Built$in_Functions_Modelica_Functions_sin = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sin); + Built$in_Functions_Modelica_Functions_sin_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sin_u); + Built$in_Functions_Modelica_Functions_sin_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sin_y); + Built$in_Functions_Modelica_Functions_sinh = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sinh); + Built$in_Functions_Modelica_Functions_sinh_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sinh_u); + Built$in_Functions_Modelica_Functions_sinh_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sinh_y); + Built$in_Functions_Modelica_Functions_smooth = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_smooth); + Built$in_Functions_Modelica_Functions_smooth_expr = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_smooth_expr); + Built$in_Functions_Modelica_Functions_smooth_p = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_smooth_p); + Built$in_Functions_Modelica_Functions_smooth_result = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_smooth_result); + Built$in_Functions_Modelica_Functions_sqrt = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sqrt); + Built$in_Functions_Modelica_Functions_sqrt_v = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sqrt_v); + Built$in_Functions_Modelica_Functions_sqrt_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_sqrt_y); + Built$in_Functions_Modelica_Functions_tan = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tan); + Built$in_Functions_Modelica_Functions_tan_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tan_u); + Built$in_Functions_Modelica_Functions_tan_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tan_y); + Built$in_Functions_Modelica_Functions_tanh = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tanh); + Built$in_Functions_Modelica_Functions_tanh_u = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tanh_u); + Built$in_Functions_Modelica_Functions_tanh_y = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_tanh_y); + Built$in_Functions_Modelica_Functions_terminal = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_terminal); + Built$in_Functions_Modelica_Functions_terminal_isTerminal = getResourceOrNull(graph, URIs.Built$in_Functions_Modelica_Functions_terminal_isTerminal); Built$in_Functions_Vensim_Functions = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions); Built$in_Functions_Vensim_Functions_ABS = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ABS); + Built$in_Functions_Vensim_Functions_ABS_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ABS_x); + Built$in_Functions_Vensim_Functions_ABS_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ABS_z); Built$in_Functions_Vensim_Functions_COS = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COS); Built$in_Functions_Vensim_Functions_COSH = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COSH); + Built$in_Functions_Vensim_Functions_COSH_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COSH_x); + Built$in_Functions_Vensim_Functions_COSH_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COSH_z); + Built$in_Functions_Vensim_Functions_COS_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COS_x); + Built$in_Functions_Vensim_Functions_COS_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_COS_z); 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_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); + Built$in_Functions_Vensim_Functions_IFTHENELSE_ontrue = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_ontrue); + Built$in_Functions_Vensim_Functions_IFTHENELSE_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_IFTHENELSE_z); Built$in_Functions_Vensim_Functions_LN = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_LN); + Built$in_Functions_Vensim_Functions_LN_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_LN_x); + Built$in_Functions_Vensim_Functions_LN_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_LN_z); Built$in_Functions_Vensim_Functions_MAX = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MAX); + Built$in_Functions_Vensim_Functions_MAX_a = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MAX_a); + Built$in_Functions_Vensim_Functions_MAX_b = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MAX_b); + Built$in_Functions_Vensim_Functions_MAX_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MAX_z); Built$in_Functions_Vensim_Functions_MIN = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MIN); + Built$in_Functions_Vensim_Functions_MIN_a = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MIN_a); + Built$in_Functions_Vensim_Functions_MIN_b = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MIN_b); + Built$in_Functions_Vensim_Functions_MIN_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MIN_z); Built$in_Functions_Vensim_Functions_MODULO = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MODULO); + Built$in_Functions_Vensim_Functions_MODULO_a = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MODULO_a); + Built$in_Functions_Vensim_Functions_MODULO_b = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MODULO_b); + Built$in_Functions_Vensim_Functions_MODULO_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_MODULO_z); Built$in_Functions_Vensim_Functions_PULSE = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_PULSE); + Built$in_Functions_Vensim_Functions_PULSE_start = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_PULSE_start); + Built$in_Functions_Vensim_Functions_PULSE_width = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_PULSE_width); + Built$in_Functions_Vensim_Functions_PULSE_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_PULSE_z); Built$in_Functions_Vensim_Functions_RAMP = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_RAMP); + Built$in_Functions_Vensim_Functions_RAMP_endTime = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_RAMP_endTime); + Built$in_Functions_Vensim_Functions_RAMP_slope = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_RAMP_slope); + Built$in_Functions_Vensim_Functions_RAMP_startTime = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_RAMP_startTime); + Built$in_Functions_Vensim_Functions_RAMP_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_RAMP_z); Built$in_Functions_Vensim_Functions_SIN = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SIN); Built$in_Functions_Vensim_Functions_SINH = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SINH); + Built$in_Functions_Vensim_Functions_SINH_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SINH_x); + Built$in_Functions_Vensim_Functions_SINH_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SINH_z); + Built$in_Functions_Vensim_Functions_SIN_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SIN_x); + Built$in_Functions_Vensim_Functions_SIN_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SIN_z); Built$in_Functions_Vensim_Functions_SQRT = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SQRT); + Built$in_Functions_Vensim_Functions_SQRT_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SQRT_x); + Built$in_Functions_Vensim_Functions_SQRT_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_SQRT_z); Built$in_Functions_Vensim_Functions_STEP = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_STEP); + Built$in_Functions_Vensim_Functions_STEP_height = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_STEP_height); + Built$in_Functions_Vensim_Functions_STEP_stepTime = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_STEP_stepTime); + Built$in_Functions_Vensim_Functions_STEP_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_STEP_z); Built$in_Functions_Vensim_Functions_TAN = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TAN); Built$in_Functions_Vensim_Functions_TANH = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TANH); + Built$in_Functions_Vensim_Functions_TANH_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TANH_x); + Built$in_Functions_Vensim_Functions_TANH_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TANH_z); + Built$in_Functions_Vensim_Functions_TAN_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TAN_x); + Built$in_Functions_Vensim_Functions_TAN_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_TAN_z); Built$in_Functions_Vensim_Functions_XIDZ = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_XIDZ); + Built$in_Functions_Vensim_Functions_XIDZ_a = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_XIDZ_a); + Built$in_Functions_Vensim_Functions_XIDZ_b = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_XIDZ_b); + Built$in_Functions_Vensim_Functions_XIDZ_x = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_XIDZ_x); + Built$in_Functions_Vensim_Functions_XIDZ_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_XIDZ_z); Built$in_Functions_Vensim_Functions_ZIDZ = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ZIDZ); + Built$in_Functions_Vensim_Functions_ZIDZ_a = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ZIDZ_a); + Built$in_Functions_Vensim_Functions_ZIDZ_b = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ZIDZ_b); + Built$in_Functions_Vensim_Functions_ZIDZ_z = getResourceOrNull(graph, URIs.Built$in_Functions_Vensim_Functions_ZIDZ_z); Built$in_Functions_interpolate = getResourceOrNull(graph, URIs.Built$in_Functions_interpolate); Built$in_Functions_interpolateFull = getResourceOrNull(graph, URIs.Built$in_Functions_interpolateFull); + Built$in_Functions_interpolateFull_icol = getResourceOrNull(graph, URIs.Built$in_Functions_interpolateFull_icol); + Built$in_Functions_interpolateFull_table = getResourceOrNull(graph, URIs.Built$in_Functions_interpolateFull_table); + Built$in_Functions_interpolateFull_u = getResourceOrNull(graph, URIs.Built$in_Functions_interpolateFull_u); + Built$in_Functions_interpolateFull_y = getResourceOrNull(graph, URIs.Built$in_Functions_interpolateFull_y); + Built$in_Functions_interpolate_table = getResourceOrNull(graph, URIs.Built$in_Functions_interpolate_table); + Built$in_Functions_interpolate_u = getResourceOrNull(graph, URIs.Built$in_Functions_interpolate_u); + Built$in_Functions_interpolate_y = getResourceOrNull(graph, URIs.Built$in_Functions_interpolate_y); Built$in_Functions_minmax = getResourceOrNull(graph, URIs.Built$in_Functions_minmax); + Built$in_Functions_minmax_expression = getResourceOrNull(graph, URIs.Built$in_Functions_minmax_expression); + Built$in_Functions_minmax_maximum = getResourceOrNull(graph, URIs.Built$in_Functions_minmax_maximum); + Built$in_Functions_minmax_minimum = getResourceOrNull(graph, URIs.Built$in_Functions_minmax_minimum); + Built$in_Functions_minmax_result = getResourceOrNull(graph, URIs.Built$in_Functions_minmax_result); Built$in_Functions_xidz = getResourceOrNull(graph, URIs.Built$in_Functions_xidz); + Built$in_Functions_xidz_divident = getResourceOrNull(graph, URIs.Built$in_Functions_xidz_divident); + Built$in_Functions_xidz_divisor = getResourceOrNull(graph, URIs.Built$in_Functions_xidz_divisor); + Built$in_Functions_xidz_x = getResourceOrNull(graph, URIs.Built$in_Functions_xidz_x); + Built$in_Functions_xidz_z = getResourceOrNull(graph, URIs.Built$in_Functions_xidz_z); Built$in_Functions_zidz = getResourceOrNull(graph, URIs.Built$in_Functions_zidz); + Built$in_Functions_zidz_divident = getResourceOrNull(graph, URIs.Built$in_Functions_zidz_divident); + Built$in_Functions_zidz_divisor = getResourceOrNull(graph, URIs.Built$in_Functions_zidz_divisor); + Built$in_Functions_zidz_z = getResourceOrNull(graph, URIs.Built$in_Functions_zidz_z); Center = getResourceOrNull(graph, URIs.Center); Cloud = getResourceOrNull(graph, URIs.Cloud); CloudSymbol = getResourceOrNull(graph, URIs.CloudSymbol); @@ -1035,8 +1844,24 @@ public class SysdynResource { SysdynModel_variableFilter_Inverse = getResourceOrNull(graph, URIs.SysdynModel_variableFilter_Inverse); SysdynModelicaFunction = getResourceOrNull(graph, URIs.SysdynModelicaFunction); SysdynModelicaFunctionLibrary = getResourceOrNull(graph, URIs.SysdynModelicaFunctionLibrary); + SysdynModelicaFunction_Input = getResourceOrNull(graph, URIs.SysdynModelicaFunction_Input); + SysdynModelicaFunction_InterfaceVariable = getResourceOrNull(graph, URIs.SysdynModelicaFunction_InterfaceVariable); + SysdynModelicaFunction_Output = getResourceOrNull(graph, URIs.SysdynModelicaFunction_Output); + SysdynModelicaFunction_VariableLengthInput = getResourceOrNull(graph, URIs.SysdynModelicaFunction_VariableLengthInput); + SysdynModelicaFunction_VariableLengthInput_shownLabels = getResourceOrNull(graph, URIs.SysdynModelicaFunction_VariableLengthInput_shownLabels); + SysdynModelicaFunction_VariableLengthInput_shownLabels_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_VariableLengthInput_shownLabels_Inverse); + SysdynModelicaFunction_definition = getResourceOrNull(graph, URIs.SysdynModelicaFunction_definition); + SysdynModelicaFunction_definition_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_definition_Inverse); + SysdynModelicaFunction_inputs = getResourceOrNull(graph, URIs.SysdynModelicaFunction_inputs); + SysdynModelicaFunction_inputs_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_inputs_Inverse); SysdynModelicaFunction_modelicaFunctionCode = getResourceOrNull(graph, URIs.SysdynModelicaFunction_modelicaFunctionCode); SysdynModelicaFunction_modelicaFunctionCode_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_modelicaFunctionCode_Inverse); + SysdynModelicaFunction_modelicaFunctionInterface = getResourceOrNull(graph, URIs.SysdynModelicaFunction_modelicaFunctionInterface); + SysdynModelicaFunction_modelicaFunctionInterface_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_modelicaFunctionInterface_Inverse); + SysdynModelicaFunction_optional = getResourceOrNull(graph, URIs.SysdynModelicaFunction_optional); + SysdynModelicaFunction_optional_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_optional_Inverse); + SysdynModelicaFunction_outputs = getResourceOrNull(graph, URIs.SysdynModelicaFunction_outputs); + SysdynModelicaFunction_outputs_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_outputs_Inverse); SysdynModuleLibrary = getResourceOrNull(graph, URIs.SysdynModuleLibrary); SysdynOperationBrowser = getResourceOrNull(graph, URIs.SysdynOperationBrowser); SysdynTerminal = getResourceOrNull(graph, URIs.SysdynTerminal); diff --git a/org.simantics.sysdyn.ui/icons/function.png b/org.simantics.sysdyn.ui/icons/function.png new file mode 100644 index 00000000..d6778473 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/function.png differ diff --git a/org.simantics.sysdyn.ui/icons/functionLink.png b/org.simantics.sysdyn.ui/icons/functionLink.png new file mode 100644 index 00000000..70ae6796 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/functionLink.png differ diff --git a/org.simantics.sysdyn.ui/icons/modelicaArrayFunction.png b/org.simantics.sysdyn.ui/icons/modelicaArrayFunction.png new file mode 100644 index 00000000..878469fc Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/modelicaArrayFunction.png differ diff --git a/org.simantics.sysdyn.ui/icons/modelicaFunction.png b/org.simantics.sysdyn.ui/icons/modelicaFunction.png new file mode 100644 index 00000000..30ee96f4 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/modelicaFunction.png differ diff --git a/org.simantics.sysdyn.ui/icons/sysdynFunction.png b/org.simantics.sysdyn.ui/icons/sysdynFunction.png new file mode 100644 index 00000000..ddc929d5 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/sysdynFunction.png differ diff --git a/org.simantics.sysdyn.ui/icons/variable.png b/org.simantics.sysdyn.ui/icons/variable.png new file mode 100644 index 00000000..0299de3d Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/variable.png differ diff --git a/org.simantics.sysdyn.ui/icons/variableGray.png b/org.simantics.sysdyn.ui/icons/variableGray.png new file mode 100644 index 00000000..a3ed59b5 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/variableGray.png differ diff --git a/org.simantics.sysdyn.ui/icons/vensimFunction.png b/org.simantics.sysdyn.ui/icons/vensimFunction.png new file mode 100644 index 00000000..f0070962 Binary files /dev/null and b/org.simantics.sysdyn.ui/icons/vensimFunction.png differ diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/preferences/ModelicaPreferencePage.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/preferences/ModelicaPreferencePage.java index 0b231599..49213646 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/preferences/ModelicaPreferencePage.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/preferences/ModelicaPreferencePage.java @@ -50,6 +50,7 @@ IWorkbenchPreferencePage { setDescription("Modelica preferences"); } + @Override public void createFieldEditors() { final File installed = ModelicaManager.getInstalledOpenModelicaHome(); 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 index 5fc90bbf..2817708f 100644 --- 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 @@ -48,7 +48,7 @@ public class FunctionTab extends LabelPropertyTabContributor { Group modelicaGroup = new Group(composite, SWT.SHADOW_ETCHED_IN); modelicaGroup.setText("Modelica code"); - GridDataFactory.fillDefaults().grab(true, true).applyTo(modelicaGroup); + GridDataFactory.fillDefaults().grab(true, true).minSize(150, 0).applyTo(modelicaGroup); GridLayoutFactory.fillDefaults().spacing(0, 0).margins(3, 3).applyTo(modelicaGroup); Label startLabel = new Label(modelicaGroup, support, SWT.NONE); diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java index ce09e6a8..9fdc02dd 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/ShortcutTabWidget.java @@ -35,14 +35,13 @@ import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport; import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.common.request.ObjectsWithType; -import org.simantics.db.common.utils.NameUtils; import org.simantics.db.exception.DatabaseException; import org.simantics.db.management.ISessionContext; import org.simantics.db.procedure.AsyncListener; import org.simantics.db.request.Read; import org.simantics.layer0.Layer0; import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.properties.widgets.expressions.Function; import org.simantics.ui.SimanticsUI; import org.simantics.utils.ui.ISelectionUtils; @@ -82,65 +81,17 @@ public class ShortcutTabWidget implements Widget { TableItem item = new TableItem(functionTable, SWT.NONE); //Finding functions - ArrayList funktio = new ArrayList(); - try { - funktio = SimanticsUI.getSession().syncRequest(new Read>() { - @Override - public ArrayList perform(ReadGraph graph) - throws DatabaseException { - SysdynResource sr = SysdynResource.getInstance(graph); - Layer0 l0 = Layer0.getInstance(graph); - ArrayList funktiot = new ArrayList(); - - Resource funktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions); - for(Resource r : graph.syncRequest(new ObjectsWithType(funktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { - String name = NameUtils.getSafeName(graph, r); - funktiot.add(name); - } - - Resource subfunktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Vensim_Functions); - for(Resource r : graph.syncRequest(new ObjectsWithType(subfunktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { - String name = NameUtils.getSafeName(graph, r); - funktiot.add(name); - } - - return funktiot; - } - }); - } - catch (DatabaseException e) { - e.printStackTrace(); - } + ArrayList functionList = Function.getAllFunctions(); - Collections.sort(funktio); + Collections.sort(functionList); - for(int a=0; a < funktio.size(); a++){ - item.setText(funktio.get(a)+"()"); - item.setData(funktio.get(a)+"({})"); + for(Function function : functionList){ + item.setText(function.getName() + "()"); + item.setData(function.getName() + "(" + function.getParameterList() + ")"); + item.setImage(Function.getImage(functionTable.getDisplay(), function)); item = new TableItem(functionTable, SWT.NONE); } -// TableItem item = new TableItem(functionTable, SWT.NONE); -// item.setText("min()"); -// item.setData("min({ })"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("max()"); -// item.setData("max({ })"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("abs()"); -// item.setData("abs({ })"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("if then else"); -// item.setData("if then else"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("xidz()"); -// item.setData("xidz( number, divisor , x)"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("interpolate()"); -// item.setData("interpolate( x, table)"); -// item = new TableItem(functionTable, SWT.NONE); -// item.setText("delay()"); -// item.setData("delay( expression, delayTime)"); functions.setControl(functionTable); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java index 34140ed8..a8276262 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/CompletionProcessor.java @@ -14,23 +14,19 @@ package org.simantics.sysdyn.ui.properties.widgets.expressions; import java.util.ArrayList; import java.util.Collections; +import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.contentassist.CompletionProposal; import org.eclipse.jface.text.contentassist.ICompletionProposal; import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.contentassist.IContextInformationValidator; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.request.ObjectsWithType; -import org.simantics.db.common.utils.NameUtils; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.request.Read; -import org.simantics.layer0.Layer0; -import org.simantics.sysdyn.SysdynResource; -import org.simantics.ui.SimanticsUI; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.sysdyn.ui.utils.ExpressionUtils; /** @@ -42,10 +38,11 @@ import org.simantics.ui.SimanticsUI; */ public class CompletionProcessor implements IContentAssistProcessor { - private Table allowedVariables; - private ArrayList functions; - private ArrayList variables = null; - + private final Table allowedVariables; + private ArrayList functions; + private ArrayList variables = null; + private ArrayList timeAndSelfVariables = null; + private final char[] allowedCharacters = { 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','å','ä','ö', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','Å','Ä','Ö', @@ -56,75 +53,120 @@ public class CompletionProcessor implements IContentAssistProcessor { public CompletionProcessor(Table allowedVariables, boolean allowFunctions){ this.allowedVariables = allowedVariables; - //Finding functions - functions = new ArrayList(); - if (allowFunctions) { - try { - functions = SimanticsUI.getSession().syncRequest(new Read>() { - @Override - public ArrayList perform(ReadGraph graph) - throws DatabaseException { - SysdynResource sr = SysdynResource.getInstance(graph); - Layer0 l0 = Layer0.getInstance(graph); - ArrayList functions = new ArrayList(); - - Resource funktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions); - for(Resource r : graph.syncRequest(new ObjectsWithType(funktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { - String name = NameUtils.getSafeName(graph, r); - functions.add(name); - } - - Resource subfunktionlibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Vensim_Functions); - for(Resource r : graph.syncRequest(new ObjectsWithType(subfunktionlibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { - String name = NameUtils.getSafeName(graph, r); - functions.add(name); - } - - return functions; - } - }); - } - catch (DatabaseException e) { - e.printStackTrace(); - } - } - Collections.sort(functions); - for (int i = 0; i < functions.size(); ++i) { - functions.set(i, functions.get(i) + "()"); - } + if (allowFunctions) { + //Finding functions and sorting them. + functions = Function.getAllFunctions(); + Collections.sort(functions); + } } - private ICompletionProposal[] collectProposals(String token, int offset) { - //Finding variables - if (variables == null) { - variables = new ArrayList(); - if(allowedVariables != null && !allowedVariables.isDisposed()) { - TableItem[] connectedVariables = allowedVariables.getItems(); - for(TableItem ti : connectedVariables) { - this.variables.add(ti.getText()); - } - } - Collections.sort(variables); - } - - ArrayList resultArray = new ArrayList(); - for (String variable : variables) { - if (token.length() == 0 || variable.toUpperCase().startsWith(token.toUpperCase())) { - resultArray.add(new CompletionProposal(variable, - offset - token.length(), - token.length(), - variable.length())); - } - } - for (String function : functions) { - if (token.length() == 0 || function.toUpperCase().startsWith(token.toUpperCase())) { - resultArray.add(new CompletionProposal(function, - offset - token.length(), - token.length(), - function.length() - 1)); - } - } - ICompletionProposal[] result = new ICompletionProposal[resultArray.size()]; + /** + * Collect and sort all variables. + * @param display + */ + private void findVariables(Display display) { + if (variables == null) { + variables = new ArrayList(); + timeAndSelfVariables = new ArrayList(); + if(allowedVariables != null && !allowedVariables.isDisposed()) { + TableItem[] connectedVariables = allowedVariables.getItems(); + for(TableItem ti : connectedVariables) { + // The status of the variable is determined using the color of its table item :( + if (ExpressionUtils.variableTimeAndSelfColor(display).equals(ti.getForeground())) { + this.timeAndSelfVariables.add(ti.getText()); + } else { + this.variables.add(ti.getText()); + } + + } + } + Collections.sort(variables); + Collections.sort(timeAndSelfVariables); + } + } + + /** + * Create CompletionProposals of the variables and add them to array. + * @param array result array of CompletionProposals + * @param display display using this CompletionProcessor + * @param token current token + * @param offset an offset within the document for which completions should be computed + */ + private void addVariables(ArrayList array, Display display, String token, int offset) { + Image imageVariable = ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/variable.png")).createImage(display); + Image imageVariableGray = ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/variableGray.png")).createImage(display); + + for (String variable : variables) { + if (token.length() == 0 || variable.toUpperCase().startsWith(token.toUpperCase())) { + array.add(new CompletionProposal(variable, + offset - token.length(), + token.length(), + variable.length(), + imageVariable, + variable, + null/*new ContextInformation("ContextInformation1", "ContextInformation2")*/, + ""/*"additional Proposal Info"*/)); + } + } + for (String variable : timeAndSelfVariables) { + if (token.length() == 0 || variable.toUpperCase().startsWith(token.toUpperCase())) { + array.add(new CompletionProposal(variable, + offset - token.length(), + token.length(), + variable.length(), + imageVariableGray, + variable, + null/*new ContextInformation("ContextInformation1", "ContextInformation2")*/, + ""/*"additional Proposal Info"*/)); + } + } + } + + /** + * Create CompletionProposals of the functions and add them to array. + * @param array result array of CompletionProposals + * @param display display using this CompletionProcessor + * @param token current token + * @param offset an offset within the document for which completions should be computed + */ + private void addFunctions(ArrayList array, Display display, String token, int offset) { + // Parameters don't have functions + if (functions == null) + return; + + // Create CompletionProposals out of Functions + for (Function function : functions) { + if (token.length() == 0 || function.getName().toUpperCase().startsWith(token.toUpperCase())) { + Image image = Function.getImage(display, function); + array.add(new CompletionProposal( + function.getName() + "(" + function.getParameterList() + ")", + offset - token.length(), + token.length(), + function.getName().length() + 1, + image, + function.getName() + "(" + function.getParameterList() + ")", + null/*new ContextInformation("ContextInformation1", "ContextInformation2")*/, + ""/*"additional Proposal Info"*/)); + } + } + } + + /** + * Collect all matching proposals + * @param display display using this CompletionProcessor + * @param token current token + * @param offset an offset within the document for which completions should be computed + * @return Array of matching proposals + */ + private ICompletionProposal[] collectProposals(Display display, String token, int offset) { + ArrayList resultArray = new ArrayList(); + + // Find variables and functions and create CompletionProposals out of them. + findVariables(display); + addVariables(resultArray, display, token, offset); + addFunctions(resultArray, display, token, offset); + + ICompletionProposal[] result = new ICompletionProposal[resultArray.size()]; for (int i = 0; i < result.length; ++i) { result[i] = resultArray.get(i); } @@ -135,11 +177,12 @@ public class CompletionProcessor implements IContentAssistProcessor { public ICompletionProposal[] computeCompletionProposals( ITextViewer viewer, int offset) { String equation = viewer.getDocument().get(); + Display display = viewer.getTextWidget().getDisplay(); if (equation.length() == 0 || offset == 0 || Character.isWhitespace(equation.charAt(offset - 1))) { - return collectProposals("", offset); + return collectProposals(display, "", offset); } equation = equation.substring(0, offset); @@ -147,29 +190,35 @@ public class CompletionProcessor implements IContentAssistProcessor { // Split into tokens on whitespace characters String[] tokens = equation.split("[\\s]"); if (tokens.length == 0) { - return collectProposals("", offset); + return collectProposals(display, "", offset); } String token = tokens[tokens.length - 1]; // If a '+', '-', etc. character is in the end, return all. if (allowedConnectedCharactersRegExp.indexOf(token.charAt(token.length() - 1)) != -1) { - return collectProposals("", offset); + return collectProposals(display, "", offset); } // Split the last token on '+', '-', etc. characters String tokensOfLastToken[] = token.split(allowedConnectedCharactersRegExp); if (tokensOfLastToken.length == 0) { - return collectProposals("", offset); + return collectProposals(display, "", offset); } token = tokensOfLastToken[tokensOfLastToken.length - 1]; //System.out.println(token + "\noffset = " + offset); - return collectProposals(token, offset); + return collectProposals(display, token, offset); } @Override public IContextInformation[] computeContextInformation( ITextViewer viewer, int offset) { + + /*IContextInformation[] result = new IContextInformation[1]; + for (int i = 0; i < result.length; ++i) { + result[i] = new ContextInformation("String1", "String2"); + } + return result;*/ return null; } @@ -180,6 +229,7 @@ public class CompletionProcessor implements IContentAssistProcessor { @Override public char[] getContextInformationAutoActivationCharacters() { + //return allowedCharacters; return null; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java new file mode 100644 index 00000000..902c24f7 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/expressions/Function.java @@ -0,0 +1,192 @@ +package org.simantics.sysdyn.ui.properties.widgets.expressions; + +import java.util.ArrayList; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.graphics.Device; +import org.eclipse.swt.graphics.Image; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.ObjectsWithType; +import org.simantics.db.common.utils.ListUtils; +import org.simantics.db.common.utils.NameUtils; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.request.Read; +import org.simantics.layer0.Layer0; +import org.simantics.sysdyn.SysdynResource; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.ui.SimanticsUI; + + +/** + * Class to store function name, type, and parameters. + * + * @author Tuomas Miettinen + * + */ +public class Function implements Comparable{ + + private final String name; + private final Type type; + private final String parameterList; + + public enum Type { + USER_DEFINED, + SHARED, + VENSIM, + SYSDYN, + MODELICA, + MODELICA_ARRAY + } + + /** + * Get the icon image for each type of Modelica function. + * @param device Device for which the image is used. + * @param function Modelica function + * @return Image to be shown e.g. in assistive text feed and ShortcutTab + */ + public static Image getImage(Device device, Function function) { + switch (function.getType()) { + case USER_DEFINED: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/function.png")).createImage(device); + case SHARED: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/functionLink.png")).createImage(device); + case VENSIM: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/vensimFunction.png")).createImage(device); + case SYSDYN: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/sysdynFunction.png")).createImage(device); + case MODELICA: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaFunction.png")).createImage(device); + case MODELICA_ARRAY: + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaArrayFunction.png")).createImage(device); + default: + return null; + } + } + + public Function(String name, String parameterList, Type type){ + this.name = new String(name); + this.type = type; + if (parameterList != null) + this.parameterList = new String(parameterList); + else + this.parameterList = new String(""); + } + + public String getParameterList() { + return parameterList; + } + + public String getName() { + return name; + } + + public Type getType() { + return type; + } + + @Override + public int compareTo(Function f) { + // Sorting is done first in the order of Types and then alphabetically. + int typeCompare = type.compareTo(f.getType()); + return typeCompare != 0 ? typeCompare : name.compareTo(f.getName()); + } + + /** + * Get Modelica function parameters + * @param graph + * @param sr + * @param r Resource of the Modelica function + * @return String in which the paramters are ", " delimited + * @throws DatabaseException + */ + private static String getFunctionInputs(ReadGraph graph, SysdynResource sr, Resource r) throws DatabaseException { + Resource inputs = graph.getPossibleObject(r, sr.SysdynModelicaFunction_inputs); + String inputStr = null; + if (inputs != null) { + for (Resource input : ListUtils.toList(graph, inputs)) { + String inputName = null; + if (graph.isInstanceOf(input, sr.SysdynModelicaFunction_VariableLengthInput)) { + inputName = ""; + Resource shownLabels = graph.getPossibleObject( + input, + sr.SysdynModelicaFunction_VariableLengthInput_shownLabels); + if (shownLabels != null) { + for (Resource label : ListUtils.toList(graph, shownLabels)) { + inputName += NameUtils.getSafeName(graph, label); + inputName += ", "; + } + } + inputName += "..."; + } else { + inputName = NameUtils.getSafeName(graph, input); + } + if (inputStr == null) + inputStr = new String(inputName); + else + inputStr += ", " + inputName; + } + } + return inputStr; + } + + /** + * Get all (atm. only built-in) Modelica functions. + * @return ArrayList containing all functions. + */ + public static ArrayList getAllFunctions() { + ArrayList result = null; + + //Finding functions + try { + result = SimanticsUI.getSession().syncRequest(new Read>() { + @Override + public ArrayList perform(ReadGraph graph) + throws DatabaseException { + SysdynResource sr = SysdynResource.getInstance(graph); + Layer0 l0 = Layer0.getInstance(graph); + ArrayList functions = new ArrayList(); + + // Add Sysdyn functions + Resource functionLibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(functionLibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + String inputStr = getFunctionInputs(graph, sr, r); + functions.add(new Function(name, inputStr, Type.SYSDYN)); + } + + // Add Vensim functions + Resource subFunctionLibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Vensim_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(subFunctionLibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + String inputStr = getFunctionInputs(graph, sr, r); + functions.add(new Function(name, inputStr, Type.VENSIM)); + } + + // Add Modelica functions + subFunctionLibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Modelica_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(subFunctionLibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + String inputStr = getFunctionInputs(graph, sr, r); + functions.add(new Function(name, inputStr, Type.MODELICA)); + } + + // Add Modelica array functions + subFunctionLibrary = graph.getPossibleResource(SysdynResource.URIs.Built$in_Functions_Modelica_Array_Functions); + for(Resource r : graph.syncRequest(new ObjectsWithType(subFunctionLibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) { + String name = NameUtils.getSafeName(graph, r); + String inputStr = getFunctionInputs(graph, sr, r); + functions.add(new Function(name, inputStr, Type.MODELICA_ARRAY)); + } + + return functions; + } + }); + } + catch (DatabaseException e) { + e.printStackTrace(); + } + + return result; + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java index 2d0cb58d..b9fb5d8c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/widgets/functions/FunctionCodeWidget.java @@ -130,6 +130,13 @@ public class FunctionCodeWidget implements Widget { public String perform(ReadGraph graph) throws DatabaseException { String code = graph.getPossibleRelatedValue( function, SysdynResource.getInstance(graph).SysdynModelicaFunction_modelicaFunctionCode); + if (code == null) { + code = graph.getPossibleRelatedValue( + function, SysdynResource.getInstance(graph).SysdynModelicaFunction_modelicaFunctionInterface); + if (code == null) { + code = new String(""); + } + } return code; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java index e186e3f1..a7a28c17 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java @@ -26,6 +26,7 @@ import java.util.regex.Pattern; import org.eclipse.jface.text.Position; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Device; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import org.simantics.db.ReadGraph; @@ -76,6 +77,36 @@ public class ExpressionUtils { return false; } } + + /** + * Color for a variable found in an expression field, used in shortcut tab. + * This is a bit silly means of communicating the state of a variable using its color. + * @param device Device in which the color is used. + * @return Color for such variable. + */ + static public Color variableFoundColor(Device device) { + return new Color(device, 0,0,0); + } + + /** + * Color for a variable not found in an expression field, used in shortcut tab. + * This is a bit silly means of communicating the state of a variable using its color. + * @param device Device in which the color is used. + * @return Color for such variable. + */ + static public Color variableNotFoundColor(Device device) { + return new Color(device, 255,125,0); + } + + /** + * Color for a variable itself and for the time variable, used in shortcut tab. + * This is a bit silly means of communicating the state of a variable using its color. + * @param device Device in which the color is used. + * @return Color for such variable. + */ + static public Color variableTimeAndSelfColor(Device device) { + return new Color(device, 127,127,127); + } /** * Validates the expressionfield of a given IExpression @@ -266,11 +297,11 @@ public class ExpressionUtils { TableItem[] connectedVariables = variableTable.getItems(); for(TableItem ti : connectedVariables) { if (ti.getText().equals("time") || ti.getText().equals(selfName)) { - ti.setForeground(new Color(ti.getDisplay(), 127,127,127)); + ti.setForeground(variableTimeAndSelfColor(ti.getDisplay())); } else if (parsingSucceeded && !variables.contains(ti.getText())) { - ti.setForeground(new Color(ti.getDisplay(), 255,125,0)); + ti.setForeground(variableNotFoundColor(ti.getDisplay())); } else if (parsingSucceeded) { - ti.setForeground(new Color(ti.getDisplay(), 0, 0, 0)); + ti.setForeground(variableFoundColor(ti.getDisplay())); variables.remove(ti.getText()); } } diff --git a/org.simantics.sysdyn/ModelicaParser.html b/org.simantics.sysdyn/ModelicaParser.html new file mode 100644 index 00000000..b33e433b --- /dev/null +++ b/org.simantics.sysdyn/ModelicaParser.html @@ -0,0 +1,737 @@ + + + +BNF for ModelicaParser.jj + + +

BNF for ModelicaParser.jj

+

TOKENS

+ + + + + + + + + + + + + +
+
+/*** Lexer *********************************************************/
+
+
+<DEFAULT> SKIP : {
+<WHITESPACE: " " | "\n" | "\r" | "\t">
+| <COMMENT1: "/*" (~["*"] | "*" ~["/"])* "*/">
+| <COMMENT2: "//" (~["\n"])*>
+}
+
+   
+
+
+<DEFAULT> TOKEN : {
+"algorithm"
+| "discrete"
+| "false"
+| "model"
+| "redeclare"
+| "and"
+| "each"
+| "final"
+| "not"
+| "replaceable"
+| "annotation"
+| "else"
+| "flow"
+| "operator"
+| "return"
+| "assert"
+| "elseif"
+| "for"
+| "or"
+| "stream"
+| "block"
+| "elsewhen"
+| "function"
+| "outer"
+| "then"
+| "break"
+| "encapsulated"
+| "if"
+| "output"
+| "true"
+| "class"
+| "end"
+| "import"
+| "package"
+| "type"
+| "connect"
+| "enumeration"
+| "in"
+| "parameter"
+| "when"
+| "connector"
+| "equation"
+| "initial"
+| "partial"
+| "while"
+| "constant"
+| "expandable"
+| "inner"
+| "protected"
+| "within"
+| "constrainedby"
+| "extends"
+| "input"
+| "public"
+| "der"
+| "external"
+| "loop"
+| "record"
+| "("
+| ")"
+| "{"
+| "}"
+| "["
+| "]"
+| "."
+| ":"
+| ";"
+| ","
+| "<"
+| "<="
+| ">"
+| ">="
+| "=="
+| "<>"
+| "+"
+| "-"
+| ".+"
+| ".-"
+| "*"
+| "/"
+| ".*"
+| "./"
+| "^"
+| ".^"
+| "="
+| ":="
+| <IDENT: ["a"-"z","A"-"Z","_"] (["a"-"z","A"-"Z","_","0"-"9"])*>
+| <STRING: "\"" (~["\"","\\","\n"] | "\\" ~["\n"])* "\""> : {
+| <UNSIGNED_INTEGER: (["0"-"9"])+>
+| <UNSIGNED_NUMBER: <UNSIGNED_INTEGER> "." (<UNSIGNED_INTEGER>)? (["e","E"] <UNSIGNED_INTEGER>)? | "." <UNSIGNED_INTEGER> (["e","E"] <UNSIGNED_INTEGER>)? | <UNSIGNED_INTEGER> ["e","E"] <UNSIGNED_INTEGER>>
+}
+
+   
+
+

NON-TERMINALS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+/*** Parser ********************************************************/
+
+// https://javacc.dev.java.net/doc/javaccgrm.html
+// add_op -> add_op()
+// [ add_op ] -> ( add_op() )?
+// { add_op term } -> ( add_op() term() )*
+
+
parse::=stored_definition <EOF>
+
+/*** Stored Definition - Within ************************************/
+
stored_definition::=( "within" ( name )? ";" )? ( ( "final" )? class_definition ";" )*
+
+/*** Class Definition **********************************************/
+
class_definition::=( "encapsulated" )? ( "partial" )? ( "class" | "model" | "record" | "block" | ( "expandable" )? "connector" | "type" | "package" | "function" | "operator" | "operator function" | "operator record" ) class_specifier
class_specifier::=<IDENT> string_comment composition "end" <IDENT>
|<IDENT> "=" base_prefix name ( array_subscripts )? ( class_modification )? comment
|<IDENT> "=" "enumeration" "(" ( ( enum_list )? | ":" ) ")" comment
|<IDENT> "=" "der" "(" name "," <IDENT> ( "," <IDENT> )* ")" comment
|"extends" <IDENT> ( class_modification )? string_comment composition "end" <IDENT>
base_prefix::=type_prefix
enum_list::=enumeration_literal ( "," enumeration_literal )*
enumeration_literal::=<IDENT> comment
parse_composition::=composition <EOF>
composition::=element_list ( "public" element_list | "protected" element_list | equation_section | algorithm_section )* ( "external" ( language_specification )? ( external_function_call )? ( annotation )? ";" )? ( annotation ";" )?
language_specification::=<STRING>
external_function_call::=( component_reference "=" )? <IDENT> "(" ( expression_list )? ")"
element_list::=( element ";" )*
element::=import_clause
|extends_clause
|( "redeclare" )? ( "final" )? ( "inner" )? ( "outer" )? ( ( class_definition | component_clause ) | "replaceable" ( class_definition | component_clause ) ( constraining_clause comment )? )
import_clause::="import" ( <IDENT> "=" name | name ( "." "*" )? ) comment
+
+/*** Extends *******************************************************/
+
extends_clause::="extends" name ( class_modification )? ( annotation )?
constraining_clause::="constrainedby" name ( class_modification )?
+
+/*** Component Clause **********************************************/
+
component_clause::=( type_prefix ) type_specifier ( array_subscripts )? component_list
type_prefix::=( "flow" | "stream" )? ( "discrete" | "parameter" | "constant" )? ( "output" | "input" )?
type_specifier::=name
component_list::=component_declaration ( "," component_declaration )*
component_declaration::=declaration ( conditional_attribute )? comment
conditional_attribute::="if" expression
declaration::=<IDENT> ( array_subscripts )? ( modification )?
+
+/*** Modification **********************************************/
+
modification::=class_modification ( "=" expression )?
|"=" expression
|":=" expression
class_modification::="(" ( argument_list )? ")"
argument_list::=argument ( "," argument )*
argument::=element_modification_or_replaceable
|element_redeclaration
element_modification_or_replaceable::=( "each" )? ( "final" )? ( element_modification | element_replaceable )
element_modification::=name ( modification )? string_comment
element_redeclaration::="redeclare" ( "each" )? ( "final" )? ( ( class_definition | component_clause1 ) | element_replaceable )
element_replaceable::="replaceable" ( class_definition | component_clause1 ) ( constraining_clause )?
component_clause1::=type_prefix type_specifier component_declaration1
component_declaration1::=declaration comment
+
+/*** Equations *************************************************/
+
equation_section::=( "initial" )? "equation" ( equation ";" )*
algorithm_section::=( "initial" )? "algorithm" ( statement ";" )*
equation::=( simple_expression "=" expression | if_equation | for_equation | connect_clause | when_equation | <IDENT> function_call_args ) comment
statement::=( component_reference ( ":=" expression | function_call_args ) | "(" output_expression_list ")" ":=" component_reference function_call_args | "break" | "return" | if_statement | for_statement | while_statement | when_statement ) comment
if_equation::="if" expression "then" ( equation ";" )* ( "elseif" expression "then" ( equation ";" )* )* ( "else" ( equation ";" )* )? "end" "if"
if_statement::="if" expression "then" ( statement ";" )* ( "elseif" expression "then" ( statement ";" )* )* ( "else" ( statement ";" )* )? "end" "if"
for_equation::="for" for_indices "loop" ( equation ";" )* "end" "for"
for_statement::="for" for_indices "loop" ( statement ";" )* "end" "for"
for_indices::=for_index ( "," for_index )*
for_index::=<IDENT> ( "in" expression )?
while_statement::="while" expression "loop" ( statement ";" )* "end" "while"
when_equation::="when" expression "then" ( equation ";" )* ( "elsewhen" expression "then" ( equation ";" )* )* "end" "when"
when_statement::="when" expression "then" ( statement ";" )* ( "elsewhen" expression "then" ( statement ";" )* )* "end" "when"
connect_clause::="connect" "(" component_reference "," component_reference ")"
+
+/*** Expressions ***************************************************/
+
expr::=simple_expression <EOF>
|"if" expression "then" expression ( "elseif" expression "then" expression )* "else" expression <EOF>
expression::=simple_expression
|"if" expression "then" expression ( "elseif" expression "then" expression )* "else" expression
simple_expression::=logical_expression ( ":" logical_expression ( ":" logical_expression )? )?
logical_expression::=logical_term ( "or" logical_term )*
logical_term::=logical_factor ( "and" logical_factor )*
logical_factor::=( "not" )? relation
relation::=arithmetic_expression ( rel_op arithmetic_expression )?
rel_op::="<"
|"<="
|">"
|">="
|"=="
|"<>"
arithmetic_expression::=( add_op )? term ( add_op term )*
add_op::="+"
|"-"
|".+"
|".-"
term::=factor ( mul_op factor )*
mul_op::="*"
|"/"
|".*"
|"./"
factor::=primary ( "^" | ".^" primary )?
primary::=<UNSIGNED_NUMBER>
|<UNSIGNED_INTEGER>
|<STRING>
|"false"
|"true"
|( name | "der" | "initial" ) function_call_args
|component_reference
|"(" output_expression_list ")"
|"[" expression_list ( ";" expression_list )* "]"
|"{" function_arguments "}"
|"end"
name::=( "." )? <IDENT> ( "." <IDENT> )*
component_reference::=( "." )? <IDENT> ( array_subscripts )? ( "." <IDENT> ( array_subscripts )? )*
function_call_args::="(" ( function_arguments )? ")"
function_arguments::=expression ( "," function_arguments | "for" for_indices )?
|named_arguments
named_arguments::=named_argument ( "," named_arguments )?
named_argument::=<IDENT> "=" expression
output_expression_list::=( expression )? ( "," ( expression )? )*
expression_list::=expression ( "," expression )*
array_subscripts::="[" subscript ( "," subscript )* "]"
subscript::=":"
|expression
comment::=string_comment ( annotation )?
string_comment::=( <STRING> ( "+" <STRING> )* )?
annotation::="annotation" class_modification
+ + diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java index 097b51ed..1d79f466 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/FunctionUtils.java @@ -259,7 +259,11 @@ public class FunctionUtils { SysdynResource sr = SysdynResource.getInstance(graph); for(Resource function : graph.syncRequest(new ObjectsWithType(library, l0.ConsistsOf, sr.SysdynModelicaFunction))) { String name = NameUtils.getSafeName(graph, function); - String functionCode = graph.getRelatedValue(function, sr.SysdynModelicaFunction_modelicaFunctionCode); + // Built-in Modelica (array) functions have no function code and they don't need to be added explicitly. + String functionCode = graph.getPossibleRelatedValue(function, sr.SysdynModelicaFunction_modelicaFunctionCode); + if (functionCode == null) { + continue; + } stream.println("function " + name); stream.println(functionCode); stream.println("end " + name + ";\n"); diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelParser/ModelicaParser.jj b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelParser/ModelicaParser.jj index cc155d08..a739dad9 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/modelParser/ModelicaParser.jj +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/modelParser/ModelicaParser.jj @@ -196,34 +196,39 @@ void constraining_clause() : { } /*** Component Clause **********************************************/ -void component_clause() : { +void component_clause() : { boolean isInput = false; } { + // type_prefix type_specifier [ array_subscripts ] component_list - type_prefix() type_specifier() ( array_subscripts() )? component_list() + ( isInput = type_prefix() ) type_specifier() ( array_subscripts() )? component_list(isInput) } -void type_prefix() : { +boolean type_prefix() : { boolean isInput = false; } { // [ flow | stream ] // [ discrete | parameter | constant ] [ input | output ] ( "flow" | "stream" )? - ( "discrete" | "parameter" | "constant" )? ( "input" | "output" )? } + ( "discrete" | "parameter" | "constant" )? + ( "output" | "input" { isInput = true; } )? + { return isInput; + } +} void type_specifier() : { } { name() } -void component_list() : { +void component_list(boolean isInput) : { } { // component_declaration { "," component_declaration } - component_declaration() ( "," component_declaration() )* + component_declaration(isInput) ( "," component_declaration(isInput) )* } -void component_declaration() : { +void component_declaration(boolean isInput) : { } { // declaration [ conditional_attribute ] comment - declaration() ( conditional_attribute() )? comment() + declaration(isInput) ( conditional_attribute() )? comment() } void conditional_attribute() : { @@ -231,10 +236,16 @@ void conditional_attribute() : { "if" expression() } -void declaration() : { +void declaration(boolean isInput) : { String input_variable = null; } { // IDENT [ array_subscripts ] [ modification ] - ( array_subscripts() )? ( modification() )? + { if (isInput) input_variable = new String(token.image); } + ( array_subscripts() )? + ( modification() { input_variable = null; })? + { + if (input_variable != null) { + //System.out.println("collect: " + input_variable); } + } } /*** Modification **********************************************/ @@ -301,7 +312,7 @@ void component_clause1() : { void component_declaration1() : { } { - declaration() comment() + declaration(false) comment() }