summaryrefslogtreecommitdiff
path: root/js/Linear
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 11:43:39 +0530
committerSunil Shetye2018-07-09 12:16:25 +0530
commit62b1d7dd9183ed75733b44104890586b03818214 (patch)
tree9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Linear
parent5c011853630a1b466ef4789d5b600dd530d0a3ec (diff)
downloadsci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz
sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2
sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Linear')
-rw-r--r--js/Linear/BIGSOM_f.js24
-rw-r--r--js/Linear/BIGSOM_f.pickle8
-rw-r--r--js/Linear/CLINDUMMY_f.js14
-rw-r--r--js/Linear/CLINDUMMY_f.pickle6
-rw-r--r--js/Linear/CLR.js34
-rw-r--r--js/Linear/CLR.pickle10
-rw-r--r--js/Linear/CLR_f.js34
-rw-r--r--js/Linear/CLR_f.pickle10
-rw-r--r--js/Linear/CLSS.js34
-rw-r--r--js/Linear/CLSS.pickle8
-rw-r--r--js/Linear/CLSS_f.js34
-rw-r--r--js/Linear/CLSS_f.pickle8
-rw-r--r--js/Linear/DELAYV_f.js38
-rw-r--r--js/Linear/DELAYV_f.pickle12
-rw-r--r--js/Linear/DERIV.js14
-rw-r--r--js/Linear/DERIV.pickle6
-rw-r--r--js/Linear/DIFF_c.js26
-rw-r--r--js/Linear/DIFF_c.pickle10
-rw-r--r--js/Linear/DLR.js34
-rw-r--r--js/Linear/DLR.pickle10
-rw-r--r--js/Linear/DLR_f.js34
-rw-r--r--js/Linear/DLR_f.pickle10
-rw-r--r--js/Linear/DLSS.js36
-rw-r--r--js/Linear/DLSS.pickle8
-rw-r--r--js/Linear/DLSS_f.js36
-rw-r--r--js/Linear/DLSS_f.pickle8
-rw-r--r--js/Linear/DOLLAR.js36
-rw-r--r--js/Linear/DOLLAR.pickle10
-rw-r--r--js/Linear/DOLLAR_f.js30
-rw-r--r--js/Linear/DOLLAR_f.pickle8
-rw-r--r--js/Linear/DOLLAR_m.js36
-rw-r--r--js/Linear/DOLLAR_m.pickle10
-rw-r--r--js/Linear/GAINBLK.js74
-rw-r--r--js/Linear/GAINBLK.pickle10
-rw-r--r--js/Linear/GAINBLK_f.js24
-rw-r--r--js/Linear/GAINBLK_f.pickle8
-rw-r--r--js/Linear/GAIN_f.js24
-rw-r--r--js/Linear/GAIN_f.pickle8
-rw-r--r--js/Linear/INTEGRAL.js36
-rw-r--r--js/Linear/INTEGRAL.pickle8
-rw-r--r--js/Linear/INTEGRAL_f.js22
-rw-r--r--js/Linear/INTEGRAL_f.pickle8
-rw-r--r--js/Linear/INTEGRAL_m.js50
-rw-r--r--js/Linear/INTEGRAL_m.pickle8
-rw-r--r--js/Linear/PID.js26
-rw-r--r--js/Linear/PID.pickle14
-rw-r--r--js/Linear/REGISTER.js46
-rw-r--r--js/Linear/REGISTER.pickle10
-rw-r--r--js/Linear/REGISTER_f.js24
-rw-r--r--js/Linear/REGISTER_f.pickle8
-rw-r--r--js/Linear/SAMPHOLD.js16
-rw-r--r--js/Linear/SAMPHOLD.pickle6
-rw-r--r--js/Linear/SAMPHOLD_m.js32
-rw-r--r--js/Linear/SAMPHOLD_m.pickle8
-rw-r--r--js/Linear/SAMPLEHOLD_f.js16
-rw-r--r--js/Linear/SAMPLEHOLD_f.pickle6
-rw-r--r--js/Linear/SOM_f.js20
-rw-r--r--js/Linear/SOM_f.pickle6
-rw-r--r--js/Linear/SUMMATION.js70
-rw-r--r--js/Linear/SUMMATION.pickle10
-rw-r--r--js/Linear/SUM_f.js14
-rw-r--r--js/Linear/SUM_f.pickle6
-rw-r--r--js/Linear/TCLSS.js40
-rw-r--r--js/Linear/TCLSS.pickle8
-rw-r--r--js/Linear/TCLSS_f.js40
-rw-r--r--js/Linear/TCLSS_f.pickle8
-rw-r--r--js/Linear/TIME_DELAY.js32
-rw-r--r--js/Linear/TIME_DELAY.pickle12
-rw-r--r--js/Linear/VARIABLE_DELAY.js30
-rw-r--r--js/Linear/VARIABLE_DELAY.pickle12
70 files changed, 753 insertions, 683 deletions
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js
index e3a3d172..c4c0daca 100644
--- a/js/Linear/BIGSOM_f.js
+++ b/js/Linear/BIGSOM_f.js
@@ -2,16 +2,16 @@
function BIGSOM_f() {
BIGSOM_f.prototype.define = function BIGSOM_f() {
this.sgn = [[1],[1]];
- model = scicos_model();
- model.sim = list("sum",2);
- model.in1 = [[-1],[-1]];
- model.out = -1;
- model.rpar = this.sgn;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("sum",2);
+ this.model.in1 = [[-1],[-1]];
+ this.model.out = new ScilabDouble(-1);
+ this.model.rpar = this.sgn;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = sci2exp(this.sgn);
gr_i = [];
- this.x = standard_define([2,3],model,exprs,gr_i);
+ this.x = standard_define([2,3],this.model,exprs,gr_i);
return new BigSom(this.x);
}
BIGSOM_f.prototype.details = function BIGSOM_f() {
@@ -26,7 +26,7 @@ function BIGSOM_f() {
this.sgn = inverse(arguments[0]["sgn"])
this.x = arg1;
graphics = arg1.graphics;
- model = arg1.model;
+ this.model = arg1.model;
exprs = graphics.exprs;
while (true) {
[ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
@@ -34,12 +34,12 @@ function BIGSOM_f() {
break;
}
in1 = -ones(size(this.sgn,"*"),1);
- [model,graphics,ok] = check_io(model,graphics,in1,-1,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,-1,[],[]);
if (ok) {
- model.rpar = this.sgn.slice();
+ this.model.rpar = this.sgn.slice();
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/BIGSOM_f.pickle b/js/Linear/BIGSOM_f.pickle
index 5912e580..602dba8d 100644
--- a/js/Linear/BIGSOM_f.pickle
+++ b/js/Linear/BIGSOM_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'sgn'
+aS'model'
p3
-atp4
-Rp5
+aS'sgn'
+p4
+atp5
+Rp6
.(dp0
S'sgn'
p1
diff --git a/js/Linear/CLINDUMMY_f.js b/js/Linear/CLINDUMMY_f.js
index 685fd5d0..e61f81b0 100644
--- a/js/Linear/CLINDUMMY_f.js
+++ b/js/Linear/CLINDUMMY_f.js
@@ -2,14 +2,14 @@
function CLINDUMMY_f() {
CLINDUMMY_f.prototype.define = function CLINDUMMY_f() {
x0 = 0;
- model = scicos_model();
- model.sim = list("cdummy",4);
- model.state = x0;
- model.blocktype = "c";
- model.firing = [];
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("cdummy",4);
+ this.model.state = new ScilabDouble(x0);
+ this.model.blocktype = new ScilabString("c");
+ this.model.firing = [];
+ this.model.dep_ut = [false,true];
gr_i = [];
- this.x = standard_define([3,2],model,[],gr_i);
+ this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
CLINDUMMY_f.prototype.details = function CLINDUMMY_f() {
diff --git a/js/Linear/CLINDUMMY_f.pickle b/js/Linear/CLINDUMMY_f.pickle
index 2a8bdb31..3b6bf950 100644
--- a/js/Linear/CLINDUMMY_f.pickle
+++ b/js/Linear/CLINDUMMY_f.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js
index 4be593c4..504c40e1 100644
--- a/js/Linear/CLR.js
+++ b/js/Linear/CLR.js
@@ -7,16 +7,16 @@ function CLR() {
C = 1;
D = 0;
exprs = [["1"],["1+s"]];
- model = scicos_model();
- model.sim = list("csslti4",4);
- model.in1 = 1;
- model.out = 1;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("csslti4",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.state = new ScilabDouble(x0);
+ this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
CLR.prototype.details = function CLR() {
@@ -35,9 +35,9 @@ function CLR() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- x0 = model.state;
- rpar = model.rpar;
+ this.model = arg1.model;
+ x0 = this.model.state;
+ rpar = this.model.rpar;
ns = prod(size(x0));
nin = 1;
nout = 1;
@@ -63,18 +63,18 @@ function CLR() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
if (ns1<=ns) {
x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- model.state = x0;
- model.rpar = rpar;
+ this.model.state = x0;
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/CLR.pickle b/js/Linear/CLR.pickle
index f42a7c70..b2c434a0 100644
--- a/js/Linear/CLR.pickle
+++ b/js/Linear/CLR.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'num'
+aS'model'
p3
-aS'den'
+aS'num'
p4
-atp5
-Rp6
+aS'den'
+p5
+atp6
+Rp7
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js
index 2aaee3d1..bb1ff3ff 100644
--- a/js/Linear/CLR_f.js
+++ b/js/Linear/CLR_f.js
@@ -7,16 +7,16 @@ function CLR_f() {
C = 1;
D = 0;
exprs = [["1"],["1+s"]];
- model = scicos_model();
- model.sim = list("csslti",1);
- model.in1 = 1;
- model.out = 1;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("csslti",1);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.state = new ScilabDouble(x0);
+ this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
gr_i = [];
- this.x = standard_define([2.5,2.5],model,exprs,gr_i);
+ this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
CLR_f.prototype.details = function CLR_f() {
@@ -35,9 +35,9 @@ function CLR_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- x0 = model.state;
- rpar = model.rpar;
+ this.model = arg1.model;
+ x0 = this.model.state;
+ rpar = this.model.rpar;
ns = prod(size(x0));
nin = 1;
nout = 1;
@@ -63,18 +63,18 @@ function CLR_f() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
if (ns1<=ns) {
x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- model.state = x0;
- model.rpar = rpar;
+ this.model.state = x0;
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/CLR_f.pickle b/js/Linear/CLR_f.pickle
index f42a7c70..b2c434a0 100644
--- a/js/Linear/CLR_f.pickle
+++ b/js/Linear/CLR_f.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'num'
+aS'model'
p3
-aS'den'
+aS'num'
p4
-atp5
-Rp6
+aS'den'
+p5
+atp6
+Rp7
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js
index b227e048..2f336b4a 100644
--- a/js/Linear/CLSS.js
+++ b/js/Linear/CLSS.js
@@ -8,17 +8,17 @@ function CLSS() {
this.D = 0;
in1 = 1;
out = 1;
- model = scicos_model();
- model.sim = list("csslti4",4);
- model.in1 = in1;
- model.out = out;
- model.state = this.x0;
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("csslti4",4);
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(out);
+ this.model.state = new ScilabDouble(this.x0);
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([4,2],model,exprs,gr_i);
+ this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
CLSS.prototype.details = function CLSS() {
@@ -46,7 +46,7 @@ function CLSS() {
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
@@ -74,7 +74,7 @@ function CLSS() {
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -84,16 +84,16 @@ function CLSS() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,true];
+ this.model.dep_ut = [false,true];
}
- model.state = this.x0.slice();
- model.rpar = rpar;
+ this.model.state = this.x0.slice();
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/CLSS.pickle b/js/Linear/CLSS.pickle
index 6f9561b1..6d8ee0b4 100644
--- a/js/Linear/CLSS.pickle
+++ b/js/Linear/CLSS.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js
index ffad604c..2576257d 100644
--- a/js/Linear/CLSS_f.js
+++ b/js/Linear/CLSS_f.js
@@ -8,17 +8,17 @@ function CLSS_f() {
this.D = 0;
in1 = 1;
out = 1;
- model = scicos_model();
- model.sim = list("csslti",1);
- model.in1 = in1;
- model.out = out;
- model.state = this.x0;
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("csslti",1);
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(out);
+ this.model.state = new ScilabDouble(this.x0);
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([4,2],model,exprs,gr_i);
+ this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
CLSS_f.prototype.details = function CLSS_f() {
@@ -46,7 +46,7 @@ function CLSS_f() {
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
@@ -64,7 +64,7 @@ function CLSS_f() {
if (ms!=ns) {
message("A matrix must be square");
} else {
- [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -74,16 +74,16 @@ function CLSS_f() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,true];
+ this.model.dep_ut = [false,true];
}
- model.state = this.x0.slice();
- model.rpar = rpar;
+ this.model.state = this.x0.slice();
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/CLSS_f.pickle b/js/Linear/CLSS_f.pickle
index 1e42cd42..d36e6ca6 100644
--- a/js/Linear/CLSS_f.pickle
+++ b/js/Linear/CLSS_f.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js
index 79cd24be..e2c55b04 100644
--- a/js/Linear/DELAYV_f.js
+++ b/js/Linear/DELAYV_f.js
@@ -5,20 +5,20 @@ function DELAYV_f() {
z0 = zeros(11,1);
this.zz0 = z0.slice(1-1,$-1);
this.T = 1;
- model = scicos_model();
- model.sim = list("delayv",1);
- model.in1 = [[this.nin],[1]];
- model.out = this.nin;
- model.evtin = 1;
- model.evtout = [[1],[1]];
- model.dstate = z0;
- model.rpar = this.T/(size(this.zz0,"*"));
- model.blocktype = "d";
- model.firing = [0,-1];
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("delayv",1);
+ this.model.in1 = [[this.nin],[1]];
+ this.model.out = new ScilabDouble(this.nin);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = [[1],[1]];
+ this.model.dstate = new ScilabDouble(z0);
+ this.model.rpar = new ScilabDouble(this.T/(size(this.zz0,"*")));
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = [0,-1];
+ this.model.dep_ut = [true,false];
exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DELAYV_f.prototype.details = function DELAYV_f() {
@@ -39,9 +39,9 @@ function DELAYV_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- this.nin = model.in1[1-1];
- z0 = model.dstate;
+ this.model = arg1.model;
+ this.nin = this.model.in1[1-1];
+ z0 = this.model.dstate;
this.zz0 = z0.slice(1-1,$-1);
told = z0[$-1];
while (true) {
@@ -58,14 +58,14 @@ function DELAYV_f() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
+ [model,graphics,ok] = check_io(this.model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = [[this.zz0.slice()],[told]];
- model.rpar = this.T/(size(this.zz0,"*"));
+ this.model.dstate = [[this.zz0.slice()],[told]];
+ this.model.rpar = new ScilabDouble(this.T/(size(this.zz0,"*")));
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DELAYV_f.pickle b/js/Linear/DELAYV_f.pickle
index 8fe3ebfa..5f5ca1c3 100644
--- a/js/Linear/DELAYV_f.pickle
+++ b/js/Linear/DELAYV_f.pickle
@@ -4,14 +4,16 @@ p0
((lp1
S'x'
p2
-aS'nin'
+aS'model'
p3
-aS'T'
+aS'nin'
p4
-aS'zz0'
+aS'T'
p5
-atp6
-Rp7
+aS'zz0'
+p6
+atp7
+Rp8
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DERIV.js b/js/Linear/DERIV.js
index c52a8979..811fb47a 100644
--- a/js/Linear/DERIV.js
+++ b/js/Linear/DERIV.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/DERIV.sci" */
function DERIV() {
DERIV.prototype.define = function DERIV() {
- model = scicos_model();
- model.sim = list("deriv",4);
- model.in1 = -1;
- model.out = -1;
- model.blocktype = "x";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("deriv",4);
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.out = new ScilabDouble(-1);
+ this.model.blocktype = new ScilabString("x");
+ this.model.dep_ut = [true,false];
exprs = [];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DERIV.prototype.details = function DERIV() {
diff --git a/js/Linear/DERIV.pickle b/js/Linear/DERIV.pickle
index f4612a1c..7c042e5e 100644
--- a/js/Linear/DERIV.pickle
+++ b/js/Linear/DERIV.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index 11b4281f..9549a346 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -2,16 +2,16 @@
function DIFF_c() {
DIFF_c.prototype.define = function DIFF_c() {
this.x0 = [[0],[0]];
- model = scicos_model();
- model.sim = list("diffblk_c",10004);
- model.in1 = 1;
- model.out = 1;
- model.state = this.x0;
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("diffblk_c",10004);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.state = this.x0;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DIFF_c.prototype.details = function DIFF_c() {
@@ -30,7 +30,7 @@ function DIFF_c() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
ask_again = false;
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),exprs);
@@ -51,11 +51,11 @@ function DIFF_c() {
}
if (!ask_again) {
graphics.exprs = exprs;
- model.state = [[this.x0],[this.xd0]];
- model.out = [N];
- model.in1 = N;
+ this.model.state = [[this.x0],[this.xd0]];
+ this.model.out = [N];
+ this.model.in1 = new ScilabDouble(N);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DIFF_c.pickle b/js/Linear/DIFF_c.pickle
index 3dd7eaac..cce7a052 100644
--- a/js/Linear/DIFF_c.pickle
+++ b/js/Linear/DIFF_c.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'x0'
+aS'model'
p3
-aS'xd0'
+aS'x0'
p4
-atp5
-Rp6
+aS'xd0'
+p5
+atp6
+Rp7
.(dp0
S'arg1'
p1
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js
index 2ad0c0d5..4107e913 100644
--- a/js/Linear/DLR.js
+++ b/js/Linear/DLR.js
@@ -7,17 +7,17 @@ function DLR() {
C = 1;
D = 0;
exprs = [["1"],["1+z"]];
- model = scicos_model();
- model.sim = list("dsslti4",4);
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("dsslti4",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = x0.slice();
+ this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DLR.prototype.details = function DLR() {
@@ -36,8 +36,8 @@ function DLR() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- x0 = model.dstate;
+ this.model = arg1.model;
+ x0 = this.model.dstate;
ns = prod(size(x0));
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
@@ -61,18 +61,18 @@ function DLR() {
x0[ns1-1][1-1] = 0;
}
rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.dstate = x0;
- model.rpar = rpar;
+ this.model.dstate = x0;
+ this.model.rpar = rpar;
if (norm(D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DLR.pickle b/js/Linear/DLR.pickle
index d26c7744..6b2c200c 100644
--- a/js/Linear/DLR.pickle
+++ b/js/Linear/DLR.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'num'
+aS'model'
p3
-aS'den'
+aS'num'
p4
-atp5
-Rp6
+aS'den'
+p5
+atp6
+Rp7
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js
index 6258df46..0a48dc93 100644
--- a/js/Linear/DLR_f.js
+++ b/js/Linear/DLR_f.js
@@ -7,17 +7,17 @@ function DLR_f() {
C = 1;
D = 0;
exprs = [["1"],["1+z"]];
- model = scicos_model();
- model.sim = "dsslti";
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("dsslti");
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = x0.slice();
+ this.model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([2.5,2.5],model,exprs,gr_i);
+ this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DLR_f.prototype.details = function DLR_f() {
@@ -36,8 +36,8 @@ function DLR_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- x0 = model.dstate;
+ this.model = arg1.model;
+ x0 = this.model.dstate;
ns = prod(size(x0));
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
@@ -61,18 +61,18 @@ function DLR_f() {
x0[ns1-1][1-1] = 0;
}
rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- model.dstate = x0;
- model.rpar = rpar;
+ this.model.dstate = x0;
+ this.model.rpar = rpar;
if (norm(D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DLR_f.pickle b/js/Linear/DLR_f.pickle
index 06b4e8cd..5646a5ed 100644
--- a/js/Linear/DLR_f.pickle
+++ b/js/Linear/DLR_f.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'num'
+aS'model'
p3
-aS'den'
+aS'num'
p4
-atp5
-Rp6
+aS'den'
+p5
+atp6
+Rp7
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js
index 4c19a6b7..d9b17858 100644
--- a/js/Linear/DLSS.js
+++ b/js/Linear/DLSS.js
@@ -6,18 +6,18 @@ function DLSS() {
this.B = 1;
this.C = 1;
this.D = 0;
- model = scicos_model();
- model.sim = list("dsslti4",4);
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = this.x0.slice();
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("dsslti4",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = this.x0.slice();
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([4,2],model,exprs,gr_i);
+ this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DLSS.prototype.details = function DLSS() {
@@ -45,7 +45,7 @@ function DLSS() {
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set discrete linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
@@ -73,7 +73,7 @@ function DLSS() {
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -83,16 +83,16 @@ function DLSS() {
} else {
mmm = [false,false];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,false];
+ this.model.dep_ut = [false,false];
}
- model.dstate = this.x0.slice();
- model.rpar = rpar;
+ this.model.dstate = this.x0.slice();
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DLSS.pickle b/js/Linear/DLSS.pickle
index f9fda6d5..b38aefd2 100644
--- a/js/Linear/DLSS.pickle
+++ b/js/Linear/DLSS.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js
index 121ba77b..7d40c411 100644
--- a/js/Linear/DLSS_f.js
+++ b/js/Linear/DLSS_f.js
@@ -6,18 +6,18 @@ function DLSS_f() {
this.B = 1;
this.C = 1;
this.D = 0;
- model = scicos_model();
- model.sim = list("dsslti",1);
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = this.x0.slice();
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("dsslti",1);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = this.x0.slice();
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([4,2],model,exprs,gr_i);
+ this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DLSS_f.prototype.details = function DLSS_f() {
@@ -45,7 +45,7 @@ function DLSS_f() {
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set discrete linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
@@ -63,7 +63,7 @@ function DLSS_f() {
if (ms!=ns) {
message("A matrix must be square");
} else {
- [model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -73,16 +73,16 @@ function DLSS_f() {
} else {
mmm = [false,false];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,false];
+ this.model.dep_ut = [false,false];
}
- model.dstate = this.x0.slice();
- model.rpar = rpar;
+ this.model.dstate = this.x0.slice();
+ this.model.rpar = rpar;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DLSS_f.pickle b/js/Linear/DLSS_f.pickle
index 54c40f94..86899fa7 100644
--- a/js/Linear/DLSS_f.pickle
+++ b/js/Linear/DLSS_f.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js
index afde8792..6fd66945 100644
--- a/js/Linear/DOLLAR.js
+++ b/js/Linear/DOLLAR.js
@@ -5,16 +5,16 @@ function DOLLAR() {
this.inh = 0;
in1 = 1;
exprs = string([[z],[this.inh]]);
- model = scicos_model();
- model.sim = list("dollar4",4);
- model.in1 = in1;
- model.out = in1;
- model.evtin = 1-this.inh;
- model.dstate = z;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("dollar4",4);
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(in1);
+ this.model.evtin = new ScilabDouble(1-this.inh);
+ this.model.dstate = new ScilabDouble(z);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DOLLAR.prototype.details = function DOLLAR() {
@@ -33,7 +33,7 @@ function DOLLAR() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
}
@@ -47,17 +47,17 @@ function DOLLAR() {
out = [];
}
in1 = out;
- model.sim = list("dollar4_m",4);
- model.odstate = list(this.a);
- model.dstate = [];
+ this.model.sim = list("dollar4_m",4);
+ this.model.odstate = list(this.a);
+ this.model.dstate = [];
if (this.type[(this.a)==1-1]) {
if (isreal(this.a)) {
it = 1;
ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
- model.sim = list("dollar4",4);
- model.dstate = this.a.slice();
- model.odstate = list();
+ this.model.sim = list("dollar4",4);
+ this.model.dstate = this.a.slice();
+ this.model.odstate = list();
}
} else {
it = 2;
@@ -86,12 +86,12 @@ function DOLLAR() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle
index 005fa40c..f2ab4abd 100644
--- a/js/Linear/DOLLAR.pickle
+++ b/js/Linear/DOLLAR.pickle
@@ -6,12 +6,14 @@ S'a'
p2
aS'x'
p3
-aS'inh'
+aS'model'
p4
-aS'type'
+aS'inh'
p5
-atp6
-Rp7
+aS'type'
+p6
+atp7
+Rp8
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js
index de459a3c..806e701e 100644
--- a/js/Linear/DOLLAR_f.js
+++ b/js/Linear/DOLLAR_f.js
@@ -5,16 +5,16 @@ function DOLLAR_f() {
this.inh = 0;
in1 = 1;
exprs = string([[z],[this.inh]]);
- model = scicos_model();
- model.sim = "dollar";
- model.in1 = in1;
- model.out = in1;
- model.evtin = 1-this.inh;
- model.dstate = z;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("dollar");
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(in1);
+ this.model.evtin = new ScilabDouble(1-this.inh);
+ this.model.dstate = new ScilabDouble(z);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DOLLAR_f.prototype.details = function DOLLAR_f() {
@@ -33,7 +33,7 @@ function DOLLAR_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
}
@@ -48,15 +48,15 @@ function DOLLAR_f() {
}
in1 = out;
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,-1,-1,ones(1-this.inh,1),[]);
+ [model,graphics,ok] = check_io(this.model,graphics,-1,-1,ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = this.a;
- model.in1 = in1;
- model.out = out;
+ this.model.dstate = new ScilabDouble(this.a);
+ this.model.in1 = in1;
+ this.model.out = out;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DOLLAR_f.pickle b/js/Linear/DOLLAR_f.pickle
index 4cc1fd5a..c5ad31a2 100644
--- a/js/Linear/DOLLAR_f.pickle
+++ b/js/Linear/DOLLAR_f.pickle
@@ -6,10 +6,12 @@ S'a'
p2
aS'x'
p3
-aS'inh'
+aS'model'
p4
-atp5
-Rp6
+aS'inh'
+p5
+atp6
+Rp7
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js
index 22941f9a..d85e0cd8 100644
--- a/js/Linear/DOLLAR_m.js
+++ b/js/Linear/DOLLAR_m.js
@@ -5,16 +5,16 @@ function DOLLAR_m() {
this.inh = 0;
in1 = 1;
exprs = string([[z],[this.inh]]);
- model = scicos_model();
- model.sim = list("dollar4",4);
- model.in1 = in1;
- model.out = in1;
- model.evtin = 1-this.inh;
- model.dstate = z;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("dollar4",4);
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(in1);
+ this.model.evtin = new ScilabDouble(1-this.inh);
+ this.model.dstate = new ScilabDouble(z);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
DOLLAR_m.prototype.details = function DOLLAR_m() {
@@ -33,7 +33,7 @@ function DOLLAR_m() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
}
@@ -47,17 +47,17 @@ function DOLLAR_m() {
out = [];
}
in1 = out;
- model.sim = list("dollar4_m",4);
- model.odstate = list(this.a);
- model.dstate = [];
+ this.model.sim = list("dollar4_m",4);
+ this.model.odstate = list(this.a);
+ this.model.dstate = [];
if ((this.type[this.a-1]==1)) {
if (isreal(this.a)) {
it = 1;
ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
- model.sim = list("dollar4",4);
- model.dstate = this.a.slice();
- model.odstate = list();
+ this.model.sim = list("dollar4",4);
+ this.model.dstate = this.a.slice();
+ this.model.odstate = list();
}
} else {
it = 2;
@@ -86,12 +86,12 @@ function DOLLAR_m() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle
index 005fa40c..f2ab4abd 100644
--- a/js/Linear/DOLLAR_m.pickle
+++ b/js/Linear/DOLLAR_m.pickle
@@ -6,12 +6,14 @@ S'a'
p2
aS'x'
p3
-aS'inh'
+aS'model'
p4
-aS'type'
+aS'inh'
p5
-atp6
-Rp7
+aS'type'
+p6
+atp7
+Rp8
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index 41106cac..99ff7bc0 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -6,18 +6,18 @@ function GAINBLK() {
out = -1;
in2 = -2;
out2 = -2;
- model = scicos_model();
- model.sim = list("gainblk",4);
- model.in1 = in1;
- model.out = out;
- model.in2 = in2;
- model.out2 = out2;
- model.rpar = this.gain;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("gainblk",4);
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(out);
+ this.model.in2 = new ScilabDouble(in2);
+ this.model.out2 = new ScilabDouble(out2);
+ this.model.rpar = new ScilabDouble(this.gain);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
GAINBLK.prototype.details = function GAINBLK() {
@@ -36,7 +36,7 @@ function GAINBLK() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")==1) {
exprs = [[exprs],[sci2exp(0)]];
}
@@ -52,9 +52,9 @@ function GAINBLK() {
if (isreal(this.gain)) {
it = 1;
ot = 1;
- model.sim = list("gainblk",4);
- model.rpar = this.gain.slice();
- model.opar = list();
+ this.model.sim = list("gainblk",4);
+ this.model.rpar = this.gain.slice();
+ this.model.opar = list();
} else {
message("type is not supported");
ok = false;
@@ -63,22 +63,22 @@ function GAINBLK() {
if ((this.over==0)) {
if ((typeof(this.gain)=="int32")) {
ot = 3;
- model.sim = list("gainblk_i32n",4);
+ this.model.sim = list("gainblk_i32n",4);
} else if ((typeof(this.gain)=="int16")) {
ot = 4;
- model.sim = list("gainblk_i16n",4);
+ this.model.sim = list("gainblk_i16n",4);
} else if ((typeof(this.gain)=="int8")) {
ot = 5;
- model.sim = list("gainblk_i8n",4);
+ this.model.sim = list("gainblk_i8n",4);
} else if ((typeof(this.gain)=="uint32")) {
ot = 6;
- model.sim = list("gainblk_ui32n",4);
+ this.model.sim = list("gainblk_ui32n",4);
} else if ((typeof(this.gain)=="uint16")) {
ot = 7;
- model.sim = list("gainblk_ui16n",4);
+ this.model.sim = list("gainblk_ui16n",4);
} else if ((typeof(this.gain)=="uint8")) {
ot = 8;
- model.sim = list("gainblk_ui8n",4);
+ this.model.sim = list("gainblk_ui8n",4);
} else {
message("type is not supported.");
ok = false;
@@ -86,22 +86,22 @@ function GAINBLK() {
} else if ((this.over==1)) {
if ((typeof(this.gain)=="int32")) {
ot = 3;
- model.sim = list("gainblk_i32s",4);
+ this.model.sim = list("gainblk_i32s",4);
} else if ((typeof(this.gain)=="int16")) {
ot = 4;
- model.sim = list("gainblk_i16s",4);
+ this.model.sim = list("gainblk_i16s",4);
} else if ((typeof(this.gain)=="int8")) {
ot = 5;
- model.sim = list("gainblk_i8s",4);
+ this.model.sim = list("gainblk_i8s",4);
} else if ((typeof(this.gain)=="uint32")) {
ot = 6;
- model.sim = list("gainblk_ui32s",4);
+ this.model.sim = list("gainblk_ui32s",4);
} else if ((typeof(this.gain)=="uint16")) {
ot = 7;
- model.sim = list("gainblk_ui16s",4);
+ this.model.sim = list("gainblk_ui16s",4);
} else if ((typeof(this.gain)=="uint8")) {
ot = 8;
- model.sim = list("gainblk_ui8s",4);
+ this.model.sim = list("gainblk_ui8s",4);
} else {
message("type is not supported.");
ok = false;
@@ -109,22 +109,22 @@ function GAINBLK() {
} else if ((this.over==2)) {
if ((typeof(this.gain)=="int32")) {
ot = 3;
- model.sim = list("gainblk_i32e",4);
+ this.model.sim = list("gainblk_i32e",4);
} else if ((typeof(this.gain)=="int16")) {
ot = 4;
- model.sim = list("gainblk_i16e",4);
+ this.model.sim = list("gainblk_i16e",4);
} else if ((typeof(this.gain)=="int8")) {
ot = 5;
- model.sim = list("gainblk_i8e",4);
+ this.model.sim = list("gainblk_i8e",4);
} else if ((typeof(this.gain)=="uint32")) {
ot = 6;
- model.sim = list("gainblk_ui32e",4);
+ this.model.sim = list("gainblk_ui32e",4);
} else if ((typeof(this.gain)=="uint16")) {
ot = 7;
- model.sim = list("gainblk_ui16e",4);
+ this.model.sim = list("gainblk_ui16e",4);
} else if ((typeof(this.gain)=="uint8")) {
ot = 8;
- model.sim = list("gainblk_ui8e",4);
+ this.model.sim = list("gainblk_ui8e",4);
} else {
message("type is not an integer.");
ok = false;
@@ -133,21 +133,21 @@ function GAINBLK() {
message("Do on Overflow must be 0,1,2");
ok = false;
}
- model.rpar = [];
- model.opar = list(this.gain.slice());
+ this.model.rpar = [];
+ this.model.opar = list(this.gain.slice());
}
if (ok) {
[out,in1] = size(this.gain);
if (out*in1!=1) {
- [model,graphics,ok] = set_io(model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
} else {
- [model,graphics,ok] = set_io(model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[]);
}
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/GAINBLK.pickle b/js/Linear/GAINBLK.pickle
index 78c06b7c..a56de86b 100644
--- a/js/Linear/GAINBLK.pickle
+++ b/js/Linear/GAINBLK.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'over'
+aS'model'
p3
-aS'gain'
+aS'over'
p4
-atp5
-Rp6
+aS'gain'
+p5
+atp6
+Rp7
.(dp0
S'arg1'
p1
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js
index 18b30def..78c39c12 100644
--- a/js/Linear/GAINBLK_f.js
+++ b/js/Linear/GAINBLK_f.js
@@ -4,16 +4,16 @@ function GAINBLK_f() {
this.gain = 1;
in1 = 1;
out = 1;
- model = scicos_model();
- model.sim = "gain";
- model.in1 = in1;
- model.out = out;
- model.rpar = this.gain;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("gain");
+ this.model.in1 = new ScilabDouble(in1);
+ this.model.out = new ScilabDouble(out);
+ this.model.rpar = new ScilabDouble(this.gain);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
GAINBLK_f.prototype.details = function GAINBLK_f() {
@@ -30,7 +30,7 @@ function GAINBLK_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
@@ -40,12 +40,12 @@ function GAINBLK_f() {
message("Gain must have at least one element");
} else {
[out,in1] = size(this.gain);
- [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = this.gain.slice();
+ this.model.rpar = this.gain.slice();
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/GAINBLK_f.pickle b/js/Linear/GAINBLK_f.pickle
index 24c29a29..960ab456 100644
--- a/js/Linear/GAINBLK_f.pickle
+++ b/js/Linear/GAINBLK_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'gain'
+aS'model'
p3
-atp4
-Rp5
+aS'gain'
+p4
+atp5
+Rp6
.(dp0
S'arg1'
p1
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js
index f0fd2265..a7ea5848 100644
--- a/js/Linear/GAIN_f.js
+++ b/js/Linear/GAIN_f.js
@@ -4,16 +4,16 @@ function GAIN_f() {
this.gain = 1;
in1 = 1;
out = 1;
- model = scicos_model();
- model.sim = "gain";
- model.in1 = 1;
- model.out = 1;
- model.rpar = this.gain;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("gain");
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.rpar = new ScilabDouble(this.gain);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
GAIN_f.prototype.details = function GAIN_f() {
@@ -30,7 +30,7 @@ function GAIN_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
@@ -40,12 +40,12 @@ function GAIN_f() {
message("Gain must have at least one element");
} else {
[out,in1] = size(this.gain);
- [model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = this.gain.slice();
+ this.model.rpar = this.gain.slice();
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/GAIN_f.pickle b/js/Linear/GAIN_f.pickle
index 059c6d78..107d062b 100644
--- a/js/Linear/GAIN_f.pickle
+++ b/js/Linear/GAIN_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'gain'
+aS'model'
p3
-atp4
-Rp5
+aS'gain'
+p4
+atp5
+Rp6
.(dp0
S'arg1'
p1
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 7d5c5aec..db35386c 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -4,17 +4,17 @@ function INTEGRAL() {
this.maxp = 1;
minp = -1;
rpar = [];
- model = scicos_model();
- model.state = 0;
- model.sim = list("integral_func",4);
- model.in1 = 1;
- model.out = 1;
- model.rpar = rpar;
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.state = new ScilabDouble(0);
+ this.model.sim = list("integral_func",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.rpar = rpar;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.id = "1/s";
return new BasicBlock(this.x);
}
@@ -40,7 +40,7 @@ function INTEGRAL() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
if (!ok) {
@@ -71,23 +71,23 @@ function INTEGRAL() {
ok = false;
} else {
rpar = [[this.maxp],[this.lowp]];
- model.nzcross = size(this.x0,1);
- model.nmode = size(this.x0,1);
+ this.model.nzcross = new ScilabDouble(size(this.x0,1));
+ this.model.nmode = new ScilabDouble(size(this.x0,1));
}
} else {
rpar = [];
- model.nzcross = 0;
- model.nmode = 0;
+ this.model.nzcross = new ScilabDouble(0);
+ this.model.nmode = new ScilabDouble(0);
}
if (ok) {
- model.rpar = rpar;
- model.state = this.x0;
- [model,graphics,ok] = check_io(model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
+ this.model.rpar = rpar;
+ this.model.state = this.x0;
+ [model,graphics,ok] = check_io(this.model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/INTEGRAL.pickle b/js/Linear/INTEGRAL.pickle
index 33296dc1..f09f5212 100644
--- a/js/Linear/INTEGRAL.pickle
+++ b/js/Linear/INTEGRAL.pickle
@@ -12,10 +12,12 @@ aS'lowp'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js
index 4a018db4..55b4d40d 100644
--- a/js/Linear/INTEGRAL_f.js
+++ b/js/Linear/INTEGRAL_f.js
@@ -2,16 +2,16 @@
function INTEGRAL_f() {
INTEGRAL_f.prototype.define = function INTEGRAL_f() {
this.x0 = 0;
- model = scicos_model();
- model.sim = "integr";
- model.in1 = 1;
- model.out = 1;
- model.state = this.x0;
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("integr");
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.state = new ScilabDouble(this.x0);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = strcat(sci2exp(this.x0));
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
INTEGRAL_f.prototype.details = function INTEGRAL_f() {
@@ -27,16 +27,16 @@ function INTEGRAL_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.state = this.x0;
+ this.model.state = new ScilabDouble(this.x0);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
this.x.model.firing = [];
diff --git a/js/Linear/INTEGRAL_f.pickle b/js/Linear/INTEGRAL_f.pickle
index 6923a6ea..6112b9f9 100644
--- a/js/Linear/INTEGRAL_f.pickle
+++ b/js/Linear/INTEGRAL_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'x0'
+aS'model'
p3
-atp4
-Rp5
+aS'x0'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js
index 149d4300..39215001 100644
--- a/js/Linear/INTEGRAL_m.js
+++ b/js/Linear/INTEGRAL_m.js
@@ -4,19 +4,19 @@ function INTEGRAL_m() {
this.maxp = 1;
minp = -1;
rpar = [];
- model = scicos_model();
- model.state = 0;
- model.sim = list("integral_func",4);
- model.in1 = 1;
- model.out = 1;
- model.in2 = 1;
- model.out2 = 1;
- model.rpar = rpar;
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.state = new ScilabDouble(0);
+ this.model.sim = list("integral_func",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.in2 = new ScilabDouble(1);
+ this.model.out2 = new ScilabDouble(1);
+ this.model.rpar = rpar;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
INTEGRAL_m.prototype.details = function INTEGRAL_m() {
@@ -41,7 +41,7 @@ function INTEGRAL_m() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs);
if (!ok) {
@@ -75,8 +75,8 @@ function INTEGRAL_m() {
ok = false;
} else {
rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
- model.nzcross = size(this.x0,"*");
- model.nmode = size(this.x0,"*");
+ this.model.nzcross = new ScilabDouble(size(this.x0,"*"));
+ this.model.nmode = new ScilabDouble(size(this.x0,"*"));
}
} else if ((Datatype==2)) {
if (size(this.maxp,"*")==1) {
@@ -96,25 +96,25 @@ function INTEGRAL_m() {
ok = false;
} else {
rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
- model.nzcross = 2*size(this.x0,"*");
- model.nmode = 2*size(this.x0,"*");
+ this.model.nzcross = new ScilabDouble(2*size(this.x0,"*"));
+ this.model.nmode = new ScilabDouble(2*size(this.x0,"*"));
}
}
} else {
rpar = [];
- model.nzcross = 0;
- model.nmode = 0;
+ this.model.nzcross = new ScilabDouble(0);
+ this.model.nmode = new ScilabDouble(0);
}
if (ok) {
- model.rpar = rpar;
+ this.model.rpar = rpar;
if ((Datatype==1)) {
- model.state = real(this.x0.slice());
- model.sim = list("integral_func",4);
+ this.model.state = new ScilabDouble(real(this.x0.slice()));
+ this.model.sim = list("integral_func",4);
it = [[1],[ones(this.reinit,1)]];
ot = 1;
} else if ((Datatype==2)) {
- model.state = [[real(this.x0.slice())],[imag(this.x0.slice())]];
- model.sim = list("integralz_func",4);
+ this.model.state = [[real(this.x0.slice())],[imag(this.x0.slice())]];
+ this.model.sim = list("integralz_func",4);
it = [[2],[2*ones(this.reinit,1)]];
ot = 2;
} else {
@@ -124,13 +124,13 @@ function INTEGRAL_m() {
if (ok) {
in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
out = size(this.x0);
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[]);
}
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/INTEGRAL_m.pickle b/js/Linear/INTEGRAL_m.pickle
index 7016703a..7d0ee3ba 100644
--- a/js/Linear/INTEGRAL_m.pickle
+++ b/js/Linear/INTEGRAL_m.pickle
@@ -12,10 +12,12 @@ aS'lowp'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/PID.js b/js/Linear/PID.js
index deab1153..af223f0d 100644
--- a/js/Linear/PID.js
+++ b/js/Linear/PID.js
@@ -23,20 +23,20 @@ function PID() {
scs_m.objs[19-1] = scicos_link(xx=[[436.5421],[456.5421]],yy=[[202.85067],[202.85067]],id="drawlink",thick=[0,0],ct=[1,1],from=[2,1,0],to=[18,1,1]);
scs_m.objs[20-1] = scicos_block(gui="IN_f",graphics=scicos_graphics(orig=[193.97067,193.11733],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=21,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[21-1] = scicos_link(xx=[[213.97067],[233.97067]],yy=[[203.11733],[203.11733]],id="drawlink",thick=[0,0],ct=[1,1],from=[20,1,0],to=[15,1,1]);
- model = scicos_model();
- model.sim = "csuper";
- model.in1 = -1;
- model.in2 = -2;
- model.out = -1;
- model.out2 = -2;
- model.intyp = 1;
- model.outtyp = 1;
- model.blocktype = "h";
- model.firing = false;
- model.dep_ut = [false,false];
- model.rpar = scs_m;
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("csuper");
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.in2 = new ScilabDouble(-2);
+ this.model.out = new ScilabDouble(-1);
+ this.model.out2 = new ScilabDouble(-2);
+ this.model.intyp = new ScilabDouble(1);
+ this.model.outtyp = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("h");
+ this.model.firing = new ScilabBoolean(false);
+ this.model.dep_ut = [false,false];
+ this.model.rpar = new ScilabDouble(scs_m);
gr_i = [];
- this.x = standard_define([2,2],model,[],gr_i);
+ this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
PID.prototype.details = function PID() {
diff --git a/js/Linear/PID.pickle b/js/Linear/PID.pickle
index f111f219..c7c6a8ec 100644
--- a/js/Linear/PID.pickle
+++ b/js/Linear/PID.pickle
@@ -2,18 +2,20 @@ c__builtin__
set
p0
((lp1
-S'i'
+S'd'
p2
-aS'x'
+aS'i'
p3
aS'exprs0'
p4
-aS'd'
-p5
aS'p'
+p5
+aS'x'
p6
-atp7
-Rp8
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'xx3'
p1
diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js
index 6a27b2d1..4569e7d9 100644
--- a/js/Linear/REGISTER.js
+++ b/js/Linear/REGISTER.js
@@ -2,17 +2,17 @@
function REGISTER() {
REGISTER.prototype.define = function REGISTER() {
this.z0 = zeros(10,1);
- model = scicos_model();
- model.sim = list("delay4",4);
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = this.z0;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("delay4",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = new ScilabDouble(this.z0);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = strcat(string(this.z0),";");
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
REGISTER.prototype.details = function REGISTER() {
@@ -31,7 +31,7 @@ function REGISTER() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,1)==1) {
exprs = [[exprs],[sci2exp(1)]];
}
@@ -45,44 +45,44 @@ function REGISTER() {
ok = false;
}
if (this.it==1) {
- model.sim = list("delay4",4);
+ this.model.sim = list("delay4",4);
this.z0 = double(this.z0);
- model.dstate = this.z0;
- model.odstate = list();
+ this.model.dstate = new ScilabDouble(this.z0);
+ this.model.odstate = list();
} else {
if (this.it==3) {
- model.sim = list("delay4_i32",4);
+ this.model.sim = list("delay4_i32",4);
this.z0 = int32(this.z0);
} else if (this.it==4) {
- model.sim = list("delay4_i16",4);
+ this.model.sim = list("delay4_i16",4);
this.z0 = int16(this.z0);
} else if (this.it==5) {
- model.sim = list("delay4_i8",4);
+ this.model.sim = list("delay4_i8",4);
this.z0 = int8(this.z0);
} else if (this.it==6) {
- model.sim = list("delay4_ui32",4);
+ this.model.sim = list("delay4_ui32",4);
this.z0 = uint32(this.z0);
} else if (this.it==7) {
- model.sim = list("delay4_ui16",4);
+ this.model.sim = list("delay4_ui16",4);
this.z0 = uint16(this.z0);
} else if (this.it==8) {
- model.sim = list("delay4_ui8",4);
+ this.model.sim = list("delay4_ui8",4);
this.z0 = uint8(this.z0);
} else {
message("Datatype is not supported");
ok = false;
}
- model.odstate = list(this.z0);
- model.dstate = [];
+ this.model.odstate = list(this.z0);
+ this.model.dstate = [];
}
if (ok) {
in1 = [1,1];
- [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
}
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/REGISTER.pickle b/js/Linear/REGISTER.pickle
index bc3735c1..dae865a3 100644
--- a/js/Linear/REGISTER.pickle
+++ b/js/Linear/REGISTER.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'z0'
+aS'model'
p3
-aS'it'
+aS'z0'
p4
-atp5
-Rp6
+aS'it'
+p5
+atp6
+Rp7
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js
index f35b06be..c4b0e7cc 100644
--- a/js/Linear/REGISTER_f.js
+++ b/js/Linear/REGISTER_f.js
@@ -2,17 +2,17 @@
function REGISTER_f() {
REGISTER_f.prototype.define = function REGISTER_f() {
this.z0 = zeros(10,1);
- model = scicos_model();
- model.sim = "delay";
- model.in1 = 1;
- model.out = 1;
- model.evtin = 1;
- model.dstate = this.z0;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("delay");
+ this.model.in1 = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = new ScilabDouble(this.z0);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = strcat(string(this.z0),";");
gr_i = [];
- this.x = standard_define([2.5,2.5],model,exprs,gr_i);
+ this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
REGISTER_f.prototype.details = function REGISTER_f() {
@@ -28,7 +28,7 @@ function REGISTER_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
if (!ok) {
@@ -40,9 +40,9 @@ function REGISTER_f() {
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = this.z0;
+ this.model.dstate = new ScilabDouble(this.z0);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/REGISTER_f.pickle b/js/Linear/REGISTER_f.pickle
index 3881a1bd..961e104f 100644
--- a/js/Linear/REGISTER_f.pickle
+++ b/js/Linear/REGISTER_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'z0'
+aS'model'
p3
-atp4
-Rp5
+aS'z0'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SAMPHOLD.js b/js/Linear/SAMPHOLD.js
index e51073c2..e47fcee2 100644
--- a/js/Linear/SAMPHOLD.js
+++ b/js/Linear/SAMPHOLD.js
@@ -2,15 +2,15 @@
function SAMPHOLD() {
SAMPHOLD.prototype.define = function SAMPHOLD() {
in1 = -1;
- model = scicos_model();
- model.sim = list("samphold4",4);
- model.in1 = -1;
- model.out = -1;
- model.evtin = 1;
- model.blocktype = "d";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("samphold4",4);
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.out = new ScilabDouble(-1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [true,false];
gr_i = [];
- this.x = standard_define([2,2],model," ",gr_i);
+ this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
SAMPHOLD.prototype.details = function SAMPHOLD() {
diff --git a/js/Linear/SAMPHOLD.pickle b/js/Linear/SAMPHOLD.pickle
index caeeb745..68b41422 100644
--- a/js/Linear/SAMPHOLD.pickle
+++ b/js/Linear/SAMPHOLD.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index c117295d..29972426 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -1,20 +1,20 @@
/* autogenerated from "macros/Linear/SAMPHOLD_m.sci" */
function SAMPHOLD_m() {
SAMPHOLD_m.prototype.define = function SAMPHOLD_m() {
- model = scicos_model();
- model.sim = list("samphold4_m",4);
- model.in1 = -1;
- model.in2 = -2;
- model.intyp = 1;
- model.outtyp = 1;
- model.out = -1;
- model.out2 = -2;
- model.evtin = 1;
- model.blocktype = "d";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("samphold4_m",4);
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.in2 = new ScilabDouble(-2);
+ this.model.intyp = new ScilabDouble(1);
+ this.model.outtyp = new ScilabDouble(1);
+ this.model.out = new ScilabDouble(-1);
+ this.model.out2 = new ScilabDouble(-2);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [true,false];
label = [sci2exp(1)];
gr_i = [];
- this.x = standard_define([2,2],model,label,gr_i);
+ this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
SAMPHOLD_m.prototype.details = function SAMPHOLD_m() {
@@ -32,7 +32,7 @@ function SAMPHOLD_m() {
this.x.model.firing = [];
graphics = arg1.graphics;
label = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
if (!ok) {
@@ -43,12 +43,12 @@ function SAMPHOLD_m() {
ok = false;
}
if (ok) {
- in1 = [model.in1,model.in2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ in1 = [this.model.in1,this.model.in2];
+ [model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
if (ok) {
graphics.exprs = exprs;
arg1.graphics = graphics;
- arg1.model = model;
+ arg1.model = this.model;
this.x = arg1;
break;
}
diff --git a/js/Linear/SAMPHOLD_m.pickle b/js/Linear/SAMPHOLD_m.pickle
index fd472bf8..7c779c2a 100644
--- a/js/Linear/SAMPHOLD_m.pickle
+++ b/js/Linear/SAMPHOLD_m.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'it'
+aS'model'
p3
-atp4
-Rp5
+aS'it'
+p4
+atp5
+Rp6
.(dp0
S'arg1'
p1
diff --git a/js/Linear/SAMPLEHOLD_f.js b/js/Linear/SAMPLEHOLD_f.js
index 7e9fe126..31ac840d 100644
--- a/js/Linear/SAMPLEHOLD_f.js
+++ b/js/Linear/SAMPLEHOLD_f.js
@@ -2,15 +2,15 @@
function SAMPLEHOLD_f() {
SAMPLEHOLD_f.prototype.define = function SAMPLEHOLD_f() {
in1 = -1;
- model = scicos_model();
- model.sim = "samphold";
- model.in1 = -1;
- model.out = -1;
- model.evtin = 1;
- model.blocktype = "d";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("samphold");
+ this.model.in1 = new ScilabDouble(-1);
+ this.model.out = new ScilabDouble(-1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [true,false];
gr_i = [];
- this.x = standard_define([2,2],model," ",gr_i);
+ this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
SAMPLEHOLD_f.prototype.details = function SAMPLEHOLD_f() {
diff --git a/js/Linear/SAMPLEHOLD_f.pickle b/js/Linear/SAMPLEHOLD_f.pickle
index c64acb4c..cee05e84 100644
--- a/js/Linear/SAMPLEHOLD_f.pickle
+++ b/js/Linear/SAMPLEHOLD_f.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js
index 274f300c..421ab2df 100644
--- a/js/Linear/SOM_f.js
+++ b/js/Linear/SOM_f.js
@@ -2,16 +2,16 @@
function SOM_f() {
SOM_f.prototype.define = function SOM_f() {
sgn = [[1],[1],[1]];
- model = scicos_model();
- model.sim = list("sum",2);
- model.in1 = [[-1],[-1],[-1]];
- model.out = -1;
- model.rpar = sgn;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("sum",2);
+ this.model.in1 = [[-1],[-1],[-1]];
+ this.model.out = new ScilabDouble(-1);
+ this.model.rpar = sgn;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = [[sci2exp(1)],[sci2exp(sgn)]];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,gr_i);
+ this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
SOM_f.prototype.details = function SOM_f() {
@@ -25,13 +25,13 @@ function SOM_f() {
SOM_f.prototype.set = function SOM_f() {
this.x = arg1;
graphics = arg1.graphics;
- model = arg1.model;
+ this.model = arg1.model;
exprs = graphics.exprs;
if (size(exprs,"*")==2) {
exprs = exprs[2-1];
}
if (size(exprs,"*")!=3) {
- exprs = string(model.rpar);
+ exprs = string(this.model.rpar);
}
if (graphics.flip) {
labs = ["down","left","up"];
diff --git a/js/Linear/SOM_f.pickle b/js/Linear/SOM_f.pickle
index df58dba6..9710ead6 100644
--- a/js/Linear/SOM_f.pickle
+++ b/js/Linear/SOM_f.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js
index 0aabff5e..ec0683cf 100644
--- a/js/Linear/SUMMATION.js
+++ b/js/Linear/SUMMATION.js
@@ -2,18 +2,18 @@
function SUMMATION() {
SUMMATION.prototype.define = function SUMMATION() {
this.sgn = [[1],[-1]];
- model = scicos_model();
- model.sim = list("summation",4);
- model.in1 = [[-1],[-1]];
- model.out = -1;
- model.in2 = [[-2],[-2]];
- model.out2 = -2;
- model.ipar = this.sgn;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("summation",4);
+ this.model.in1 = [[-1],[-1]];
+ this.model.out = new ScilabDouble(-1);
+ this.model.in2 = [[-2],[-2]];
+ this.model.out2 = new ScilabDouble(-2);
+ this.model.ipar = this.sgn;
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
exprs = sci2exp(this.sgn);
gr_i = [];
- this.x = standard_define([2,3],model,exprs,gr_i);
+ this.x = standard_define([2,3],this.model,exprs,gr_i);
return new Summation(this.x);
}
SUMMATION.prototype.details = function SUMMATION() {
@@ -33,7 +33,7 @@ function SUMMATION() {
this.satur = arguments[0]["satur"]
this.x = arg1;
graphics = arg1.graphics;
- model = arg1.model;
+ this.model = arg1.model;
exprs = graphics.exprs;
if (size(exprs,1)==1) {
exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
@@ -81,66 +81,66 @@ function SUMMATION() {
it = this.Datatype*ones(1,size(in1,1));
ot = this.Datatype;
if (this.Datatype==1) {
- model.sim = list("summation",4);
+ this.model.sim = list("summation",4);
} else if (this.Datatype==2) {
- model.sim = list("summation_z",4);
+ this.model.sim = list("summation_z",4);
} else if (((this.Datatype<1)||(this.Datatype>8))) {
message("Datatype is not supported");
ok = false;
} else {
if (this.satur==0) {
if (this.Datatype==3) {
- model.sim = list("summation_i32n",4);
+ this.model.sim = list("summation_i32n",4);
} else if (this.Datatype==4) {
- model.sim = list("summation_i16n",4);
+ this.model.sim = list("summation_i16n",4);
} else if (this.Datatype==5) {
- model.sim = list("summation_i8n",4);
+ this.model.sim = list("summation_i8n",4);
} else if (this.Datatype==6) {
- model.sim = list("summation_ui32n",4);
+ this.model.sim = list("summation_ui32n",4);
} else if (this.Datatype==7) {
- model.sim = list("summation_ui16n",4);
+ this.model.sim = list("summation_ui16n",4);
} else if (this.Datatype==8) {
- model.sim = list("summation_ui8n",4);
+ this.model.sim = list("summation_ui8n",4);
}
} else if (this.satur==1) {
if (this.Datatype==3) {
- model.sim = list("summation_i32s",4);
+ this.model.sim = list("summation_i32s",4);
} else if (this.Datatype==4) {
- model.sim = list("summation_i16s",4);
+ this.model.sim = list("summation_i16s",4);
} else if (this.Datatype==5) {
- model.sim = list("summation_i8s",4);
+ this.model.sim = list("summation_i8s",4);
} else if (this.Datatype==6) {
- model.sim = list("summation_ui32s",4);
+ this.model.sim = list("summation_ui32s",4);
} else if (this.Datatype==7) {
- model.sim = list("summation_ui16s",4);
+ this.model.sim = list("summation_ui16s",4);
} else if (this.Datatype==8) {
- model.sim = list("summation_ui8s",4);
+ this.model.sim = list("summation_ui8s",4);
}
} else if (this.satur==2) {
if (this.Datatype==3) {
- model.sim = list("summation_i32e",4);
+ this.model.sim = list("summation_i32e",4);
} else if (this.Datatype==4) {
- model.sim = list("summation_i16e",4);
+ this.model.sim = list("summation_i16e",4);
} else if (this.Datatype==5) {
- model.sim = list("summation_i8e",4);
+ this.model.sim = list("summation_i8e",4);
} else if (this.Datatype==6) {
- model.sim = list("summation_ui32e",4);
+ this.model.sim = list("summation_ui32e",4);
} else if (this.Datatype==7) {
- model.sim = list("summation_ui16e",4);
+ this.model.sim = list("summation_ui16e",4);
} else if (this.Datatype==8) {
- model.sim = list("summation_ui8e",4);
+ this.model.sim = list("summation_ui8e",4);
}
}
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
+ [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
}
if (ok) {
- model.rpar = this.satur;
- model.ipar = this.sgn;
+ this.model.rpar = new ScilabDouble(this.satur);
+ this.model.ipar = new ScilabDouble(this.sgn);
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/SUMMATION.pickle b/js/Linear/SUMMATION.pickle
index 06cb5242..db96cae6 100644
--- a/js/Linear/SUMMATION.pickle
+++ b/js/Linear/SUMMATION.pickle
@@ -6,12 +6,14 @@ S'Datatype'
p2
aS'x'
p3
-aS'satur'
+aS'model'
p4
-aS'sgn'
+aS'satur'
p5
-atp6
-Rp7
+aS'sgn'
+p6
+atp7
+Rp8
.(dp0
S'arg1'
p1
diff --git a/js/Linear/SUM_f.js b/js/Linear/SUM_f.js
index c4d18b7e..76f1d489 100644
--- a/js/Linear/SUM_f.js
+++ b/js/Linear/SUM_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/SUM_f.sci" */
function SUM_f() {
SUM_f.prototype.define = function SUM_f() {
- model = scicos_model();
- model.sim = list("plusblk",2);
- model.in1 = [[-1],[-1],[-1]];
- model.out = -1;
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model = scicos_model();
+ this.model.sim = list("plusblk",2);
+ this.model.in1 = [[-1],[-1],[-1]];
+ this.model.out = new ScilabDouble(-1);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
gr_i = [];
exprs = [];
- this.x = standard_define([1,1],model,exprs,gr_i);
+ this.x = standard_define([1,1],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
SUM_f.prototype.details = function SUM_f() {
diff --git a/js/Linear/SUM_f.pickle b/js/Linear/SUM_f.pickle
index 5152d73e..a12aa427 100644
--- a/js/Linear/SUM_f.pickle
+++ b/js/Linear/SUM_f.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'model'
+p3
+atp4
+Rp5
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js
index 03dd5504..dc538324 100644
--- a/js/Linear/TCLSS.js
+++ b/js/Linear/TCLSS.js
@@ -9,18 +9,18 @@ function TCLSS() {
in1 = 1;
nx = size(this.x0,"*");
out = 1;
- model = scicos_model();
- model.sim = list("tcslti4",4);
- model.in1 = [[in1],[nx]];
- model.out = out;
- model.evtin = 1;
- model.state = this.x0;
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("tcslti4",4);
+ this.model.in1 = [[in1],[nx]];
+ this.model.out = new ScilabDouble(out);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.state = new ScilabDouble(this.x0);
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
TCLSS.prototype.details = function TCLSS() {
@@ -45,7 +45,7 @@ function TCLSS() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
@@ -66,7 +66,7 @@ function TCLSS() {
if (ms!=ns) {
message("A matrix must be square");
} else {
- [model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
+ [model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -76,21 +76,21 @@ function TCLSS() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,true];
+ this.model.dep_ut = [false,true];
}
- model.state = this.x0.slice();
- model.rpar = rpar;
+ this.model.state = this.x0.slice();
+ this.model.rpar = rpar;
if (this.D!=[]) {
- model.sim = list("tcslti4",4);
+ this.model.sim = list("tcslti4",4);
} else {
- model.sim = list("tcsltj4",4);
+ this.model.sim = list("tcsltj4",4);
}
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/TCLSS.pickle b/js/Linear/TCLSS.pickle
index e39b2024..ba012589 100644
--- a/js/Linear/TCLSS.pickle
+++ b/js/Linear/TCLSS.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js
index 3d425930..00370934 100644
--- a/js/Linear/TCLSS_f.js
+++ b/js/Linear/TCLSS_f.js
@@ -9,18 +9,18 @@ function TCLSS_f() {
in1 = 1;
nx = size(this.x0,"*");
out = 1;
- model = scicos_model();
- model.sim = list("tcslti",1);
- model.in1 = [[in1],[nx]];
- model.out = out;
- model.evtin = 1;
- model.state = this.x0;
- model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
- model.blocktype = "c";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("tcslti",1);
+ this.model.in1 = [[in1],[nx]];
+ this.model.out = new ScilabDouble(out);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.state = new ScilabDouble(this.x0);
+ this.model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [false,true];
exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
TCLSS_f.prototype.details = function TCLSS_f() {
@@ -45,7 +45,7 @@ function TCLSS_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (size(exprs,"*")==7) {
exprs = exprs[[1:4,7]-1];
}
@@ -66,7 +66,7 @@ function TCLSS_f() {
if (ms!=ns) {
message("A matrix must be square");
} else {
- [model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
+ [model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
@@ -76,21 +76,21 @@ function TCLSS_f() {
} else {
mmm = [false,true];
}
- if (or(model.dep_ut!=mmm)) {
- model.dep_ut = mmm;
+ if (or(this.model.dep_ut!=mmm)) {
+ this.model.dep_ut = mmm;
}
} else {
- model.dep_ut = [false,true];
+ this.model.dep_ut = [false,true];
}
- model.state = this.x0.slice();
- model.rpar = rpar;
+ this.model.state = this.x0.slice();
+ this.model.rpar = rpar;
if (this.D!=[]) {
- model.sim = list("tcslti",1);
+ this.model.sim = list("tcslti",1);
} else {
- model.sim = list("tcsltj",1);
+ this.model.sim = list("tcsltj",1);
}
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/TCLSS_f.pickle b/js/Linear/TCLSS_f.pickle
index e39b2024..ba012589 100644
--- a/js/Linear/TCLSS_f.pickle
+++ b/js/Linear/TCLSS_f.pickle
@@ -12,10 +12,12 @@ aS'D'
p5
aS'x'
p6
-aS'x0'
+aS'model'
p7
-atp8
-Rp9
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index fc9aa70e..ce36dfc9 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -5,17 +5,17 @@ function TIME_DELAY() {
this.T = 1;
this.init = 0;
this.N = 1024;
- model = scicos_model();
- model.sim = list("time_delay",4);
- model.in1 = [nin];
- model.out = nin;
- model.rpar = [this.T,this.init];
- model.ipar = this.N;
- model.blocktype = "x";
- model.dep_ut = [false,true];
+ this.model = scicos_model();
+ this.model.sim = list("time_delay",4);
+ this.model.in1 = [nin];
+ this.model.out = new ScilabDouble(nin);
+ this.model.rpar = [this.T,this.init];
+ this.model.ipar = new ScilabDouble(this.N);
+ this.model.blocktype = new ScilabString("x");
+ this.model.dep_ut = [false,true];
exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
- this.x = standard_define([3.5,2],model,exprs,gr_i);
+ this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
TIME_DELAY.prototype.details = function TIME_DELAY() {
@@ -36,8 +36,8 @@ function TIME_DELAY() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- nin = model.in1[1-1];
+ this.model = arg1.model;
+ nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -52,15 +52,15 @@ function TIME_DELAY() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[-1],-1,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,[-1],-1,[],[]);
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[this.T],[this.init]];
- model.ipar = this.N;
- model.dep_ut = [false,true];
+ this.model.rpar = [[this.T],[this.init]];
+ this.model.ipar = new ScilabDouble(this.N);
+ this.model.dep_ut = [false,true];
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/TIME_DELAY.pickle b/js/Linear/TIME_DELAY.pickle
index f1fcfb41..91ce14f8 100644
--- a/js/Linear/TIME_DELAY.pickle
+++ b/js/Linear/TIME_DELAY.pickle
@@ -4,14 +4,16 @@ p0
((lp1
S'x'
p2
-aS'init'
+aS'model'
p3
-aS'T'
+aS'init'
p4
-aS'N'
+aS'T'
p5
-atp6
-Rp7
+aS'N'
+p6
+atp7
+Rp8
.(dp0
S'arg1'
p1
diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js
index 0d045edb..9b4fc33f 100644
--- a/js/Linear/VARIABLE_DELAY.js
+++ b/js/Linear/VARIABLE_DELAY.js
@@ -5,17 +5,17 @@ function VARIABLE_DELAY() {
this.T = 1;
this.init = 0;
this.N = 1024;
- model = scicos_model();
- model.sim = list("variable_delay",4);
- model.in1 = [[nin],[1]];
- model.out = nin;
- model.rpar = [this.T,this.init];
- model.ipar = this.N;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("variable_delay",4);
+ this.model.in1 = [[nin],[1]];
+ this.model.out = new ScilabDouble(nin);
+ this.model.rpar = [this.T,this.init];
+ this.model.ipar = new ScilabDouble(this.N);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
- this.x = standard_define([3,2],model,exprs,gr_i);
+ this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
VARIABLE_DELAY.prototype.details = function VARIABLE_DELAY() {
@@ -36,8 +36,8 @@ function VARIABLE_DELAY() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
- nin = model.in1[1-1];
+ this.model = arg1.model;
+ nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Max delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -52,14 +52,14 @@ function VARIABLE_DELAY() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[[-1],[1]],-1,[],[]);
+ [model,graphics,ok] = check_io(this.model,graphics,[[-1],[1]],-1,[],[]);
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[this.T],[this.init]];
- model.ipar = this.N;
+ this.model.rpar = [[this.T],[this.init]];
+ this.model.ipar = new ScilabDouble(this.N);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Linear/VARIABLE_DELAY.pickle b/js/Linear/VARIABLE_DELAY.pickle
index c57d7ee0..4cf3cbd7 100644
--- a/js/Linear/VARIABLE_DELAY.pickle
+++ b/js/Linear/VARIABLE_DELAY.pickle
@@ -4,14 +4,16 @@ p0
((lp1
S'x'
p2
-aS'init'
+aS'model'
p3
-aS'T'
+aS'init'
p4
-aS'N'
+aS'T'
p5
-atp6
-Rp7
+aS'N'
+p6
+atp7
+Rp8
.(dp0
S'arg1'
p1