diff options
author | kamakshidasan | 2016-12-22 15:42:26 +0530 |
---|---|---|
committer | kamakshidasan | 2016-12-22 15:42:26 +0530 |
commit | a249d85c0e727d8251102e13aa179f64d5f8dbf7 (patch) | |
tree | 175c82701bf3d53ae8d2ba481fcc99f8ee961c40 /data_structures_correct/MBLOCK.js | |
parent | b2cd0d0cad32683971baf53efa2e50ff8d26f66b (diff) | |
download | xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.gz xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.bz2 xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.zip |
Rearrange folders
Diffstat (limited to 'data_structures_correct/MBLOCK.js')
-rw-r--r-- | data_structures_correct/MBLOCK.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/data_structures_correct/MBLOCK.js b/data_structures_correct/MBLOCK.js deleted file mode 100644 index c916ccd..0000000 --- a/data_structures_correct/MBLOCK.js +++ /dev/null @@ -1,45 +0,0 @@ -function MBLOCK() { - - MBLOCK.prototype.define = function MBLOCK() { - this.in1 = ["u1"]; - this.intype = ["I"]; - this.out = [["y1"],["y2"]]; - this.outtype = [["I"],["E"]]; - this.param = [["R"],["L"]]; - this.paramv = list(new ScilabDouble([0.1]), new ScilabDouble([0.0001])); - this.pprop = [[0],[0]]; - this.nameF = "generic"; - - var exprs = tlist(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"], new ScilabString(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"]), new ScilabString([sci2exp(this.in1)]), new ScilabString([sci2exp(this.intype)]), new ScilabString([sci2exp(this.out)]), new ScilabString([sci2exp(this.outtype)]), new ScilabString([sci2exp(this.param)]), list(new ScilabString([0.1]), new ScilabString([0.0001])), new ScilabString([sci2exp(this.pprop)]), new ScilabString([this.nameF]), new ScilabDouble()); - - var model = scicos_model(); - model.blocktype = new ScilabString(["c"]); - model.dep_ut = new ScilabBoolean([false, true]); - model.rpar = []; - - for (var i = 0; i < this.paramv.length; i++) { - model.rpar.push(getData(this.paramv[i])); - } - - model.rpar = new ScilabDouble(...model.rpar); - var mo = new modelica_function(); - mo.model = new ScilabString([this.nameF]); - mo.parameters = list(new ScilabString(...this.param), this.paramv); - model.sim = list(mo.model, new ScilabDouble([30004])); - mo.inputs = new ScilabString(this.in1); - mo.outputs = new ScilabString(...this.out); - model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "r"), 1)); - model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "r"), 1)); - model.equations = mo; - var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MBLOCK\",sz(1),sz(2));"]); - - this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); - this.x.graphics.in_implicit = new ScilabString(this.intype); - this.x.graphics.out_implicit = new ScilabString(...this.outtype); - return new BasicBlock(this.x); - } - - MBLOCK.prototype.details = function MBLOCK() { - return this.x; - } -} |