diff options
Diffstat (limited to 'data_structures_correct')
46 files changed, 3692 insertions, 2 deletions
diff --git a/data_structures_correct/CLKGotoTagVisibility.js b/data_structures_correct/CLKGotoTagVisibility.js new file mode 100644 index 0000000..d1b5553 --- /dev/null +++ b/data_structures_correct/CLKGotoTagVisibility.js @@ -0,0 +1,27 @@ +function CLKGotoTagVisibility() { + + CLKGotoTagVisibility.prototype.define = function CLKGotoTagVisibility() { + var model = scicos_model(); + model.sim = new ScilabString(["clkgototagvisibility"]); + model.in1 = new ScilabDouble(); + model.in2 = new ScilabDouble(); + model.out = new ScilabDouble(); + model.out2 = new ScilabDouble(); + model.evtin = new ScilabDouble(); + model.intyp = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.opar = list(new ScilabString(["A"])); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabBoolean([false]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString(["A"]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKGotoTagVisibility\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + CLKGotoTagVisibility.prototype.details = function CLKGotoTagVisibility() { + return this.x; + } +} diff --git a/data_structures_correct/CLKINV_f.js b/data_structures_correct/CLKINV_f.js index f9dadbc..70c142f 100644 --- a/data_structures_correct/CLKINV_f.js +++ b/data_structures_correct/CLKINV_f.js @@ -12,10 +12,30 @@ function CLKINV_f() { model.dep_ut = new ScilabBoolean([false, false]); var exprs = new ScilabString([this.prt]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKINV_f\",sz(1),sz(2));"]); this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i); return new EventInBlock(this.x); } + CLKINV_f.prototype.internal = function CLKINV_f() { + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["input"]); + model.evtout = new ScilabDouble([1]); + model.ipar = new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["d"]); + model.firing = new ScilabDouble([-1]); + model.dep_ut = new ScilabBoolean([false, false]); + model.outtyp = new ScilabDouble(); + + var exprs = new ScilabString([this.prt]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKINV_f\",sz(1),sz(2));"]); + var block = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i); + block.graphics.style = new ScilabString(["CLKINV_f"]); + return block; + } CLKINV_f.prototype.details = function CLKINV_f() { return this.x; } diff --git a/data_structures_correct/CLKOUTV_f.js b/data_structures_correct/CLKOUTV_f.js new file mode 100644 index 0000000..5ea67f1 --- /dev/null +++ b/data_structures_correct/CLKOUTV_f.js @@ -0,0 +1,42 @@ +function CLKOUTV_f() { + + CLKOUTV_f.prototype.define = function CLKOUTV_f() { + + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["output"]); + model.evtin = new ScilabDouble([1]); + model.ipar = new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["d"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.prt]); + this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, new ScilabString([" "])); + return new EventOutBlock(this.x); + } + + CLKOUTV_f.prototype.internal = function CLKOUTV_f() { + + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["output"]); + model.evtin = new ScilabDouble([1]); + model.ipar = new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["d"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([false, false]); + model.outtyp = new ScilabDouble(); + var exprs = new ScilabString([this.prt]); + var block = new standard_define(new ScilabDouble([1, 1]), model, exprs, new ScilabString([" "])); + block.graphics.gr_i = list(new ScilabString(["xstringb(orig(1),orig(2),"CLKOUTV_f",sz(1),sz(2));"]), new ScilabDouble([8])); + block.graphics.style = new ScilabString(["CLKOUTV_f"]); + return block; + } + + CLKOUTV_f.prototype.details = function CLKOUTV_f() { + return this.x; + } +} diff --git a/data_structures_correct/CLSS.js b/data_structures_correct/CLSS.js new file mode 100644 index 0000000..471f302 --- /dev/null +++ b/data_structures_correct/CLSS.js @@ -0,0 +1,30 @@ +function CLSS() { + + CLSS.prototype.define = function CLSS() { + this.x0 = 0; + this.A = -1; + this.B = 1; + this.C = 1; + this.D = 0; + this.in1 = 1; + this.out = 1; + + var model = scicos_model(); + model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4])); + model.in = new ScilabDouble([this.in1]); + model.out = new ScilabDouble([this.out]); + model.state = new ScilabDouble([this.x0]); + model.rpar = new ScilabDouble([this.A], [this.B], [this.C], [this.D]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, true]); + + var exprs = new ScilabString([this.A], [this.B], [this.C], [this.D], [this.x0]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLSS\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + CLSS.prototype.details = function CLSS() { + return this.x; + } +} diff --git a/data_structures_correct/CONST_f.js b/data_structures_correct/CONST_f.js new file mode 100644 index 0000000..8890f0d --- /dev/null +++ b/data_structures_correct/CONST_f.js @@ -0,0 +1,25 @@ +function CONST_f() { + + CONST_f.prototype.define = function CONST_f() { + this.C = 1; + + var model = scicos_model(); + model.sim = list(new ScilabString(["cstblk"]), new ScilabDouble([1])); + model.in = new ScilabDouble(); + model.out = new ScilabDouble([1]); + model.rpar = new ScilabDouble([this.C]); + model.blocktype = new ScilabString(["d"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([sci2exp(this.C)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONST_f\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + CONST_f.prototype.details = function CONST_f() { + + return this.x; + } +} diff --git a/data_structures_correct/CONST_m.js b/data_structures_correct/CONST_m.js index b96a0e7..3031351 100644 --- a/data_structures_correct/CONST_m.js +++ b/data_structures_correct/CONST_m.js @@ -7,7 +7,8 @@ function CONST_m() { return options; } CONST_m.prototype.set = function CONST_m() { - this.c = [arguments[0]["vec"]]; + this.c = [parseInt(arguments[0]["vec"])]; + this.displayParameter = this.c; this.x.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4])); this.x.model.opar = list(new ScilabDouble(this.c)); this.x.model.rpar = new ScilabDouble(); @@ -25,6 +26,7 @@ function CONST_m() { model.rpar = new ScilabDouble(this.c); model.opar = list(); model.blocktype = new ScilabString(["d"]); + this.displayParameter = [1]; model.dep_ut = new ScilabBoolean([false, false]); var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONST_m\",sz(1),sz(2));"]); diff --git a/data_structures_correct/CONVERT.js b/data_structures_correct/CONVERT.js new file mode 100644 index 0000000..ab56435 --- /dev/null +++ b/data_structures_correct/CONVERT.js @@ -0,0 +1,31 @@ +function CONVERT() { + + CONVERT.prototype.define = function CONVERT() { + this.sgn = 2; + + var model = scicos_model(); + model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4])); + model.in = new ScilabDouble([-1]); + model.out = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.out2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([3]); + model.rpar = new ScilabDouble(); + model.ipar = new ScilabDouble([this.sgn]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([sci2exp(1)], [sci2exp(3)], [sci2exp(0)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CONVERT\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + CONVERT.prototype.details = function CONVERT() { + return this.x; + + } + +} diff --git a/data_structures_correct/COSBLK_f.js b/data_structures_correct/COSBLK_f.js new file mode 100644 index 0000000..4b845f1 --- /dev/null +++ b/data_structures_correct/COSBLK_f.js @@ -0,0 +1,20 @@ +function COSBLK_f () { + + COSBLK_f.prototype.define = function COSBLK_f() { + this.in1 = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["cosblk"]); + model.in = new ScilabDouble([-1]); + model.out = new ScilabDouble([-1]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true,false]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"COSBLK_f\",sz(1),sz(2));"]); + this.x=new standard_define(new ScilabDouble([2,2]),model,new ScilabDouble(),gr_i); + return new BasicBlock(this.x); + } + COSBLK_f.prototype.details = function COSBLK_f() { + return this.x; + } +} diff --git a/data_structures_correct/CSCOPE.js b/data_structures_correct/CSCOPE.js new file mode 100644 index 0000000..87571d4 --- /dev/null +++ b/data_structures_correct/CSCOPE.js @@ -0,0 +1,32 @@ +function CSCOPE() { + + CSCOPE.prototype.define = function CSCOPE() { + this.win = -1; + this.wdim = [[600],[400]]; + this.wpos = [[-1],[-1]]; + this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]]; + this.N = 20; + this.ymin = -15; + this.ymax = 15; + this.per = 30; + + var model = scicos_model(); + model.sim = list(new ScilabString(["cscope"]), new ScilabDouble([4])); + model.in = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([1]); + model.evtin = new ScilabDouble([1]); + model.rpar = new ScilabDouble([0], [this.ymin], [this.ymax], [this.per]); + model.ipar = new ScilabDouble([this.win], [1], [this.N], ...this.clrs, ...this.wpos, ...this.wdim); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([this.clrs.toString().replace(/,/g, " ")], [this.win], [sci2exp([])], [sci2exp(this.wdim)], [this.ymin], [this.ymax], [this.per], [this.N], [0], [""]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CSCOPE\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + CSCOPE.prototype.details = function CSCOPE() { + return this.x; + } +} diff --git a/data_structures_correct/CSCOPXY3D.js b/data_structures_correct/CSCOPXY3D.js new file mode 100644 index 0000000..5f389a5 --- /dev/null +++ b/data_structures_correct/CSCOPXY3D.js @@ -0,0 +1,36 @@ +function CSCOPXY3D() { + + CSCOPXY3D.prototype.define = function CSCOPXY3D() { + this.win = -1; + this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]]; + this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]]; + this.wdim = [[600],[400]]; + this.wpos = [[-1],[-1]]; + this.N = 2; + this.param3ds = [[50],[280]]; + this.vec_x = [[-15],[15]]; + this.vec_y = [[-15],[15]]; + this.vec_z = [[-15],[15]]; + this.nbr_curves = 1; + + var model = scicos_model(); + model.sim = list(new ScilabString(["cscopxy3d"]), new ScilabDouble([4])); + model.in = new ScilabDouble([1], [1], [1]); + model.in2 = new ScilabDouble([1], [1], [1]); + model.intyp = new ScilabDouble([1], [1], [1]); + model.evtin = new ScilabDouble([1]); + model.rpar = new ScilabDouble(...this.vec_x, ...this.vec_y, ...this.vec_z, ...this.param3ds); + model.ipar = new ScilabDouble([this.win], [8], [this.N], ...this.clrs, ...this.siz, [8], ...this.wpos, ...this.wdim, [this.nbr_curves]); + model.blocktype = new ScilabString(["d"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.nbr_curves], [this.clrs.toString().replace(/,/g, " ")], [this.siz.toString().replace(/,/g, " ")], [this.win], [sci2exp([])], [sci2exp(this.wdim)], [this.vec_x.toString().replace(/,/g, " ")], [this.vec_y.toString().replace(/,/g, " ")], [this.vec_z.toString().replace(/,/g, " ")], [this.param3ds.toString().replace(/,/g, " ")], [this.N]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CSCOPE\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + CSCOPXY3D.prototype.details = function CSCOPXY3D() { + return this.x; + } +} diff --git a/data_structures_correct/CUMSUM.js b/data_structures_correct/CUMSUM.js new file mode 100644 index 0000000..b39b028 --- /dev/null +++ b/data_structures_correct/CUMSUM.js @@ -0,0 +1,35 @@ +function CUMSUM() { + + CUMSUM.prototype.define = function CUMSUM() { + var model = scicos_model(); + + this.function_name = "cumsum_m"; + this.funtyp = 4; + + model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp])); + model.in = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([1]); + model.out = new ScilabDouble([-1]); + model.out2 = new ScilabDouble([-2]); + model.outtyp = new ScilabDouble([1]); + model.evtin = new ScilabDouble(); + model.evtout = new ScilabDouble(); + model.state = new ScilabDouble(); + model.dstate = new ScilabDouble(); + model.rpar = new ScilabDouble(); + model.ipar = new ScilabDouble(); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([true, false]); + + var label = new ScilabString([sci2exp(1)], [sci2exp(0)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CUMSUM\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i); + return new BasicBlock(this.x); + } + CUMSUM.prototype.details = function CUMSUM() { + return this.x; + } +} diff --git a/data_structures_correct/CURV_f.js b/data_structures_correct/CURV_f.js new file mode 100644 index 0000000..598f49e --- /dev/null +++ b/data_structures_correct/CURV_f.js @@ -0,0 +1,27 @@ +function CURV_f() { + + CURV_f.prototype.define = function CURV_f() { + this.xx = [[0],[1],[2]]; + this.yy = [[-5],[5],[0]]; + this.rect = [0,-5,2,5]; + this.axisdata = [[2],[10],[2],[10]]; + this.ipar = new ScilabDouble([size(this.xx, 1)], ...this.axisdata); + this.rpar = new ScilabDouble(...this.xx, ...this.yy, this.rect); + + var model = scicos_model(); + model.sim = new ScilabString(["intplt"]); + model.in = new ScilabDouble(); + model.out = new ScilabDouble([1]); + model.rpar = new ScilabDouble(...this.xx, ...this.yy, ...colon_operator([this.rect])); + model.ipar = new ScilabDouble([size(this.xx, 1)], ...this.axisdata); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, true]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CURV_f\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + CURV_f.prototype.details = function CURV_f() { + return this.x; + } +} diff --git a/data_structures_correct/ConstantVoltage.js b/data_structures_correct/ConstantVoltage.js new file mode 100644 index 0000000..ec5fcd6 --- /dev/null +++ b/data_structures_correct/ConstantVoltage.js @@ -0,0 +1,32 @@ +function ConstantVoltage() { + + ConstantVoltage.prototype.define = function ConstantVoltage() { + this.V = 0.01; + + var model = scicos_model(); + model.rpar = new ScilabDouble([this.V]); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.sim = new ScilabString(["ConstantVoltage"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var mo = modelica(); + mo.model = new ScilabString(["ConstantVoltage"]); + mo.inputs = new ScilabString(["p"]); + mo.outputs = new ScilabString(["n"]); + mo.parameters = list(new ScilabString(["V"]), list(new ScilabDouble([this.V]))); + model.equations = mo; + + var exprs = new ScilabString([this.V]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ConstantVoltage\",sz(1),sz(2));"]); + this.x = standard_define([1.5, 1.1], model, exprs, list(gr_i, new ScilabDouble([0]))); + this.x.graphics.in_implicit = new ScilabString(["I"]); + this.x.graphics.out_implicit = new ScilabString(["I"]); + return new BasicBlock(this.x); + } + ConstantVoltage.prototype.details = function ConstantVoltage() { + return this.x; + } +} diff --git a/data_structures_correct/Counter.js b/data_structures_correct/Counter.js new file mode 100644 index 0000000..c884e95 --- /dev/null +++ b/data_structures_correct/Counter.js @@ -0,0 +1,28 @@ +function Counter() { + + Counter.prototype.define = function Counter() { + this.minim = 0; + this.maxim = 2; + this.rule = 1; + + var model = scicos_model(); + model.sim = list(new ScilabString(["counter"]), new ScilabDouble([4])); + model.evtin = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.dstate = new ScilabDouble([0]); + model.ipar = new ScilabDouble([this.rule], [this.maxim], [this.minim]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.minim], [this.maxim], [this.rule]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Counter\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + Counter.prototype.details = function Counter() { + return this.x; + } +} diff --git a/data_structures_correct/CurrentSensor.js b/data_structures_correct/CurrentSensor.js new file mode 100644 index 0000000..1841fe9 --- /dev/null +++ b/data_structures_correct/CurrentSensor.js @@ -0,0 +1,29 @@ +function CurrentSensor() { + + CurrentSensor.prototype.define = function CurrentSensor() { + var model = scicos_model(); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1], [1]); + model.sim = new ScilabString(["CurrentSensor"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var mo = modelica(); + mo.model = new ScilabString(["CurrentSensor"]); + mo.inputs = new ScilabString(["p"]); + mo.outputs = new ScilabString(["n"], ["i"]); + model.equations = mo; + + var exprs = new ScilabDouble(); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CurrentSensor\",sz(1),sz(2));"]); + this.x = standard_define(new ScilabDouble([2, 2]), model, exprs, list(gr_i, new ScilabDouble([0]))); + this.x.graphics.in_implicit = new ScilabString(["I"]); + this.x.graphics.out_implicit = new ScilabString(["I"], ["E"]); + return new BasicBlock(this.x); + } + + CurrentSensor.prototype.details = function CurrentSensor() { + return this.x; + } +} diff --git a/data_structures_correct/DEADBAND.js b/data_structures_correct/DEADBAND.js new file mode 100644 index 0000000..91303b3 --- /dev/null +++ b/data_structures_correct/DEADBAND.js @@ -0,0 +1,27 @@ +function DEADBAND() { + + DEADBAND.prototype.define = function DEADBAND() { + this.minp = -0.5; + this.maxp = 0.5; + this.rpar = new ScilabDouble([this.maxp], [this.minp]); + + var model = scicos_model(); + model.sim = list(new ScilabString(["deadband"]), new ScilabDouble([4])); + model.in = new ScilabDouble([1]); + model.nzcross = new ScilabDouble([2]); + model.nmode = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.rpar = this.rpar; + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([this.maxp], [this.minp], [...getData(model.nmode).toString()]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DEADBAND\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + DEADBAND.prototype.details = function DEADBAND() { + return this.x; + } +} diff --git a/data_structures_correct/DELAY_f.js b/data_structures_correct/DELAY_f.js new file mode 100644 index 0000000..14e968c --- /dev/null +++ b/data_structures_correct/DELAY_f.js @@ -0,0 +1,116 @@ +function DELAY_f () { + + DELAY_f.prototype.define =function DELAY_f() { + var evtdly = new EVTDLY_f().internal(); + evtdly.graphics.orig = new ScilabDouble([243,296]); + evtdly.graphics.sz = new ScilabDouble([40,40]); + evtdly.graphics.flip = new ScilabBoolean([true]); + evtdly.graphics.exprs = new ScilabString(["0.1"],["0"]); + evtdly.graphics.pein = new ScilabDouble([10]); + evtdly.graphics.peout = new ScilabDouble([7]); + evtdly.model.rpar = new ScilabDouble([0.1]); + evtdly.model.firing = new ScilabDouble([0]); + evtdly.model.uid = new ScilabString([count]); // changed + evtdly.doc = list(new ScilabString([count++])); + evtdly.model.outtyp = new ScilabDouble(); + + var register = new REGISTER_f().internal(); + register.graphics.orig = new ScilabDouble([238,195]); + register.graphics.sz = new ScilabDouble([50,50]); + register.graphics.flip = new ScilabBoolean([true]); + register.graphics.exprs = new ScilabString(["0;0;0;0;0;0;0;0;0;0"]); + register.graphics.pin = new ScilabDouble([6]); + register.graphics.pout = new ScilabDouble([5]); + register.graphics.pein = new ScilabDouble([9]); + register.model.uid = new ScilabString([count]); // changed + register.doc = list(new ScilabString([count++])); + register.model.in2 = new ScilabDouble([1]); + register.model.intyp = new ScilabDouble([1]); + register.model.out2 = new ScilabDouble([1]); + + var input_port = new IN_f().internal(); + input_port.graphics.orig = new ScilabDouble([92,210]); + input_port.graphics.sz = new ScilabDouble([20,20]); + input_port.graphics.flip = new ScilabBoolean([true]); + input_port.graphics.exprs = new ScilabString(["1"],["1"]); + input_port.graphics.pout = new ScilabDouble([6]); + input_port.model.ipar = new ScilabDouble([1]); + input_port.model.uid = new ScilabString([count]); // changed + input_port.doc = list(new ScilabString([count++])); + input_port.model.outtyp = new ScilabDouble([-1]); + + var output_port = new OUT_f().internal(); + output_port.graphics.orig = new ScilabDouble([440,210]); + output_port.graphics.sz = new ScilabDouble([20,20]); + output_port.graphics.flip = new ScilabBoolean([true]); + output_port.graphics.exprs = new ScilabString(["1"],["1"]); + output_port.graphics.pin = new ScilabDouble([5]); + output_port.model.ipar = new ScilabDouble([1]); + output_port.model.uid = new ScilabString([count]); // changed + output_port.doc = list(new ScilabString([count++])); + output_port.model.outtyp = new ScilabDouble(); + + var split = new CLKSPLIT_f().internal(); + split.graphics.orig = new ScilabDouble([263,271.2]); + split.graphics.pein = new ScilabDouble([7]); + split.graphics.peout = new ScilabDouble([9],[10]); + split.model.uid = new ScilabString([count]); // changed + split.doc = list(new ScilabString([count++])); + + var diagram = scicos_diagram(); + diagram.objs.push(input_port); + diagram.objs.push(output_port); + diagram.objs.push(register); + diagram.objs.push(evtdly); + diagram.objs.push(split); + diagram.objs.push(scicos_link({ + xx: new ScilabDouble([296.6],[440]), + yy: new ScilabDouble([220],[220]), + from: new ScilabDouble([3,1,0]), + to: new ScilabDouble([2,1,1])})); + diagram.objs.push(scicos_link({ + xx: new ScilabDouble([112],[229.4]), + yy: new ScilabDouble([220],[220]), + from: new ScilabDouble([1,1,0]), + to: new ScilabDouble([3,1,1])})); + diagram.objs.push(scicos_link({ + xx: new ScilabDouble([263],[263]), + yy: new ScilabDouble([290.3],[271.2]), + ct: new ScilabDouble([5,-1]), + from: new ScilabDouble([4,1,0]), + to: new ScilabDouble([5,1,1])})); + diagram.objs.push(scicos_link({ + xx: new ScilabDouble([263],[263]), + yy: new ScilabDouble([271.2],[250.7]), + ct: new ScilabDouble([5,-1]), + from: new ScilabDouble([5,1,0]), + to: new ScilabDouble([3,1,1])})); + diagram.objs.push(scicos_link({ + xx: new ScilabDouble([263],[308.6],[308.6],[263],[263]), + yy: new ScilabDouble([271.2],[271.2],[367],[367],[341.7]), + ct: new ScilabDouble([5,-1]), + from: new ScilabDouble([5,2,0]), + to: new ScilabDouble([4,1,1])})); + + this.x=scicos_block(); + this.x.gui = new ScilabString(["DELAY_f"]); + this.x.graphics.sz = new ScilabDouble([2,2]); + this.x.graphics.gr_i = new ScilabDouble(); + this.x.graphics.pin = new ScilabDouble([0]); + this.x.graphics.pout = new ScilabDouble([0]); + this.x.model.sim = new ScilabString(["csuper"]); + this.x.model.in = new ScilabDouble([1]); + this.x.model.out = new ScilabDouble([1]); + this.x.model.blocktype = new ScilabString(["h"]); + this.x.model.dep_ut = new ScilabBoolean([false,false]); + this.x.model.rpar=diagram; + this.x.graphics.in_implicit = new ScilabString(["E"]); + this.x.graphics.in_style = new ScilabString([""]); + this.x.graphics.out_implicit = new ScilabString(["E"]); + this.x.graphics.out_style = new ScilabString([""]); + return new BasicBlock(this.x); + } + DELAY_f.prototype.details = function DELAY_f() { + return this.x; + } +} diff --git a/data_structures_correct/DEMUX.js b/data_structures_correct/DEMUX.js new file mode 100644 index 0000000..4975c52 --- /dev/null +++ b/data_structures_correct/DEMUX.js @@ -0,0 +1,28 @@ +function DEMUX() { + + DEMUX.prototype.define = function DEMUX() { + this.out = 2; + + var model = scicos_model(); + model.sim = list(new ScilabString(["multiplex"]), new ScilabDouble([4])); + model.in = new ScilabDouble([0]); + + var arr = []; + arr.push(math.range(-1, -this.out, -1, true)._data); + model.out = new ScilabDouble(...math.transpose(arr)); + model.ipar = new ScilabDouble([this.out]); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([this.out]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DEMUX\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([.5, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + DEMUX.prototype.details = function DEMUX() { + return this.x; + } +} diff --git a/data_structures_correct/DERIV.js b/data_structures_correct/DERIV.js new file mode 100644 index 0000000..6fc1796 --- /dev/null +++ b/data_structures_correct/DERIV.js @@ -0,0 +1,20 @@ +function DERIV() { + + DERIV.prototype.define = function DERIV() { + var model = scicos_model(); + model.sim = list(new ScilabString(["deriv"]), new ScilabDouble([4])); + model.in = new ScilabDouble([-1]); + model.out = new ScilabDouble([-1]); + model.blocktype = new ScilabString(["x"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabDouble(); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DERIV\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + DERIV.prototype.details = function DERIV() { + return this.x; + } +} diff --git a/data_structures_correct/DFLIPFLOP.js b/data_structures_correct/DFLIPFLOP.js new file mode 100644 index 0000000..d99813e --- /dev/null +++ b/data_structures_correct/DFLIPFLOP.js @@ -0,0 +1,2016 @@ +function DFLIPFLOP() { + + DFLIPFLOP.prototype.define = function DFLIPFLOP() { + var scs_m = scicos_diagram({ + version: new ScilabString(["scicos4.2"]), + props: scicos_params({ + wpar: new ScilabDouble([600, 450, 0, 0, 600, 450]), + Title: new ScilabString(["DFLIPFLOP"]), + tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]), + tf: new ScilabDouble([100000]), + context: new ScilabString([" "]), + void1: new ScilabDouble(), + options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])), + void2: new ScilabDouble(), + void3: new ScilabDouble(), + doc: list() + }) + }); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["CONST_m"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([109.62561, 263.44465]), + sz: new ScilabDouble([20], [20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["int8(0)"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([6]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CONST_m",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["CONST_m"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4])), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble(), + out: new ScilabDouble([1]), + out2: new ScilabDouble([1]), + outtyp: new ScilabDouble([5]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(int8([0])), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["IFTHEL_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([239.98293, 378.2166]), + sz: new ScilabDouble([60, 60]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"], ["1"]), + pin: new ScilabDouble([29]), + pout: new ScilabDouble(), + pein: new ScilabDouble([22]), + peout: new ScilabDouble([16], [44]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IFTHEL_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["IFTHEL_f"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["ifthel"]), new ScilabDouble([-1])), + in: new ScilabDouble([1]), + in2: new ScilabDouble([1]), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["l"]), + firing: new ScilabDouble([-1, -1]), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([1]), + nmode: new ScilabDouble([1]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["LOGICAL_OP"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([152.88902, 260.24498]), + sz: new ScilabDouble([60, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["2"], ["1"], ["5"], ["0"]), + pin: new ScilabDouble([11], [39]), + pout: new ScilabDouble([5]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"LOGICAL_OP",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"], ["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""], [""]), + out_label: new ScilabString([""]), + style: new ScilabString(["LOGICAL_OP"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["logicalop_i8"]), new ScilabDouble([4])), + in: new ScilabDouble([-1], [-1]), + in2: new ScilabDouble([-2], [-2]), + intyp: new ScilabDouble([5], [5]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble([-2]), + outtyp: new ScilabDouble([5]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1], [0]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SAMPHOLD_m"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([233.72156, 260.24498]), + sz: new ScilabDouble([40, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["5"]), + pin: new ScilabDouble([5]), + pout: new ScilabDouble([33]), + pein: new ScilabDouble([42]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SAMPHOLD_m",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""]), + style: new ScilabString(["SAMPHOLD_m"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["samphold4_m"]), new ScilabDouble([4])), + in: new ScilabDouble([-1]), + in2: new ScilabDouble([-2]), + intyp: new ScilabDouble([5]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble([-2]), + outtyp: new ScilabDouble([5]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([221.46044], [225.15013]), + yy: new ScilabDouble([280.24498], [280.24498]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([3, 1, 0]), + to: new ScilabDouble([4, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([138.19704], [140.34523]), + yy: new ScilabDouble([273.44465], [273.49157]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([1, 1, 0]), + to: new ScilabDouble([38, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["LOGICAL_OP"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([373.24106, 309.46812]), + sz: new ScilabDouble([60, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"], ["5"], ["5"], ["0"]), + pin: new ScilabDouble([36]), + pout: new ScilabDouble([13]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"LOGICAL_OP",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""]), + style: new ScilabString(["LOGICAL_OP"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["logicalop_i8"]), new ScilabDouble([4])), + in: new ScilabDouble([-1]), + in2: new ScilabDouble([-2]), + intyp: new ScilabDouble([5]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble([-2]), + outtyp: new ScilabDouble([5]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([5], [0]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["IN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([199.48466, 398.2166]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["3"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([9]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["IN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([-1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([3]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([219.48466], [222.54128]), + yy: new ScilabDouble([408.2166], [408.2166]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([8, 1, 0]), + to: new ScilabDouble([28, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["IN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([104.31759, 276.91165]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([11]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["IN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([-1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([124.31759], [144.31759]), + yy: new ScilabDouble([286.91165], [286.91165]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([10, 1, 0]), + to: new ScilabDouble([3, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["OUT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([457.40928, 320.20131]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["2"]), + pin: new ScilabDouble([13]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"OUT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["OUT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["output"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([2]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([441.81249], [457.40928]), + yy: new ScilabDouble([329.46812], [330.20131]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([7, 1, 0]), + to: new ScilabDouble([12, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["OUT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([376.4669, 270.83282]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble([37]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"OUT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["OUT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["output"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + + var scs_m_1 = scicos_diagram({ + version: new ScilabString(["scicos4.2"]), + props: scicos_params({ + wpar: new ScilabDouble([600, 450, 0, 0, 600, 450]), + Title: new ScilabString(["Untitled"]), + tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]), + tf: new ScilabDouble([100000]), + context: new ScilabDouble(), + void1: new ScilabDouble(), + options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])), + void2: new ScilabDouble(), + void3: new ScilabDouble(), + doc: list() + }) + }); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["ANDLOG_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([194, 133]), + sz: new ScilabDouble([60, 60]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble(), + pout: new ScilabDouble([9]), + pein: new ScilabDouble([4], [11]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"ANDLOG_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["ANDLOG_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["andlog"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1], [1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKIN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([149, 287]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([4]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKIN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKIN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble([-1]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKOUT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([450, 83]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([8]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKOUT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKOUT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["output"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([169], [214], [214]), + yy: new ScilabDouble([297], [297], [198.71]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([2, 1]), + to: new ScilabDouble([1, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKIN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([141, 330]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["2"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([6]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKIN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKIN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([2]), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble([-1]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([161], [234], [234]), + yy: new ScilabDouble([340], [340], [275.78]), + thick: new ScilabDouble([0, 0]), + id: new ScilabString(["drawlink"]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([5, 1]), + to: new ScilabDouble([10, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["IFTHEL_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([331, 137]), + sz: new ScilabDouble([60, 60]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"], ["1"]), + pin: new ScilabDouble([9]), + pout: new ScilabDouble(), + pein: new ScilabDouble([12]), + peout: new ScilabDouble([8], [0]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IFTHEL_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["IFTHEL_f"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["ifthel"]), new ScilabDouble([-1])), + in: new ScilabDouble([1]), + in2: new ScilabDouble([1]), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["l"]), + firing: new ScilabDouble([-1, -1]), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([1]), + nmode: new ScilabDouble([1]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([351], [351], [450]), + yy: new ScilabDouble([131.29], [93], [93]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([7, 1]), + to: new ScilabDouble([3, 1]) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([262.57], [322.43]), + yy: new ScilabDouble([163], [167]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([1, 1]), + to: new ScilabDouble([7, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKSPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([234], [275.78348]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([6]), + peout: new ScilabDouble([11], [12]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKSPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKSPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["split"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabBoolean([false, false, false]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([234], [234]), + yy: new ScilabDouble([275.78], [198.71]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([10, 1]), + to: new ScilabDouble([1, 2]) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([234], [361], [361]), + yy: new ScilabDouble([275.78], [275.78], [202.71]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([10, 2]), + to: new ScilabDouble([7, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["ANDBLK"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([233.73039, 318.74407]), + sz: new ScilabDouble([40, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([19], [16]), + peout: new ScilabDouble([17]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"ANDBLK",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["ANDBLK"]) + }), + model: scicos_model({ + sim: new ScilabString(["csuper"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1], [1]), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: scs_m_1, + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["h"]), + firing: new ScilabBoolean([false]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([259.98293], [260.39705]), + yy: new ScilabDouble([372.50232], [364.45835]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([2, 1, 0]), + to: new ScilabDouble([15, 2, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([253.73039], [253.72572]), + yy: new ScilabDouble([313.02978], [309.29537]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([15, 1, 0]), + to: new ScilabDouble([41, 1, 1]) + })); + scs_m_1 = scicos_diagram({ + version: new ScilabString(["scicos4.2"]), + props: scicos_params({ + wpar: new ScilabDouble([600, 450, 0, 0, 600, 450]), + Title: new ScilabString(["EDGE_TRIGGER", "./"]), + tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]), + tf: new ScilabDouble([30]), + context: new ScilabString([" "]), + void1: new ScilabDouble(), + options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])), + void2: new ScilabDouble(), + void3: new ScilabDouble(), + doc: list() + }) + }); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["EDGETRIGGER"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([288.58631, 257.1131]), + sz: new ScilabDouble([60, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble([5]), + pout: new ScilabDouble([3]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"EDGETRIGGER",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""]), + style: new ScilabString(["EDGETRIGGER"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["edgetrig"]), new ScilabDouble([4])), + in: new ScilabDouble([1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble([0]), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([1]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["IFTHEL_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([388.28869, 247.1131]), + sz: new ScilabDouble([60, 60]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["0"], ["0"]), + pin: new ScilabDouble([3]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([7], [0]), + gr_i: new ScilabDouble(), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble() + }), + model: scicos_model({ + sim: list(new ScilabString(["ifthel"]), new ScilabDouble([-1])), + in: new ScilabDouble([1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble([1]), + outtyp: new ScilabDouble(), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["l"]), + firing: new ScilabDouble([-1, -1]), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([357.15774], [362.99107], [379.71726]), + yy: new ScilabDouble([277.1131], [277.1131], [277.1131]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([1, 1, 0]), + to: new ScilabDouble([2, 1, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["IN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([240.01488, 267.1131]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([5]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + style: new ScilabString(["IN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([260.01488], [280.01488]), + yy: new ScilabDouble([277.1131], [277.1131]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([4, 1, 0]), + to: new ScilabDouble([1, 1, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKOUTV_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([398.28869, 181.39881]), + sz: new ScilabDouble([20, 30]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([7]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKOUTV_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKOUTV_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["output"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([408.28869], [408.28869]), + yy: new ScilabDouble([241.39881], [211.39881]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([2, 1, 0]), + to: new ScilabDouble([6, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["EDGE_TRIGGER"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([133.90637, 385.342]), + sz: new ScilabDouble([60, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([26]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([19]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"EDGE_TRIGGER",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["EDGE_TRIGGER"]) + }), + model: scicos_model({ + sim: new ScilabString(["csuper"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: scs_m_1, + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["h"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([163.90637], [163.90637], [247.06372]), + yy: new ScilabDouble([379.62771], [364.45835], [364.45835]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([18, 1, 0]), + to: new ScilabDouble([15, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["IN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([79.594811, 395.47647]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["2"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([23]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["IN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([-1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([2]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + + scs_m_1 = scicos_diagram({ + version: new ScilabString(["scicos4.2"]), + props: scicos_params({ + wpar: new ScilabDouble([600, 450, 0, 0, 600, 450]), + Title: new ScilabString(["EXTRACT_ACTIVATION", "./"]), + tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]), + tf: new ScilabDouble([30]), + context: new ScilabString([" "]), + void1: new ScilabDouble(), + options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])), + void2: new ScilabDouble(), + void3: new ScilabDouble(), + doc: list() + }) + }); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["IFTHEL_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([150.65045, 143.82208]), + sz: new ScilabDouble([60, 60]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["0"], ["0"]), + pin: new ScilabDouble([6]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([3], [4]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IFTHEL_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["IFTHEL_f"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["ifthel"]), new ScilabDouble([-1])), + in: new ScilabDouble([1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["l"]), + firing: new ScilabDouble([-1, -1]), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKSOMV_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([169.82143, 96.146231]), + sz: new ScilabDouble([16.666667, 16.666667]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([3], [4], [0]), + peout: new ScilabDouble([8]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKSOMV_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKSOMV_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["sum"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1], [1], [1]), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble([-1]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([170.65045], [170.65045], [150.04302], [150.04302], [169.82143]), + yy: new ScilabDouble([138.10779], [128.235], [128.235], [104.47956], [104.47956]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([1, 1, 0]), + to: new ScilabDouble([2, 1, 1]) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([190.65045], [190.65045], [178.15476]), + yy: new ScilabDouble([138.10779], [111.55729], [112.8129]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([1, 2, 0]), + to: new ScilabDouble([2, 2, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["IN_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([102.07902, 163.82208]), + sz: new ScilabDouble([20, 20]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble([6]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"IN_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabString(["E"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_label: new ScilabString([""]), + style: new ScilabString(["IN_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["input"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([-1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([122.07902], [142.07902]), + yy: new ScilabDouble([173.82208], [173.82208]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([5, 1, 0]), + to: new ScilabDouble([1, 1, 1]) + })); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["CLKOUTV_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([168.15476, 38.527183]), + sz: new ScilabDouble([20, 30]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([8]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKOUTV_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKOUTV_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["output"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble([1]), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([178.15476], [178.15476]), + yy: new ScilabDouble([98.527183], [68.527183]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([2, 1, 0]), + to: new ScilabDouble([7, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["Extract_Activation"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([239.82193, 456.57677]), + sz: new ScilabDouble([60, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([31]), + pout: new ScilabDouble(), + pein: new ScilabDouble(), + peout: new ScilabDouble([22]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"Extract_Activation",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabDouble(), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + style: new ScilabString(["Extract_Activation"]) + }), + model: scicos_model({ + sim: new ScilabString(["csuper"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: scs_m_1, + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["h"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([269.82193], [269.98293]), + yy: new ScilabDouble([450.86248], [443.93089]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([21, 1, 0]), + to: new ScilabDouble([2, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([99.594811], [110.25582]), + yy: new ScilabDouble([405.47647], [405.42077]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([20, 1, 0]), + to: new ScilabDouble([25, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SUM_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([200.5252, 469.13173]), + sz: new ScilabDouble([16.666667, 16.666667]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([27], [0], [30]), + pout: new ScilabDouble([31]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SUM_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"], ["E"], ["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""], [""], [""]), + out_label: new ScilabString([""]), + style: new ScilabString(["SUM_f"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["plusblk"]), new ScilabDouble([2])), + in: new ScilabDouble([-1], [-1], [-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([110.25582], [405.42077]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([23]), + pout: new ScilabDouble([26], [27]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"], ["E"], ["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""], [""], [""]), + style: new ScilabString(["SPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["lsplit"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1], [-1], [-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([110.25582], [114.33667], [125.33494]), + yy: new ScilabDouble([405.42077], [405.39945], [405.342]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([25, 1, 0]), + to: new ScilabDouble([18, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([110.25582], [110.25582], [208.85853]), + yy: new ScilabDouble([405.42077], [469.13173], [469.13173]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([25, 2, 0]), + to: new ScilabDouble([24, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([222.54128], [408.2166]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([9]), + pout: new ScilabDouble([29], [30]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"], ["E"], ["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""], [""], [""]), + style: new ScilabString(["SPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["lsplit"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1], [-1], [-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([222.54128], [231.4115]), + yy: new ScilabDouble([408.2166], [408.2166]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([28, 1, 0]), + to: new ScilabDouble([2, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([222.54128], [222.54128], [208.85853], [208.85853]), + yy: new ScilabDouble([408.2166], [453.0015], [453.0015], [485.7984]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([28, 2, 0]), + to: new ScilabDouble([24, 3, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([219.57282], [231.2505]), + yy: new ScilabDouble([477.46506], [476.57677]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([24, 1, 0]), + to: new ScilabDouble([21, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SELECT_m"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([298.86371, 253.57321]), + sz: new ScilabDouble([40, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["5"], ["2"], ["1"]), + pin: new ScilabDouble([33], [40]), + pout: new ScilabDouble([34]), + pein: new ScilabDouble([43], [44]), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SELECT_m",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"], ["E"]), + out_implicit: new ScilabString(["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""], [""]), + out_label: new ScilabString([""]), + style: new ScilabString(["SELECT_m"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["selector_m"]), new ScilabDouble([4])), + in: new ScilabDouble([-1], [-1]), + in2: new ScilabDouble([-2], [-2]), + intyp: new ScilabDouble([5], [5]), + out: new ScilabDouble([-1]), + out2: new ScilabDouble([-2]), + outtyp: new ScilabDouble([5]), + evtin: new ScilabDouble([1], [1]), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble([1]), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([282.29299], [290.29229]), + yy: new ScilabDouble([280.24498], [280.23987]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([4, 1, 0]), + to: new ScilabDouble([32, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([347.43514], [357.57328], [357.57328]), + yy: new ScilabDouble([273.57321], [273.57321], [280.83282]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([32, 1, 0]), + to: new ScilabDouble([35, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([357.57328, 280.83282]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([34]), + pout: new ScilabDouble([36], [37]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"], ["E"], ["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""], [""], [""]), + style: new ScilabString(["SPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["lsplit"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1], [-1], [-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([357.57328], [357.57328], [364.66964]), + yy: new ScilabDouble([280.83282], [329.46812], [329.46812]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([35, 1, 0]), + to: new ScilabDouble([7, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([357.57328], [376.4669]), + yy: new ScilabDouble([280.83282], [280.83282]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([35, 2, 0]), + to: new ScilabDouble([14, 1, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["SPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([140.34523], [273.49157]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble([6]), + pout: new ScilabDouble([39], [40]), + pein: new ScilabDouble(), + peout: new ScilabDouble(), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"SPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabString(["E"]), + out_implicit: new ScilabString(["E"], ["E"], ["E"]), + in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]), + out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]), + in_label: new ScilabString([""]), + out_label: new ScilabString([""], [""], [""]), + style: new ScilabString(["SPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["lsplit"]), + in: new ScilabDouble([-1]), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble([-1], [-1], [-1]), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["c"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([true, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([140.34523], [144.31759]), + yy: new ScilabDouble([273.49157], [273.57832]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([38, 1, 0]), + to: new ScilabDouble([3, 2, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([140.34523], [140.34523], [290.29229], [290.29229]), + yy: new ScilabDouble([273.49157], [247.70767], [247.70767], [266.90654]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([1, 1]), + from: new ScilabDouble([38, 2, 0]), + to: new ScilabDouble([32, 2, 1]) + })); + scs_m.objs.push(scicos_block({ + gui: new ScilabString(["CLKSPLIT_f"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([253.72572], [309.29537]), + sz: new ScilabDouble([0.3333333, 0.3333333]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabDouble(), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([17]), + peout: new ScilabDouble([42], [43]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"CLKSPLIT_f",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["CLKSPLIT_f"]) + }), + model: scicos_model({ + sim: new ScilabString(["split"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble([1], [1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabBoolean([false, false, false]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([253.72572], [253.72156]), + yy: new ScilabDouble([309.29537], [305.95927]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([41, 1, 0]), + to: new ScilabDouble([4, 1, 1]) + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([253.72572], [312.19705], [312.19705]), + yy: new ScilabDouble([309.29537], [309.29537], [299.28749]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([41, 2, 0]), + to: new ScilabDouble([32, 1, 1]) + + })); + scs_m.objs.push(scicos_link({ + xx: new ScilabDouble([279.98293], [279.98293], [325.53038], [325.53038]), + yy: new ScilabDouble([372.50232], [315.89455], [315.89455], [299.28749]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([2, 2, 0]), + to: new ScilabDouble([32, 2, 1]) + })); + + var model = scicos_model(); + model.sim = new ScilabString(["csuper"]); + model.in = new ScilabDouble([1], [1], [1]); + model.in2 = new ScilabDouble([1], [1], [1]); + model.out = new ScilabDouble([1], [1]); + model.out2 = new ScilabDouble([1], [1]); + model.intyp = new ScilabDouble([5, 1, 1]); + model.outtyp = new ScilabDouble([5, 5]); + model.blocktype = new ScilabString(["h"]); + model.firing = new ScilabBoolean([false]); + model.dep_ut = new ScilabBoolean([true, false]); + model.rpar = scs_m; + + var gr_i = []; + this.x = new standard_define(new ScilabDouble([2, 3]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + DFLIPFLOP.prototype.details = function DFLIPFLOP() { + return this.x; + } +} diff --git a/data_structures_correct/Diode.js b/data_structures_correct/Diode.js new file mode 100644 index 0000000..aab1eaf --- /dev/null +++ b/data_structures_correct/Diode.js @@ -0,0 +1,36 @@ +function Diode() { + + Diode.prototype.define = function Diode() { + + this.Ids = 1.e-6; + this.Vt = 0.04; + this.Maxexp = 15; + this.R = 1.e8; + + var model = scicos_model(); + model.rpar = new ScilabDouble([this.Ids], [this.Vt], [this.Maxexp], [this.R]); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.sim = new ScilabString(["Diode"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var mo = modelica(); + mo.model = new ScilabString(["Diode"]); + mo.inputs = new ScilabString(["p"]); + mo.outputs = new ScilabString(["n"]); + mo.parameters = list(new ScilabString(["Ids", "Vt", "Maxexp", "R"]), list(new ScilabDouble([this.Ids]), new ScilabDouble([this.Vt]), new ScilabDouble([this.Maxexp]), new ScilabDouble([this.R]))); + model.equations = mo; + + var exprs = new ScilabString([this.Ids], [this.Vt], [this.Maxexp], [this.R]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Diode\",sz(1),sz(2));"]); + this.x = standard_define(new ScilabDouble([2, 1]), model, exprs, list(gr_i, 0)); + this.x.graphics.in_implicit = new ScilabString(["I"]); + this.x.graphics.out_implicit = new ScilabString(["I"]); + return new BasicBlock(this.x); + } + Diode.prototype.details = function Diode() { + return this.x; + } +} diff --git a/data_structures_correct/EDGETRIGGER.js b/data_structures_correct/EDGETRIGGER.js new file mode 100644 index 0000000..5245267 --- /dev/null +++ b/data_structures_correct/EDGETRIGGER.js @@ -0,0 +1,25 @@ +function EDGETRIGGER() { + + EDGETRIGGER.prototype.internal = function EDGETRIGGER() { + this.edge = 1; + var model = scicos_model(); + model.sim = list(new ScilabString(["edgetrig"]), new ScilabDouble([4])); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.in2 = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.intyp = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.dstate = new ScilabDouble([0]); + model.nzcross = new ScilabDouble([1]); + model.ipar = new ScilabDouble([this.edge]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([this.edge]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"EDGETRIGGER",sz(1),sz(2));"]); + var block = standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + block.graphics.style = new ScilabString(["EDGETRIGGER"]); + return block; + } +} diff --git a/data_structures_correct/EDGE_TRIGGER.js b/data_structures_correct/EDGE_TRIGGER.js new file mode 100644 index 0000000..20aa23a --- /dev/null +++ b/data_structures_correct/EDGE_TRIGGER.js @@ -0,0 +1,114 @@ +function EDGE_TRIGGER() { + + EDGE_TRIGGER.prototype.define = function EDGE_TRIGGER() { + var scs_m_1 = scicos_diagram(); + scs_m_1.objs.push(new EDGETRIGGER().internal()); + scs_m_1.objs.push(new IFTHEL_f().internal()); + scs_m_1.objs.push(new IN_f().internal()); + scs_m_1.objs.push(new CLKOUTV_f().internal()); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + + var blk = scs_m_1.objs[0]; + var graphics = blk.graphics; + var model = blk.model; + graphics.orig = new ScilabDouble([60, 0]); + graphics.sz = new ScilabDouble([60, 40]); + graphics.exprs = new ScilabString(["0"]); + graphics.in_implicit = new ScilabString(["E"]); + graphics.out_implicit = new ScilabString(["E"]); + graphics.in_style = new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]); + graphics.out_style = new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]); + graphics.in_label = new ScilabString([""]); + graphics.out_label = new ScilabString([""]); + model.ipar = new ScilabDouble([0]); + graphics.pin = new ScilabDouble([5]); + graphics.pout = new ScilabDouble([6]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[0] = blk; + + blk = scs_m_1.objs[1]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([160, 0]); + graphics.sz = new ScilabDouble([60, 40]); + graphics.exprs = new ScilabString(["0"], ["0"]); + model.evtin = new ScilabDouble(); + model.nzcross = new ScilabDouble([0]); + model.nmode = new ScilabDouble([0]); + graphics.pin = new ScilabDouble([6]); + graphics.peout = new ScilabDouble([7], [0]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[1] = blk; + + blk = scs_m_1.objs[2]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([0, 10]); + graphics.sz = new ScilabDouble([20, 20]); + graphics.exprs = new ScilabString(["1"]); + model.ipar = new ScilabDouble([1]); + graphics.pout = new ScilabDouble([5]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[2] = blk; + + blk = scs_m_1.objs[3]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([170, -60]); + graphics.sz = new ScilabDouble([20, 20]); + graphics.exprs = new ScilabString(["1"]); + model.ipar = new ScilabDouble([1]); + graphics.pein = new ScilabDouble([7]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[3] = blk; + + var lnk = scs_m_1.objs[4]; + lnk.xx = new ScilabDouble([64], [96]); + lnk.yy = new ScilabDouble([-40], [-20]); + lnk.from = new ScilabDouble([3, 1, 0]); + lnk.to = new ScilabDouble([1, 1, 1]); + scs_m_1.objs[4] = lnk; + + lnk = scs_m_1.objs[5]; + lnk.xx = new ScilabDouble([164], [196]); + lnk.yy = new ScilabDouble([-20], [-20]); + lnk.from = new ScilabDouble([1, 1, 0]); + lnk.to = new ScilabDouble([2, 1, 1]); + scs_m_1.objs[5] = lnk; + + lnk = scs_m_1.objs[6]; + lnk.xx = new ScilabDouble([220], [220]); + lnk.yy = new ScilabDouble([-44], [-96]); + lnk.ct = new ScilabDouble([5, -1]); + lnk.from = new ScilabDouble([2, 1, 0]); + lnk.to = new ScilabDouble([4, 1, 1]); + scs_m_1.objs[6] = lnk; + + model = scicos_model(); + model.sim = new ScilabString(["csuper"]); + model.in = new ScilabDouble([1]); + model.evtout = new ScilabDouble([1]); + model.rpar = scs_m_1; + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"EDGE_TRIGGER",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + EDGE_TRIGGER.prototype.details = function EDGE_TRIGGER() { + return this.x; + } +} diff --git a/data_structures_correct/ENDBLK.js b/data_structures_correct/ENDBLK.js new file mode 100644 index 0000000..e3ca767 --- /dev/null +++ b/data_structures_correct/ENDBLK.js @@ -0,0 +1,106 @@ +function ENDBLK() { + + ENDBLK.prototype.define = function ENDBLK() { + var scs_m_1 = scicos_diagram({ + version: new ScilabString(["scicos4.2"]), + props: scicos_params({ + wpar: new ScilabDouble([600, 450, 0, 0, 600, 450]), + Title: new ScilabString(["ENDBLK"]), + tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]), + tf: new ScilabDouble([100000]), + context: new ScilabString([" "]), + void1: new ScilabDouble(), + options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])), + void2: new ScilabDouble(), + void3: new ScilabDouble(), + doc: list() + }) + }); + scs_m_1.objs.push(scicos_block({ + gui: new ScilabString(["END_c"]), + graphics: scicos_graphics({ + orig: new ScilabDouble([272.104, 249.11733]), + sz: new ScilabDouble([40, 40]), + flip: new ScilabBoolean([true]), + theta: new ScilabDouble([0]), + exprs: new ScilabString(["1.000E+08"]), + pin: new ScilabDouble(), + pout: new ScilabDouble(), + pein: new ScilabDouble([2]), + peout: new ScilabDouble([2]), + gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),"END_c",sz(1),sz(2));"]), new ScilabDouble([8])), + id: new ScilabString([""]), + in_implicit: new ScilabDouble(), + out_implicit: new ScilabDouble(), + style: new ScilabString(["END_c"]) + }), + model: scicos_model({ + sim: list(new ScilabString(["scicosexit"]), new ScilabDouble([4])), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble(), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble(), + evtin: new ScilabDouble([1]), + evtout: new ScilabDouble([1]), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: new ScilabDouble(), + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["d"]), + firing: new ScilabDouble([1.000E+08]), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list(), + uid: new ScilabString([count]) + }), + doc: list(new ScilabString([count++])) + })); + scs_m_1.objs.push(scicos_link({ + xx: new ScilabDouble([292.104], [292.104], [261.83733], [261.83733], [292.104], [292.104]), + yy: new ScilabDouble([243.40305], [234.45067], [234.45067], [305.584], [305.584], [294.83162]), + id: new ScilabString(["drawlink"]), + thick: new ScilabDouble([0, 0]), + ct: new ScilabDouble([5, -1]), + from: new ScilabDouble([1, 1, 0]), + to: new ScilabDouble([1, 1, 1]) + })); + + var model = scicos_model({ + sim: new ScilabString(["csuper"]), + in: new ScilabDouble(), + in2: new ScilabDouble(), + intyp: new ScilabDouble([1]), + out: new ScilabDouble(), + out2: new ScilabDouble(), + outtyp: new ScilabDouble([1]), + evtin: new ScilabDouble(), + evtout: new ScilabDouble(), + state: new ScilabDouble(), + dstate: new ScilabDouble(), + odstate: list(), + rpar: scs_m_1, + ipar: new ScilabDouble(), + opar: list(), + blocktype: new ScilabString(["h"]), + firing: new ScilabDouble(), + dep_ut: new ScilabBoolean([false, false]), + label: new ScilabString([""]), + nzcross: new ScilabDouble([0]), + nmode: new ScilabDouble([0]), + equations: list() + }); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"ENDBLK",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + ENDBLK.prototype.details = function ENDBLK() { + return this.x; + } +} diff --git a/data_structures_correct/EVTDLY_f.js b/data_structures_correct/EVTDLY_f.js new file mode 100644 index 0000000..04e38a0 --- /dev/null +++ b/data_structures_correct/EVTDLY_f.js @@ -0,0 +1,23 @@ +function EVTDLY_f () { + + EVTDLY_f.prototype.internal = function EVTDLY_f() { + this.dt = 0.1; + this.ff = this.dt; + + var model = scicos_model(); + model.sim = new ScilabString(["evtdly"]); + model.evtin = new ScilabDouble([1]); + model.evtout = new ScilabDouble([1]); + model.rpar=new ScilabDouble([this.dt]); + model.blocktype = new ScilabString(["d"]); + model.firing=new ScilabDouble([this.ff]); + model.dep_ut = new ScilabBoolean([false,false]); + + var exprs = new ScilabString([this.dt],[sci2exp(this.ff)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EVTDLY_f\",sz(1),sz(2));"]); + var block = new standard_define(new ScilabDouble([2,2]),model,exprs,gr_i); + block.graphics.style = new ScilabString(["EVTDLY_f"]); + return block; + } +} diff --git a/data_structures_correct/EVTGEN_f.js b/data_structures_correct/EVTGEN_f.js new file mode 100644 index 0000000..ba7197f --- /dev/null +++ b/data_structures_correct/EVTGEN_f.js @@ -0,0 +1,22 @@ +function EVTGEN_f() { + + EVTGEN_f.prototype.define = function EVTGEN_f() { + this.tt = 0; + + var model = scicos_model(); + model.sim = new ScilabString(["trash"]); + model.evtout = new ScilabDouble([1]); + model.blocktype = new ScilabString(["d"]); + model.firing = new ScilabDouble([this.tt]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.tt]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EVTGEN_f\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + EVTGEN_f.prototype.details = function EVTGEN_f() { + return this.x; + } +} diff --git a/data_structures_correct/EXPBLK_m.js b/data_structures_correct/EXPBLK_m.js new file mode 100644 index 0000000..b5cf28b --- /dev/null +++ b/data_structures_correct/EXPBLK_m.js @@ -0,0 +1,28 @@ +function EXPBLK_m() { + + EXPBLK_m.prototype.define = function EXPBLK_m() { + this.in1 = 1; + this.a = math.E; + + var model = scicos_model(); + model.sim = list(new ScilabString(["expblk_m"]), new ScilabDouble([4])); + model.in = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.out = new ScilabDouble([-1]); + model.out2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.rpar = new ScilabDouble([this.a]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString(["%e"]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXPBLK_m\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + EXPBLK_m.prototype.details = function EXPBLK_m() { + return this.x; + } +} diff --git a/data_structures_correct/EXTRACTBITS.js b/data_structures_correct/EXTRACTBITS.js new file mode 100644 index 0000000..4f16f21 --- /dev/null +++ b/data_structures_correct/EXTRACTBITS.js @@ -0,0 +1,27 @@ +function EXTRACTBITS() { + + EXTRACTBITS.prototype.define = function EXTRACTBITS() { + this.numb = []; + + var model = scicos_model(); + model.sim = list(new ScilabString(["extract_bit_32_UH0"]), new ScilabDouble([4])); + model.in = new ScilabDouble([1]); + model.in2 = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.intyp = new ScilabDouble([3]); + model.outtyp = new ScilabDouble([3]); + model.ipar = new ScilabDouble([0, ...this.numb]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([sci2exp(3)], [sci2exp(1)], [sci2exp(0)], [sci2exp(0)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXTRACTBITS\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + EXTRACTBITS.prototype.details = function EXTRACTBITS() { + return this.x; + } +} diff --git a/data_structures_correct/GENSQR_f.js b/data_structures_correct/GENSQR_f.js new file mode 100644 index 0000000..4a48f00 --- /dev/null +++ b/data_structures_correct/GENSQR_f.js @@ -0,0 +1,25 @@ +function GENSQR_f() { + + GENSQR_f.prototype.define = function GENSQR_f() { + this.Amplitude = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["gensqr"]); + model.out = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.evtin = new ScilabDouble([1]); + model.dstate = new ScilabDouble([this.Amplitude]); + model.blocktype = new ScilabString(["d"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.Amplitude]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENSQR_f\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + GENSQR_f.prototype.details = function GENSQR_f() { + return this.x; + } +} diff --git a/data_structures_correct/GOTO.js b/data_structures_correct/GOTO.js new file mode 100644 index 0000000..7f0a421 --- /dev/null +++ b/data_structures_correct/GOTO.js @@ -0,0 +1,28 @@ +function GOTO() { + + GOTO.prototype.define = function GOTO() { + var model = scicos_model(); + model.sim = new ScilabString(["goto"]); + model.in = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([-1]); + model.out = new ScilabDouble(); + model.out2 = new ScilabDouble(); + model.outtyp = new ScilabDouble([1]); + model.ipar = new ScilabDouble([1]); + model.opar = list(new ScilabString(["A"])); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString(["A"], [sci2exp(1)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GOTO\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i); + this.x.graphics.id = new ScilabString(["Goto"]); + return new BasicBlock(this.x) + } + + GOTO.prototype.details = function GOTO() { + return this.x; + } +} diff --git a/data_structures_correct/GotoTagVisibility.js b/data_structures_correct/GotoTagVisibility.js new file mode 100644 index 0000000..61eb71c --- /dev/null +++ b/data_structures_correct/GotoTagVisibility.js @@ -0,0 +1,30 @@ +function GotoTagVisibility() { + + GotoTagVisibility.prototype.define = function GotoTagVisibility() { + + var model = scicos_model(); + model.sim = new ScilabString(["gototagvisibility"]); + model.in1 = new ScilabDouble(); + model.in2 = new ScilabDouble(); + model.out = new ScilabDouble(); + model.out2 = new ScilabDouble(); + model.evtin = new ScilabDouble(); + model.intyp = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.opar = list(new ScilabString(["A"])); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabBoolean([false]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString(["A"]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GotoTagVisibility\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + GotoTagVisibility.prototype.details = function GotoTagVisibility() { + + return this.x; + } +} diff --git a/data_structures_correct/Ground.js b/data_structures_correct/Ground.js new file mode 100644 index 0000000..9ebe910 --- /dev/null +++ b/data_structures_correct/Ground.js @@ -0,0 +1,30 @@ +function Ground() { + + Ground.prototype.define = function Ground() { + + var model = scicos_model(); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble(); + model.sim = new ScilabString(["Ground"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var mo = modelica(); + mo.model = new ScilabString(["Ground"]); + mo.inputs = new ScilabString(["p"]); + mo.outputs = new ScilabDouble(); + model.equations = mo; + + var exprs = new ScilabString([""]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Ground\",sz(1),sz(2));"]); + this.x = standard_define(new ScilabDouble([1, 1]), model, exprs, list(gr_i, new ScilabDouble([0]))); + this.x.graphics.in_implicit = new ScilabString(["I"]); + this.x.graphics.out_implicit = new ScilabString(["I"]); + return new GroundBlock(this.x); + } + + Ground.prototype.details = function Ground() { + return this.x; + } +} diff --git a/data_structures_correct/Gyrator.js b/data_structures_correct/Gyrator.js new file mode 100644 index 0000000..3c716af --- /dev/null +++ b/data_structures_correct/Gyrator.js @@ -0,0 +1,57 @@ +function Gyrator() { + + Gyrator.prototype.define = function Gyrator() { + this.ModelName = "Gyrator"; + this.PrametersValue = [[1],[1]]; + this.ParametersName = [["G1"],["G2"]]; + this.model = scicos_model(); + this.Typein = []; + this.Typeout = []; + this.MI = []; + this.MO = []; + this.P = [[2.5, 90, 2, 0],[2.5, 10, 2, 0],[97.5, 90, -2, 0],[97.5, 10, -2, 0]]; + this.PortName = [["p1"],["n1"],["p2"],["n2"]]; + + for (var i = 0; i < size(this.P, "r"); i++) { + if (this.P[i][2] == 1) { + this.Typein.push(["E"]); + this.MI.push(this.PortName[i]); + } + if (this.P[i][2] == 2) { + this.Typein.push(["I"]); + this.MI.push(this.PortName[i]); + } + if (this.P[i][2] == -1) { + this.Typeout.push(["E"]); + this.MO.push(this.PortName[i]); + } + if (this.P[i][2] == -2) { + this.Typeout.push(["I"]); + this.MO.push(this.PortName[i]); + } + } + var model = scicos_model(); + var mo = modelica(); + model.sim = new ScilabString([this.ModelName]); + mo.inputs = new ScilabString(...this.MI); + mo.outputs = new ScilabString(...this.MO); + console.log(this.MI); + model.rpar = new ScilabDouble(...this.PrametersValue); + mo.parameters = list(new ScilabString(...this.ParametersName), new ScilabDouble(...this.PrametersValue), new ScilabDouble(...zeros(this.ParametersName))); + var exprs = new ScilabString(["1"], ["1"]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"Gyrator",sz(1),sz(2));"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, true]); + mo.model = new ScilabString([this.ModelName]); + model.equations = mo; + model.in = new ScilabDouble(...ones(size(this.MI, "*"), 1)); + model.out = new ScilabDouble(...ones(size(this.MO, "*"), 1)); + this.x = standard_define([2, 2], model, exprs, list(gr_i, new ScilabDouble([0]))); + this.x.graphics.in_implicit = new ScilabString(...this.Typein); + this.x.graphics.out_implicit = new ScilabString(...this.Typeout); + return new BasicBlock(this.x); + } + Gyrator.prototype.details = function Gyrator() { + return this.x; + } +} diff --git a/data_structures_correct/INTRPLBLK_f.js b/data_structures_correct/INTRPLBLK_f.js new file mode 100644 index 0000000..2b073e0 --- /dev/null +++ b/data_structures_correct/INTRPLBLK_f.js @@ -0,0 +1,26 @@ +function INTRPLBLK_f() { + + INTRPLBLK_f.prototype.define = function INTRPLBLK_f() { + this.a = [[0],[1]]; + + this.b = [[0],[1]]; + + var model = scicos_model(); + model.sim = new ScilabString(["intrpl"]); + model.in = new ScilabDouble(1); + model.out = new ScilabDouble(1); + model.rpar = new ScilabDouble(...this.a, ...this.b); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true,false]); + + var exprs = new ScilabString([sci2exp(this.a)], [sci2exp(this.b)]); + + var gr_i = ["xstringb(orig(1),orig(2),\"INTRPLBLK_f\",sz(1),sz(2));"]; + this.x = new standard_define(new ScilabDouble([2,2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + INTRPLBLK_f.prototype.details = function INTRPLBLK_f() { + return this.x; + } +} diff --git a/data_structures_correct/IN_f.js b/data_structures_correct/IN_f.js new file mode 100644 index 0000000..7527ab6 --- /dev/null +++ b/data_structures_correct/IN_f.js @@ -0,0 +1,48 @@ +function IN_f () { + + IN_f.prototype.internal = function IN_f() { + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["input"]); + model.out = new ScilabDouble([-1]); + model.out2 = new ScilabDouble([-2]); + model.outtyp = new ScilabDouble([-1]); + model.ipar=new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false,false]); + + var exprs = new ScilabString([sci2exp(this.prt)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"IN_f\",sz(1),sz(2));"]); + var block=new standard_define(new ScilabDouble([1,1]),model,exprs,gr_i); + block.graphics.style = new ScilabString(["IN_f"]); // changed + block.graphics.out_implicit = new ScilabString(["E"]); + block.graphics.out_style = new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]); + block.graphics.out_label = new ScilabString([""]); + return block; + } + + IN_f.prototype.define = function IN_f() { + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["input"]); + model.out = new ScilabDouble([-1]); + model.out2 = new ScilabDouble([-2]); + model.outtyp = new ScilabDouble([-1]); + model.ipar=new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false,false]); + + var exprs = new ScilabString([sci2exp(this.prt)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"IN_f\",sz(1),sz(2));"]); + this.x=new standard_define(new ScilabDouble([1,1]),model,exprs,gr_i); + return new ExplicitInBlock(this.x); + } + + IN_f.prototype.details = function IN_f() { + return this.x; + } +} diff --git a/data_structures_correct/IdealTransformer.js b/data_structures_correct/IdealTransformer.js new file mode 100644 index 0000000..4a8666f --- /dev/null +++ b/data_structures_correct/IdealTransformer.js @@ -0,0 +1,60 @@ +function IdealTransformer() { + + IdealTransformer.prototype.define = function IdealTransformer() { + this.ModelName = "IdealTransformer"; + this.PrametersValue = [1]; + this.ParametersName = ["N"]; + + var model = scicos_model(); + + this.Typein = []; + this.Typeout = []; + this.MI = []; + this.MO = []; + this.P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]]; + this.PortName = [["p1"],["n1"],["p2"],["n2"]]; + + for (var i = 0; i < size(this.P, "r"); i++) { + if (this.P[i][2] == 1) { + this.Typein.push(["E"]); + this.MI.push(this.PortName[i]); + } + + if (this.P[i][2] == 2) { + this.Typein.push(["I"]); + this.MI.push(this.PortName[i]); + } + if (this.P[i][2] == -1) { + this.Typeout.push(["E"]); + this.MO.push(this.PortName[i]); + } + if (this.P[i][2] == -2) { + this.Typeout.push(["I"]); + this.MO.push(this.PortName[i]); + } + } + var mo = modelica(); + model.sim = new ScilabString([this.ModelName]); + mo.inputs = new ScilabString(...this.MI); + mo.outputs = new ScilabString(...this.MO); + model.rpar = new ScilabDouble(this.PrametersValue); + mo.parameters = list(new ScilabString(this.ParametersName), new ScilabDouble(this.PrametersValue), new ScilabDouble(zeros(getData(this.ParametersName)))); + var exprs = new ScilabString(["1"]); + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"IdealTransformer\",sz(1),sz(2));"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, true]); + mo.model = new ScilabString([this.ModelName]); + model.equations = mo; + model.in = new ScilabDouble(...ones(size(this.MI, "*"), 1)); + model.out = new ScilabDouble(...ones(size(this.MO, "*"), 1)); + this.x = new standard_define(new ScilabDouble([2,2]), model, exprs, list(gr_i), new ScilabDouble([0])); + this.x.graphics.in_implicit = new ScilabDouble(this.Typein); + this.x.graphics.out_implicit = new ScilabDouble(this.Typeout); + return new BasicBlock(this.x); + } + + IdealTransformer.prototype.details = function IdealTransformer() { + return this.x; + } + +} diff --git a/data_structures_correct/MATZREIM.js b/data_structures_correct/MATZREIM.js new file mode 100644 index 0000000..f748098 --- /dev/null +++ b/data_structures_correct/MATZREIM.js @@ -0,0 +1,37 @@ +function MATZREIM() { + MATZREIM.prototype.define = function MATZREIM() { + + + var model = scicos_model(); + + this.function_name = "matz_reim"; + + this.funtyp = new ScilabDouble([4]); + model.sim = list(this.function_name, this.funtyp); + model.in1 = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([2]); + model.out = new ScilabDouble(-1, -1); + model.out2 = new ScilabDouble(-2, -2); + model.outtyp = new ScilabDouble([1,1]); + model.evtin = new ScilabDouble(); + model.evtout = new ScilabDouble(); + model.state = new ScilabDouble(); + model.dstate = new ScilabDouble(); + model.rpar = new ScilabDouble(); + model.ipar = new ScilabDouble(); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([true,false]); + + this.label = sci2exp(new ScilabDouble(1)); + + var gr_i = ["xstringb(orig(1),orig(2),\"MATZREIM\",sz(1),sz(2));"]; + this.x = new standard_define(new ScilabDouble([3,2]), model, this.label, gr_i); + return new BasicBlock(this.x); + } + + MATZREIM.prototype.details = function MATZREIM() { + return this.x; + } +} diff --git a/data_structures_correct/MAX_f.js b/data_structures_correct/MAX_f.js new file mode 100644 index 0000000..a55e66b --- /dev/null +++ b/data_structures_correct/MAX_f.js @@ -0,0 +1,24 @@ +function MAX_f() { + + MAX_f.prototype.define = function MAX_f() { + this.in = new ScilabDouble([-1]); + + var model = scicos_model(); + model.sim = new ScilabString(["maxblk"]); + model.in = this.in; + model.out = new ScilabDouble(1); + model.dstate = new ScilabDouble([0], [0]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = new ScilabString([" "]); + + var gr_i = ["xstringb(orig(1),orig(2),\"MAX_f\",sz(1),sz(2));"]; + this.x = new standard_define(new ScilabDouble([2,2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + + MAX_f.prototype.details = function MAX_f() { + return this.x; + } +} diff --git a/data_structures_correct/Modulo_Count.js b/data_structures_correct/Modulo_Count.js index bb6ad29..dfff095 100644 --- a/data_structures_correct/Modulo_Count.js +++ b/data_structures_correct/Modulo_Count.js @@ -19,8 +19,28 @@ function Modulo_Count() { this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); return new BasicBlock(this.x); } + Modulo_Count.prototype.internal = function Modulo_Count() { + this.ini_c = 0; + this.base = 3; + + var model = scicos_model(); + model.sim = list(new ScilabString(["modulo_count"]), new ScilabDouble([4])); + model.evtin = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.dstate = new ScilabDouble([this.ini_c]); + model.ipar = new ScilabDouble([this.base]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false, false]); + + var exprs = new ScilabString([this.ini_c], [this.base]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Modulo_Count\",sz(1),sz(2));"]); + var block = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i); + block.graphics.style = new ScilabString(["Modulo_Count"]); + return block; + } Modulo_Count.prototype.details = function Modulo_Count() { return this.x; } } - diff --git a/data_structures_correct/NEGTOPOS_f.js b/data_structures_correct/NEGTOPOS_f.js new file mode 100644 index 0000000..f28db43 --- /dev/null +++ b/data_structures_correct/NEGTOPOS_f.js @@ -0,0 +1,22 @@ +function NEGTOPOS_f() { + + NEGTOPOS_f.prototype.define = function NEGTOPOS_f() { + var model = scicos_model(); + model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1])); + model.nzcross = new ScilabDouble([1]); + model.in = new ScilabDouble([1]); + model.evtout = new ScilabDouble([1]); + model.rpar = new ScilabDouble([-1], [-1], [0], [-1]); + model.blocktype = new ScilabString(["z"]); + model.firing = new ScilabDouble([-1]); + model.dep_ut = new ScilabBoolean([true, false]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NEGTOPOS_f\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + + NEGTOPOS_f.prototype.details = function NEGTOPOS_f() { + return this.x; + } +} diff --git a/data_structures_correct/OUT_f.js b/data_structures_correct/OUT_f.js new file mode 100644 index 0000000..d632563 --- /dev/null +++ b/data_structures_correct/OUT_f.js @@ -0,0 +1,50 @@ +function OUT_f () { + + OUT_f.prototype.internal = function OUT_f() { + this.n = -1; + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["output"]); + model.in = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([-1]); + model.ipar=new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false,false]); + var exprs = new ScilabString([sci2exp(this.prt)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"OUT_f\",sz(1),sz(2));"]); + var block=new standard_define(new ScilabDouble([1,1]),model,exprs,gr_i); + block.graphics.style = new ScilabString(["OUT_f"]); // changed + block.graphics.in_style = new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]); + block.graphics.in_label = new ScilabString([""]); + block.graphics.in_implicit = new ScilabString(["E"]); + return block; + } + + OUT_f.prototype.define = function OUT_f() { + this.n = -1; + this.prt = 1; + + var model = scicos_model(); + model.sim = new ScilabString(["output"]); + model.in1 = new ScilabDouble([-1]); + model.in2 = new ScilabDouble([-2]); + model.intyp = new ScilabDouble([-1]); + model.ipar=new ScilabDouble([this.prt]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([false,false]); + + var exprs = new ScilabString([sci2exp(this.prt)]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"OUT_f\",sz(1),sz(2));"]); + var block=new standard_define(new ScilabDouble([1,1]),model,exprs,gr_i); + block.graphics.style = new ScilabString(["OUT_f"]); + return new ExplicitOutBlock(this.x); + } + + OUT_f.prototype.details = function OUT_f() { + return this.x; + } +} diff --git a/data_structures_correct/REGISTER_f.js b/data_structures_correct/REGISTER_f.js new file mode 100644 index 0000000..bf4c28e --- /dev/null +++ b/data_structures_correct/REGISTER_f.js @@ -0,0 +1,28 @@ +function REGISTER_f () { + + REGISTER_f.prototype.internal = function REGISTER_f() { + this.z0 = zeros(10,1); + + var model = scicos_model(); + model.sim = new ScilabString(["delay"]); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.evtin = new ScilabDouble([1]); + model.dstate= new ScilabDouble(...this.z0); + model.blocktype = new ScilabString(["d"]); + model.dep_ut = new ScilabBoolean([false,false]); + + var exprs = new ScilabString([this.z0.toString().replace(/,/g, ";")]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"REGISTER_f\",sz(1),sz(2));"]); + var block=new standard_define(new ScilabDouble([2.5,2.5]),model,exprs,gr_i); + block.graphics.style = new ScilabString(["REGISTER_f"]); + block.graphics.in_implicit = new ScilabString(["E"]); // changed + block.graphics.out_implicit = new ScilabString(["E"]); + block.graphics.in_style = new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]); + block.graphics.out_style = new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]); + block.graphics.in_label = new ScilabString([""]); + block.graphics.out_label = new ScilabString([""]); + return block; + } +} diff --git a/data_structures_correct/combine_script.bat b/data_structures_correct/combine_script.bat new file mode 100644 index 0000000..54d2926 --- /dev/null +++ b/data_structures_correct/combine_script.bat @@ -0,0 +1 @@ +copy /b *.js ..\combined.js diff --git a/data_structures_correct/fortran_block.js b/data_structures_correct/fortran_block.js new file mode 100644 index 0000000..adfa5ef --- /dev/null +++ b/data_structures_correct/fortran_block.js @@ -0,0 +1,29 @@ +function fortran_block() { + + fortran_block.prototype.define = function fortran_block() { + var model = scicos_model(); + model.sim = list(new ScilabString([" "]), new ScilabDouble([1001])); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.evtin = new ScilabDouble(); + model.evtout = new ScilabDouble(); + model.state = new ScilabDouble(); + model.dstate = new ScilabDouble(); + model.rpar = new ScilabDouble(); + model.ipar = new ScilabDouble([0]); + model.blocktype = new ScilabString(["c"]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([true, false]); + + this.funam = "forty"; + + var label = list(new ScilabString([sci2exp(parseInt(getData(model.in)))], [sci2exp(parseInt(getData(model.out)))], [sci2exp(getData(model.rpar))], [this.funam]), list(new ScilabDouble())); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"fortran_block\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([4, 2]), model, label, gr_i); + return new BasicBlock(this.x); + } + fortran_block.prototype.details = function fortran_block() { + return this.x; + } +} diff --git a/data_structures_correct/freq_div.js b/data_structures_correct/freq_div.js new file mode 100644 index 0000000..c8cb1cc --- /dev/null +++ b/data_structures_correct/freq_div.js @@ -0,0 +1,146 @@ +function freq_div() { + + freq_div.prototype.define = function freq_div() { + var scs_m_1 = scicos_diagram(); + scs_m_1.objs.push(new Modulo_Count().internal()); + scs_m_1.objs.push(new CLKINV_f().internal()); + scs_m_1.objs.push(new CLKOUTV_f().internal()); + scs_m_1.objs.push(new IFTHEL_f().internal()); + scs_m_1.objs.push(new CLKSPLIT_f().internal()); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + scs_m_1.objs.push(scicos_link({})); + + var blk = scs_m_1.objs[0]; + var graphics = blk.graphics; + var model = blk.model; + graphics.orig = new ScilabDouble([0, -100]); + graphics.sz = new ScilabDouble([60, 40]); + graphics.exprs = new ScilabString(["0"], ["3"]); + model.dstate = new ScilabDouble([3]); + model.ipar = new ScilabDouble([3]); + graphics.pout = new ScilabDouble([7]); + graphics.pein = new ScilabDouble([10]); + graphics.out_implicit = new ScilabString(["E"]); + graphics.out_style = new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]); + graphics.out_label = new ScilabString([""]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[0] = blk; + + blk = scs_m_1.objs[1]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([120, 0]); + graphics.sz = new ScilabDouble([20, 20]); + graphics.exprs = new ScilabString(["1"]); + model.ipar = new ScilabDouble([1]); + graphics.peout = new ScilabDouble([6]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[1] = blk; + + blk = scs_m_1.objs[2]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([130, -160]); + graphics.sz = new ScilabDouble([20, 20]); + graphics.exprs = new ScilabString(["1"]); + model.ipar = new ScilabDouble([1]); + graphics.pein = new ScilabDouble([8]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[2] = blk; + + blk = scs_m_1.objs[3]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([100, -100]); + graphics.sz = new ScilabDouble([60, 40]); + graphics.exprs = new ScilabString(["1"], ["0"]); + model.ipar = new ScilabDouble([1]); + graphics.pin = new ScilabDouble([7]); + graphics.pein = new ScilabDouble([9]); + graphics.peout = new ScilabDouble([0], [8]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[3] = blk; + + blk = scs_m_1.objs[4]; + graphics = blk.graphics; + model = blk.model; + graphics.orig = new ScilabDouble([127, -33]); + graphics.sz = new ScilabDouble([7, 7]); + graphics.pein = new ScilabDouble([6]); + graphics.peout = new ScilabDouble([9], [10]); + model.uid = new ScilabString([count]); + blk.doc = list(new ScilabString([count++])); + blk.graphics = graphics; + blk.model = model; + scs_m_1.objs[4] = blk; + + var lnk = scs_m_1.objs[5]; + lnk.xx = new ScilabDouble([170], [170.5]); + lnk.yy = new ScilabDouble([-44], [-75]); + lnk.ct = new ScilabDouble([5, -1]); + lnk.from = new ScilabDouble([2, 1, 0]); + lnk.to = new ScilabDouble([5, 1, 1]); + scs_m_1.objs[5] = lnk; + + lnk = scs_m_1.objs[6]; + lnk.xx = new ScilabDouble([104], [136]); + lnk.yy = new ScilabDouble([-100], [-100]); + lnk.from = new ScilabDouble([1, 1, 0]); + lnk.to = new ScilabDouble([4, 1, 1]); + scs_m_1.objs[6] = lnk; + + lnk = scs_m_1.objs[7]; + lnk.xx = new ScilabDouble([180], [180]); + lnk.yy = new ScilabDouble([-124], [-176]); + lnk.ct = new ScilabDouble([5, -1]); + lnk.from = new ScilabDouble([4, 2, 0]); + lnk.to = new ScilabDouble([3, 1, 1]); + scs_m_1.objs[7] = lnk; + + lnk = scs_m_1.objs[8]; + lnk.xx = new ScilabDouble([170], [170.5]); + lnk.yy = new ScilabDouble([-44], [-75]); + lnk.ct = new ScilabDouble([5, -1]); + lnk.from = new ScilabDouble([5, 1, 0]); + lnk.to = new ScilabDouble([4, 1, 1]); + scs_m_1.objs[8] = lnk; + + lnk = scs_m_1.objs[9]; + lnk.xx = new ScilabDouble([169], [170]); + lnk.yy = new ScilabDouble([-90], [-76]); + lnk.xx = new ScilabDouble([0, 30, 1]); + lnk.yy = new ScilabDouble([0, -30, 1]); + lnk.ct = new ScilabDouble([5, -1]); + lnk.from = new ScilabDouble([5, 2, 0]); + lnk.to = new ScilabDouble([1, 1, 1]); + scs_m_1.objs[9] = lnk; + + model = scicos_model(); + model.sim = new ScilabString(["csuper"]); + model.evtin = new ScilabDouble([1]); + model.evtout = new ScilabDouble([1]); + model.rpar = scs_m_1; + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"freq_div",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i); + return new BasicBlock(this.x); + } + freq_div.prototype.details = function freq_div() { + return this.x; + } +} diff --git a/data_structures_correct/generic_block3.js b/data_structures_correct/generic_block3.js new file mode 100644 index 0000000..6679727 --- /dev/null +++ b/data_structures_correct/generic_block3.js @@ -0,0 +1,25 @@ +function generic_block3() { + + generic_block3.prototype.define = function generic_block3() { + var model = scicos_model(); + this.function_name = "sinblk"; + this.funtyp = 4; + model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp])); + model.in = new ScilabDouble([1]); + model.in2 = new ScilabDouble([1]); + model.intyp = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + model.out2 = new ScilabDouble([1]); + model.outtyp = new ScilabDouble([1]); + model.dep_ut = new ScilabBoolean([true, false]); + + var label = new ScilabString([this.function_name], [sci2exp(this.funtyp)], [sci2exp([parseInt(getData(model.in)[0]), parseInt(getData(model.in2)[0])])], [sci2exp(parseInt(getData(model.intyp)[0]))], [sci2exp([parseInt(getData(model.out)[0]), parseInt(getData(model.out2)[0])])], [sci2exp(parseInt(getData(model.outtyp)[0]))], [sci2exp(getData(model.evtin))], [sci2exp(getData(model.evtout))], [sci2exp(getData(model.state))], [sci2exp(getData(model.dstate))], [sci2exp(model.odstate)], [sci2exp(getData(model.rpar))], [sci2exp(getData(model.ipar))], [sci2exp(model.opar)], [sci2exp(parseInt(getData(model.nmode)[0]))], [sci2exp(parseInt(getData(model.nzcross)[0]))], [sci2exp(getData(model.firing))], ["y"], ["n"]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"generic_block3\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([4, 2]), model, label, gr_i); + return new BasicBlock(this.x); + } + generic_block3.prototype.details = function generic_block3() { + return this.x; + } +} |