From a7878ff29ccf8bb286371f2311db3b07a9b934ac Mon Sep 17 00:00:00 2001
From: Chhavi
Date: Tue, 5 Jul 2016 07:47:13 +0000
Subject: updated dependencies.js

---
 dependencies.js | 265 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 265 insertions(+)

(limited to 'dependencies.js')

diff --git a/dependencies.js b/dependencies.js
index 51341e4..860d4f8 100644
--- a/dependencies.js
+++ b/dependencies.js
@@ -497,6 +497,271 @@ function GroundBlock() {
     }
 }
 
+function Product() {
+    if (arguments.length > 0) {
+        var options = arguments[0];
+        this.angle = options.angle; // Not Known
+        this.blockType = getData(options.model.blocktype)[0];
+        this.connectable = options.connectable; // Not Known
+        var dep_ut = getData(options.model.dep_ut);
+        if (dep_ut[0] == "true")
+            this.dependsOnU = "1";
+        if (dep_ut[1] == "true")
+            this.dependsOnT = "1";
+        this.id = options.id;
+        this.interfaceFunctionName = arguments.callee.caller.name;
+        this.ordering = options.ordering;
+        this.parent = options.parent;
+        if (options.model.sim instanceof Array) {
+            this.simulationFunctionName = getData(options.model.sim[0])[0];
+            var func_type;
+            switch (getData(options.model.sim[1])[0].toString()) {
+                case "-2.0":
+                    func_type = "ESELECT";
+                    break;
+                case "-1.0":
+                    func_type = "IFTHENELSE";
+                    break;
+                case "1.0":
+                    func_type = "TYPE_1";
+                    break;
+                case "2.0":
+                    func_type = "TYPE_2";
+                    break;
+                case "3.0":
+                    func_type = "TYPE_3";
+                    break;
+                case "4.0":
+                    func_type = "C_OR_FORTRAN";
+                    break;
+                case "5.0":
+                    func_type = "SCILAB";
+                    break;
+                case "99.0":
+                    func_type = "DEBUG";
+                    break;
+                case "1001.0":
+                    func_type = "DYNAMIC_FORTRAN_1";
+                    break;
+                case "2001.0":
+                    func_type = "DYNAMIC_C_1";
+                    break;
+                case "2004.0":
+                    func_type = "DYNAMIC_EXPLICIT_4";
+                    break;
+                case "10001.0":
+                    func_type = "OLDBLOCKS";
+                    break;
+                case "10004.0":
+                    func_type = "IMPLICIT_C_OR_FORTRAN";
+                    break;
+                case "30004.0":
+                    func_type = "MODELICA";
+                    break;
+            }
+            this.simulationFunctionType = func_type;
+        } else {
+            this.simulationFunctionName = getData(options.model.sim)[0];
+            this.simulationFunctionType = "DEFAULT";
+        }
+        if(!isEmpty(options.graphics.style)) {
+            this.style = getData(options.graphics.style)[0];
+        }
+        else {
+            this.style = arguments.callee.caller.name;
+        }
+        this.value = options.value; // Not Known
+        this.vertex = options.vertex; // Not Known
+        this.visible = options.visible; // Not Known
+        this.exprs = options.graphics.exprs;
+        this.realParameters = options.model.rpar;
+        this.integerParameters = options.model.ipar;
+        this.objectsParameters = options.model.opar;
+        this.nbZerosCrossing = options.model.nzcross;
+        this.nmode = options.model.nmode;
+        if(!isEmpty(options.model.state)) {
+            this.state = options.model.state;
+        }
+        if(!isEmpty(options.model.dstate)) {
+            this.dState = options.model.dstate;
+        }
+        this.oDState = options.model.odstate;
+        this.equations = options.model.equations;
+        this.blockName = "Product";
+        this.blockElementName = arguments.callee.caller.name;
+    }
+}
+
+function ImplicitOutBlock() {
+    if (arguments.length > 0) {
+        var options = arguments[0];
+        this.angle = options.angle; // Not Known
+        this.blockType = getData(options.model.blocktype)[0];
+        this.connectable = options.connectable; // Not Known
+        var dep_ut = getData(options.model.dep_ut);
+        if (dep_ut[0] == "true")
+            this.dependsOnU = "1";
+        if (dep_ut[1] == "true")
+            this.dependsOnT = "1";
+        this.id = options.id;
+        this.interfaceFunctionName = arguments.callee.caller.name;
+        this.ordering = options.ordering;
+        this.parent = options.parent;
+        if (options.model.sim instanceof Array) {
+            this.simulationFunctionName = getData(options.model.sim[0])[0];
+            var func_type;
+            switch (getData(options.model.sim[1])[0].toString()) {
+                case "-2.0":
+                    func_type = "ESELECT";
+                    break;
+                case "-1.0":
+                    func_type = "IFTHENELSE";
+                    break;
+                case "1.0":
+                    func_type = "TYPE_1";
+                    break;
+                case "2.0":
+                    func_type = "TYPE_2";
+                    break;
+                case "3.0":
+                    func_type = "TYPE_3";
+                    break;
+                case "4.0":
+                    func_type = "C_OR_FORTRAN";
+                    break;
+                case "5.0":
+                    func_type = "SCILAB";
+                    break;
+                case "99.0":
+                    func_type = "DEBUG";
+                    break;
+                case "1001.0":
+                    func_type = "DYNAMIC_FORTRAN_1";
+                    break;
+                case "2001.0":
+                    func_type = "DYNAMIC_C_1";
+                    break;
+                case "2004.0":
+                    func_type = "DYNAMIC_EXPLICIT_4";
+                    break;
+                case "10001.0":
+                    func_type = "OLDBLOCKS";
+                    break;
+                case "10004.0":
+                    func_type = "IMPLICIT_C_OR_FORTRAN";
+                    break;
+                case "30004.0":
+                    func_type = "MODELICA";
+                    break;
+            }
+            this.simulationFunctionType = func_type;
+        } else {
+            this.simulationFunctionName = getData(options.model.sim)[0];
+            this.simulationFunctionType = "DEFAULT";
+        }
+        this.value = options.value; // Not Known
+        this.vertex = options.vertex; // Not Known
+        this.visible = options.visible; // Not Known
+        this.exprs = options.graphics.exprs;
+        this.integerParameters = options.model.ipar;
+        this.objectsParameters = options.model.opar;
+        if(!isEmpty(options.model.state)) {
+            this.state = options.model.state;
+        }
+        if(!isEmpty(options.model.dstate)) {
+            this.dState = options.model.dstate;
+        }
+        this.equations = options.model.equations;
+        this.blockName = "ImplicitOutBlock";
+        this.blockElementName = arguments.callee.caller.name;
+    }
+}
+
+function ImplicitInBlock() {
+    if (arguments.length > 0) {
+        var options = arguments[0];
+        this.angle = options.angle; // Not Known
+        this.blockType = getData(options.model.blocktype)[0];
+        this.connectable = options.connectable; // Not Known
+        var dep_ut = getData(options.model.dep_ut);
+        if (dep_ut[0] == "true")
+            this.dependsOnU = "1";
+        if (dep_ut[1] == "true")
+            this.dependsOnT = "1";
+        this.id = options.id;
+        this.interfaceFunctionName = arguments.callee.caller.name;
+        this.ordering = options.ordering;
+        this.parent = options.parent;
+        if (options.model.sim instanceof Array) {
+            this.simulationFunctionName = getData(options.model.sim[0])[0];
+            var func_type;
+            switch (getData(options.model.sim[1])[0].toString()) {
+                case "-2.0":
+                    func_type = "ESELECT";
+                    break;
+                case "-1.0":
+                    func_type = "IFTHENELSE";
+                    break;
+                case "1.0":
+                    func_type = "TYPE_1";
+                    break;
+                case "2.0":
+                    func_type = "TYPE_2";
+                    break;
+                case "3.0":
+                    func_type = "TYPE_3";
+                    break;
+                case "4.0":
+                    func_type = "C_OR_FORTRAN";
+                    break;
+                case "5.0":
+                    func_type = "SCILAB";
+                    break;
+                case "99.0":
+                    func_type = "DEBUG";
+                    break;
+                case "1001.0":
+                    func_type = "DYNAMIC_FORTRAN_1";
+                    break;
+                case "2001.0":
+                    func_type = "DYNAMIC_C_1";
+                    break;
+                case "2004.0":
+                    func_type = "DYNAMIC_EXPLICIT_4";
+                    break;
+                case "10001.0":
+                    func_type = "OLDBLOCKS";
+                    break;
+                case "10004.0":
+                    func_type = "IMPLICIT_C_OR_FORTRAN";
+                    break;
+                case "30004.0":
+                    func_type = "MODELICA";
+                    break;
+            }
+            this.simulationFunctionType = func_type;
+        } else {
+            this.simulationFunctionName = getData(options.model.sim)[0];
+            this.simulationFunctionType = "DEFAULT";
+        }
+        this.value = options.value; // Not Known
+        this.vertex = options.vertex; // Not Known
+        this.visible = options.visible; // Not Known
+        this.exprs = options.graphics.exprs;
+        this.integerParameters = options.model.ipar;
+        this.objectsParameters = options.model.opar;
+        if(!isEmpty(options.model.state)) {
+            this.state = options.model.state;
+        }
+        if(!isEmpty(options.model.dstate)) {
+            this.dState = options.model.dstate;
+        }
+        this.equations = options.model.equations;
+        this.blockName = "ImplicitInBlock";
+        this.blockElementName = arguments.callee.caller.name;
+    }
+}
+
 function zeros() {
     if (arguments.length == 0) {
         return [0];
-- 
cgit