MAF.scalar.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.scalar.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.vector.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.vector.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.matrix.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.matrix.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.ndims.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.ndims.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Integer"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
\r
\r
\r
MAF.size.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
MAF.size.i : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional true\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.size.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
\r
\r
\r
MAF.array.A : SYSDYN.SysdynModelicaFunction.VariableLengthInput\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List\r
@L0.list\r
MAF.array.A.A : L0.String\r
@L0.list\r
MAF.array.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.cat.k : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
MAF.cat.A : SYSDYN.SysdynModelicaFunction.VariableLengthInput\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List\r
@L0.list\r
MAF.cat.A.A : L0.String\r
@L0.list\r
MAF.cat.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.zeros.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List\r
@L0.list\r
MAF.zeros.n.n1 : L0.String\r
@L0.list\r
MAF.zeros.o : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Integer"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n annotation(__OpenModelica_varArgs = true);\r
output Integer o[:];"""\r
\r
MAF.ones.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput\r
SYSDYN.Variable.type "Integer"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List\r
@L0.list\r
MAF.ones.n.n1 : L0.String\r
@L0.list\r
MAF.ones.o : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Integer"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n annotation(__OpenModelica_varArgs = true);\r
output Integer o[:];"""\r
\r
MAF.fill.s : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MAF.fill.n : SYSDYN.SysdynModelicaFunction.VariableLengthInput\r
SYSDYN.Variable.type "Integer"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.VariableLengthInput.shownLabels _ : L0.List\r
@L0.list\r
MAF.fill.n.n1 : L0.String\r
@L0.list\r
MAF.fill.o : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input OpenModelica.Internal.BuiltinType s;\r
input Integer n annotation(__OpenModelica_varArgs = true);\r
output OpenModelica.Internal.BuiltinType o[:];"""\r
MAF.identity.n : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Integer "\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.identity.outArray : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Integer "\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Integer n;\r
output Integer[n,n] outArray;"""\r
\r
MAF.diagonal.v : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.diagonal.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.linspace.x1 : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MAF.linspace.x2 : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MAF.linspace.n : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Integer"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.linspace.v : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x1 "start";\r
input Real x2 "end";\r
input Integer n "number";\r
MAF.min.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.min.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.max.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.max.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.sum.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.sum.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.product.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.product.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
\r
\r
\r
MAF.transpose.A : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.transpose.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MAF.cross.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MAF.cross.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.cross.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p*'q"\r
\r
\r
\r
MAF.skew.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MAF.skew.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
+
\ No newline at end of file
MF.abs.v : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.abs.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.acos.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.acos.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.asin.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.asin.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.atan.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.atan.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.atan2.u1 : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.atan2.u2 : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.atan2.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u1;\r
input Real u2;\r
output Real z;"""\r
MF.ceil.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.ceil.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
output Real y;"""\r
\r
MF.ceil.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.ceil.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.cosh.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.cosh.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.delay.expr : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.delay.delayTime : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
MF.delay.delayMax : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional true\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.delay.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.der.expr : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.der.dexpr : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/TIME"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real expr(unit = "'p");\r
output Real dexpr(unit = "'p/s");"""\r
\r
MF.div.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.div.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.div.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
\r
\r
\r
MF.edge.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Boolean"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.edge.edgeEvent : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Boolean"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Boolean b;\r
output Boolean edgeEvent;"""\r
\r
MF.exp.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.exp.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1");\r
output Real y(unit = "1");"""\r
\r
MF.floor.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.floor.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
output Real y;"""\r
\r
@L0.list\r
MF.initial.isInitial : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Boolean"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ output Boolean isInitial;"""\r
\r
\r
MF.log.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.log.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1");\r
output Real y(unit = "1");"""\r
\r
MF.log10.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.log10.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u(unit = "1");\r
output Real y(unit = "1");"""\r
\r
MF.max.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.max.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.max.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.min.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.min.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.min.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.mod.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.mod.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.mod.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.noEvent.expr : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.noEvent.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
\r
\r
\r
MF.pre.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.pre.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
+\r
+\r
\r
MF.rem : SYSDYN.SysdynModelicaFunction\r
L0.HasDescription """rem(x, y)\r
MF.rem.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.rem.y : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.rem.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.sample.start : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
MF.sample.interval : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.sample.isSample : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Boolean"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ parameter input Real start(fixed = false);\r
parameter input Real interval(fixed = false);\r
output Boolean isSample;"""\r
MF.semiLinear.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
MF.semiLinear.positiveSlope : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
MF.semiLinear.negativeSlope : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.semiLinear.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p*'q"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
input Real positiveSlope;\r
input Real negativeSlope;\r
MF.sign.v : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.sign.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Integer"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real v;\r
output Integer result;"""\r
\r
MF.sin.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.sin.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
output Real y;"""\r
\r
MF.sinh.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.sinh.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
output Real y;"""\r
\r
MF.smooth.p : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
MF.smooth.expr : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.smooth.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
\r
\r
\r
MF.sqrt.v : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.sqrt.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real v(unit = "'p");\r
output Real y(unit = "'p(1/2)");"""\r
\r
MF.tan.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.tan.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real u;\r
output Real y;"""\r
\r
MF.tanh.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
MF.tanh.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ input Real x;\r
output Real y;"""\r
\r
@L0.list\r
MF.terminal.isTerminal : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Boolean"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionInterface """ output Boolean isTerminal;"""\r
\ No newline at end of file
SYSDYN.SysdynModelicaFunction.InterfaceVariable <T L0.Entity
@L0.singleProperty L0.HasName
>-- SYSDYN.SysdynModelicaFunction.definition --> L0.String <R L0.HasProperty
+ >-- SYSDYN.SysdynModelicaFunction.unit --> L0.String <R L0.HasProperty
SYSDYN.SysdynModelicaFunction.Input <T SYSDYN.SysdynModelicaFunction.InterfaceVariable
>-- SYSDYN.SysdynModelicaFunction.optional --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
FL.minmax.expression : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
FL.minmax.minimum : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
FL.minmax.maximum : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
FL.minmax.result : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real expression;\r
input Real minimum;\r
input Real maximum;\r
FL.xidz.divident : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
FL.xidz.divisor : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
FL.xidz.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.definition "Result if divisor = 0"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
FL.xidz.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real divident;\r
input Real divisor;\r
input Real x;\r
FL.zidz.divident : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
FL.zidz.divisor : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
FL.zidz.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real divident;\r
input Real divisor;\r
output Real z;\r
FL.interpolate.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.definition "input value (first column of table)"\r
FL.interpolate.table : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.definition "table to be interpolated"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
FL.interpolate.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real u "input value (first column of table)";\r
input Real table[:, :] "table to be interpolated";\r
output Real y "interpolated input value (icol column of table)";\r
FL.interpolateFull.u : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.definition "input value (first column of table)"\r
FL.interpolateFull.table : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.definition "table to be interpolated"\r
FL.interpolateFull.icol : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Integer"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.definition "column of table to be interpolated"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
FL.interpolateFull.y : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real u "input value (first column of table)";\r
input Real table[:, :] "table to be interpolated";\r
input Integer icol "column of table to be interpolated";\r
VF.IFTHENELSE.cond : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
VF.IFTHENELSE.ontrue : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.IFTHENELSE.onfalse : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.IFTHENELSE.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Boolean cond;\r
input Real ontrue;\r
input Real onfalse;\r
VF.MAX.a : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.MAX.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.MAX.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a;\r
input Real b;\r
output Real z;\r
VF.MIN.a : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.MIN.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.MIN.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a;\r
input Real b;\r
output Real z;\r
VF.XIDZ.a : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.XIDZ.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
VF.XIDZ.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.XIDZ.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a;\r
input Real b;\r
input Real x;\r
VF.ZIDZ.a : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.ZIDZ.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'q"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.ZIDZ.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p/'q"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a;\r
input Real b;\r
output Real z;\r
VF.ABS.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.ABS.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.SQRT.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.SQRT.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.MODULO.a : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.MODULO.b : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.MODULO.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real a;\r
input Real b;\r
output Real z;\r
VF.PULSE.start : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
VF.PULSE.width : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.PULSE.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real start;\r
input Real width;\r
input Real t = time;\r
VF.RAMP.slope : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
VF.RAMP.startTime : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
VF.RAMP.endTime : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.RAMP.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real slope;\r
input Real startTime;\r
input Real endTime;\r
VF.STEP.height : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit ".p"\r
VF.STEP.stepTime : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "TIME"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.STEP.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "'p"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real height;\r
input Real stepTime;\r
input Real t = time;\r
VF.EXP.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.EXP.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.SIN.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.SIN.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.SINH.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.SINH.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.COS.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.COS.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.COSH.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.COSH.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.TAN.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.TAN.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.TANH.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.TANH.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
VF.LN.x : SYSDYN.SysdynModelicaFunction.Input\r
SYSDYN.Variable.type "Real"\r
SYSDYN.SysdynModelicaFunction.optional false\r
+ SYSDYN.SysdynModelicaFunction.unit "ANY"\r
SYSDYN.SysdynModelicaFunction.outputs _ : L0.List\r
@L0.list\r
VF.LN.z : SYSDYN.SysdynModelicaFunction.Output\r
SYSDYN.Variable.type "Real"\r
+ SYSDYN.SysdynModelicaFunction.unit "1"\r
SYSDYN.SysdynModelicaFunction.modelicaFunctionCode """ input Real x;\r
output Real z;\r
algorithm\r
public final Resource SysdynModelicaFunction_optional_Inverse;\r
public final Resource SysdynModelicaFunction_outputs;\r
public final Resource SysdynModelicaFunction_outputs_Inverse;\r
+ public final Resource SysdynModelicaFunction_unit;\r
+ public final Resource SysdynModelicaFunction_unit_Inverse;\r
public final Resource SysdynModuleLibrary;\r
public final Resource SysdynOperationBrowser;\r
public final Resource SysdynSymbol;\r
public static final String SysdynModelicaFunction_optional_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/optional/Inverse";\r
public static final String SysdynModelicaFunction_outputs = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/outputs";\r
public static final String SysdynModelicaFunction_outputs_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/outputs/Inverse";\r
+ public static final String SysdynModelicaFunction_unit = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/unit";\r
+ public static final String SysdynModelicaFunction_unit_Inverse = "http://www.simantics.org/Sysdyn-1.1/SysdynModelicaFunction/unit/Inverse";\r
public static final String SysdynModuleLibrary = "http://www.simantics.org/Sysdyn-1.1/SysdynModuleLibrary";\r
public static final String SysdynOperationBrowser = "http://www.simantics.org/Sysdyn-1.1/SysdynOperationBrowser";\r
public static final String SysdynSymbol = "http://www.simantics.org/Sysdyn-1.1/SysdynSymbol";\r
SysdynModelicaFunction_optional_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_optional_Inverse);\r
SysdynModelicaFunction_outputs = getResourceOrNull(graph, URIs.SysdynModelicaFunction_outputs);\r
SysdynModelicaFunction_outputs_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_outputs_Inverse);\r
+ SysdynModelicaFunction_unit = getResourceOrNull(graph, URIs.SysdynModelicaFunction_unit);\r
+ SysdynModelicaFunction_unit_Inverse = getResourceOrNull(graph, URIs.SysdynModelicaFunction_unit_Inverse);\r
SysdynModuleLibrary = getResourceOrNull(graph, URIs.SysdynModuleLibrary);\r
SysdynOperationBrowser = getResourceOrNull(graph, URIs.SysdynOperationBrowser);\r
SysdynSymbol = getResourceOrNull(graph, URIs.SysdynSymbol);\r
\r
import org.eclipse.jface.layout.GridDataFactory;\r
import org.eclipse.jface.layout.GridLayoutFactory;\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
import org.eclipse.jface.resource.JFaceResources;\r
import org.eclipse.jface.resource.LocalResourceManager;\r
import org.eclipse.jface.viewers.IStructuredSelection;\r
import org.eclipse.swt.SWT;\r
import org.eclipse.swt.events.FocusListener;\r
import org.eclipse.swt.events.MouseListener;\r
+import org.eclipse.swt.graphics.Image;\r
import org.eclipse.swt.widgets.Composite;\r
import org.eclipse.swt.widgets.TabFolder;\r
import org.eclipse.swt.widgets.TabItem;\r
import org.simantics.db.procedure.AsyncListener;\r
import org.simantics.db.request.Read;\r
import org.simantics.layer0.Layer0;\r
-import org.simantics.sysdyn.ui.properties.widgets.expressions.Function;\r
+import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.sysdyn.ui.validation.ValidationUtils;\r
+import org.simantics.sysdyn.utils.Function;\r
import org.simantics.ui.SimanticsUI;\r
import org.simantics.utils.ui.ISelectionUtils;\r
\r
item = new TableItem(functionTable, SWT.NONE);\r
item.setText(function.getName() + "()");\r
item.setData(function.getName() + "(" + function.getParameterList() + ")");\r
- item.setImage(Function.getImage(this.resourceManager, function));\r
+ item.setImage(getImage(this.resourceManager, function));\r
}\r
\r
}\r
return variableTable;\r
}\r
\r
-\r
+ /**\r
+ * Get the icon image for each type of Modelica function.\r
+ * @param rm LocalResourceManager for which the image is created.\r
+ * @param function Modelica function\r
+ * @return Image to be shown e.g. in assistive text feed and ShortcutTab\r
+ */\r
+ public static Image getImage(LocalResourceManager rm, Function function) {\r
+ switch (function.getType()) {\r
+ case USER_DEFINED:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/function.png")));\r
+ case SHARED:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/functionLink.png")));\r
+ case VENSIM:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/vensimFunction.png")));\r
+ case SYSDYN:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/sysdynFunction.png")));\r
+ case MODELICA:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaFunction.png")));\r
+ case MODELICA_ARRAY:\r
+ return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaArrayFunction.png")));\r
+ default:\r
+ return null;\r
+ }\r
+ }\r
}\r
import org.simantics.db.layer0.variable.Variables;\r
import org.simantics.db.request.Read;\r
import org.simantics.sysdyn.ui.Activator;\r
+import org.simantics.sysdyn.ui.properties.widgets.ShortcutTabWidget;\r
import org.simantics.sysdyn.ui.utils.ExpressionUtils;\r
+import org.simantics.sysdyn.utils.Function;\r
import org.simantics.ui.SimanticsUI;\r
\r
\r
// Create CompletionProposals out of Functions\r
for (Function function : functions) {\r
if (token.length() == 0 || function.getName().toUpperCase().startsWith(token.toUpperCase())) {\r
- Image image = Function.getImage(resourceManager, function);\r
+ Image image = ShortcutTabWidget.getImage(resourceManager, function);\r
array.add(new CompletionProposal(\r
function.getName() + "(" + function.getParameterList() + ")", \r
offset - token.length(),\r
import org.simantics.sysdyn.representation.Sheet;\r
import org.simantics.sysdyn.representation.Variable;\r
import org.simantics.sysdyn.ui.modelica.ModelicaSourceViewerConfiguration;\r
-import org.simantics.sysdyn.ui.properties.widgets.expressions.Function;\r
+import org.simantics.sysdyn.utils.Function;\r
import org.simantics.ui.SimanticsUI;\r
\r
\r
import org.simantics.sysdyn.representation.IndependentVariable;\r
import org.simantics.sysdyn.representation.expressions.IExpression;\r
import org.simantics.sysdyn.representation.utils.UnitUtils;\r
+import org.simantics.sysdyn.utils.Function;\r
import org.simantics.sysdyn.utils.ModelUtils;\r
\r
public class UnitFunction {\r
continue;\r
String left = graph.getPossibleRelatedValue(output, SR.Variable_unit);\r
String right = graph.getPossibleRelatedValue(reference, SR.Variable_unit);\r
- result = UnitUtils.matchUnits(left, right, UnitUtils.allowEquivalents(graph, model));\r
+ ArrayList<Function> functions = Function.getAllBuiltInFunctions(graph);\r
+ result = UnitUtils.matchUnits(left, right, functions, UnitUtils.allowEquivalents(graph, model));\r
if(result != null)\r
issues.add(new ModuleStandardIssue(SR.Validations_ModuleOutputUnitWarning, module, output, reference));\r
}\r
continue;\r
String left = graph.getPossibleRelatedValue(variable, SR.Variable_unit);\r
String right = graph.getPossibleRelatedValue(reference, SR.Variable_unit);\r
- result = UnitUtils.matchUnits(left, right, UnitUtils.allowEquivalents(graph, model));\r
+ ArrayList<Function> functions = Function.getAllBuiltInFunctions(graph);\r
+ result = UnitUtils.matchUnits(left, right, functions, UnitUtils.allowEquivalents(graph, model));\r
if(result != null)\r
issues.add(new ModuleStandardIssue(SR.Validations_ModuleInputUnitWarning, module, variable, reference));\r
}\r
return "No unit defined for " + NameUtils.getSafeName(graph, rightResource);\r
\r
SysdynModel model = ModelUtils.getModel(graph, leftResource);\r
- String result = UnitUtils.matchUnits(left, right, UnitUtils.allowEquivalents(graph, model));\r
+ ArrayList<Function> functions = Function.getAllBuiltInFunctions(graph);\r
+ String result = UnitUtils.matchUnits(left, right, functions, UnitUtils.allowEquivalents(graph, model));\r
\r
if(result != null)\r
result = prefix + result + suffix;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.UnitParser;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
public class TestParser {\r
\r
UnitCheckingNode node = (UnitCheckingNode) parser.expr();\r
\r
try {\r
- UnitResult u = node.getUnits(units, allowEquivalents);\r
+ UnitResult u = node.getUnits(units, Function.getAllBuiltInFunctions(), allowEquivalents);\r
System.out.println("Result: " + u.getCleanFullUnit());\r
} catch (UnitCheckingException e) {\r
e.printStackTrace();\r
package org.simantics.sysdyn.representation.utils;\r
\r
import java.io.StringReader;\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
import java.util.HashSet;\r
import java.util.Set;\r
import org.simantics.sysdyn.unitParser.UnitParser;\r
import org.simantics.sysdyn.unitParser.nodes.ComponentReferenceFull;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
public class UnitUtils {\r
\r
HashMap<String, String> units = UnitUtils.findUnits(graph, model, configuration, components);\r
\r
try {\r
- node.getUnits(units, allowEquivalents(graph, model));\r
+ node.getUnits(units, Function.getAllBuiltInFunctions(graph), allowEquivalents(graph, model));\r
} catch (UnitCheckingException e) {\r
return e.getMessage();\r
} catch (DatabaseException e) {\r
leftReader.close();\r
\r
try {\r
+ ArrayList<Function> functions = Function.getAllBuiltInFunctions(graph);\r
boolean allowEquivalents = allowEquivalents(graph, model);\r
- UnitResult rightUnits = right.getUnits(units, allowEquivalents);\r
- UnitResult leftUnits = left.getUnits(null, allowEquivalents);\r
+ UnitResult rightUnits = right.getUnits(units, functions, allowEquivalents);\r
+ UnitResult leftUnits = left.getUnits(null, functions, allowEquivalents);\r
\r
if(!rightUnits.equals(leftUnits))\r
return leftUnits.getCleanFullUnit() + " != " + rightUnits.getCleanFullUnit();\r
}\r
\r
\r
- public static String matchUnits(String left, String right, boolean allowEquivalents) throws DatabaseException {\r
+ public static String matchUnits(String left, String right, ArrayList<Function> functions, boolean allowEquivalents) throws DatabaseException {\r
if(left == null || right == null || left.isEmpty() || right.isEmpty())\r
return "No unit defined";\r
\r
rightReader.close();\r
\r
try {\r
- UnitResult leftUnits = leftNode.getUnits(null, allowEquivalents);\r
- UnitResult rightUnits = rightNode.getUnits(null, allowEquivalents);\r
+ UnitResult leftUnits = leftNode.getUnits(null, functions, allowEquivalents);\r
+ UnitResult rightUnits = rightNode.getUnits(null, functions, allowEquivalents);\r
\r
if(!rightUnits.equals(leftUnits))\r
return leftUnits.getCleanFullUnit() + " != " + rightUnits.getCleanFullUnit();\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
\r
public class UnitCheckingNode extends SimpleNode {\r
super(id);\r
}\r
\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException{\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException{\r
UnitResult result = new UnitResult(allowEquivalents);\r
\r
if(jjtGetNumChildren() == 0){\r
result.append(node);\r
} else {\r
for(int i = 0; i < jjtGetNumChildren(); i++) {\r
- result.appendResult(((UnitCheckingNode)jjtGetChild(i)).getUnits(units, allowEquivalents));\r
+ result.appendResult(((UnitCheckingNode)jjtGetChild(i)).getUnits(units, functions, allowEquivalents));\r
}\r
}\r
return result; \r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.OPERATOR);\r
return result;\r
}\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
\r
UnitCheckingNode base = null;\r
\r
for(int i = 0; i < jjtGetNumChildren(); i++) {\r
candidateNode = ((UnitCheckingNode)jjtGetChild(i));\r
- UnitResult candidateUnits = candidateNode.getUnits(units, allowEquivalents);\r
+ UnitResult candidateUnits = candidateNode.getUnits(units, functions, allowEquivalents);\r
if(candidateUnits.getUnitType() == UnitType.OPERATOR) {\r
continue;\r
} else if(base == null || result.getUnitType() == UnitType.SCALAR || result.getUnitType() == UnitType.ANY) {\r
base = ((UnitCheckingNode)jjtGetChild(i));\r
- result.appendResult(base.getUnits(units, allowEquivalents));\r
+ result.appendResult(base.getUnits(units, functions, allowEquivalents));\r
continue;\r
} else if(candidateUnits.getUnitType() == UnitType.SCALAR) {\r
continue;\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
result.setUnitType(UnitType.SCALAR);\r
\r
FunctionArguments functionArguments = (FunctionArguments) jjtGetChild(0);\r
\r
for(UnitCheckingNode candidateNode : gatherExpressions(functionArguments, new ArrayList<UnitCheckingNode>())) {\r
- UnitResult candidateUnits = candidateNode.getUnits(units, allowEquivalents);\r
+ UnitResult candidateUnits = candidateNode.getUnits(units, functions, allowEquivalents);\r
if(candidateUnits.getUnitType() == UnitType.SCALAR) {\r
continue;\r
} else if(base == null) {\r
base = candidateNode;\r
UnitType oldUnitType = result.getUnitType();\r
- result.appendResult(base.getUnits(units, allowEquivalents));\r
+ result.appendResult(base.getUnits(units, functions, allowEquivalents));\r
\r
/*\r
* Make sure unit type persist\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
import java.io.StringReader;\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.ParseException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.UnitParser;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
super(id);\r
}\r
\r
- protected UnitResult parseUnits(String units, boolean allowEquivalents) {\r
+ protected UnitResult parseUnits(String units, ArrayList<Function> functions, boolean allowEquivalents) {\r
StringReader sr = new StringReader(units);\r
UnitParser parser = new UnitParser(sr);\r
try {\r
UnitCheckingNode node = (UnitCheckingNode) parser.expr();\r
- return node.getUnits(null, allowEquivalents);\r
+ return node.getUnits(null, functions, allowEquivalents);\r
} catch (ParseException e) {\r
e.printStackTrace();\r
} catch (UnitCheckingException e) {\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
String node = printNode();\r
\r
if("dmnl".equals(node)) {\r
if(!units.containsKey(node) || units.get(node) == null)\r
throw new UnitCheckingException("No units defined for " + node);\r
else {\r
- return parseUnits(units.get(node), allowEquivalents);\r
+ return parseUnits(units.get(node), functions, allowEquivalents);\r
}\r
} else {\r
UnitResult result = new UnitResult(allowEquivalents);\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.OPERATOR);\r
return result;\r
}\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.Token;\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
\r
UnitCheckingNode current = null;\r
\r
for(int i = 0; i < jjtGetNumChildren(); i++) {\r
current = ((UnitCheckingNode)jjtGetChild(i));\r
- UnitResult currentUnits = current.getUnits(units, allowEquivalents);\r
+ UnitResult currentUnits = current.getUnits(units, functions, allowEquivalents);\r
\r
if(currentUnits.getUnitType() == UnitType.ANY) {\r
result = new UnitResult(allowEquivalents);\r
UnitType unitType = currentUnits.getUnitType();\r
if(unitType == UnitType.SCALAR) {\r
int exponent;\r
- UnitResult baseUnits = base.getUnits(units, allowEquivalents);\r
+ UnitResult baseUnits = base.getUnits(units, functions, allowEquivalents);\r
try {\r
exponent = Integer.valueOf(currentUnits.getFullUnit());\r
} catch (NumberFormatException e) {\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
return new UnitResult(allowEquivalents);\r
}\r
\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
result.setUnitType(UnitType.ANY);\r
return result;\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult base = null;\r
UnitCheckingNode baseNode = null;\r
UnitCheckingNode candidateNode = null;\r
\r
for(int i = 0; i < jjtGetNumChildren(); i++) {\r
candidateNode = ((UnitCheckingNode)jjtGetChild(i));\r
- UnitResult candidateUnits = candidateNode.getUnits(units, allowEquivalents);\r
+ UnitResult candidateUnits = candidateNode.getUnits(units, functions, allowEquivalents);\r
\r
if(!(candidateNode instanceof Condition)) {\r
\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.OPERATOR);\r
return result;\r
}\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.OPERATOR);\r
return result;\r
}\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.OPERATOR);\r
return result;\r
}\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
\r
UnitCheckingNode base = null;\r
base = ((UnitCheckingNode)jjtGetChild(1));\r
\r
if(base instanceof Arithmetic) {\r
- result.appendResult(base.getUnits(units, allowEquivalents));\r
+ result.appendResult(base.getUnits(units, functions, allowEquivalents));\r
\r
for(int i = 2; i < jjtGetNumChildren(); i = i + 2) {\r
candidateNode = ((UnitCheckingNode)jjtGetChild(i));\r
\r
if(!(candidateNode instanceof Value)) {\r
operator = ((UnitCheckingNode)jjtGetChild(i-1));\r
- UnitResult candidateUnits = candidateNode.getUnits(units, allowEquivalents);\r
+ UnitResult candidateUnits = candidateNode.getUnits(units, functions, allowEquivalents);\r
if(!result.equals(candidateUnits)) {\r
result.equals(candidateUnits);\r
throw new UnitCheckingException("Not equals exception: " +\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.Token;\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
UnitResult result = new UnitResult(allowEquivalents);\r
\r
UnitCheckingNode current = null;\r
\r
for(int i = 0; i < jjtGetNumChildren(); i++) {\r
current = ((UnitCheckingNode)jjtGetChild(i));\r
- UnitResult currentUnits = current.getUnits(units, allowEquivalents);\r
+ UnitResult currentUnits = current.getUnits(units, functions, allowEquivalents);\r
\r
if(currentUnits.getUnitType() == UnitType.ANY) {\r
result = new UnitResult(allowEquivalents);\r
*******************************************************************************/\r
package org.simantics.sysdyn.unitParser.nodes;\r
\r
+import java.util.ArrayList;\r
import java.util.HashMap;\r
\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.nodes.UnitResult.UnitType;\r
+import org.simantics.sysdyn.utils.Function;\r
\r
/**\r
* See UnitCheckingNodeFactory for mapping\r
}\r
\r
@Override\r
- public UnitResult getUnits(HashMap<String, String> units, boolean allowEquivalents) throws UnitCheckingException {\r
- UnitResult result = super.getUnits(units, allowEquivalents);\r
+ public UnitResult getUnits(HashMap<String, String> units, ArrayList<Function> functions, boolean allowEquivalents) throws UnitCheckingException {\r
+ UnitResult result = super.getUnits(units, functions, allowEquivalents);\r
result.setUnitType(UnitType.SCALAR);\r
return result;\r
}\r
-package org.simantics.sysdyn.ui.properties.widgets.expressions;\r
+package org.simantics.sysdyn.utils;\r
\r
import java.util.ArrayList;\r
import java.util.Collection;\r
\r
-import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.jface.resource.LocalResourceManager;\r
-import org.eclipse.swt.graphics.Device;\r
-import org.eclipse.swt.graphics.Image;\r
import org.simantics.databoard.Bindings;\r
import org.simantics.db.ReadGraph;\r
import org.simantics.db.Resource;\r
import org.simantics.db.request.Read;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.sysdyn.SysdynResource;\r
-import org.simantics.sysdyn.ui.Activator;\r
import org.simantics.ui.SimanticsUI;\r
\r
\r
private final String parameterList;\r
private final String description;\r
\r
+ public static class Parameter {\r
+ public String name;\r
+ public String unit = "1";\r
+ public boolean variableLength = false;\r
+ }\r
+ \r
public enum Type {\r
USER_DEFINED,\r
SHARED,\r
VENSIM\r
}\r
\r
- /**\r
- * Get the icon image for each type of Modelica function.\r
- * @param rm LocalResourceManager for which the image is created.\r
- * @param function Modelica function\r
- * @return Image to be shown e.g. in assistive text feed and ShortcutTab\r
- */\r
- public static Image getImage(LocalResourceManager rm, Function function) {\r
- switch (function.getType()) {\r
- case USER_DEFINED:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/function.png")));\r
- case SHARED:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/functionLink.png")));\r
- case VENSIM:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/vensimFunction.png")));\r
- case SYSDYN:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/sysdynFunction.png")));\r
- case MODELICA:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaFunction.png")));\r
- case MODELICA_ARRAY:\r
- return rm.createImage(ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaArrayFunction.png")));\r
- default:\r
- return null;\r
- }\r
- }\r
-\r
- /**\r
- * Get the icon image for each type of Modelica function.\r
- * @param device Device for which the image is used.\r
- * @param function Modelica function\r
- * @return Image to be shown e.g. in assistive text feed and ShortcutTab\r
- */\r
- @Deprecated\r
- public static Image getImage(Device device, Function function) {\r
- switch (function.getType()) {\r
- case USER_DEFINED:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/function.png")).createImage(device);\r
- case SHARED:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/functionLink.png")).createImage(device);\r
- case VENSIM:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/vensimFunction.png")).createImage(device);\r
- case SYSDYN:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/sysdynFunction.png")).createImage(device);\r
- case MODELICA:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaFunction.png")).createImage(device);\r
- case MODELICA_ARRAY:\r
- return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/modelicaArrayFunction.png")).createImage(device);\r
- default:\r
- return null;\r
- }\r
- }\r
- \r
- public Function(String name, String parameterList, Type type, String description){\r
+ public Function(String name, ArrayList<Parameter> parameterList, Type type, String description){\r
this.name = new String(name);\r
\r
this.type = type;\r
\r
- if (parameterList != null)\r
- this.parameterList = new String(parameterList);\r
+ String parameterListString = parameterListToString(parameterList);\r
+ if (parameterListString != null)\r
+ this.parameterList = new String(parameterListString);\r
else\r
this.parameterList = new String("");\r
\r
else\r
this.description = null;\r
}\r
+ \r
+ public static String parameterListToString(ArrayList<Parameter> parameterList) {\r
+ String inputStr = null;\r
+ for (Parameter p : parameterList) {\r
+ if (inputStr == null)\r
+ inputStr = new String(p.name);\r
+ else\r
+ inputStr += ", " + p.name;\r
+ }\r
+ return inputStr;\r
+ }\r
\r
public String getParameterList() {\r
return parameterList;\r
* @return String in which the paramters are ", " delimited\r
* @throws DatabaseException\r
*/\r
- public static String getFunctionInputs(ReadGraph graph, SysdynResource sr, Resource r) throws DatabaseException {\r
+ public static ArrayList<Parameter> getFunctionInputs(ReadGraph graph, SysdynResource sr, Resource r) throws DatabaseException {\r
Resource inputs = graph.getPossibleObject(r, sr.SysdynModelicaFunction_inputs);\r
- String inputStr = null;\r
+ ArrayList<Parameter> inputParameters = new ArrayList<Parameter>();\r
if (inputs != null) {\r
for (Resource input : ListUtils.toList(graph, inputs)) {\r
- String inputName = null;\r
+ Parameter inputParameter = new Parameter();\r
if (graph.isInstanceOf(input, sr.SysdynModelicaFunction_VariableLengthInput)) {\r
- inputName = "";\r
+ inputParameter.name = "";\r
+ inputParameter.variableLength = true;\r
Resource shownLabels = graph.getPossibleObject(\r
input, \r
sr.SysdynModelicaFunction_VariableLengthInput_shownLabels);\r
if (shownLabels != null) {\r
for (Resource label : ListUtils.toList(graph, shownLabels)) {\r
- inputName += NameUtils.getSafeName(graph, label);\r
- inputName += ", ";\r
+ inputParameter.name += NameUtils.getSafeName(graph, label);\r
+ inputParameter.name += ", ";\r
}\r
}\r
- inputName += "...";\r
+ inputParameter.name += "...";\r
} else {\r
- inputName = NameUtils.getSafeName(graph, input);\r
+ inputParameter.name = NameUtils.getSafeName(graph, input);\r
}\r
- if (inputStr == null)\r
- inputStr = new String(inputName);\r
- else\r
- inputStr += ", " + inputName;\r
+ \r
+ inputParameters.add(inputParameter);\r
}\r
}\r
- return inputStr;\r
+ return inputParameters;\r
}\r
\r
public static String getFunctionDescription(ReadGraph graph, Resource r) throws DatabaseException {\r
Resource functionLibrary = graph.getPossibleResource(functionTypeUri);\r
for(Resource r : graph.syncRequest(new ObjectsWithType(functionLibrary, l0.ConsistsOf, sr.SysdynModelicaFunction))) {\r
String name = NameUtils.getSafeName(graph, r);\r
- String inputStr = getFunctionInputs(graph, sr, r);\r
+ ArrayList<Parameter> inputs = getFunctionInputs(graph, sr, r);\r
String description = getFunctionDescription(graph, r);\r
- functions.add(new Function(name, inputStr, functionType, description));\r
+ functions.add(new Function(name, inputs, functionType, description));\r
}\r
return functions;\r
}\r