summaryrefslogtreecommitdiff
path: root/data_structures_correct
diff options
context:
space:
mode:
Diffstat (limited to 'data_structures_correct')
-rw-r--r--data_structures_correct/ANDLOG_f.js2
-rw-r--r--data_structures_correct/BARXY.js2
-rw-r--r--data_structures_correct/BOUNCEXY.js2
-rw-r--r--data_structures_correct/Bache.js92
-rw-r--r--data_structures_correct/CANIMXY3D.js12
-rw-r--r--data_structures_correct/CCS.js58
-rw-r--r--data_structures_correct/CFSCOPE.js2
-rw-r--r--data_structures_correct/CLKFROM.js28
-rw-r--r--data_structures_correct/CLKGOTO.js2
-rw-r--r--data_structures_correct/CLKINV_f.js20
-rw-r--r--data_structures_correct/CLKOUTV_f.js4
-rw-r--r--data_structures_correct/CLKSOMV_f.js14
-rw-r--r--data_structures_correct/CLKSOM_f.js19
-rw-r--r--data_structures_correct/CLOCK_c.js16
-rw-r--r--data_structures_correct/CLSS.js2
-rw-r--r--data_structures_correct/CONST_m.js4
-rw-r--r--data_structures_correct/COSBLK_f.js20
-rw-r--r--data_structures_correct/CSCOPE.js32
-rw-r--r--data_structures_correct/CSCOPXY3D.js36
-rw-r--r--data_structures_correct/CUMSUM.js2
-rw-r--r--data_structures_correct/CURV_f.js27
-rw-r--r--data_structures_correct/CVS.js58
-rw-r--r--data_structures_correct/Capacitor.js62
-rw-r--r--data_structures_correct/ConstantVoltage.js32
-rw-r--r--data_structures_correct/Counter.js28
-rw-r--r--data_structures_correct/CurrentSensor.js29
-rw-r--r--data_structures_correct/DELAY_f.js121
-rw-r--r--data_structures_correct/DEMUX.js28
-rw-r--r--data_structures_correct/DEMUX_f.js27
-rw-r--r--data_structures_correct/DLRADAPT_f.js32
-rw-r--r--data_structures_correct/DOLLAR.js27
-rw-r--r--data_structures_correct/DOLLAR_f.js27
-rw-r--r--data_structures_correct/DOLLAR_m.js27
-rw-r--r--data_structures_correct/Diode.js36
-rw-r--r--data_structures_correct/EDGETRIGGER.js25
-rw-r--r--data_structures_correct/EDGE_TRIGGER.js114
-rw-r--r--data_structures_correct/ENDBLK.js106
-rw-r--r--data_structures_correct/END_c.js24
-rw-r--r--data_structures_correct/ESELECT_f.js29
-rw-r--r--data_structures_correct/EVTDLY_f.js23
-rw-r--r--data_structures_correct/EVTGEN_f.js22
-rw-r--r--data_structures_correct/EVTVARDLY.js25
-rw-r--r--data_structures_correct/EXPBLK_m.js28
-rw-r--r--data_structures_correct/EXTRACT.js35
-rw-r--r--data_structures_correct/EXTRACTBITS.js27
-rw-r--r--data_structures_correct/EXTRACTOR.js24
-rw-r--r--data_structures_correct/EXTTRI.js35
-rw-r--r--data_structures_correct/Extract_Activation.js129
-rw-r--r--data_structures_correct/FROM.js29
-rw-r--r--data_structures_correct/FROMMO.js33
-rw-r--r--data_structures_correct/FROMWSB.js164
-rw-r--r--data_structures_correct/Flowmeter.js61
-rw-r--r--data_structures_correct/GAINBLK.js30
-rw-r--r--data_structures_correct/GAINBLK_f.js26
-rw-r--r--data_structures_correct/GAIN_f.js26
-rw-r--r--data_structures_correct/GENERAL_f.js29
-rw-r--r--data_structures_correct/GENSIN_f.js26
-rw-r--r--data_structures_correct/GENSQR_f.js25
-rw-r--r--data_structures_correct/GOTO.js28
-rw-r--r--data_structures_correct/GOTOMO.js33
-rw-r--r--data_structures_correct/GotoTagVisibilityMO.js29
-rw-r--r--data_structures_correct/Ground.js30
-rw-r--r--data_structures_correct/Gyrator.js57
-rw-r--r--data_structures_correct/HALT_f.js24
-rw-r--r--data_structures_correct/HYSTHERESIS.js29
-rw-r--r--data_structures_correct/IFTHEL_f.js2
-rw-r--r--data_structures_correct/INIMPL_f.js28
-rw-r--r--data_structures_correct/INTEGRAL_f.js24
-rw-r--r--data_structures_correct/INTEGRAL_m.js29
-rw-r--r--data_structures_correct/INTMUL.js29
-rw-r--r--data_structures_correct/INTRP2BLK_f.js27
-rw-r--r--data_structures_correct/INVBLK.js23
-rw-r--r--data_structures_correct/IN_f.js48
-rw-r--r--data_structures_correct/ISELECT_m.js35
-rw-r--r--data_structures_correct/IdealTransformer.js121
-rw-r--r--data_structures_correct/Inductor.js34
-rw-r--r--data_structures_correct/LOGBLK_f.js25
-rw-r--r--data_structures_correct/LOGICAL_OP.js26
-rw-r--r--data_structures_correct/LOOKUP_f.js21
-rw-r--r--data_structures_correct/MATBKSL.js35
-rw-r--r--data_structures_correct/MATCATH.js35
-rw-r--r--data_structures_correct/MATCATV.js36
-rw-r--r--data_structures_correct/MATDET.js36
-rw-r--r--data_structures_correct/MATDIAG.js35
-rw-r--r--data_structures_correct/MATDIV.js37
-rw-r--r--data_structures_correct/MATEIG.js35
-rw-r--r--data_structures_correct/MATEXPM.js34
-rw-r--r--data_structures_correct/MATINV.js35
-rw-r--r--data_structures_correct/MATLU.js35
-rw-r--r--data_structures_correct/MATMAGPHI.js35
-rw-r--r--data_structures_correct/MATMUL.js24
-rw-r--r--data_structures_correct/MATPINV.js36
-rw-r--r--data_structures_correct/MATRESH.js35
-rw-r--r--data_structures_correct/MATSING.js36
-rw-r--r--data_structures_correct/MATSUM.js35
-rw-r--r--data_structures_correct/MATTRAN.js23
-rw-r--r--data_structures_correct/MATZCONJ.js35
-rw-r--r--data_structures_correct/MATZREIM.js7
-rw-r--r--data_structures_correct/MAXMIN.js23
-rw-r--r--data_structures_correct/MBLOCK.js45
-rw-r--r--data_structures_correct/MCLOCK_f.js139
-rw-r--r--data_structures_correct/MFCLCK_f.js50
-rw-r--r--data_structures_correct/MIN_f.js24
-rw-r--r--data_structures_correct/MUX.js26
-rw-r--r--data_structures_correct/MUX_f.js26
-rw-r--r--data_structures_correct/M_SWITCH.js26
-rw-r--r--data_structures_correct/M_freq.js24
-rw-r--r--data_structures_correct/Modulo_Count.js46
-rw-r--r--data_structures_correct/NMOS.js40
-rw-r--r--data_structures_correct/NPN.js56
-rw-r--r--data_structures_correct/NRMSOM_f.js24
-rw-r--r--data_structures_correct/OUTIMPL_f.js30
-rw-r--r--data_structures_correct/OUT_f.js50
-rw-r--r--data_structures_correct/OpAmp.js34
-rw-r--r--data_structures_correct/PDE.js24
-rw-r--r--data_structures_correct/PID.js626
-rw-r--r--data_structures_correct/PNP.js63
-rw-r--r--data_structures_correct/POSTONEG_f.js24
-rw-r--r--data_structures_correct/POWBLK_f.js25
-rw-r--r--data_structures_correct/PRODUCT.js23
-rw-r--r--data_structures_correct/PROD_f.js19
-rw-r--r--data_structures_correct/PerteDP.js41
-rw-r--r--data_structures_correct/PotentialSensor.js31
-rw-r--r--data_structures_correct/PuitsP.js34
-rw-r--r--data_structures_correct/QUANT_f.js26
-rw-r--r--data_structures_correct/RAMP.js29
-rw-r--r--data_structures_correct/RAND_m.js39
-rw-r--r--data_structures_correct/RATELIMITER.js26
-rw-r--r--data_structures_correct/READAU_f.js33
-rw-r--r--data_structures_correct/READC_f.js39
-rw-r--r--data_structures_correct/REGISTER_f.js28
-rw-r--r--data_structures_correct/RELATIONALOP.js26
-rw-r--r--data_structures_correct/RELAY_f.js28
-rw-r--r--data_structures_correct/RFILE_f.js36
-rw-r--r--data_structures_correct/RICC.js35
-rw-r--r--data_structures_correct/ROOTCOEF.js35
-rw-r--r--data_structures_correct/Resistor.js33
-rw-r--r--data_structures_correct/SATURATION.js28
-rw-r--r--data_structures_correct/SAWTOOTH_f.js23
-rw-r--r--data_structures_correct/SCALAR2VECTOR.js23
-rw-r--r--data_structures_correct/SELECT_m.js35
-rw-r--r--data_structures_correct/SHIFT.js30
-rw-r--r--data_structures_correct/SIGNUM.js25
-rw-r--r--data_structures_correct/SINBLK_f.js22
-rw-r--r--data_structures_correct/SQRT.js24
-rw-r--r--data_structures_correct/SRFLIPFLOP.js439
-rw-r--r--data_structures_correct/STEP_FUNCTION.js79
-rw-r--r--data_structures_correct/SUMMATION.js25
-rw-r--r--data_structures_correct/SWITCH2_m.js33
-rw-r--r--data_structures_correct/SWITCH_f.js27
-rw-r--r--data_structures_correct/SampleCLK.js22
-rw-r--r--data_structures_correct/Sigbuilder.js272
-rw-r--r--data_structures_correct/SineVoltage.js38
-rw-r--r--data_structures_correct/SourceP.js36
-rw-r--r--data_structures_correct/TANBLK_f.js23
-rw-r--r--data_structures_correct/TCLSS.js34
-rw-r--r--data_structures_correct/TEXT_f.js25
-rw-r--r--data_structures_correct/TIME_DELAY.js28
-rw-r--r--data_structures_correct/TIME_f.js18
-rw-r--r--data_structures_correct/TKSCALE.js26
-rw-r--r--data_structures_correct/TOWS_c.js33
-rw-r--r--data_structures_correct/TRASH_f.js23
-rw-r--r--data_structures_correct/TrigFun.js21
-rw-r--r--data_structures_correct/VARIABLE_DELAY.js28
-rw-r--r--data_structures_correct/VanneReglante.js37
-rw-r--r--data_structures_correct/VariableResistor.js29
-rw-r--r--data_structures_correct/VirtualCLK0.js22
-rw-r--r--data_structures_correct/WRITEC_f.js31
-rw-r--r--data_structures_correct/c_block.js3
-rw-r--r--data_structures_correct/combine_script.bat1
-rw-r--r--data_structures_correct/fortran_block.js29
-rw-r--r--data_structures_correct/freq_div.js146
-rw-r--r--data_structures_correct/scifunc_block_m.js43
173 files changed, 6937 insertions, 176 deletions
diff --git a/data_structures_correct/ANDLOG_f.js b/data_structures_correct/ANDLOG_f.js
index 0fe3b2f..a1b0c67 100644
--- a/data_structures_correct/ANDLOG_f.js
+++ b/data_structures_correct/ANDLOG_f.js
@@ -22,7 +22,7 @@ function ANDLOG_f() {
return block;
}
- ANDLOG_f.prototype.define = function ANDLOG() {
+ ANDLOG_f.prototype.define = function ANDLOG_f() {
var model = scicos_model();
model.sim = new ScilabString(["andlog"]);
model.out = new ScilabDouble([1]);
diff --git a/data_structures_correct/BARXY.js b/data_structures_correct/BARXY.js
index 51d9dfc..a7ca0f1 100644
--- a/data_structures_correct/BARXY.js
+++ b/data_structures_correct/BARXY.js
@@ -15,7 +15,7 @@ function BARXY() {
model.intyp = new ScilabDouble([1]);
model.out = new ScilabDouble();
model.evtin = new ScilabDouble([1]);
- model.rpar = new ScilabDouble([xmin], [xmax], [ymin], [ymax]);
+ model.rpar = new ScilabDouble([this.xmin], [this.xmax], [this.ymin], [this.ymax]);
model.ipar = new ScilabDouble([1]);
this.x = new standard_define(new ScilabDouble([2, 2]), model, [], []);
this.x.graphics.in_implicit = new ScilabString(["E", , "E"]);
diff --git a/data_structures_correct/BOUNCEXY.js b/data_structures_correct/BOUNCEXY.js
index 6a3163c..1fa2ff2 100644
--- a/data_structures_correct/BOUNCEXY.js
+++ b/data_structures_correct/BOUNCEXY.js
@@ -47,4 +47,4 @@ function BOUNCEXY() {
return this.x;
}
-} \ No newline at end of file
+}
diff --git a/data_structures_correct/Bache.js b/data_structures_correct/Bache.js
index 5a2585c..c85c3d5 100644
--- a/data_structures_correct/Bache.js
+++ b/data_structures_correct/Bache.js
@@ -1,46 +1,46 @@
-function Bache() {
-
- Bache.prototype.define = function Bache() {
- this.in1 = 2;
- this.out = 3;
-
- var model = scicos_model();
- model.in = new ScilabDouble(math.transpose(math.range(-1, -this.in1, -1, true)));
- model.out = new ScilabDouble(math.transpose(math.range(-1, -this.out, -1, true)));
-
- this.Patm = 1.013E5;
- this.A = 1;
- this.ze1 = 40;
- this.ze2 = 0;
- this.zs1 = 40;
- this.zs2 = 0;
- this.z0 = 30;
- this.T0 = 290;
- this.p_rho = 0;
-
- model.rpar = new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]);
- model.sim = new ScilabString(["Bache"]);
- model.blocktype = new ScilabString(["c"]);
- model.dep_ut = new ScilabBoolean([true, false]);
-
- var mo = modelica();
- mo.model = new ScilabString(["Bache"]);
- mo.inputs = new ScilabString(["Ce1", "Ce2"]);
- mo.outputs = new ScilabString(["Cs1", "Cs2", "yNiveau"]);
- mo.parameters = list(new ScilabString(["Patm"], ["A"], ["ze1"], ["ze2"], ["zs1"], ["zs2"], ["z0"], ["T0"], ["p_rho"]), new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]));
- model.equations = mo;
- model.in = new ScilabDouble(...ones(size(getData(mo.inputs), '*'), 1));
- model.out = new ScilabDouble(...ones(size(getData(mo.outputs), '*'), 1));
-
- var exprs = new ScilabString([this.Patm.toString()], [this.A.toString()], [this.ze1.toString()], [this.ze2.toString()], [this.zs1.toString()], [this.zs2.toString()], [this.z0.toString()], [this.T0.toString()], [this.p_rho.toString()]);
-
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Bache\",sz(1),sz(2));"]);
- this.x = new standard_define([2, 2], model, exprs, list(gr_i, 0));
- this.x.graphics.in_implicit = new ScilabString(["I"], ["I"]);
- this.x.graphics.out_implicit = new ScilabString(["I"], ["I"], ["E"]);
- return new BasicBlock(this.x);
- }
- Bache.prototype.details = function Bache() {
- return this.x;
- }
-}
+function Bache() {
+
+ Bache.prototype.define = function Bache() {
+ this.in1 = 2;
+ this.out = 3;
+
+ var model = scicos_model();
+ model.in = new ScilabDouble(math.transpose(math.range(-1, -this.in1, -1, true)));
+ model.out = new ScilabDouble(math.transpose(math.range(-1, -this.out, -1, true)));
+
+ this.Patm = 1.013E5;
+ this.A = 1;
+ this.ze1 = 40;
+ this.ze2 = 0;
+ this.zs1 = 40;
+ this.zs2 = 0;
+ this.z0 = 30;
+ this.T0 = 290;
+ this.p_rho = 0;
+
+ model.rpar = new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]);
+ model.sim = new ScilabString(["Bache"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Bache"]);
+ mo.inputs = new ScilabString(["Ce1", "Ce2"]);
+ mo.outputs = new ScilabString(["Cs1", "Cs2", "yNiveau"]);
+ mo.parameters = list(new ScilabString(["Patm"], ["A"], ["ze1"], ["ze2"], ["zs1"], ["zs2"], ["z0"], ["T0"], ["p_rho"]), new ScilabDouble([this.Patm], [this.A], [this.ze1], [this.ze2], [this.zs1], [this.zs2], [this.z0], [this.T0], [this.p_rho]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), '*'), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), '*'), 1));
+
+ var exprs = new ScilabString([this.Patm.toString()], [this.A.toString()], [this.ze1.toString()], [this.ze2.toString()], [this.zs1.toString()], [this.zs2.toString()], [this.z0.toString()], [this.T0.toString()], [this.p_rho.toString()]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Bache\",sz(1),sz(2));"]);
+ this.x = new standard_define([2, 2], model, exprs, list(gr_i, 0));
+ this.x.graphics.in_implicit = new ScilabString(["I"], ["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"], ["I"], ["E"]);
+ return new BasicBlock(this.x);
+ }
+ Bache.prototype.details = function Bache() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/CANIMXY3D.js b/data_structures_correct/CANIMXY3D.js
index d806266..0a319e6 100644
--- a/data_structures_correct/CANIMXY3D.js
+++ b/data_structures_correct/CANIMXY3D.js
@@ -1,12 +1,11 @@
function CANIMXY3D() {
CANIMXY3D.prototype.define = function CANIMXY3D() {
-
- this.win = -1;
- this.N = 2;
- this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
- this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
- this.wpos = [[-1],[-1]];
+ this.win = -1;
+ this.N = 2;
+ this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
+ this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
+ this.wpos = [[-1],[-1]];
this.wdim = [[-1],[-1]];
this.param3ds = [[50],[280]];
this.vec_x = [[-15],[15]];
@@ -34,7 +33,6 @@ function CANIMXY3D() {
}
CANIMXY3D.prototype.details = function CANIMXY3D() {
-
return this.x;
}
diff --git a/data_structures_correct/CCS.js b/data_structures_correct/CCS.js
new file mode 100644
index 0000000..d1ca10c
--- /dev/null
+++ b/data_structures_correct/CCS.js
@@ -0,0 +1,58 @@
+function CCS() {
+
+ CCS.prototype.define = function CCS() {
+ this.ModelName = "CCS";
+ this.PrametersValue = new ScilabDouble();
+ this.ParametersName = new ScilabDouble();
+ var model = scicos_model();
+ this.Typein = [];
+ this.Typeout = [];
+ this.MI = [];
+ this.MO = [];
+ this.P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ this.PortName = [["Iin"],["p"],["n"]];
+
+ 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 = new modelica_function();
+ model.sim = new ScilabString([this.ModelName]);
+ mo.inputs = new ScilabString(...this.MI);
+ mo.outputs = new ScilabString(...this.MO);
+ model.rpar = this.PrametersValue;
+ mo.parameters = list(this.ParametersName, this.PrametersValue, new ScilabDouble(...zeros(getData(this.ParametersName))));
+ var exprs = new ScilabDouble();
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CCS\",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.1, 3]), model, exprs, list(new ScilabString([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);
+ }
+
+ CCS.prototype.details = function CCS() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/CFSCOPE.js b/data_structures_correct/CFSCOPE.js
index c2c7991..7be1e41 100644
--- a/data_structures_correct/CFSCOPE.js
+++ b/data_structures_correct/CFSCOPE.js
@@ -9,7 +9,7 @@ function CFSCOPE() {
this.ymin = -15;
this.ymax = 15;
this.per = 30;
-
+
var model = scicos_model();
model.sim = list(new ScilabString(["cfscope"]), new ScilabDouble([4]));
model.evtin = new ScilabDouble([1]);
diff --git a/data_structures_correct/CLKFROM.js b/data_structures_correct/CLKFROM.js
index 9209cb5..eeb78b0 100644
--- a/data_structures_correct/CLKFROM.js
+++ b/data_structures_correct/CLKFROM.js
@@ -1,20 +1,20 @@
-function CLKFROM () {
+function CLKFROM() {
CLKFROM.prototype.define = function CLKFROM() {
- var model = scicos_model();
- model.sim = new ScilabString(["clkfrom"]);
- model.evtout = new ScilabDouble([1]);
- model.opar=list(new ScilabString(["A"]));
- model.blocktype = new ScilabString(["d"]);
- model.firing = new ScilabDouble([-1]);
- model.dep_ut = new ScilabBoolean([false,false]);
-
- var exprs = new ScilabString(["A"]);
- this.x=new standard_define(new ScilabDouble([2,1]),model,exprs,new ScilabString([" "]));
- this.x.graphics.id = new ScilabString(["From"]);
- return new BasicBlock(this.x);
+ var model = scicos_model();
+ model.sim = new ScilabString(["clkfrom"]);
+ model.evtout = new ScilabDouble([1]);
+ model.opar = list(new ScilabString(["A"]));
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString(["A"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, new ScilabString([" "]));
+ this.x.graphics.id = new ScilabString(["From"]);
+ return new BasicBlock(this.x);
}
CLKFROM.prototype.details = function CLKFROM() {
return this.x;
}
-}
+} \ No newline at end of file
diff --git a/data_structures_correct/CLKGOTO.js b/data_structures_correct/CLKGOTO.js
index 2c15601..a91514f 100644
--- a/data_structures_correct/CLKGOTO.js
+++ b/data_structures_correct/CLKGOTO.js
@@ -15,7 +15,7 @@ function CLKGOTO() {
this.x.graphics.id = new ScilabString(["Goto"]);
return new BasicBlock(this.x);
}
-
+
CLKGOTO.prototype.details = function CLKGOTO() {
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
index 5d13410..5ea67f1 100644
--- a/data_structures_correct/CLKOUTV_f.js
+++ b/data_structures_correct/CLKOUTV_f.js
@@ -28,9 +28,11 @@ function CLKOUTV_f() {
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),&quot;CLKOUTV_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8]));
+ block.graphics.style = new ScilabString(["CLKOUTV_f"]);
return block;
}
diff --git a/data_structures_correct/CLKSOMV_f.js b/data_structures_correct/CLKSOMV_f.js
index 346241f..6729647 100644
--- a/data_structures_correct/CLKSOMV_f.js
+++ b/data_structures_correct/CLKSOMV_f.js
@@ -1,5 +1,19 @@
function CLKSOMV_f() {
+ CLKSOMV_f.prototype.internal = function CLKSOMV_f() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["sum"]);
+ model.evtin = new ScilabDouble([1], [1], [1]);
+ model.evtout = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKSOMV_f\",sz(1),sz(2));"]);
+ var block = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i);
+ return block;
+ }
+
CLKSOMV_f.prototype.define = function CLKSOMV_f() {
var model = scicos_model();
model.sim = new ScilabString(["sum"]);
diff --git a/data_structures_correct/CLKSOM_f.js b/data_structures_correct/CLKSOM_f.js
new file mode 100644
index 0000000..f67b2a4
--- /dev/null
+++ b/data_structures_correct/CLKSOM_f.js
@@ -0,0 +1,19 @@
+function CLKSOM_f() {
+
+ CLKSOM_f.prototype.internal = function CLKSOM_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sum"]);
+ model.evtin = new ScilabDouble([1], [1], [1]);
+ model.evtout = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+ model.outtyp = new ScilabDouble();
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLKSOM_f\",sz(1),sz(2));"]);
+ var block = standard_define(new ScilabDouble([1, 1]), model, [], gr_i);
+ block.graphics.style = new ScilabString(["CLKSOM_f"])
+ return block;
+ }
+}
diff --git a/data_structures_correct/CLOCK_c.js b/data_structures_correct/CLOCK_c.js
index 1284626..b6910b2 100644
--- a/data_structures_correct/CLOCK_c.js
+++ b/data_structures_correct/CLOCK_c.js
@@ -1,4 +1,20 @@
function CLOCK_c() {
+
+ CLOCK_c.prototype.get = function CLOCK_c() {
+ var options = {
+ dt: ["Period", getData(this.x.model.rpar.objs[1].model.rpar)[0]],
+ t0: ["Initialisation Time", getData(this.x.model.rpar.objs[1].model.firing)],
+ };
+ return options;
+ }
+
+ CLOCK_c.prototype.set = function CLOCK_c() {
+ this.x.model.rpar.objs[1].model.firing = new ScilabDouble([arguments[0]["t0"]]);
+ this.x.model.rpar.objs[1].model.rpar = new ScilabDouble([arguments[0]["dt"]], [arguments[0]["t0"]]);
+ this.x.model.rpar.objs[1].graphics.exprs = new ScilabString([arguments[0]["dt"]], [arguments[0]["t0"]])
+ return new BasicBlock(this.x);
+ }
+
CLOCK_c.prototype.define = function CLOCK_c() {
var evtdly = new EVTDLY_c().internal();
evtdly.graphics.orig = new ScilabDouble([320, 232]);
diff --git a/data_structures_correct/CLSS.js b/data_structures_correct/CLSS.js
index 471f302..db5bd1b 100644
--- a/data_structures_correct/CLSS.js
+++ b/data_structures_correct/CLSS.js
@@ -23,7 +23,7 @@ function CLSS() {
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_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/COSBLK_f.js b/data_structures_correct/COSBLK_f.js
new file mode 100644
index 0000000..4e05648
--- /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;
+ }
+} \ No newline at end of file
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
index b39b028..8e6a1ae 100644
--- a/data_structures_correct/CUMSUM.js
+++ b/data_structures_correct/CUMSUM.js
@@ -5,7 +5,7 @@ function CUMSUM() {
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]);
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/CVS.js b/data_structures_correct/CVS.js
new file mode 100644
index 0000000..8643d0e
--- /dev/null
+++ b/data_structures_correct/CVS.js
@@ -0,0 +1,58 @@
+function CVS() {
+
+ CVS.prototype.define = function CVS() {
+ this.ModelName = "CVS";
+ this.PrametersValue = new ScilabDouble();
+ this.ParametersName = new ScilabDouble();
+ var model = scicos_model();
+ this.Typein = [];
+ this.Typeout = [];
+ this.MI = [];
+ this.MO = [];
+ this.P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ this.PortName = [["vin"],["p"],["n"]];
+
+ 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 = new modelica_function();
+ model.sim = new ScilabString([this.ModelName]);
+ mo.inputs = new ScilabString(...this.MI);
+ mo.outputs = new ScilabString(...this.MO);
+ model.rpar = this.PrametersValue;
+ mo.parameters = list(this.ParametersName, this.PrametersValue, new ScilabDouble(...zeros(getData(this.ParametersName))));
+ var exprs = new ScilabDouble();
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CVS\",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.1, 3]), model, exprs, list(new ScilabString([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);
+ }
+
+ CVS.prototype.details = function CVS() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/Capacitor.js b/data_structures_correct/Capacitor.js
index eae92f9..60e0c1e 100644
--- a/data_structures_correct/Capacitor.js
+++ b/data_structures_correct/Capacitor.js
@@ -1,31 +1,31 @@
-function Capacitor() {
-
- Capacitor.prototype.define = function Capacitor() {
-
- var model = scicos_model();
- var C = 0.01, v = 0;
- model.rpar = new ScilabDouble([C],[v]);
- model.sim = new ScilabString(["Capacitor"]);
- model.blocktype = new ScilabString(["c"]);
- model.dep_ut = new ScilabBoolean([true, false]);
-
- var mo = modelica();
- mo.model = new ScilabString(["Capacitor"]);
- mo.inputs = new ScilabString(["p"]);
- mo.outputs = new ScilabString(["n"]);
- mo.parameters = list(new ScilabString(["C", "v"]), list(new ScilabDouble([C]), new ScilabDouble([v])), new ScilabDouble([0, 1]));
- model.equations = mo;
- model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
- model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
-
- var exprs = new ScilabString([C], [v]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Capacitor\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([2, 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);
- }
- Capacitor.prototype.details = function Capacitor() {
- return this.x;
- }
-}
+function Capacitor() {
+
+ Capacitor.prototype.define = function Capacitor() {
+
+ var model = scicos_model();
+ var C = 0.01, v = 0;
+ model.rpar = new ScilabDouble([C],[v]);
+ model.sim = new ScilabString(["Capacitor"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Capacitor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["C", "v"]), list(new ScilabDouble([C]), new ScilabDouble([v])), new ScilabDouble([0, 1]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([C], [v]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Capacitor\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 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);
+ }
+ Capacitor.prototype.details = function Capacitor() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/ConstantVoltage.js b/data_structures_correct/ConstantVoltage.js
new file mode 100644
index 0000000..cb57690
--- /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 = new modelica_function();
+ 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..a94201c
--- /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 = new modelica_function();
+ 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/DELAY_f.js b/data_structures_correct/DELAY_f.js
new file mode 100644
index 0000000..650ac12
--- /dev/null
+++ b/data_structures_correct/DELAY_f.js
@@ -0,0 +1,121 @@
+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;
+ }
+} \ No newline at end of file
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/DEMUX_f.js b/data_structures_correct/DEMUX_f.js
new file mode 100644
index 0000000..ed0f26c
--- /dev/null
+++ b/data_structures_correct/DEMUX_f.js
@@ -0,0 +1,27 @@
+function DEMUX_f() {
+
+ DEMUX_f.prototype.define = function DEMUX_f() {
+ this.out = 2;
+ var arr = [];
+ arr.push(math.range(-1, -this.out, -1, true)._data);
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["demux"]), new ScilabDouble([1]));
+ model.in = new ScilabDouble([0]);
+ 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_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DEMUX_f.prototype.details = function DEMUX_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/DLRADAPT_f.js b/data_structures_correct/DLRADAPT_f.js
new file mode 100644
index 0000000..8b68940
--- /dev/null
+++ b/data_structures_correct/DLRADAPT_f.js
@@ -0,0 +1,32 @@
+function DLRADAPT_f() {
+
+ DLRADAPT_f.prototype.define = function DLRADAPT_f() {
+ this.p = [[0], [1]];
+ this.rn = [];
+ this.rd = [[math.complex(0.2, 0.8), math.complex(0.2, -0.8)], [math.complex(0.3, 0.7), math.complex(0.3, -0.7)]];
+ this.g = [[1], [1]];
+ this.last_u = [];
+ this.last_y = [[0], [0]];
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["dlradp"]);
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble(...this.last_y);
+ model.rpar = new ScilabDouble(...this.p, ...real(colon_operator(this.rd)), ...math.im(colon_operator(this.rd)), ...this.g);
+ model.ipar = new ScilabDouble([0], [2], [2]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.p)], [sci2exp(this.rn)], [sci2exp(this.rd, 0)], [sci2exp(this.g)], [sci2exp(this.last_u)], [sci2exp(this.last_y)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLRADAPT_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DLRADAPT_f.prototype.details = function DLRADAPT_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/DOLLAR.js b/data_structures_correct/DOLLAR.js
new file mode 100644
index 0000000..5e6dffb
--- /dev/null
+++ b/data_structures_correct/DOLLAR.js
@@ -0,0 +1,27 @@
+function DOLLAR() {
+
+ DOLLAR.prototype.define = function DOLLAR() {
+ this.z = 0;
+ this.inh = 0;
+ this.in1 = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.evtin = new ScilabDouble([1 - this.inh]);
+ model.dstate = new ScilabDouble([this.z]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.z], [this.inh]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DOLLAR.prototype.details = function DOLLAR() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/DOLLAR_f.js b/data_structures_correct/DOLLAR_f.js
new file mode 100644
index 0000000..d4625b7
--- /dev/null
+++ b/data_structures_correct/DOLLAR_f.js
@@ -0,0 +1,27 @@
+function DOLLAR_f() {
+
+ DOLLAR_f.prototype.define = function DOLLAR_f() {
+ this.z = 0;
+ this.inh = 0;
+ this.in1 = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["dollar"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.evtin = new ScilabDouble([1 - this.inh]);
+ model.dstate = new ScilabDouble([this.z]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.z], [this.inh]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DOLLAR_f.prototype.details = function DOLLAR_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/DOLLAR_m.js b/data_structures_correct/DOLLAR_m.js
new file mode 100644
index 0000000..d39a88f
--- /dev/null
+++ b/data_structures_correct/DOLLAR_m.js
@@ -0,0 +1,27 @@
+function DOLLAR_m() {
+
+ DOLLAR_m.prototype.define = function DOLLAR_m() {
+ this.z = 0;
+ this.inh = 0;
+ this.in1 = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.evtin = new ScilabDouble([1 - this.inh]);
+ model.dstate = new ScilabDouble([this.z]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.z], [this.inh]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DOLLAR_m.prototype.details = function DOLLAR_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Diode.js b/data_structures_correct/Diode.js
new file mode 100644
index 0000000..90177bf
--- /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 = new modelica_function();
+ 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),&quot;EDGETRIGGER&quot;,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),&quot;EDGE_TRIGGER&quot;,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),&quot;END_c&quot;,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),&quot;ENDBLK&quot;,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/END_c.js b/data_structures_correct/END_c.js
new file mode 100644
index 0000000..37c6f21
--- /dev/null
+++ b/data_structures_correct/END_c.js
@@ -0,0 +1,24 @@
+function END_c() {
+
+ END_c.prototype.define = function END_c() {
+ this.tf = 100000000;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scicosexit"]), new ScilabDouble([4]));
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble([1]);
+ model.firing = new ScilabDouble([this.tf]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.tf]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"END_c\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ END_c.prototype.details = function END_c() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/ESELECT_f.js b/data_structures_correct/ESELECT_f.js
new file mode 100644
index 0000000..dc0ab87
--- /dev/null
+++ b/data_structures_correct/ESELECT_f.js
@@ -0,0 +1,29 @@
+function ESELECT_f() {
+
+ ESELECT_f.prototype.define = function ESELECT_f() {
+ this.out = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["eselect"]), new ScilabDouble([-2]));
+ model.in = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.intyp = new ScilabDouble([-1]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble(...ones(this.out, 1));
+ model.blocktype = new ScilabString(["l"]);
+ model.firing = new ScilabDouble(...ones(this.out, 1));
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.nmode = new ScilabDouble([0]);
+ model.nzcross = new ScilabDouble([0]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ESELECT_f\",sz(1),sz(2));"]);;
+
+ var exprs = new ScilabString([this.out], [1], [parseInt(getData(model.nmode))]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ ESELECT_f.prototype.details = function ESELECT_f() {
+ 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..1bb4e29
--- /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;
+ }
+} \ No newline at end of file
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/EVTVARDLY.js b/data_structures_correct/EVTVARDLY.js
new file mode 100644
index 0000000..816c0a5
--- /dev/null
+++ b/data_structures_correct/EVTVARDLY.js
@@ -0,0 +1,25 @@
+function EVTVARDLY() {
+
+ EVTVARDLY.prototype.define = function EVTVARDLY() {
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["evtvardly"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([parseInt(getData(model.firing), 10)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EVTVARDLY\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ EVTVARDLY.prototype.details = function EVTVARDLY() {
+ 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/EXTRACT.js b/data_structures_correct/EXTRACT.js
new file mode 100644
index 0000000..387f465
--- /dev/null
+++ b/data_structures_correct/EXTRACT.js
@@ -0,0 +1,35 @@
+function EXTRACT() {
+
+ EXTRACT.prototype.define = function EXTRACT() {
+ this.function_name = "extract";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([1]);
+ 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([1, 1, 1, 1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)], [sci2exp([1])], [sci2exp([1])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXTRACT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ EXTRACT.prototype.details = function EXTRACT() {
+ 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/EXTRACTOR.js b/data_structures_correct/EXTRACTOR.js
new file mode 100644
index 0000000..c8d7a1b
--- /dev/null
+++ b/data_structures_correct/EXTRACTOR.js
@@ -0,0 +1,24 @@
+function EXTRACTOR() {
+
+ EXTRACTOR.prototype.define = function EXTRACTOR() {
+ this.ind = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["extractor"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.ipar = new ScilabDouble([this.ind]);
+
+ var exprs = new ScilabString([sci2exp(this.ind)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXTRACTOR\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ EXTRACTOR.prototype.details = function EXTRACTOR() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/EXTTRI.js b/data_structures_correct/EXTTRI.js
new file mode 100644
index 0000000..96fdb39
--- /dev/null
+++ b/data_structures_correct/EXTTRI.js
@@ -0,0 +1,35 @@
+function EXTTRI() {
+
+ EXTTRI.prototype.define = function EXTTRI() {
+ this.function_name = "extrilz";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"EXTTRI\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ EXTTRI.prototype.details = function EXTTRI() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Extract_Activation.js b/data_structures_correct/Extract_Activation.js
new file mode 100644
index 0000000..a13fc27
--- /dev/null
+++ b/data_structures_correct/Extract_Activation.js
@@ -0,0 +1,129 @@
+function Extract_Activation() {
+
+ Extract_Activation.prototype.define = function Extract_Activation() {
+ var scs_m_1 = scicos_diagram();
+ scs_m_1.objs.push(new IFTHEL_f().internal());
+ scs_m_1.objs.push(new CLKSOMV_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({}));
+ 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([80, 0]);
+ graphics.sz = new ScilabDouble([60, 40]);
+ graphics.flip = new ScilabBoolean([true]);
+ graphics.exprs = new ScilabString(["0"], ["0"]);
+ model.evtin = new ScilabDouble();
+ model.nzcross = new ScilabDouble([0]);
+ model.nmode = new ScilabDouble([0]);
+ graphics.pin = new ScilabDouble([7]);
+ graphics.peout = new ScilabDouble([5], [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;
+ model.outtyp = new ScilabDouble();
+ model.evtin = new ScilabDouble([-1], [-1], [-1]);
+ model.evtout = new ScilabDouble([-1]);
+ graphics.orig = new ScilabDouble([80, -80]);
+ graphics.sz = new ScilabDouble([80, 40]);
+ graphics.flip = new ScilabBoolean([true]);
+ graphics.pein = new ScilabDouble([5], [6], [0]);
+ graphics.peout = new ScilabDouble([8]);
+ graphics.style = new ScilabString(["CLKSOMV_f"]);
+ 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.flip = new ScilabBoolean([true]);
+ graphics.exprs = new ScilabString(["1"]);
+ model.ipar = new ScilabDouble([1]);
+ graphics.pout = new ScilabDouble([7]);
+ 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;
+ model.outtyp = new ScilabDouble();
+ graphics.style = new ScilabString(["CLKOUTV_f"]);
+ graphics.orig = new ScilabDouble([110, -140]);
+ graphics.sz = new ScilabDouble([20, 20]);
+ graphics.flip = new ScilabBoolean([true]);
+ graphics.exprs = new ScilabString(["1"]);
+ graphics.gr_i = list(new ScilabString(["xstringb(orig(1),orig(2),\"CLKOUTV_f\",sz(1),sz(2));"]), new ScilabDouble([8]));
+ 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[3] = blk;
+
+ var lnk = scs_m_1.objs[4];
+ lnk.xx = new ScilabDouble([140], [140]);
+ lnk.yy = new ScilabDouble([-44], [-76]);
+ lnk.ct = new ScilabDouble([5, -1]);
+ lnk.from = new ScilabDouble([1, 1, 0]);
+ lnk.to = new ScilabDouble([2, 1, 1]);
+ scs_m_1.objs[4] = lnk;
+
+ lnk = scs_m_1.objs[5];
+ lnk.xx = new ScilabDouble([160], [160]);
+ lnk.yy = new ScilabDouble([-44], [-76]);
+ lnk.ct = new ScilabDouble([5, -1]);
+ lnk.from = new ScilabDouble([1, 2, 0]);
+ lnk.to = new ScilabDouble([2, 2, 1]);
+ scs_m_1.objs[5] = lnk;
+
+ lnk = scs_m_1.objs[6];
+ lnk.xx = new ScilabDouble([64], [116]);
+ lnk.yy = new ScilabDouble([-40], [-20]);
+ lnk.from = new ScilabDouble([3, 1, 0]);
+ lnk.to = new ScilabDouble([1, 1, 1]);
+ scs_m_1.objs[6] = lnk;
+
+ lnk = scs_m_1.objs[7];
+ lnk.xx = new ScilabDouble([160], [160]);
+ lnk.yy = new ScilabDouble([-124], [-176]);
+ lnk.ct = new ScilabDouble([5, -1]);
+ lnk.from = new ScilabDouble([2, 1, 0]);
+ lnk.to = new ScilabDouble([4, 1, 1]);
+ scs_m_1.objs[7] = 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),\"Extract_Activation\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ Extract_Activation.prototype.details = function Extract_Activation() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/FROM.js b/data_structures_correct/FROM.js
new file mode 100644
index 0000000..f6002b2
--- /dev/null
+++ b/data_structures_correct/FROM.js
@@ -0,0 +1,29 @@
+function FROM() {
+
+ FROM.prototype.define = function FROM() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["from"]);
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble();
+ model.opar = list(new ScilabString(["A"]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString(["A"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i);
+ this.x.graphics.id = new ScilabString(["From"]);
+ return new BasicBlock(this.x);
+ }
+ FROM.prototype.details = function FROM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/FROMMO.js b/data_structures_correct/FROMMO.js
new file mode 100644
index 0000000..a59a1ae
--- /dev/null
+++ b/data_structures_correct/FROMMO.js
@@ -0,0 +1,33 @@
+function FROMMO() {
+
+ FROMMO.prototype.define = function FROMMO() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["frommo"]);
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble();
+ model.opar = list(new ScilabString(["A"]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["frommo"]);
+ mo.outputs = new ScilabString(["n"]);
+
+ var exprs = new ScilabString(["A"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROMMO\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ FROMMO.prototype.details = function FROMMO() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/FROMWSB.js b/data_structures_correct/FROMWSB.js
new file mode 100644
index 0000000..8ccfebf
--- /dev/null
+++ b/data_structures_correct/FROMWSB.js
@@ -0,0 +1,164 @@
+function FROMWSB() {
+
+ FROMWSB.prototype.define = function FROMWSB() {
+ var scs_m_1 = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["FROMWSB"]),
+ 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(["FROMWS_c"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([260.37067, 261.584]),
+ sz: new ScilabDouble([70, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["V"], ["1"], ["1"], ["0"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([4]),
+ pein: new ScilabDouble([2]),
+ peout: new ScilabDouble([2]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;FROMWS_c&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["FROMWS_c"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["fromws_c"]), new ScilabDouble([4])),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ outtyp: new ScilabDouble([-1]),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1], [-31], [1], [1], [0]),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabDouble([0]),
+ dep_ut: new ScilabBoolean([false, true]),
+ 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(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([358.9421, 271.584]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([4]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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([295.37067], [295.37067], [233.23733], [233.23733], [295.37067], [295.37067]),
+ yy: new ScilabDouble([255.86971], [223.45067], [223.45067], [337.85067], [337.85067], [307.29829]),
+ 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])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([338.9421], [358.9421]),
+ yy: new ScilabDouble([281.584], [281.584]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+
+ var model = scicos_model({
+ sim: new ScilabString(["csuper"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ 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),\"FROMWSB\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([5, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ FROMWSB.prototype.details = function FROMWSB() {
+ return this.x;
+ }
+} \ No newline at end of file
diff --git a/data_structures_correct/Flowmeter.js b/data_structures_correct/Flowmeter.js
new file mode 100644
index 0000000..a10f96b
--- /dev/null
+++ b/data_structures_correct/Flowmeter.js
@@ -0,0 +1,61 @@
+function Flowmeter() {
+
+ Flowmeter.prototype.define = function Flowmeter() {
+ this.ModelName = "Flowmeter";
+ this.PrametersValue = 1;
+ this.ParametersName = "Qini";
+
+ var model = scicos_model();
+
+ this.Typein = [];
+ this.Typeout = [];
+
+ this.MI = [];
+ this.MO = [];
+ this.P = [[50,105,-1,90],[0,10,2,0],[101,10,-2,0]];
+ this.PortName = [["Mesure"],["C1"],["C2"]];
+
+ 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 = new modelica_function();
+ 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([this.ParametersName])));
+ var exprs = new ScilabString(["1"]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Flowmeter\",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(new ScilabString([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);
+ }
+
+ Flowmeter.prototype.details = function Flowmeter() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/GAINBLK.js b/data_structures_correct/GAINBLK.js
new file mode 100644
index 0000000..f4d758e
--- /dev/null
+++ b/data_structures_correct/GAINBLK.js
@@ -0,0 +1,30 @@
+function GAINBLK() {
+
+ GAINBLK.prototype.define = function GAINBLK() {
+ this.gain = 1;
+ this.in1 = -1;
+ this.out = -1;
+ this.in2 = -2;
+ this.out2 = -2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.in2 = new ScilabDouble([this.in2]);
+ model.out2 = new ScilabDouble([this.out2]);
+ model.rpar = new ScilabDouble([this.gain]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.gain)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GAINBLK.prototype.details = function GAINBLK() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GAINBLK_f.js b/data_structures_correct/GAINBLK_f.js
new file mode 100644
index 0000000..1e0ae00
--- /dev/null
+++ b/data_structures_correct/GAINBLK_f.js
@@ -0,0 +1,26 @@
+function GAINBLK_f() {
+
+ GAINBLK_f.prototype.define = function GAINBLK_f() {
+ this.gain = 1;
+ this.in1 = 1;
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gain"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.rpar = new ScilabDouble([this.gain]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.gain)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GAINBLK_f.prototype.details = function GAINBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GAIN_f.js b/data_structures_correct/GAIN_f.js
new file mode 100644
index 0000000..b102bab
--- /dev/null
+++ b/data_structures_correct/GAIN_f.js
@@ -0,0 +1,26 @@
+function GAIN_f() {
+
+ GAIN_f.prototype.define = function GAIN_f() {
+ this.gain = 1;
+ this.in1 = 1;
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gain"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([this.gain]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.gain)], [sci2exp(this.in1)], [sci2exp(this.out)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAIN_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GAIN_f.prototype.details = function GAIN_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GENERAL_f.js b/data_structures_correct/GENERAL_f.js
new file mode 100644
index 0000000..10081f9
--- /dev/null
+++ b/data_structures_correct/GENERAL_f.js
@@ -0,0 +1,29 @@
+function GENERAL_f() {
+
+ GENERAL_f.prototype.define = function GENERAL_f() {
+ var rpar = [[0],[0],[0],[0]];
+
+ this.in1 = 1;
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
+ model.nzcross = new ScilabDouble([this.in1]);
+ model.in = new ScilabDouble([this.in1]);
+ model.evtout = new ScilabDouble(...ones(this.out, 1));
+ model.rpar = new ScilabDouble([0], [0], [0], [0]);
+ model.blocktype = new ScilabString(["z"]);
+ model.firing = -new ScilabDouble(...ones(this.out, 1));
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.in1)], [sci2exp(this.out)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENERAL_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ GENERAL_f.prototype.details = function GENERAL_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/GENSIN_f.js b/data_structures_correct/GENSIN_f.js
new file mode 100644
index 0000000..66542ea
--- /dev/null
+++ b/data_structures_correct/GENSIN_f.js
@@ -0,0 +1,26 @@
+function GENSIN_f() {
+
+ GENSIN_f.prototype.define = function GENSIN_f() {
+ this.rpar = [[1], [1], [0]];
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gensin"]);
+ model.in = new ScilabDouble();
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([1], [1], [0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString(this.rpar[0], this.rpar[1], this.rpar[2]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENSIN_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GENSIN_f.prototype.details = function GENSIN_f() {
+ 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/GOTOMO.js b/data_structures_correct/GOTOMO.js
new file mode 100644
index 0000000..6da9404
--- /dev/null
+++ b/data_structures_correct/GOTOMO.js
@@ -0,0 +1,33 @@
+function GOTOMO() {
+
+ GOTOMO.prototype.define = function GOTOMO() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gotomo"]);
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble();
+ 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 mo = new modelica_function();
+ mo.model = new ScilabString(["gotomo"]);
+ mo.inputs = new ScilabString(["p"]);
+
+ var exprs = new ScilabString(["A"], [sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GOTOMO\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ GOTOMO.prototype.details = function GOTOMO() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GotoTagVisibilityMO.js b/data_structures_correct/GotoTagVisibilityMO.js
new file mode 100644
index 0000000..06a4356
--- /dev/null
+++ b/data_structures_correct/GotoTagVisibilityMO.js
@@ -0,0 +1,29 @@
+function GotoTagVisibilityMO() {
+
+ GotoTagVisibilityMO.prototype.define = function GotoTagVisibilityMO() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gototagvisibilitymo"]);
+ model.in = 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),\"GotoTagVisibilityMO\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GotoTagVisibilityMO.prototype.details = function GotoTagVisibilityMO() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Ground.js b/data_structures_correct/Ground.js
new file mode 100644
index 0000000..ba365af
--- /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 = new modelica_function();
+ 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..569d29f
--- /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 = new modelica_function();
+ 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),&quot;Gyrator&quot;,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/HALT_f.js b/data_structures_correct/HALT_f.js
new file mode 100644
index 0000000..1d51549
--- /dev/null
+++ b/data_structures_correct/HALT_f.js
@@ -0,0 +1,24 @@
+function HALT_f() {
+
+ HALT_f.prototype.define = function HALT_f() {
+ this.n = 0;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["hltblk"]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble([0]);
+ model.ipar = new ScilabDouble([0]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.n]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"HALT_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ HALT_f.prototype.details = function HALT_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/HYSTHERESIS.js b/data_structures_correct/HYSTHERESIS.js
new file mode 100644
index 0000000..cea39de
--- /dev/null
+++ b/data_structures_correct/HYSTHERESIS.js
@@ -0,0 +1,29 @@
+function HYSTHERESIS() {
+
+ HYSTHERESIS.prototype.define = function HYSTHERESIS() {
+ this.in1 = 1;
+ this.ipar = 0;
+ this.nzz = 2;
+ this.rpar = [[1], [0], [1], [0]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["hystheresis"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.nzcross = new ScilabDouble([this.nzz]);
+ model.nmode = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString(...this.rpar, [Math.sign(this.nzz)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"HYSTHERESIS\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ HYSTHERESIS.prototype.details = function HYSTHERESIS() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/IFTHEL_f.js b/data_structures_correct/IFTHEL_f.js
index ebe8c6e..95971dc 100644
--- a/data_structures_correct/IFTHEL_f.js
+++ b/data_structures_correct/IFTHEL_f.js
@@ -49,7 +49,7 @@ function IFTHEL_f() {
this.x.graphics.in_implicit = new ScilabString(["E"]);
// changed
this.x.graphics.in_label = new ScilabString([""]);
- this, x.graphics.in_style = new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]);
+ this.x.graphics.in_style = new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]);
this.x.graphics.style = new ScilabString(["IFTHEL_f"]);
return new BasicBlock(this.x);
}
diff --git a/data_structures_correct/INIMPL_f.js b/data_structures_correct/INIMPL_f.js
new file mode 100644
index 0000000..68555d7
--- /dev/null
+++ b/data_structures_correct/INIMPL_f.js
@@ -0,0 +1,28 @@
+function INIMPL_f() {
+
+ INIMPL_f.prototype.define = function INIMPL_f() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["inimpl"]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([1]);
+ model.ipar = new ScilabDouble([1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+ model.blocktype = new ScilabString(["c"]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["PORT"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.inputs = new ScilabDouble();
+ model.equations = mo;
+
+ var exprs = new ScilabString(["1"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),&quot;INIMPL_f&quot;,sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new ImplicitInBlock(this.x);
+ }
+ INIMPL_f.prototype.details = function INIMPL_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/INTEGRAL_f.js b/data_structures_correct/INTEGRAL_f.js
new file mode 100644
index 0000000..2bd0b45
--- /dev/null
+++ b/data_structures_correct/INTEGRAL_f.js
@@ -0,0 +1,24 @@
+function INTEGRAL_f() {
+
+ INTEGRAL_f.prototype.define = function INTEGRAL_f() {
+ this.x0 = 0;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["integr"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.state = new ScilabDouble([this.x0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([sci2exp(this.x0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTEGRAL_f.prototype.details = function INTEGRAL_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTEGRAL_m.js b/data_structures_correct/INTEGRAL_m.js
new file mode 100644
index 0000000..042d5ff
--- /dev/null
+++ b/data_structures_correct/INTEGRAL_m.js
@@ -0,0 +1,29 @@
+function INTEGRAL_m() {
+
+ INTEGRAL_m.prototype.define = function INTEGRAL_m() {
+ this.maxp = 1;
+ this.minp = -1;
+ this.rpar = [];
+
+ var model = scicos_model();
+ model.state = new ScilabDouble([0]);
+ model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble();
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([0], [0], [0], [this.maxp], [this.minp]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTEGRAL_m.prototype.details = function INTEGRAL_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTMUL.js b/data_structures_correct/INTMUL.js
new file mode 100644
index 0000000..e24c496
--- /dev/null
+++ b/data_structures_correct/INTMUL.js
@@ -0,0 +1,29 @@
+function INTMUL() {
+
+ INTMUL.prototype.define = function INTMUL() {
+ this.sgn = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["matmul_i32"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-2]);
+ model.out = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.out2 = new ScilabDouble([-3]);
+ model.intyp = new ScilabDouble([3, 3]);
+ 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(3)], [sci2exp(0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTMUL\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTMUL.prototype.details = function INTMUL() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTRP2BLK_f.js b/data_structures_correct/INTRP2BLK_f.js
new file mode 100644
index 0000000..6d002ab
--- /dev/null
+++ b/data_structures_correct/INTRP2BLK_f.js
@@ -0,0 +1,27 @@
+function INTRP2BLK_f() {
+
+ INTRP2BLK_f.prototype.define = function INTRP2BLK_f() {
+ this.a = [[0],[1]];
+ this.b = [[0],[1]];
+ this.c = [[0,1],[1,2]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["intrp2"]), new ScilabDouble([1]));
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.a,...this.b,...colon_operator(this.c));
+ model.ipar = new ScilabDouble([2], [2]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.c)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTRP2BLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTRP2BLK_f.prototype.details = function INTRP2BLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INVBLK.js b/data_structures_correct/INVBLK.js
new file mode 100644
index 0000000..34da523
--- /dev/null
+++ b/data_structures_correct/INVBLK.js
@@ -0,0 +1,23 @@
+function INVBLK() {
+
+ INVBLK.prototype.define = function INVBLK() {
+ this.in1 = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["invblk4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INVBLK\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INVBLK.prototype.details = function INVBLK() {
+ 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..1a2545a
--- /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/ISELECT_m.js b/data_structures_correct/ISELECT_m.js
new file mode 100644
index 0000000..e2f2c10
--- /dev/null
+++ b/data_structures_correct/ISELECT_m.js
@@ -0,0 +1,35 @@
+function ISELECT_m() {
+
+ ISELECT_m.prototype.define = function ISELECT_m() {
+ this.z0 = 1;
+ this.nout = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["selector_m"]), new ScilabDouble([4]));
+ model.out = new ScilabDouble([-1], [-1]);
+ model.out2 = new ScilabDouble([-2], [-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.firing = new ScilabDouble();
+ model.evtin = new ScilabDouble(...ones(this.nout, 1));
+ model.dstate = new ScilabDouble([this.z0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(this.nout)], [sci2exp(this.z0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ISELECT_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ ISELECT_m.prototype.details = function ISELECT_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/IdealTransformer.js b/data_structures_correct/IdealTransformer.js
index 3c97211..d2a9fa5 100644
--- a/data_structures_correct/IdealTransformer.js
+++ b/data_structures_correct/IdealTransformer.js
@@ -1,61 +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);
- console.log(zeros(getData(this.ParametersName)));
- 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;
- }
-
-}
+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 = new modelica_function();
+ 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/Inductor.js b/data_structures_correct/Inductor.js
new file mode 100644
index 0000000..b64efe4
--- /dev/null
+++ b/data_structures_correct/Inductor.js
@@ -0,0 +1,34 @@
+function Inductor() {
+
+ Inductor.prototype.define = function Inductor() {
+ this.L = 1.0E-5;
+
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([this.L.toExponential(1)]);
+ model.sim = new ScilabString(["Inductor"]);
+
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Inductor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["L"]), list(new ScilabDouble([this.L.toExponential(1)])));
+ model.equations = mo;
+
+ var exprs = new ScilabString([this.L]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Inductor\",sz(1),sz(2));"]);
+ this.x = standard_define([2, 0.9], 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);
+ }
+ Inductor.prototype.details = function Inductor() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOGBLK_f.js b/data_structures_correct/LOGBLK_f.js
new file mode 100644
index 0000000..07f70f9
--- /dev/null
+++ b/data_structures_correct/LOGBLK_f.js
@@ -0,0 +1,25 @@
+function LOGBLK_f() {
+
+ LOGBLK_f.prototype.define = function LOGBLK_f() {
+ this.in1 = 1;
+ this.a = Math.E;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["logblk"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = 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),\"LOGBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOGBLK_f.prototype.details = function LOGBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOGICAL_OP.js b/data_structures_correct/LOGICAL_OP.js
new file mode 100644
index 0000000..c7ccea1
--- /dev/null
+++ b/data_structures_correct/LOGICAL_OP.js
@@ -0,0 +1,26 @@
+function LOGICAL_OP() {
+
+ LOGICAL_OP.prototype.define = function LOGICAL_OP() {
+ this.in1 = [[-1], [-1]];
+ this.ipar = 0;
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble([this.ipar]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nin], [this.ipar]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOGICAL_OP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOGICAL_OP.prototype.details = function LOGICAL_OP() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/LOOKUP_f.js b/data_structures_correct/LOOKUP_f.js
new file mode 100644
index 0000000..bce7f4c
--- /dev/null
+++ b/data_structures_correct/LOOKUP_f.js
@@ -0,0 +1,21 @@
+function LOOKUP_f() {
+
+ LOOKUP_f.prototype.define = function LOOKUP_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["lookup"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([-2], [-1], [1], [2], [-1], [1], [-1], [1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"LOOKUP_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, [], gr_i);
+ return new BasicBlock(this.x);
+ }
+ LOOKUP_f.prototype.details = function LOOKUP_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATBKSL.js b/data_structures_correct/MATBKSL.js
new file mode 100644
index 0000000..22a873c
--- /dev/null
+++ b/data_structures_correct/MATBKSL.js
@@ -0,0 +1,35 @@
+function MATBKSL() {
+
+ MATBKSL.prototype.define = function MATBKSL() {
+ this.function_name = "mat_bksl";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.intyp = new ScilabDouble([1, 1]);
+ model.out = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([-3]);
+ 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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATBKSL\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATBKSL.prototype.details = function MATBKSL() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATCATH.js b/data_structures_correct/MATCATH.js
new file mode 100644
index 0000000..b1dc096
--- /dev/null
+++ b/data_structures_correct/MATCATH.js
@@ -0,0 +1,35 @@
+function MATCATH() {
+
+ MATCATH.prototype.define = function MATCATH() {
+ this.funtyp = 4;
+ this.function_name = "mat_cath";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.intyp = new ScilabDouble([1, 1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([0]);
+ 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(2)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATCATH\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATCATH.prototype.details = function MATCATH() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATCATV.js b/data_structures_correct/MATCATV.js
new file mode 100644
index 0000000..317309b
--- /dev/null
+++ b/data_structures_correct/MATCATV.js
@@ -0,0 +1,36 @@
+function MATCATV() {
+
+ MATCATV.prototype.define = function MATCATV() {
+ this.l1 = [[2], [2]];
+ this.function_name = "mat_catv";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in2 = new ScilabDouble([-1], [-1]);
+ model.in = new ScilabDouble([-2], [-3]);
+ model.intyp = new ScilabDouble([-1, -1]);
+ model.out = new ScilabDouble([0]);
+ model.out2 = new ScilabDouble([-1]);
+ 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(2)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATCATV\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATCATV.prototype.details = function MATCATV() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATDET.js b/data_structures_correct/MATDET.js
new file mode 100644
index 0000000..7005d7c
--- /dev/null
+++ b/data_structures_correct/MATDET.js
@@ -0,0 +1,36 @@
+function MATDET() {
+
+ MATDET.prototype.define = function MATDET() {
+ var model = scicos_model();
+
+ this.function_name = "mat_det";
+ 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.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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATDET\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ MATDET.prototype.details = function MATDET() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MATDIAG.js b/data_structures_correct/MATDIAG.js
new file mode 100644
index 0000000..c622a95
--- /dev/null
+++ b/data_structures_correct/MATDIAG.js
@@ -0,0 +1,35 @@
+function MATDIAG() {
+
+ MATDIAG.prototype.define = function MATDIAG() {
+ this.function_name = "mat_diag";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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.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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATDIAG\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATDIAG.prototype.details = function MATDIAG() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATDIV.js b/data_structures_correct/MATDIV.js
new file mode 100644
index 0000000..6715345
--- /dev/null
+++ b/data_structures_correct/MATDIV.js
@@ -0,0 +1,37 @@
+function MATDIV() {
+
+ MATDIV.prototype.define = function MATDIV() {
+ var model = scicos_model();
+
+ this.function_name = "mat_div";
+ this.funtyp = 4;
+
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-2]);
+ model.in2 = new ScilabDouble([-3], [-3]);
+ model.intyp = new ScilabDouble([1, 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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATDIV\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ MATDIV.prototype.details = function MATDIV() {
+ return this.x;
+ }
+
+}
diff --git a/data_structures_correct/MATEIG.js b/data_structures_correct/MATEIG.js
new file mode 100644
index 0000000..aefc690
--- /dev/null
+++ b/data_structures_correct/MATEIG.js
@@ -0,0 +1,35 @@
+function MATEIG() {
+
+ MATEIG.prototype.define = function MATEIG() {
+ this.function_name = "mat_vps";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([2]);
+ 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(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATEIG\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATEIG.prototype.details = function MATEIG() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATEXPM.js b/data_structures_correct/MATEXPM.js
new file mode 100644
index 0000000..6e58a87
--- /dev/null
+++ b/data_structures_correct/MATEXPM.js
@@ -0,0 +1,34 @@
+function MATEXPM() {
+
+ MATEXPM.prototype.define = function MATEXPM() {
+ this.function_name = "mat_expm";
+ this.funtyp = 4;
+ var model = scicos_model();
+ 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.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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATEXPM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATEXPM.prototype.details = function MATEXPM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATINV.js b/data_structures_correct/MATINV.js
new file mode 100644
index 0000000..e118137
--- /dev/null
+++ b/data_structures_correct/MATINV.js
@@ -0,0 +1,35 @@
+function MATINV() {
+
+ MATINV.prototype.define = function MATINV() {
+ this.function_name = "mat_inv";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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.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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATINV\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATINV.prototype.details = function MATINV() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATLU.js b/data_structures_correct/MATLU.js
new file mode 100644
index 0000000..126d164
--- /dev/null
+++ b/data_structures_correct/MATLU.js
@@ -0,0 +1,35 @@
+function MATLU() {
+
+ MATLU.prototype.define = function MATLU() {
+ this.function_name = "mat_lu";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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], [-1]);
+ model.out2 = new ScilabDouble([-1], [-1]);
+ 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]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATLU\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATLU.prototype.details = function CSCOPE() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATMAGPHI.js b/data_structures_correct/MATMAGPHI.js
new file mode 100644
index 0000000..0748d27
--- /dev/null
+++ b/data_structures_correct/MATMAGPHI.js
@@ -0,0 +1,35 @@
+function MATMAGPHI() {
+
+ MATMAGPHI.prototype.define = function MATMAGPHI() {
+ this.function_name = "matz_abs";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([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]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATMAGPHI\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATMAGPHI.prototype.details = function MATMAGPHI() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATMUL.js b/data_structures_correct/MATMUL.js
new file mode 100644
index 0000000..88f425b
--- /dev/null
+++ b/data_structures_correct/MATMUL.js
@@ -0,0 +1,24 @@
+function MATMUL() {
+
+ MATMUL.prototype.define = function MATMUL() {
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["matmul_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-2]);
+ model.in2 = new ScilabDouble([-2], [-3]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-3]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.ipar = new ScilabDouble([1]);
+
+ var label = new ScilabString([sci2exp(parseInt(getData(model.ipar)))]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATMUL\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATMUL.prototype.details = function MATMUL() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATPINV.js b/data_structures_correct/MATPINV.js
new file mode 100644
index 0000000..855d8a3
--- /dev/null
+++ b/data_structures_correct/MATPINV.js
@@ -0,0 +1,36 @@
+function MATPINV() {
+
+ MATPINV.prototype.define = function MATPINV() {
+ this.function_name = "mat_pinv";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1]);
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([-1]);
+ 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)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATPINV\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATPINV.prototype.details = function MATPINV() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATRESH.js b/data_structures_correct/MATRESH.js
new file mode 100644
index 0000000..1db99fa
--- /dev/null
+++ b/data_structures_correct/MATRESH.js
@@ -0,0 +1,35 @@
+function MATRESH() {
+
+ MATRESH.prototype.define = function MATRESH() {
+ this.function_name = "mat_reshape";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([1, 1])], [sci2exp([1, 1])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATRESH\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATRESH.prototype.details = function MATRESH() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATSING.js b/data_structures_correct/MATSING.js
new file mode 100644
index 0000000..d99399e
--- /dev/null
+++ b/data_structures_correct/MATSING.js
@@ -0,0 +1,36 @@
+function MATSING() {
+
+ MATSING.prototype.define = function MATSING() {
+ var model = scicos_model();
+
+ this.function_name = "mat_sing";
+ 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([1]);
+ 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(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATSING\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ MATSING.prototype.details = function MATSING() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MATSUM.js b/data_structures_correct/MATSUM.js
new file mode 100644
index 0000000..5af9624
--- /dev/null
+++ b/data_structures_correct/MATSUM.js
@@ -0,0 +1,35 @@
+function MATSUM() {
+
+ MATSUM.prototype.define = function MATSUM() {
+ this.function_name = "mat_sum";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([1]);
+ 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),\"MATSUM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATSUM.prototype.details = function MATSUM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATTRAN.js b/data_structures_correct/MATTRAN.js
new file mode 100644
index 0000000..2ab793a
--- /dev/null
+++ b/data_structures_correct/MATTRAN.js
@@ -0,0 +1,23 @@
+function MATTRAN() {
+
+ MATTRAN.prototype.define = function MATTRAN() {
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mattran_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.out = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATTRAN\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATTRAN.prototype.details = function MATTRAN() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATZCONJ.js b/data_structures_correct/MATZCONJ.js
new file mode 100644
index 0000000..7ef31bf
--- /dev/null
+++ b/data_structures_correct/MATZCONJ.js
@@ -0,0 +1,35 @@
+function MATZCONJ() {
+
+ MATZCONJ.prototype.define = function MATZCONJ() {
+ this.function_name = "matz_conj";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([2]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([2]);
+ 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 ScilabDouble();
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MATZCONJ\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MATZCONJ.prototype.details = function MATZCONJ() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MATZREIM.js b/data_structures_correct/MATZREIM.js
index f748098..0d7c68c 100644
--- a/data_structures_correct/MATZREIM.js
+++ b/data_structures_correct/MATZREIM.js
@@ -1,14 +1,11 @@
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.in = new ScilabDouble([-1]);
model.in2 = new ScilabDouble([-2]);
model.intyp = new ScilabDouble([2]);
model.out = new ScilabDouble(-1, -1);
diff --git a/data_structures_correct/MAXMIN.js b/data_structures_correct/MAXMIN.js
new file mode 100644
index 0000000..c9d7ce6
--- /dev/null
+++ b/data_structures_correct/MAXMIN.js
@@ -0,0 +1,23 @@
+function MAXMIN() {
+
+ MAXMIN.prototype.define = function MAXMIN() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["minmax"]), new ScilabDouble([4]));
+ model.out = new ScilabDouble([1]);
+ model.in = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.ipar = new ScilabDouble([0]);
+
+ var exprs = new ScilabString(...math.transpose([[2, 1, 1]]));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MAXMIN\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.style = new ScilabString(["MAXMIN;displayedLabel=MAX"]);
+ return new BasicBlock(this.x);
+ }
+
+ MAXMIN.prototype.details = function MAXMIN() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MBLOCK.js b/data_structures_correct/MBLOCK.js
new file mode 100644
index 0000000..59f8f59
--- /dev/null
+++ b/data_structures_correct/MBLOCK.js
@@ -0,0 +1,45 @@
+function MBLOCK() {
+
+ MBLOCK.prototype.define = function MBLOCK() {
+ this.in1 = ["u1"];
+ this.intype = ["I"];
+ this.out = [["y1"],["y2"]];
+ this.outtype = [["I"],["E"]];
+ this.param = [["R"],["L"]];
+ this.paramv = list(new ScilabDouble([0.1]), new ScilabDouble([0.0001]));
+ this.pprop = [[0],[0]];
+ this.nameF = "generic";
+
+ var exprs = tlist(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"], new ScilabString(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"]), new ScilabString([sci2exp(this.in1)]), new ScilabString([sci2exp(this.intype)]), new ScilabString([sci2exp(this.out)]), new ScilabString([sci2exp(this.outtype)]), new ScilabString([sci2exp(this.param)]), list(new ScilabString([0.1]), new ScilabString([0.0001])), new ScilabString([sci2exp(this.pprop)]), new ScilabString([this.nameF]), new ScilabDouble());
+
+ var model = scicos_model();
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+ model.rpar = [];
+
+ for (var i = 0; i < this.paramv.length; i++) {
+ model.rpar.push(getData(this.paramv[i]));
+ }
+
+ model.rpar = new ScilabDouble(...model.rpar);
+ var mo = new modelica_function();
+ mo.model = new ScilabString([this.nameF]);
+ mo.parameters = list(new ScilabString(...this.param), this.paramv);
+ model.sim = list(mo.model, new ScilabDouble([30004]));
+ mo.inputs = new ScilabString(this.in1);
+ mo.outputs = new ScilabString(...this.out);
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "r"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "r"), 1));
+ model.equations = mo;
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MBLOCK\",sz(1),sz(2));"]);
+
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(this.intype);
+ this.x.graphics.out_implicit = new ScilabString(...this.outtype);
+ return new BasicBlock(this.x);
+ }
+
+ MBLOCK.prototype.details = function MBLOCK() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MCLOCK_f.js b/data_structures_correct/MCLOCK_f.js
new file mode 100644
index 0000000..b6e1b67
--- /dev/null
+++ b/data_structures_correct/MCLOCK_f.js
@@ -0,0 +1,139 @@
+function MCLOCK_f() {
+
+ MCLOCK_f.prototype.define = function MCLOCK_f() {
+ this.nn = 2;
+ this.dt = 0.1;
+ var exprs = new ScilabString([this.dt], [this.nn]);
+
+ var mfclck = new MFCLCK_f().internal();
+ mfclck.graphics.orig = new ScilabDouble([334, 199]);
+ mfclck.graphics.sz = new ScilabDouble([40, 40]);
+ mfclck.graphics.flip = new ScilabBoolean([true]);
+ mfclck.graphics.exprs = exprs;
+ mfclck.graphics.pein = new ScilabDouble([12]);
+ mfclck.graphics.peout = new ScilabDouble([4], [3]);
+ mfclck.model.rpar = new ScilabDouble([0.1]);
+ mfclck.model.ipar = new ScilabDouble([this.nn]);
+ mfclck.model.firing = new ScilabDouble([-1, 0]);
+ mfclck.model.uid = new ScilabString([count]);
+ mfclck.doc = list(new ScilabString([count++]));
+
+ var clksom = new CLKSOM_f().internal();
+ clksom.graphics.orig = new ScilabDouble([457, 161]);
+ clksom.graphics.sz = new ScilabDouble([16.666667, 16.666667]);
+ clksom.graphics.flip = new ScilabBoolean([true]);
+ clksom.graphics.exprs = new ScilabString(["0.1"], ["0.1"]);
+ clksom.graphics.pein = new ScilabDouble([4], [9], [0]);
+ clksom.graphics.peout = new ScilabDouble([5]);
+ clksom.model.uid = new ScilabString([count]);
+ clksom.doc = list(new ScilabString([count++]));
+
+ var output_port1 = new CLKOUT_f().internal();
+ output_port1.graphics.orig = new ScilabDouble([509, 261]);
+ output_port1.graphics.sz = new ScilabDouble([20, 20]);
+ output_port1.graphics.flip = new ScilabBoolean([true]);
+ output_port1.graphics.exprs = new ScilabString(["1"]);
+ output_port1.graphics.pein = new ScilabDouble([10]);
+ output_port1.model.ipar = new ScilabDouble([1]);
+ output_port1.model.uid = new ScilabString([count]);
+ output_port1.doc = list(new ScilabString([count++]));
+
+ var output_port2 = new CLKOUT_f().internal();
+ output_port2.graphics.orig = new ScilabDouble([509, 142]);
+ output_port2.graphics.sz = new ScilabDouble([20, 20]);
+ output_port2.graphics.flip = new ScilabBoolean([true]);
+ output_port2.graphics.exprs = new ScilabString(["2"]);
+ output_port2.graphics.pein = new ScilabDouble([13]);
+ output_port2.model.ipar = new ScilabDouble([2]);
+ output_port2.model.uid = new ScilabString([count]);
+ output_port2.doc = list(new ScilabString([count++]));
+
+ var split1 = new CLKSPLIT_f().internal();
+ split1.graphics.orig = new ScilabDouble([411.92504, 169.33333]);
+ split1.graphics.pein = new ScilabDouble([3]);
+ split1.graphics.peout = new ScilabDouble([9], [10]);
+ split1.model.uid = new ScilabString([count]);
+ split1.doc = list(new ScilabString([count++]));
+
+ var split2 = new CLKSPLIT_f().internal();
+ split2.graphics.orig = new ScilabDouble([482.45315, 169.33333]);
+ split2.graphics.pein = new ScilabDouble([5]);
+ split2.graphics.peout = new ScilabDouble([12], [13]);
+ split2.model.uid = new ScilabString([count]);
+ split2.doc = list(new ScilabString([count++]));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),&quot;MCLOCK_f&quot;,sz(1),sz(2));"]);
+
+ var diagram = scicos_diagram();
+ diagram.objs.push(mfclck);
+ diagram.objs.push(clksom);
+ diagram.objs.push(output_port1);
+ diagram.objs.push(output_port2);
+ diagram.objs.push(split1);
+ diagram.objs.push(split2);
+
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([360.7], [360.7], [411.9]),
+ yy: new ScilabDouble([193.3], [169.3], [169.3]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([1, 2, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([347.3], [347.3], [461.8], [461.8]),
+ yy: new ScilabDouble([193.3], [155.5], [155.5], [161]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([468.9], [482.5]),
+ yy: new ScilabDouble([169.3], [169.3]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([6, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([411.9], [457]),
+ yy: new ScilabDouble([169.3], [169.3]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([5, 1, 0]),
+ to: new ScilabDouble([2, 2, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([411.9], [411.9], [509]),
+ yy: new ScilabDouble([169.3], [271], [271]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([5, 2, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([482.5], [489.6], [489.6], [354], [354]),
+ yy: new ScilabDouble([169.3], [169.3], [338.3], [338.3], [244.7]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([6, 1, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([482.4], [482.4], [509]),
+ yy: new ScilabDouble([169.3], [152], [152]),
+ ct: new ScilabDouble([10, -1]),
+ from: new ScilabDouble([6, 2, 0]),
+ to: new ScilabDouble([4, 1, 1])
+ }));
+
+ this.x = scicos_block();
+ this.x.gui = new ScilabString(["MCLOCK_f"]);
+ this.x.graphics.sz = new ScilabDouble([3, 2]);
+ this.x.graphics.gr_i = gr_i;
+ this.x.model.sim = new ScilabString(["csuper"]);
+ this.x.model.evtout = new ScilabDouble([1], [1]);
+ this.x.model.blocktype = new ScilabString(["h"]);
+ this.x.model.rpar = diagram;
+ this.x.graphics.peout = new ScilabDouble([0], [0]);
+ return new BasicBlock(this.x);
+ }
+ MCLOCK_f.prototype.details = function MCLOCK_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MFCLCK_f.js b/data_structures_correct/MFCLCK_f.js
new file mode 100644
index 0000000..6e0a6aa
--- /dev/null
+++ b/data_structures_correct/MFCLCK_f.js
@@ -0,0 +1,50 @@
+function MFCLCK_f() {
+
+ MFCLCK_f.prototype.define = function MFCLCK_f() {
+ this.nn = 2;
+ this.dt = 0.1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["mfclck"]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble([1], [1]);
+ model.dstate = new ScilabDouble([0]);
+ model.rpar = new ScilabDouble([this.dt]);
+ model.ipar = new ScilabDouble([this.nn]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1], [0]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.dt], [this.nn]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MFCLCK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MFCLCK_f.prototype.internal = function MFCLCK_f() {
+ this.nn = 2;
+ this.dt = 0.1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["mfclck"]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble([1], [1]);
+ model.dstate = new ScilabDouble([0]);
+ model.rpar = new ScilabDouble([this.dt]);
+ model.ipar = new ScilabDouble([this.nn]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1], [0]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+ model.outtyp = new ScilabDouble();
+
+ var exprs = new ScilabString([this.dt], [this.nn]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MFCLCK_f\",sz(1),sz(2));"]);
+ var block = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ block.graphics.style = new ScilabString(["MFCLCK_f"]);
+ return block;
+ }
+ MFCLCK_f.prototype.details = function MFCLCK_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/MIN_f.js b/data_structures_correct/MIN_f.js
new file mode 100644
index 0000000..e64f3af
--- /dev/null
+++ b/data_structures_correct/MIN_f.js
@@ -0,0 +1,24 @@
+function MIN_f() {
+
+ MIN_f.prototype.define = function MIN_f() {
+ this.in1 = -1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["minblk"]);
+ model.in = new ScilabDouble([this.in1]);
+ 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([sci2exp(this.in1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MIN_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MIN_f.prototype.details = function MIN_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MUX.js b/data_structures_correct/MUX.js
new file mode 100644
index 0000000..f968deb
--- /dev/null
+++ b/data_structures_correct/MUX.js
@@ -0,0 +1,26 @@
+function MUX() {
+
+ MUX.prototype.define = function MUX() {
+ this.in1 = 2;
+ var arr = [];
+ arr.push(math.range(-1, -this.in1, -1, true)._data);
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["multiplex"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble(...math.transpose(arr));
+ model.out = new ScilabDouble([0]);
+ model.ipar = new ScilabDouble([this.in1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.in1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MUX.prototype.details = function MUX() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/MUX_f.js b/data_structures_correct/MUX_f.js
new file mode 100644
index 0000000..fa55526
--- /dev/null
+++ b/data_structures_correct/MUX_f.js
@@ -0,0 +1,26 @@
+function MUX_f() {
+
+ MUX_f.prototype.define = function MUX_f() {
+ this.in1 = 2;
+ var arr = [];
+ arr.push(math.range(-1, -this.in1, -1, true)._data);
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mux"]), new ScilabDouble([1]));
+ model.in = new ScilabDouble(...math.transpose(arr));
+ model.out = new ScilabDouble([0]);
+ model.ipar = new ScilabDouble([this.in1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.in1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([0.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ MUX_f.prototype.details = function MUX_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/M_SWITCH.js b/data_structures_correct/M_SWITCH.js
new file mode 100644
index 0000000..ec04419
--- /dev/null
+++ b/data_structures_correct/M_SWITCH.js
@@ -0,0 +1,26 @@
+function M_SWITCH() {
+
+ M_SWITCH.prototype.define = function M_SWITCH() {
+ this.in1 = [[1], [-1], [-1]];
+ this.ipar = [[1], [3]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mswitch"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble(...this.ipar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nin], ...this.ipar);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"M_SWITCH\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ M_SWITCH.prototype.details = function M_SWITCH() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/M_freq.js b/data_structures_correct/M_freq.js
new file mode 100644
index 0000000..e335809
--- /dev/null
+++ b/data_structures_correct/M_freq.js
@@ -0,0 +1,24 @@
+function M_freq() {
+
+ M_freq.prototype.define = function M_freq() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["m_frequ"]), new ScilabDouble([4]));
+ model.evtout = new ScilabDouble([1], [1], [1]);
+ model.evtin = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble();
+ model.opar = list(new ScilabDouble([1, 1, 0], [1, 1, 1], [1, 3, 2]), new ScilabDouble([1]), new ScilabDouble([0]), new ScilabDouble([0]));
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([0, -1, -1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp([[1], [2]])], [sci2exp([[0], [0]])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"M_freq\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ M_freq.prototype.details = function M_freq() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/Modulo_Count.js b/data_structures_correct/Modulo_Count.js
new file mode 100644
index 0000000..dfff095
--- /dev/null
+++ b/data_structures_correct/Modulo_Count.js
@@ -0,0 +1,46 @@
+function Modulo_Count() {
+
+ Modulo_Count.prototype.define = 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.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));"]);
+ 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/NMOS.js b/data_structures_correct/NMOS.js
new file mode 100644
index 0000000..a03a9f1
--- /dev/null
+++ b/data_structures_correct/NMOS.js
@@ -0,0 +1,40 @@
+function NMOS() {
+
+ NMOS.prototype.define = function NMOS() {
+ this.W = 20.e-6;
+ this.L = 6.e-6;
+ this.Beta = 0.041e-3;
+ this.Vt = 0.8;
+ this.K2 = 1.144;
+ this.K5 = 0.7311;
+ this.dW = -2.5e-6;
+ this.dL = -1.5e-6;
+ this.RDS = 1.e+7;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["NMOS"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["NMOS"]);
+ mo.outputs = new ScilabString(["D"], ["B"], ["S"]);
+ mo.inputs = new ScilabString(["G"]);
+ mo.parameters = list(new ScilabString(["W"], ["L"], ["Beta"], ["Vt"], ["K2"], ["K5"], ["dW"], ["dL"], ["RDS"]), new ScilabDouble([this.W], [this.L], [this.Beta], [this.Vt], [this.K2], [this.K5], [this.dW], [this.dL], [this.RDS]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.W], [this.L], [this.Beta], [this.Vt], [this.K2], [this.K5], [this.dW], [this.dL], [this.RDS]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NMOS\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"], ["I"], ["I"]);
+ return new BasicBlock(this.x);
+ }
+ NMOS.prototype.details = function NMOS() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/NPN.js b/data_structures_correct/NPN.js
new file mode 100644
index 0000000..f88489e
--- /dev/null
+++ b/data_structures_correct/NPN.js
@@ -0,0 +1,56 @@
+function NPN() {
+
+ NPN.prototype.define = function NPN() {
+ this.ModelName = "NPN";
+ this.PrametersValue = [[50], [0.1], [0], [0.02], [1.200e-10], [5.000e-09], [1.000e-12], [4.000e-13], [5.000e-13], [0.8], [0.4], [0.8], [0.333], [1.000e-15], [1.000e-15], [0.02585], [40]];
+ this.ParametersName = [["Bf"], ["Br"], ["Is"], ["Vak"], ["Tauf"], ["Taur"], ["Ccs"], ["Cje"], ["Cjc"], ["Phie"], ["Me"], ["Phic"], ["Mc"], ["Gbc"], ["Gbe"], ["Vt"], ["EMinMax"]];
+ this.model = scicos_model();
+ this.Typein = [];
+ this.Typeout = [];
+ this.MI = [];
+ this.MO = [];
+ this.P = [[100, 90, -2, 0], [0, 50, 2, 0], [100, 10, -2, 0]];
+ this.PortName = [["C"], ["B"], ["E"]];
+
+ 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 = new modelica_function();
+ 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(this.ParametersName)));
+ var exprs = new ScilabString(["50"], ["0.1"], ["1.e-16"], ["0.02"], ["0.12e-9"], ["5e-9"], ["1e-12"], ["0.4e-12"], ["0.5e-12"], ["0.8"], ["0.4"], ["0.8"], ["0.333"], ["1e-15"], ["1e-15"], ["0.02585"], ["40"]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),&quot;NPN&quot;,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);
+ }
+ NPN.prototype.details = function NPN() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/NRMSOM_f.js b/data_structures_correct/NRMSOM_f.js
new file mode 100644
index 0000000..f80bb88
--- /dev/null
+++ b/data_structures_correct/NRMSOM_f.js
@@ -0,0 +1,24 @@
+function NRMSOM_f() {
+
+ NRMSOM_f.prototype.define = function NRMSOM_f() {
+ this.in1 = [[-1], [-1]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["junk"]);
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nin]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NRMSOM_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([.2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ NRMSOM_f.prototype.details = function NRMSOM_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/OUTIMPL_f.js b/data_structures_correct/OUTIMPL_f.js
new file mode 100644
index 0000000..25207b3
--- /dev/null
+++ b/data_structures_correct/OUTIMPL_f.js
@@ -0,0 +1,30 @@
+function OUTIMPL_f() {
+
+ OUTIMPL_f.prototype.define = function OUTIMPL_f() {
+ var model = scicos_model();
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([1]);
+
+ this.prt = 1;
+ model.sim = new ScilabString(["outimpl"]);
+ model.ipar = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["PORT"]);
+ mo.inputs = new ScilabString(["n"]);
+ mo.outputs = new ScilabDouble();
+ model.equations = mo;
+
+ var exprs = new ScilabString(["1"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),&quot;OUTIMPL_f&quot;,sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ return new ImplicitOutBlock(this.x);
+ }
+ OUTIMPL_f.prototype.details = function OUTIMPL_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..277148c
--- /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.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));"]);
+ this.x = new standard_define(new ScilabDouble([1,1]),model,exprs,gr_i);
+ this.x.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/OpAmp.js b/data_structures_correct/OpAmp.js
new file mode 100644
index 0000000..f347cfb
--- /dev/null
+++ b/data_structures_correct/OpAmp.js
@@ -0,0 +1,34 @@
+function OpAmp() {
+
+ OpAmp.prototype.define = function OpAmp() {
+ this.S = [];
+ this.Z = [];
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["OpAmp"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = model.sim;
+ mo.inputs = new ScilabString(["in_p"], ["in_n"]);
+ mo.outputs = new ScilabString(["out"]);
+ mo.parameters = list(new ScilabDouble(), new ScilabDouble());
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+ model.rpar = new ScilabDouble();
+
+ var exprs = new ScilabString();
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"OpAmp\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 5]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"], ["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ OpAmp.prototype.details = function OpAmp() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/PDE.js b/data_structures_correct/PDE.js
new file mode 100644
index 0000000..2aa3a6d
--- /dev/null
+++ b/data_structures_correct/PDE.js
@@ -0,0 +1,24 @@
+function PDE() {
+
+ PDE.prototype.define = function PDE() {
+ this.params_pde = tlist(["paramspde", "a", "b", "txt_exp", "check_op1", "a1", "b1", "check_op2", "a2", "b2", "check_op3", "a3", "b3", "check_op4", "a4", "b4", "check_op5", "a5", "b5", "check_op6", "a6", "b6", "check_op7", "a7", "b7", "discr_cst", "discr_non_cst", "signe", "rad_automatique", "rad_manuel", "methode", "ord1", "ord2", "ord3", "degre", "nnode", "txt_pas", "CI", "dCI", "CLa", "CLa_exp", "CLb", "CLb_exp", "points"], new ScilabString(["paramspde"], ["a"], ["b"], ["txt_exp"], ["check_op1"], ["a1"], ["b1"], ["check_op2"], ["a2"], ["b2"], ["check_op3"], ["a3"], ["b3"], ["check_op4"], ["a4"], ["b4"], ["check_op5"], ["a5"], ["b5"], ["check_op6"], ["a6"], ["b6"], ["check_op7"], ["a7"], ["b7"], ["discr_cst"], ["discr_non_cst"], ["signe"], ["rad_automatique"], ["rad_manuel"], ["methode"], ["ord1"], ["ord2"], ["ord3"], ["degre"], ["nnode"], ["txt_pas"], ["CI"], ["dCI"], ["CLa"], ["CLa_exp"], ["CLb"], ["CLb_exp"], ["points"]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP1(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP2(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP3(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP4(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP5(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP6(t)"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString(["IN_EDP7(t)"]), new ScilabString(["0"]), new ScilabString(["0"]), new ScilabString(["0"]), new ScilabString(["0"]), new ScilabString(["0"]), new ScilabString(["0"]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString([""]), new ScilabString(["0"]), new ScilabString(["IN_CL1(t)"]), new ScilabString(["0"]), new ScilabString(["IN_CL2(t)"]), new ScilabString([""]));
+
+ var model = scicos_model();
+ model.state = new ScilabDouble(...zeros(10, 1));
+ model.sim = list(new ScilabString(["PDE"]), new ScilabDouble([0]));
+ model.in = new ScilabDouble([1], [1], [1], [1], [1]);
+ model.out = new ScilabDouble([10], [0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var label = list(this.params_pde, new ScilabDouble(), new ScilabString([""]));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PDE\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 3]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ PDE.prototype.details = function PDE() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/PID.js b/data_structures_correct/PID.js
new file mode 100644
index 0000000..894446b
--- /dev/null
+++ b/data_structures_correct/PID.js
@@ -0,0 +1,626 @@
+function PID() {
+
+ PID.prototype.define = function PID() {
+ 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(["PID"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [1.000E-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(["INTEGRAL_m"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([318.304, 183.11733]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["0"], ["0"], ["0"], ["1"], ["-1"]),
+ pin: new ScilabDouble([7]),
+ pout: new ScilabDouble([9]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;INTEGRAL_m&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString(["1/s"]),
+ 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(["INTEGRAL_m"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["integral_func"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble([0]),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, true]),
+ label: new ScilabString(["1/s"]),
+ 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(["SUMMATION"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([387.97067, 172.85067]),
+ sz: new ScilabDouble([40, 60]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"], ["[1;1;1]"]),
+ pin: new ScilabDouble([10], [9], [11]),
+ pout: new ScilabDouble([19]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SUMMATION&quot;,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(["SUMMATION"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["summation"]), new ScilabDouble([4])),
+ in: new ScilabDouble([-1], [-1], [-1]),
+ in2: new ScilabDouble([-2], [-2], [-2]),
+ intyp: new ScilabDouble([1], [1], [1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ 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], [1], [1]),
+ 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(["GAINBLK"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([321.23733, 235.91733]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([17]),
+ pout: new ScilabDouble([10]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;GAINBLK&quot;,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(["GAINBLK"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["gainblk"]), new ScilabDouble([4])),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([1]),
+ 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(["DERIV"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([319.03733, 135.45067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([8]),
+ pout: new ScilabDouble([11]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;DERIV&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString(["s"]),
+ 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(["DERIV"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["deriv"]), new ScilabDouble([4])),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ 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(["x"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([true, false]),
+ label: new ScilabString(["s"]),
+ 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(["GAINBLK"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([255.23733, 183.11733]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([13]),
+ pout: new ScilabDouble([7]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;GAINBLK&quot;,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(["GAINBLK"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["gainblk"]), new ScilabDouble([4])),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([1]),
+ 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(["GAINBLK"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([255.23733, 135.45067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([14]),
+ pout: new ScilabDouble([8]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;GAINBLK&quot;,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(["GAINBLK"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["gainblk"]), new ScilabDouble([4])),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([-2]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([1]),
+ 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([234.704, 203.11733]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([16]),
+ pout: new ScilabDouble([16], [17], [0]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SPLIT_f&quot;,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([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1], [-1], [-1]),
+ out2: new ScilabDouble([1], [1], [1]),
+ outtyp: new ScilabDouble([1], [1], [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([233.97067, 203.11733]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([21]),
+ pout: new ScilabDouble([18], [19], [0]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SPLIT_f&quot;,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([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1], [-1], [-1]),
+ out2: new ScilabDouble([1], [1], [1]),
+ outtyp: new ScilabDouble([1], [1], [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(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([456.5421, 192.85067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([19]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,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([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([193.97067, 193.11733]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([21]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,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(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ 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([303.80876], [309.73257]),
+ yy: new ScilabDouble([203.11733], [203.11733]),
+ 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.objs.push(scicos_link({
+ xx: new ScilabDouble([303.80876], [310.4659]),
+ yy: new ScilabDouble([155.45067], [155.45067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([6, 1, 0]),
+ to: new ScilabDouble([4, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([366.87543], [379.39924]),
+ yy: new ScilabDouble([203.11733], [202.85067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([2, 2, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([369.80876], [379.39924], [379.39924]),
+ yy: new ScilabDouble([255.91733], [255.91733], [217.85067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([3, 1, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([367.60876], [379.39924], [379.39924]),
+ yy: new ScilabDouble([155.45067], [155.45067], [187.85067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([4, 1, 0]),
+ to: new ScilabDouble([2, 3, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([234.704], [246.6659]),
+ yy: new ScilabDouble([203.11733], [203.11733]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([12, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([234.704], [234.704], [246.6659]),
+ yy: new ScilabDouble([203.11733], [155.45067], [155.45067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([12, 2, 0]),
+ to: new ScilabDouble([6, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([233.97067], [234.704]),
+ yy: new ScilabDouble([203.11733], [203.11733]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([15, 1, 0]),
+ to: new ScilabDouble([12, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([233.97067], [233.97067], [312.6659]),
+ yy: new ScilabDouble([203.11733], [255.91733], [255.91733]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([15, 2, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([436.5421], [456.5421]),
+ yy: new ScilabDouble([202.85067], [202.85067]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([18, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([213.97067], [233.97067]),
+ yy: new ScilabDouble([203.11733], [203.11733]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([20, 1, 0]),
+ to: new ScilabDouble([15, 1, 1])
+ }));
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["csuper"]);
+ 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.blocktype = new ScilabString(["h"]);
+ model.firing = new ScilabBoolean([false]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+ model.rpar = scs_m;
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PID\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ PID.prototype.details = function PID() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/PNP.js b/data_structures_correct/PNP.js
new file mode 100644
index 0000000..1c16f94
--- /dev/null
+++ b/data_structures_correct/PNP.js
@@ -0,0 +1,63 @@
+function PNP() {
+
+ PNP.prototype.define = function PNP() {
+ this.ModelName = "PNP";
+ this.PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
+ this.ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
+
+ var model = scicos_model();
+ this.Typein = [];
+ this.Typeout = [];
+ this.MI = [];
+ this.MO = [];
+ this.P = [[100, 90, -2, 0], [0, 50, 2, 0], [100, 10, -2, 0]];
+ this.PortName = [["C"], ["B"], ["E"]];
+
+ 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 = new modelica_function();
+ model.sim = new ScilabString([this.ModelName]);
+ mo.inputs = new ScilabString(...this.MI);
+ mo.outputs = new ScilabString(...this.MO);
+ model.rpar = new ScilabDouble(...this.PrametersValue);
+
+ var arr = [];
+ arr.push(zeros(getData(this.ParametersName)));
+ mo.parameters = list(new ScilabString(...this.ParametersName), new ScilabDouble(...this.PrametersValue), new ScilabDouble(...math.transpose(arr)));
+ var exprs = new ScilabString(["50"], ["0.1"], ["1.e-16"], ["0.02"], ["0.12e-9"], ["5e-9"], ["1e-12"], ["0.4e-12"], ["0.5e-12"], ["0.8"], ["0.4"], ["0.8"], ["0.333"], ["1e-15"], ["1e-15"], ["0.02585"], ["40"]);
+ var gr_i = "xstringb(orig(1),orig(2),\"PNP\",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(new ScilabString([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);
+ }
+
+ PNP.prototype.details = function PNP() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/POSTONEG_f.js b/data_structures_correct/POSTONEG_f.js
new file mode 100644
index 0000000..97d9aa6
--- /dev/null
+++ b/data_structures_correct/POSTONEG_f.js
@@ -0,0 +1,24 @@
+function POSTONEG_f() {
+
+ POSTONEG_f.prototype.define = function POSTONEG_f() {
+ this.rpar = [[-1], [-1], [-1], [0]];
+
+ 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], [-1], [0]);
+ model.blocktype = new ScilabString(["z"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.firing = new ScilabDouble([-1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POSTONEG_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, [], gr_i);
+ return new BasicBlock(this.x);
+ }
+ POSTONEG_f.prototype.details = function POSTONEG_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/POWBLK_f.js b/data_structures_correct/POWBLK_f.js
new file mode 100644
index 0000000..0e19fc1
--- /dev/null
+++ b/data_structures_correct/POWBLK_f.js
@@ -0,0 +1,25 @@
+function POWBLK_f() {
+
+ POWBLK_f.prototype.define = function POWBLK_f() {
+ this.in = 1;
+ this.a = 1.5;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["powblk"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = 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([this.a]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POWBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ POWBLK_f.prototype.details = function POWBLK_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/PRODUCT.js b/data_structures_correct/PRODUCT.js
new file mode 100644
index 0000000..0e9e6c8
--- /dev/null
+++ b/data_structures_correct/PRODUCT.js
@@ -0,0 +1,23 @@
+function PRODUCT() {
+
+ PRODUCT.prototype.define = function PRODUCT() {
+ this.sgn = [[1],[-1]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["product"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble(...this.sgn);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.sgn)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),&quot;PRODUCT&quot;,sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, exprs, gr_i);
+ return new Product(this.x);
+ }
+ PRODUCT.prototype.details = function PRODUCT() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/PROD_f.js b/data_structures_correct/PROD_f.js
new file mode 100644
index 0000000..d46b7d9
--- /dev/null
+++ b/data_structures_correct/PROD_f.js
@@ -0,0 +1,19 @@
+function PROD_f() {
+
+ PROD_f.prototype.define = function PROD_f() {
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["prod"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ this.x = new standard_define(new ScilabDouble([1, 1]), model, new ScilabDouble(), new ScilabString());
+ return new RoundBlock(this.x);
+ }
+ PROD_f.prototype.details = function PROD_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/PerteDP.js b/data_structures_correct/PerteDP.js
new file mode 100644
index 0000000..667c206
--- /dev/null
+++ b/data_structures_correct/PerteDP.js
@@ -0,0 +1,41 @@
+function PerteDP() {
+
+ PerteDP.prototype.define = function PerteDP() {
+ this.L = 10;
+ this.D = 0.2;
+ this.lambda = 0.03;
+ this.z1 = 0;
+ this.z2 = 0;
+ this.p_rho = 0;
+
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([this.L], [this.D], [this.lambda], [this.z1], [this.z2], [this.p_rho]);
+ model.sim = new ScilabString(["PerteDP"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["PerteDP"]);
+ mo.inputs = new ScilabString(["C1"]);
+ mo.outputs = new ScilabString(["C2"]);
+ mo.parameters = list(new ScilabString(["L"], ["D"], ["lambda"], ["z1"], ["z2"], ["p_rho"]), new ScilabDouble([this.L], [this.D], [this.lambda], [this.z1], [this.z2], [this.p_rho]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.L], [this.D], [this.lambda], [this.z1], [this.z2], [this.p_rho]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PerteDP\",sz(1),sz(2));"]);
+ this.x = standard_define([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);
+ }
+ PerteDP.prototype.details = function PerteDP() {
+ return this.x;
+ }
+
+}
+
diff --git a/data_structures_correct/PotentialSensor.js b/data_structures_correct/PotentialSensor.js
new file mode 100644
index 0000000..c7114d5
--- /dev/null
+++ b/data_structures_correct/PotentialSensor.js
@@ -0,0 +1,31 @@
+function PotentialSensor() {
+
+ PotentialSensor.prototype.define = function PotentialSensor() {
+
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble();
+ model.sim = new ScilabString(["PotentialSensor"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["PotentialSensor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["v"]);
+ model.equations = mo;
+
+ var exprs = new ScilabString([""]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PotentialSensor\",sz(1),sz(2));"]);
+ this.x = standard_define([2, 2], model, exprs, list(gr_i, 0));
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["E"]);
+ return new BasicBlock(this.x);
+ }
+ PotentialSensor.prototype.details = function PotentialSensor() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/PuitsP.js b/data_structures_correct/PuitsP.js
new file mode 100644
index 0000000..6c5ff3e
--- /dev/null
+++ b/data_structures_correct/PuitsP.js
@@ -0,0 +1,34 @@
+function PuitsP() {
+
+ PuitsP.prototype.define = function PuitsP() {
+ this.P0 = 100000;
+ this.T0 = 290;
+ this.H0 = 100000;
+ this.option_temperature = 1;
+
+ var model = scicos_model();
+ model.rpar = new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+ model.sim = new ScilabString(["Puits"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Puits"]);
+ mo.inputs = new ScilabString(["C"]);
+ mo.outputs = new ScilabDouble();
+ mo.parameters = list(new ScilabString(["P0"], ["T0"], ["H0"], ["option_temperature"]), new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+
+ var exprs = new ScilabString([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PuitsP\",sz(1),sz(2));"]);
+ this.x = standard_define([2.5, 2], model, exprs, list(gr_i, new ScilabDouble(0)));
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ PuitsP.prototype.details = function PuitsP() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/QUANT_f.js b/data_structures_correct/QUANT_f.js
new file mode 100644
index 0000000..1934882
--- /dev/null
+++ b/data_structures_correct/QUANT_f.js
@@ -0,0 +1,26 @@
+function QUANT_f() {
+
+ QUANT_f.prototype.define = function QUANT_f() {
+ this.pas = 0.1;
+ this.meth = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["qzrnd"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.rpar = new ScilabDouble([this.pas]);
+ model.ipar = new ScilabDouble([this.meth]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.pas], [this.meth]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"QUANT_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ QUANT_f.prototype.details = function QUANT_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/RAMP.js b/data_structures_correct/RAMP.js
new file mode 100644
index 0000000..947aa27
--- /dev/null
+++ b/data_structures_correct/RAMP.js
@@ -0,0 +1,29 @@
+function RAMP() {
+
+ RAMP.prototype.define = function RAMP() {
+ this.slope = 0;
+ this.iout = 0;
+ this.stt = 0;
+ this.rpar = [[this.slope], [this.stt], [this.iout]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble();
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.nmode = new ScilabDouble([1]);
+ model.nzcross = new ScilabDouble([1]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString(...this.rpar);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RAMP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RAMP.prototype.details = function RAMP() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/RAND_m.js b/data_structures_correct/RAND_m.js
new file mode 100644
index 0000000..e5eff23
--- /dev/null
+++ b/data_structures_correct/RAND_m.js
@@ -0,0 +1,39 @@
+function RAND_m() {
+
+ RAND_m.prototype.define = function RAND_m() {
+ this.a = 0;
+ this.b = 1;
+ this.dt = 0;
+ this.flag = 0;
+ this.function_name = "rndblk_m";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble();
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble([parseInt(Math.random() * 10000000)], [0 * this.a]);
+ model.rpar = new ScilabDouble([this.a, this.b]);
+ model.ipar = new ScilabDouble([this.flag]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [this.flag], [sci2exp([this.a])], [sci2exp([this.b])], [sci2exp([parseInt(getData(model.dstate)[0]), parseInt(Math.random() * 10000000)])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RAND_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RAND_m.prototype.details = function RAND_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/RATELIMITER.js b/data_structures_correct/RATELIMITER.js
new file mode 100644
index 0000000..881b020
--- /dev/null
+++ b/data_structures_correct/RATELIMITER.js
@@ -0,0 +1,26 @@
+function RATELIMITER() {
+
+ RATELIMITER.prototype.define = function RATELIMITER() {
+ this.minp = -1;
+ this.maxp = 1;
+ this.rpar = [[this.maxp], [this.minp]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["ratelimiter"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.maxp], [this.minp]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RATELIMITER\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RATELIMITER.prototype.details = function RATELIMITER() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/READAU_f.js b/data_structures_correct/READAU_f.js
new file mode 100644
index 0000000..38f3d96
--- /dev/null
+++ b/data_structures_correct/READAU_f.js
@@ -0,0 +1,33 @@
+function READAU_f() {
+
+ READAU_f.prototype.define = function READAU_f() {
+ this.frmt = "uc ";
+ this.fname = "test.au";
+ this.lunit = 0;
+ this.N = 20;
+ this.M = 1;
+ this.tmask = [];
+ this.swap = 0;
+ this.offset = 1;
+ this.outmask = 1;
+ this.ievt = 0;
+ this.nout = size(this.outmask, "*");
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["readau"]), new ScilabDouble([2]));
+ model.out = new ScilabDouble([this.nout]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble([1], [1], [this.lunit], ...zeros(this.N * this.M, 1));
+ model.ipar = new ScilabDouble([this.fname.length], ..._str2code(this.frmt), [this.ievt], [this.N], [this.M], [this.swap], [this.offset], ..._str2code(this.fname), [this.outmask]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.fname], [this.N], [this.swap]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"READAU_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ READAU_f.prototype.details = function READAU_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/READC_f.js b/data_structures_correct/READC_f.js
new file mode 100644
index 0000000..a851fbb
--- /dev/null
+++ b/data_structures_correct/READC_f.js
@@ -0,0 +1,39 @@
+function READC_f() {
+
+ READC_f.prototype.define = function READC_f() {
+ this.frmt = "d ";
+ this.fname = "foo";
+ this.lunit = 0;
+ this.N = 20;
+ this.M = 1;
+ this.rpar = [];
+ this.tmask = 0;
+ this.swap = 0;
+ this.offset = 1;
+ this.outmask = 1;
+ this.ievt = 0;
+ this.nout = size(this.outmask, "*");
+
+ var ipar = new ScilabDouble([this.fname.length], ..._str2code(this.frmt), [this.ievt], [this.N], [this.M], [this.swap], [this.offset], ..._str2code(this.fname), [this.tmask], [this.outmask]);
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["readc"]), new ScilabDouble([2]));
+ model.out = new ScilabDouble([this.nout]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.dstate = new ScilabDouble([1], [1], [this.lunit], ...zeros(this.N * this.M, 1));
+ model.ipar = ipar;
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString(["[]"], [this.outmask], [this.fname], [this.frmt], [this.M], [this.N], [this.offset], [this.swap]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"READC_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ READC_f.prototype.details = function READC_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/RELATIONALOP.js b/data_structures_correct/RELATIONALOP.js
new file mode 100644
index 0000000..100570e
--- /dev/null
+++ b/data_structures_correct/RELATIONALOP.js
@@ -0,0 +1,26 @@
+function RELATIONALOP() {
+
+ RELATIONALOP.prototype.define = function RELATIONALOP() {
+ this.ipar = 2;
+ this.label = "&lt";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["relationalop"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.ipar = new ScilabDouble([this.ipar]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.ipar], [0]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RELATIONALOP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.style = new ScilabString(["fontSize=13;fontStyle=1;displayedLabel=" + label]);
+ return new BasicBlock(this.x);
+ }
+ RELATIONALOP.prototype.details = function RELATIONALOP() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/RELAY_f.js b/data_structures_correct/RELAY_f.js
new file mode 100644
index 0000000..5b323d5
--- /dev/null
+++ b/data_structures_correct/RELAY_f.js
@@ -0,0 +1,28 @@
+function RELAY_f() {
+
+ RELAY_f.prototype.define = function RELAY_f() {
+ this.i0 = 0;
+ this.in1 = [[-1], [-1]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["relay"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.evtin = new ScilabDouble(...ones(this.in1));
+ model.dstate = new ScilabDouble([this.i0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, true]);
+
+ var exprs = new ScilabString([this.nin], [this.i0 + 1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RELAY_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RELAY_f.prototype.details = function RELAY_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/RFILE_f.js b/data_structures_correct/RFILE_f.js
new file mode 100644
index 0000000..f0d79e7
--- /dev/null
+++ b/data_structures_correct/RFILE_f.js
@@ -0,0 +1,36 @@
+function RFILE_f() {
+
+ RFILE_f.prototype.define = function RFILE_f() {
+ this.out = 1;
+ this.nout = this.out;
+ this.frmt = "(7(e10.3,1x))";
+ this.fname = "foo";
+ this.lunit = 0;
+ this.N = 2;
+ this.rpar = [];
+ this.tmask = 0;
+ this.outmask = 1;
+
+ var ipar = new ScilabDouble([this.fname.length], [this.frmt.length], [0], [this.N], ..._str2code(this.fname), ..._str2code(this.frmt), [this.tmask], [this.outmask]);
+
+ var dstate = new ScilabDouble([1], [1], [this.lunit], ...zeros((this.nout) * this.N, 1));
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["readf"]);
+ model.out = new ScilabDouble([this.nout]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = dstate;
+ model.ipar = ipar;
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp([])], [sci2exp(this.outmask)], [this.fname], [this.frmt], [this.N], [this.out]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RFILE_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RFILE_f.prototype.details = function RFILE_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/RICC.js b/data_structures_correct/RICC.js
new file mode 100644
index 0000000..5664207
--- /dev/null
+++ b/data_structures_correct/RICC.js
@@ -0,0 +1,35 @@
+function RICC() {
+
+ RICC.prototype.define = function RICC() {
+ this.function_name = "ricc_m";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1], [-1]);
+ model.in2 = new ScilabDouble([-1], [-1], [-1]);
+ model.intyp = new ScilabDouble([1, 1, 1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-1]);
+ 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([1], [1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)], [sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RICC\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RICC.prototype.details = function RICC() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/ROOTCOEF.js b/data_structures_correct/ROOTCOEF.js
new file mode 100644
index 0000000..96e72c6
--- /dev/null
+++ b/data_structures_correct/ROOTCOEF.js
@@ -0,0 +1,35 @@
+function ROOTCOEF() {
+
+ ROOTCOEF.prototype.define = function ROOTCOEF() {
+ this.function_name = "root_coef";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ 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([-2]);
+ model.out2 = new ScilabDouble([1]);
+ 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(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ROOTCOEF\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ ROOTCOEF.prototype.details = function ROOTCOEF() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Resistor.js b/data_structures_correct/Resistor.js
new file mode 100644
index 0000000..1ef43d6
--- /dev/null
+++ b/data_structures_correct/Resistor.js
@@ -0,0 +1,33 @@
+function Resistor() {
+
+ Resistor.prototype.define = function Resistor() {
+ this.R = 0.01;
+
+ var model = scicos_model();
+ model.rpar = new ScilabDouble([this.R]);
+ model.sim = new ScilabString(["resistor"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Resistor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["R"]), list(new ScilabDouble([this.R])));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.R]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Resistor\",sz(1),sz(2));"]);
+ this.x = standard_define([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);
+ }
+ Resistor.prototype.details = function Resistor() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SATURATION.js b/data_structures_correct/SATURATION.js
new file mode 100644
index 0000000..99bd3fa
--- /dev/null
+++ b/data_structures_correct/SATURATION.js
@@ -0,0 +1,28 @@
+function SATURATION() {
+
+ SATURATION.prototype.define = function SATURATION() {
+ this.minp = -1;
+ this.maxp = 1;
+ this.rpar = [[this.maxp], [this.minp]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["satur"]), 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 = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.maxp], [this.minp], [parseInt(getData(model.nmode)[0])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SATURATION\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SATURATION.prototype.details = function SATURATION() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SAWTOOTH_f.js b/data_structures_correct/SAWTOOTH_f.js
new file mode 100644
index 0000000..75a8fec
--- /dev/null
+++ b/data_structures_correct/SAWTOOTH_f.js
@@ -0,0 +1,23 @@
+function SAWTOOTH_f() {
+
+ SAWTOOTH_f.prototype.define = function SAWTOOTH_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sawtth"]);
+ model.out = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble([0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAWTOOTH_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SAWTOOTH_f.prototype.details = function SAWTOOTH_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SCALAR2VECTOR.js b/data_structures_correct/SCALAR2VECTOR.js
new file mode 100644
index 0000000..f701a95
--- /dev/null
+++ b/data_structures_correct/SCALAR2VECTOR.js
@@ -0,0 +1,23 @@
+function SCALAR2VECTOR() {
+
+ SCALAR2VECTOR.prototype.define = function SCALAR2VECTOR() {
+ this.nout = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scalar2vector"]), new ScilabDouble([4]));
+ model.out = new ScilabDouble([this.nout]);
+ model.in = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nout]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SCALAR2VECTOR\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SCALAR2VECTOR.prototype.details = function SCALAR2VECTOR() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SELECT_m.js b/data_structures_correct/SELECT_m.js
new file mode 100644
index 0000000..95583a6
--- /dev/null
+++ b/data_structures_correct/SELECT_m.js
@@ -0,0 +1,35 @@
+function SELECT_m() {
+
+ SELECT_m.prototype.define = function SELECT_m() {
+ this.z0 = 1;
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["selector_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.firing = new ScilabDouble();
+ model.evtin = new ScilabDouble(...ones(this.nin, 1));
+ model.dstate = new ScilabDouble([this.z0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp([this.nin])], [sci2exp([this.z0])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SELECT_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SELECT_m.prototype.details = function SELECT_m() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SHIFT.js b/data_structures_correct/SHIFT.js
new file mode 100644
index 0000000..a0e9283
--- /dev/null
+++ b/data_structures_correct/SHIFT.js
@@ -0,0 +1,30 @@
+function SHIFT() {
+
+ SHIFT.prototype.define = function SHIFT() {
+ this.sgn = [[0],[0]];
+ this.OPER = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["shift_32_LA"]), 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([3]);
+ 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(3)], [sci2exp(0)], [sci2exp(0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SHIFT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SHIFT.prototype.details = function SHIFT() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SIGNUM.js b/data_structures_correct/SIGNUM.js
new file mode 100644
index 0000000..1cbac1e
--- /dev/null
+++ b/data_structures_correct/SIGNUM.js
@@ -0,0 +1,25 @@
+function SIGNUM() {
+
+ SIGNUM.prototype.define = function SIGNUM() {
+ this.nu = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["signum"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.nu]);
+ model.out = new ScilabDouble([this.nu]);
+ model.nzcross = new ScilabDouble([this.nu]);
+ model.nmode = new ScilabDouble([this.nu]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SIGNUM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SIGNUM.prototype.details = function SIGNUM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SINBLK_f.js b/data_structures_correct/SINBLK_f.js
new file mode 100644
index 0000000..170f5d5
--- /dev/null
+++ b/data_structures_correct/SINBLK_f.js
@@ -0,0 +1,22 @@
+function SINBLK_f() {
+
+ SINBLK_f.prototype.define = function SINBLK_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sinblk"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SINBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SINBLK_f.prototype.details = function SINBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SQRT.js b/data_structures_correct/SQRT.js
new file mode 100644
index 0000000..f9ddb24
--- /dev/null
+++ b/data_structures_correct/SQRT.js
@@ -0,0 +1,24 @@
+function SQRT() {
+
+ SQRT.prototype.define = function SQRT() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mat_sqrt"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SQRT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SQRT.prototype.details = function SQRT() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SRFLIPFLOP.js b/data_structures_correct/SRFLIPFLOP.js
new file mode 100644
index 0000000..439fc4a
--- /dev/null
+++ b/data_structures_correct/SRFLIPFLOP.js
@@ -0,0 +1,439 @@
+function SRFLIPFLOP() {
+
+ SRFLIPFLOP.prototype.define = function SRFLIPFLOP() {
+ var scs_m = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["SRFLIPFLOP"]),
+ 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(["LOGIC"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([298.504, 201.45067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["[0 1;1 0;1 0;1 0;0 1;0 1;0 0;0 0]"], ["1"]),
+ pin: new ScilabDouble([4], [10], [12]),
+ pout: new ScilabDouble([3], [8]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;LOGIC&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"], ["E"], ["E"]),
+ out_implicit: new ScilabString(["E"], ["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"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""], [""], [""]),
+ out_label: new ScilabString([""], [""]),
+ style: new ScilabString(["LOGIC"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["logic"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1], [1], [1]),
+ in2: new ScilabDouble([1], [1], [1]),
+ intyp: new ScilabDouble([5], [5], [5]),
+ out: new ScilabDouble([1], [1]),
+ out2: new ScilabDouble([1], [1]),
+ outtyp: new ScilabDouble([5], [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, 1], [1, 0], [1, 0], [1, 0], [0, 1], [0, 1], [0, 0], [0, 0])),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabBoolean([false]),
+ 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(["DOLLAR_m"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([299.23733, 254.25067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([false]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["int8(0)"], ["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble([4]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;DOLLAR_m&quot;,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(["DOLLAR_m"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([5]),
+ 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(int8([0])),
+ 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.objs.push(scicos_block({
+ gui: new ScilabString(["SPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([363.03733, 248.584]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([3]),
+ pout: new ScilabDouble([10], [14], [0]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SPLIT_f&quot;,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([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1], [-1], [-1]),
+ out2: new ScilabDouble([1], [1], [1]),
+ outtyp: new ScilabDouble([1], [1], [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(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([367.07543, 204.784]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble([8]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,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([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 211.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([10]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,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(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ 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_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 201.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([12]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,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(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ 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_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([383.03733, 238.584]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([14]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,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([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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([347.07543], [363.03733], [363.03733]),
+ yy: new ScilabDouble([228.11733], [228.11733], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([290.6659], [272.104], [272.104], [289.93257]),
+ yy: new ScilabDouble([274.25067], [274.25067], [231.45067], [231.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [363.03733], [344.95162]),
+ yy: new ScilabDouble([248.584], [274.25067], [274.25067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 1, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([347.07543], [367.07543]),
+ yy: new ScilabDouble([214.784], [214.784]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 2, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([221.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([9, 1, 0]),
+ to: new ScilabDouble([1, 2, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([211.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([11, 1, 0]),
+ to: new ScilabDouble([1, 3, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [383.03733]),
+ yy: new ScilabDouble([248.584], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 2, 0]),
+ to: new ScilabDouble([13, 1, 1])
+ }));
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["csuper"]);
+ model.in = new ScilabDouble([1], [1]);
+ model.in2 = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1], [1]);
+ model.out2 = new ScilabDouble([1], [1]);
+ model.intyp = new ScilabDouble([5, 5]);
+ 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 = new ScilabString(["xstringb(orig(1),orig(2),\"SRFLIPFLOP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ SRFLIPFLOP.prototype.details = function SRFLIPFLOP() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/STEP_FUNCTION.js b/data_structures_correct/STEP_FUNCTION.js
new file mode 100644
index 0000000..0c379ab
--- /dev/null
+++ b/data_structures_correct/STEP_FUNCTION.js
@@ -0,0 +1,79 @@
+function STEP_FUNCTION() {
+
+ STEP_FUNCTION.prototype.define = function STEP_FUNCTION() {
+ var scs_m_1 = scicos_diagram();
+ scs_m_1.objs.push(new STEP().internal());
+ scs_m_1.objs.push(new OUT_f().internal());
+ 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, 0]);
+ graphics.sz = new ScilabDouble([40, 40]);
+ graphics.flip = new ScilabBoolean([true]);
+ graphics.pein = new ScilabDouble([4]);
+ graphics.peout = new ScilabDouble([4]);
+ graphics.pout = new ScilabDouble([3]);
+ graphics.out_implicit = new ScilabString(["E"]);
+ graphics.in_style = new ScilabDouble();
+ graphics.out_style = new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]);
+ graphics.in_label = new ScilabDouble();
+ graphics.out_label = new ScilabString([""]);
+ model.evtin = new ScilabDouble([-1]);
+ model.evtout = new ScilabDouble([-1]);
+ model.uid = new ScilabString([count]);
+ blk.graphics = graphics;
+ blk.model = model;
+ blk.doc = list(new ScilabString([count++]));
+ scs_m_1.objs[0] = blk;
+
+ blk = scs_m_1.objs[1];
+ graphics = blk.graphics;
+ model = blk.model;
+ graphics.orig = new ScilabDouble([80, 10]);
+ graphics.sz = new ScilabDouble([20, 20]);
+ graphics.flip = new ScilabBoolean([true]);
+ graphics.exprs = new ScilabString(["1"]);
+ model.ipar = new ScilabDouble([1]);
+ graphics.pin = new ScilabDouble([3]);
+ model.outtyp = new ScilabDouble();
+ model.uid = new ScilabString([count]);
+ blk.doc = list(new ScilabString([count++]));
+ blk.graphics = graphics;
+ blk.model = model;
+ scs_m_1.objs[1] = blk;
+
+ var lnk = scs_m_1.objs[2];
+ lnk.xx = new ScilabDouble([104], [136]);
+ lnk.yy = new ScilabDouble([-40], [-60]);
+ lnk.from = new ScilabDouble([1, 1, 0]);
+ lnk.to = new ScilabDouble([2, 1, 1]);
+ scs_m_1.objs[2] = lnk;
+
+ lnk = scs_m_1.objs[3];
+ lnk.xx = new ScilabDouble([0], [20], [-20], [-20], [20], [1]);
+ lnk.yy = new ScilabDouble([0], [-20], [-20], [60], [60], [1]);
+ lnk.ct = new ScilabDouble([5, -1]);
+ lnk.from = new ScilabDouble([1, 1, 0]);
+ lnk.to = new ScilabDouble([1, 1, 1]);
+ scs_m_1.objs[3] = lnk;
+
+ model = scicos_model();
+ model.sim = new ScilabString(["csuper"]);
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.rpar = scs_m_1;
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"STEP_FUNCTION\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabString(), gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ STEP_FUNCTION.prototype.details = function STEP_FUNCTION() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SUMMATION.js b/data_structures_correct/SUMMATION.js
new file mode 100644
index 0000000..867c9fd
--- /dev/null
+++ b/data_structures_correct/SUMMATION.js
@@ -0,0 +1,25 @@
+function SUMMATION() {
+ SUMMATION.prototype.define = function SUMMATION() {
+ this.sgn = [[1],[-1]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["summation"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2], [-2]);
+ model.out2 = new ScilabDouble([-2]);
+ model.ipar = new ScilabDouble(...this.sgn);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.sgn)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUMMATION\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, exprs, gr_i);
+ return new Summation(this.x);
+ }
+
+ SUMMATION.prototype.details = function SUMMATION() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SWITCH2_m.js b/data_structures_correct/SWITCH2_m.js
new file mode 100644
index 0000000..405c5ce
--- /dev/null
+++ b/data_structures_correct/SWITCH2_m.js
@@ -0,0 +1,33 @@
+function SWITCH2_m() {
+
+ SWITCH2_m.prototype.define = function SWITCH2_m() {
+ this.ipar = [0];
+ this.nzz = 1;
+ this.rpar = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["switch2_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [1], [-1]);
+ model.in2 = new ScilabDouble([-2], [1], [-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.ipar = new ScilabDouble(this.ipar);
+ model.rpar = new ScilabDouble([this.rpar]);
+ model.nzcross = new ScilabDouble([this.nzz]);
+ model.nmode = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([1], this.ipar, [this.rpar], [this.nzz]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SWITCH2_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SWITCH2_m.prototype.details = function SWITCH2_m() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SWITCH_f.js b/data_structures_correct/SWITCH_f.js
new file mode 100644
index 0000000..ec4e1d7
--- /dev/null
+++ b/data_structures_correct/SWITCH_f.js
@@ -0,0 +1,27 @@
+function SWITCH_f() {
+
+ SWITCH_f.prototype.define = function SWITCH_f() {
+ this.i0 = 0;
+ this.in1 = [[-1], [-1]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["switchn"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble([this.i0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, true]);
+
+ var exprs = new ScilabString([this.nin], [this.i0 + 1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SWITCH_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SWITCH_f.prototype.details = function SWITCH_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SampleCLK.js b/data_structures_correct/SampleCLK.js
new file mode 100644
index 0000000..5568e10
--- /dev/null
+++ b/data_structures_correct/SampleCLK.js
@@ -0,0 +1,22 @@
+function SampleCLK() {
+
+ SampleCLK.prototype.define = function SampleCLK() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sampleclk"]);
+ model.evtout = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([1, 0]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(0)]);
+
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, ["xstringb(orig(1),orig(2),\"SampleCLK\",sz(1),sz(2));"]);
+ return new BasicBlock(this.x);
+ }
+ SampleCLK.prototype.details = function SampleCLK() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Sigbuilder.js b/data_structures_correct/Sigbuilder.js
new file mode 100644
index 0000000..15b6da0
--- /dev/null
+++ b/data_structures_correct/Sigbuilder.js
@@ -0,0 +1,272 @@
+function Sigbuilder() {
+
+ Sigbuilder.prototype.define = function Sigbuilder() {
+ var scs_m_1 = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["Sigbuilder"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]),
+ tf: new ScilabDouble([100]),
+ 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(["CURVE_c"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([329.63473, 606.18517]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["3"], ["[0,1,2]"], ["[10,20,-30]"], ["y"], ["n"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([6]),
+ pein: new ScilabDouble([4]),
+ peout: new ScilabDouble([2]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CURVE_c&quot;,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(["CURVE_c"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["curve_c"]), new ScilabDouble([4])),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([0], [1], [2], [10], [20], [-30]),
+ ipar: new ScilabDouble([3], [3], [1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble([0]),
+ dep_ut: new ScilabBoolean([false, true]),
+ 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(["CLKSPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([349.49528, 565.10704]),
+ 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([2]),
+ peout: new ScilabDouble([8], [4]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CLKSPLIT_f&quot;,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(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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([-1], [-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(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([398.20616, 616.18517]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,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([-2]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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_block({
+ gui: new ScilabString(["CLKOUTV_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([339.49528, 505.10704]),
+ 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),&quot;CLKOUTV_f&quot;,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(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ 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([349.63473], [349.49528]),
+ yy: new ScilabDouble([600.47089], [565.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [266.69602], [266.69602], [270.35525], [342.80795], [342.80795], [349.63473]),
+ yy: new ScilabDouble([565.10704], [565.10704], [680.99483], [680.99483], [680.99483], [651.89946], [651.89946]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 2, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([378.20616], [398.20616]),
+ yy: new ScilabDouble([626.18517], [626.18517]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [349.49528]),
+ yy: new ScilabDouble([565.10704], [535.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 1, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+
+ var model = scicos_model({
+ sim: new ScilabString(["csuper"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ 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()
+ });
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Sigbuilder\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ Sigbuilder.prototype.details = function Sigbuilder() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SineVoltage.js b/data_structures_correct/SineVoltage.js
new file mode 100644
index 0000000..f6c580d
--- /dev/null
+++ b/data_structures_correct/SineVoltage.js
@@ -0,0 +1,38 @@
+function SineVoltage() {
+
+ SineVoltage.prototype.define = function SineVoltage() {
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+
+ this.V = 1;
+ this.ph = 0;
+ this.frq = 1;
+ this.offset = 0;
+ this.start = 0;
+
+ model.rpar = new ScilabDouble([this.V], [this.ph], [this.frq], [this.offset], [this.start]);
+ model.sim = new ScilabString(["SineVoltage"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["SineVoltage"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["V"], ["phase"], ["freqHz"], ["offset"], ["startTime"]), list(new ScilabDouble([this.V]), new ScilabDouble([this.ph]), new ScilabDouble([this.frq]), new ScilabDouble([this.offset]), new ScilabDouble([this.start])));
+ model.equations = mo;
+
+ var exprs = new ScilabString([this.V], [this.ph], [this.frq], [this.offset], [this.start]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SineVoltage\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ SineVoltage.prototype.details = function SineVoltage() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SourceP.js b/data_structures_correct/SourceP.js
new file mode 100644
index 0000000..08212bc
--- /dev/null
+++ b/data_structures_correct/SourceP.js
@@ -0,0 +1,36 @@
+function SourceP() {
+
+ SourceP.prototype.define = function SourceP() {
+ var model = scicos_model();
+
+ this.P0 = 300000;
+ this.T0 = 290;
+ this.H0 = 100000;
+ this.option_temperature = 1;
+
+ model.rpar = new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+ model.sim = new ScilabString(["Source"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["Source"]);
+ mo.inputs = new ScilabDouble();
+ mo.outputs = new ScilabString(["C"]);
+ mo.parameters = list(new ScilabString(["P0"], ["T0"], ["H0"], ["option_temperature"]), new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SourceP\",sz(1),sz(2));"]);
+ this.x = new standard_define([2.5, 2], model, exprs, list(gr_i, new ScilabDouble([0])));
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ SourceP.prototype.details = function SourceP() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TANBLK_f.js b/data_structures_correct/TANBLK_f.js
new file mode 100644
index 0000000..d468e84
--- /dev/null
+++ b/data_structures_correct/TANBLK_f.js
@@ -0,0 +1,23 @@
+function TANBLK_f() {
+
+ TANBLK_f.prototype.define = function TANBLK_f() {
+ this.in1 = -1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["tanblk"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.in1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(in1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TANBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TANBLK_f.prototype.details = function TANBLK_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TCLSS.js b/data_structures_correct/TCLSS.js
new file mode 100644
index 0000000..e102d93
--- /dev/null
+++ b/data_structures_correct/TCLSS.js
@@ -0,0 +1,34 @@
+function TCLSS() {
+
+ TCLSS.prototype.define = function TCLSS() {
+ this.x0 = 0;
+ this.A = 0;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
+ this.in1 = 1;
+ this.nx = size(this.x0, "*");
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["tcslti4"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.in1], [this.nx]);
+ model.out = new ScilabDouble([this.out]);
+ model.evtin = new ScilabDouble([1]);
+ 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([sci2exp(this.A)], [sci2exp(this.B)], [sci2exp(this.C)], [sci2exp(this.D)], [sci2exp(this.x0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TCLSS\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+
+ TCLSS.prototype.details = function TCLSS() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TEXT_f.js b/data_structures_correct/TEXT_f.js
new file mode 100644
index 0000000..cb5a481
--- /dev/null
+++ b/data_structures_correct/TEXT_f.js
@@ -0,0 +1,25 @@
+function TEXT_f() {
+
+ TEXT_f.prototype.define = function TEXT_f() {
+ this.font = 2;
+ this.siz = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["text"]);
+ model.rpar = new ScilabString(["Text"]);
+ model.ipar = new ScilabDouble([this.font], [this.siz]);
+
+ var exprs = ["Text", this.font, this.siz];
+
+ var graphics = scicos_graphics();
+ graphics.orig = new ScilabDouble([0, 0]);
+ graphics.sz = new ScilabDouble([2, 1]);
+ graphics.exprs = new ScilabString(exprs);
+ this.x = mlist(["Text", "graphics", "model", "void", "gui"], new ScilabString(["Text", "graphics", "model", "void", "gui"]), graphics, model, new ScilabString([" "]), new ScilabString(["TEXT_f"]));
+ return new TextBlock(this.x);
+ }
+
+ TEXT_f.prototype.details = function TEXT_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TIME_DELAY.js b/data_structures_correct/TIME_DELAY.js
new file mode 100644
index 0000000..8438941
--- /dev/null
+++ b/data_structures_correct/TIME_DELAY.js
@@ -0,0 +1,28 @@
+function TIME_DELAY() {
+
+ TIME_DELAY.prototype.define = function TIME_DELAY() {
+ this.nin = 1;
+ this.T = 1;
+ this.init = 0;
+ this.N = 1024;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["time_delay"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.nin]);
+ model.out = new ScilabDouble([this.nin]);
+ model.rpar = new ScilabDouble([this.T, this.init]);
+ model.ipar = new ScilabDouble([this.N]);
+ model.blocktype = new ScilabString(["x"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([this.T], [this.init], [this.N]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TIME_DELAY\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TIME_DELAY.prototype.details = function TIME_DELAY() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TIME_f.js b/data_structures_correct/TIME_f.js
new file mode 100644
index 0000000..a9c233c
--- /dev/null
+++ b/data_structures_correct/TIME_f.js
@@ -0,0 +1,18 @@
+function TIME_f() {
+
+ TIME_f.prototype.define = function TIME_f() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["timblk"]);
+ model.out = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TIME_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TIME_f.prototype.details = function TIME_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TKSCALE.js b/data_structures_correct/TKSCALE.js
new file mode 100644
index 0000000..532a923
--- /dev/null
+++ b/data_structures_correct/TKSCALE.js
@@ -0,0 +1,26 @@
+function TKSCALE() {
+
+ TKSCALE.prototype.define = function TKSCALE() {
+ this.a = -10;
+ this.b = 10;
+ this.f = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["tkscaleblk"]), new ScilabDouble([5]));
+ model.out = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([this.a], [this.b], [this.f]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(this.a)], [sci2exp(this.b)], [sci2exp(this.f)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TKSCALE\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TKSCALE.prototype.details = function TKSCALE() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TOWS_c.js b/data_structures_correct/TOWS_c.js
new file mode 100644
index 0000000..e4ea771
--- /dev/null
+++ b/data_structures_correct/TOWS_c.js
@@ -0,0 +1,33 @@
+function TOWS_c() {
+
+ TOWS_c.prototype.define = function TOWS_c() {
+ this.nu = -1;
+ this.nz = 128;
+ this.varnam = "A";
+ this.herit = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["tows_c"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.nu]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([-1]);
+ model.out = new ScilabDouble();
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([this.nz], [this.varnam.length], ascii(this.varnam));
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TOWS_c\",sz(1),sz(2));"]);;
+
+ var exprs = new ScilabString([this.nz], [this.varnam], [this.herit]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TOWS_c.prototype.details = function TOWS_c() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TRASH_f.js b/data_structures_correct/TRASH_f.js
new file mode 100644
index 0000000..27da7c0
--- /dev/null
+++ b/data_structures_correct/TRASH_f.js
@@ -0,0 +1,23 @@
+function TRASH_f() {
+
+ TRASH_f.prototype.define = function TRASH_f() {
+ this.in1 = -1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["trash"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.evtin = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TRASH_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TRASH_f.prototype.details = function TRASH_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/TrigFun.js b/data_structures_correct/TrigFun.js
new file mode 100644
index 0000000..e23141c
--- /dev/null
+++ b/data_structures_correct/TrigFun.js
@@ -0,0 +1,21 @@
+function TrigFun() {
+
+ TrigFun.prototype.define = function TrigFun() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["sin_blk"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString(["sin"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TrigFun\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ TrigFun.prototype.details = function TrigFun() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/VARIABLE_DELAY.js b/data_structures_correct/VARIABLE_DELAY.js
new file mode 100644
index 0000000..11f8d4b
--- /dev/null
+++ b/data_structures_correct/VARIABLE_DELAY.js
@@ -0,0 +1,28 @@
+function VARIABLE_DELAY() {
+
+ VARIABLE_DELAY.prototype.define = function VARIABLE_DELAY() {
+ this.nin = 1;
+ this.T = 1;
+ this.init = 0;
+ this.N = 1024;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["variable_delay"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.nin], [1]);
+ model.out = new ScilabDouble([this.nin]);
+ model.rpar = new ScilabDouble([this.T, this.init]);
+ model.ipar = new ScilabDouble([this.N]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([this.T], [this.init], [this.N]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VARIABLE_DELAY\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ VARIABLE_DELAY.prototype.details = function VARIABLE_DELAY() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/VanneReglante.js b/data_structures_correct/VanneReglante.js
new file mode 100644
index 0000000..a501c2f
--- /dev/null
+++ b/data_structures_correct/VanneReglante.js
@@ -0,0 +1,37 @@
+function VanneReglante() {
+
+ VanneReglante.prototype.define = function VanneReglante() {
+ var model = scicos_model();
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+
+ this.Cvmax = 8005.42;
+ this.p_rho = 0;
+
+ model.rpar = new ScilabDouble([this.Cvmax], [this.p_rho]);
+ model.sim = new ScilabString(["VanneReglante"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["VanneReglante"]);
+ mo.inputs = new ScilabString(["C1", "Ouv"]);
+ mo.outputs = new ScilabString(["C2"]);
+ mo.parameters = list(new ScilabString(["Cvmax"], ["p_rho"]), new ScilabDouble([this.Cvmax], [this.p_rho]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.Cvmax], [this.p_rho]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VanneReglante\",sz(1),sz(2));"]);
+ this.x = standard_define([2, 2], model, exprs, list(gr_i, new ScilabDouble([0])));
+ this.x.graphics.in_implicit = new ScilabString(["I"], ["E"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ VanneReglante.prototype.details = function VanneReglante() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/VariableResistor.js b/data_structures_correct/VariableResistor.js
new file mode 100644
index 0000000..4e5a5e1
--- /dev/null
+++ b/data_structures_correct/VariableResistor.js
@@ -0,0 +1,29 @@
+function VariableResistor() {
+
+ VariableResistor.prototype.define = function VariableResistor() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["VariableResistor"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = new modelica_function();
+ mo.model = new ScilabString(["VariableResistor"]);
+ mo.inputs = new ScilabString(["p", "R"]);
+ mo.outputs = new ScilabString(["n"]);
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabDouble();
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VariableResistor\",sz(1),sz(2));"]);;
+ this.x = standard_define([2, 2], model, exprs, list(gr_i, 0));
+ this.x.graphics.in_implicit = new ScilabString(["I", "E"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ VariableResistor.prototype.details = function VariableResistor() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/VirtualCLK0.js b/data_structures_correct/VirtualCLK0.js
new file mode 100644
index 0000000..79f8e6e
--- /dev/null
+++ b/data_structures_correct/VirtualCLK0.js
@@ -0,0 +1,22 @@
+function VirtualCLK0() {
+
+ VirtualCLK0.prototype.define = function VirtualCLK0() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["vrtclk0"]);
+ model.evtin = new ScilabDouble([1]);
+ model.opar = list();
+ model.ipar = new ScilabDouble();
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabDouble();
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, new ScilabString([" "]));
+ return new BasicBlock(this.x);
+ }
+
+ VirtualCLK0.prototype.details = function VirtualCLK0() {
+ return this.x;
+ }
+
+}
diff --git a/data_structures_correct/WRITEC_f.js b/data_structures_correct/WRITEC_f.js
new file mode 100644
index 0000000..ae17903
--- /dev/null
+++ b/data_structures_correct/WRITEC_f.js
@@ -0,0 +1,31 @@
+function WRITEC_f() {
+
+ WRITEC_f.prototype.define = function WRITEC_f() {
+ this.in = 1;
+ this.nin = math.sum(this.in);
+ this.frmt = "c ";
+ this.fname = "foo";
+ this.swap = 0;
+ this.lunit = 0;
+ this.N = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["writec"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble([this.in]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble([-1], [this.lunit], ...zeros((this.nin + 1) * this.N, 1));
+ model.ipar = new ScilabDouble([this.fname.length], ..._str2code(this.frmt), [this.N], [this.swap], ..._str2code(this.fname));
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.in)], [this.fname], [this.frmt], [this.N], [this.swap]);
+
+ var gr_i = ["xstringb(orig(1),orig(2),\"WRITEC_f\",sz(1),sz(2));"];
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ WRITEC_f.prototype.details = function WRITEC_f() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/c_block.js b/data_structures_correct/c_block.js
index ac826b2..1cb86e7 100644
--- a/data_structures_correct/c_block.js
+++ b/data_structures_correct/c_block.js
@@ -1,7 +1,7 @@
function c_block() {
c_block.prototype.define = function c_block() {
-
+
this.in1 = 1;
this.out = 1;
this.rpar = [];
@@ -28,7 +28,6 @@ function c_block() {
return new BasicBlock(this.x);
}
c_block.prototype.details = function c_block() {
-
return this.x;
}
}
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),&quot;freq_div&quot;,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/scifunc_block_m.js b/data_structures_correct/scifunc_block_m.js
new file mode 100644
index 0000000..a15ee4a
--- /dev/null
+++ b/data_structures_correct/scifunc_block_m.js
@@ -0,0 +1,43 @@
+function scifunc_block_m() {
+
+ scifunc_block_m.prototype.define = function scifunc_block_m() {
+ this.in1 = 1;
+ this.out = 1;
+ this.clkin = [];
+ this.clkout = [];
+ this.x0 = [];
+ this.z0 = [];
+ this.typ = "c";
+ this.auto = [];
+ this.rpar = [];
+ this.it = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
+ model.in = new ScilabDouble([this.in1]);
+ model.in2 = new ScilabDouble([this.in1]);
+ model.intyp = new ScilabDouble([this.it]);
+ model.out = new ScilabDouble([this.out]);
+ model.out2 = new ScilabDouble([this.out]);
+ model.outtyp = new ScilabDouble([this.it]);
+ 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.opar = list();
+ model.blocktype = new ScilabString([this.typ]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = list(new ScilabString([sci2exp([this.in1, this.in1])], [sci2exp([this.out, this.out])], [sci2exp(this.clkin)], [sci2exp(this.clkout)], [sci2exp(this.x0)], [sci2exp(this.z0)], [sci2exp(this.rpar)], [sci2exp(this.auto)], [sci2exp(0)]), list(new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString([" "])));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"scifunc_block_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ scifunc_block_m.prototype.details = function scifunc_block_m() {
+ return this.x;
+ }
+}