summaryrefslogtreecommitdiff
path: root/js/Linear
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear')
-rw-r--r--js/Linear/BIGSOM_f.js16
-rw-r--r--js/Linear/BIGSOM_f.pickle6
-rw-r--r--js/Linear/CLR.js6
-rw-r--r--js/Linear/CLR.pickle8
-rw-r--r--js/Linear/CLR_f.js6
-rw-r--r--js/Linear/CLR_f.pickle8
-rw-r--r--js/Linear/CLSS.js42
-rw-r--r--js/Linear/CLSS.pickle16
-rw-r--r--js/Linear/CLSS_f.js32
-rw-r--r--js/Linear/CLSS_f.pickle16
-rw-r--r--js/Linear/DELAYV_f.js30
-rw-r--r--js/Linear/DELAYV_f.pickle10
-rw-r--r--js/Linear/DELAY_f.js14
-rw-r--r--js/Linear/DELAY_f.pickle8
-rw-r--r--js/Linear/DIFF_c.js18
-rw-r--r--js/Linear/DIFF_c.pickle8
-rw-r--r--js/Linear/DLR.js6
-rw-r--r--js/Linear/DLR.pickle8
-rw-r--r--js/Linear/DLR_f.js6
-rw-r--r--js/Linear/DLR_f.pickle8
-rw-r--r--js/Linear/DLSS.js42
-rw-r--r--js/Linear/DLSS.pickle16
-rw-r--r--js/Linear/DLSS_f.js32
-rw-r--r--js/Linear/DLSS_f.pickle16
-rw-r--r--js/Linear/DOLLAR.js34
-rw-r--r--js/Linear/DOLLAR.pickle12
-rw-r--r--js/Linear/DOLLAR_f.js14
-rw-r--r--js/Linear/DOLLAR_f.pickle10
-rw-r--r--js/Linear/DOLLAR_m.js34
-rw-r--r--js/Linear/DOLLAR_m.pickle12
-rw-r--r--js/Linear/GAINBLK.js62
-rw-r--r--js/Linear/GAINBLK.pickle8
-rw-r--r--js/Linear/GAINBLK_f.js14
-rw-r--r--js/Linear/GAINBLK_f.pickle6
-rw-r--r--js/Linear/GAIN_f.js14
-rw-r--r--js/Linear/GAIN_f.pickle6
-rw-r--r--js/Linear/INTEGRAL.js44
-rw-r--r--js/Linear/INTEGRAL.pickle16
-rw-r--r--js/Linear/INTEGRAL_f.js10
-rw-r--r--js/Linear/INTEGRAL_f.pickle6
-rw-r--r--js/Linear/INTEGRAL_m.js70
-rw-r--r--js/Linear/INTEGRAL_m.pickle16
-rw-r--r--js/Linear/PID.js18
-rw-r--r--js/Linear/PID.pickle14
-rw-r--r--js/Linear/REGISTER.js44
-rw-r--r--js/Linear/REGISTER.pickle8
-rw-r--r--js/Linear/REGISTER_f.js12
-rw-r--r--js/Linear/REGISTER_f.pickle6
-rw-r--r--js/Linear/SAMPHOLD_m.js6
-rw-r--r--js/Linear/SAMPHOLD_m.pickle6
-rw-r--r--js/Linear/SUMMATION.js88
-rw-r--r--js/Linear/SUMMATION.pickle12
-rw-r--r--js/Linear/TCLSS.js36
-rw-r--r--js/Linear/TCLSS.pickle16
-rw-r--r--js/Linear/TCLSS_f.js36
-rw-r--r--js/Linear/TCLSS_f.pickle16
-rw-r--r--js/Linear/TIME_DELAY.js22
-rw-r--r--js/Linear/TIME_DELAY.pickle10
-rw-r--r--js/Linear/VARIABLE_DELAY.js22
-rw-r--r--js/Linear/VARIABLE_DELAY.pickle10
60 files changed, 658 insertions, 490 deletions
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js
index 096e388b..f6ca95aa 100644
--- a/js/Linear/BIGSOM_f.js
+++ b/js/Linear/BIGSOM_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Linear/BIGSOM_f.sci" */
function BIGSOM_f() {
BIGSOM_f.prototype.define = function BIGSOM_f() {
- sgn = [[1],[1]];
+ this.sgn = [[1],[1]];
model = scicos_model();
model.sim = list("sum",2);
model.in1 = [[-1],[-1]];
model.out = -1;
- model.rpar = sgn;
+ model.rpar = this.sgn;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = sci2exp(sgn);
+ exprs = sci2exp(this.sgn);
gr_i = [];
this.x = standard_define([2,3],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new BigSom(this.x);
}
BIGSOM_f.prototype.details = function BIGSOM_f() {
return this.x;
@@ -25,20 +25,20 @@ function BIGSOM_f() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
+ [ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
if (!ok) {
break;
}
- in1 = -ones(size(sgn,"*"),1);
+ in1 = -ones(size(this.sgn,"*"),1);
[model,graphics,ok] = check_io(model,graphics,in1,-1,[],[]);
if (ok) {
- model.rpar = sgn.slice();
+ model.rpar = this.sgn.slice();
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new BigSom(this.x);
}
}
diff --git a/js/Linear/BIGSOM_f.pickle b/js/Linear/BIGSOM_f.pickle
index 0d1dde24..1f88411a 100644
--- a/js/Linear/BIGSOM_f.pickle
+++ b/js/Linear/BIGSOM_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'sgn'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js
index 3d97e275..a985ba29 100644
--- a/js/Linear/CLR.js
+++ b/js/Linear/CLR.js
@@ -37,16 +37,16 @@ function CLR() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper or strictly proper.");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/CLR.pickle b/js/Linear/CLR.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/CLR.pickle
+++ b/js/Linear/CLR.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js
index d9b963d0..3f029025 100644
--- a/js/Linear/CLR_f.js
+++ b/js/Linear/CLR_f.js
@@ -37,16 +37,16 @@ function CLR_f() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper or strictly proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/CLR_f.pickle b/js/Linear/CLR_f.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/CLR_f.pickle
+++ b/js/Linear/CLR_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js
index 86279506..7b142963 100644
--- a/js/Linear/CLSS.js
+++ b/js/Linear/CLSS.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/CLSS.sci" */
function CLSS() {
CLSS.prototype.define = function CLSS() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = list("csslti4",4);
model.in1 = in1;
model.out = out;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -35,25 +35,25 @@ function CLSS() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
okD = true;
- if (size(D,"*")!=size(C,1)*size(B,2)) {
- if (size(D,"*")==1) {
- D = D*ones(C*B);
- } else if (size(D,"*")==0) {
- D = zeros(C*B);
+ if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
+ if (size(this.D,"*")==1) {
+ this.D = this.D*ones(this.C*this.B);
+ } else if (size(this.D,"*")==0) {
+ this.D = zeros(this.C*this.B);
} else {
okD = false;
}
@@ -64,9 +64,9 @@ function CLSS() {
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -77,7 +77,7 @@ function CLSS() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/CLSS.pickle b/js/Linear/CLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/CLSS.pickle
+++ b/js/Linear/CLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js
index e30c06fa..d1efb421 100644
--- a/js/Linear/CLSS_f.js
+++ b/js/Linear/CLSS_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/CLSS_f.sci" */
function CLSS_f() {
CLSS_f.prototype.define = function CLSS_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = list("csslti",1);
model.in1 = in1;
model.out = out;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -35,28 +35,28 @@ function CLSS_f() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -67,7 +67,7 @@ function CLSS_f() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/CLSS_f.pickle b/js/Linear/CLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/CLSS_f.pickle
+++ b/js/Linear/CLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js
index 622d60b2..4f04acee 100644
--- a/js/Linear/DELAYV_f.js
+++ b/js/Linear/DELAYV_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/DELAYV_f.sci" */
function DELAYV_f() {
DELAYV_f.prototype.define = function DELAYV_f() {
- nin = 1;
+ this.nin = 1;
z0 = zeros(11,1);
- zz0 = z0.slice(1-1,$-1);
- T = 1;
+ this.zz0 = z0.slice(1-1,$-1);
+ this.T = 1;
model = scicos_model();
model.sim = list("delayv",1);
- model.in1 = [[nin],[1]];
- model.out = nin;
+ model.in1 = [[this.nin],[1]];
+ model.out = this.nin;
model.evtin = 1;
model.evtout = [[1],[1]];
model.dstate = z0;
- model.rpar = T/(size(zz0,"*"));
+ model.rpar = this.T/(size(this.zz0,"*"));
model.blocktype = "d";
model.firing = [0,-1];
model.dep_ut = [true,false];
- exprs = [[string(nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(T)]];
+ 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);
return new BasicBlock(this.x);
@@ -31,30 +31,30 @@ function DELAYV_f() {
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
- nin = model.in1[1-1];
+ this.nin = model.in1[1-1];
z0 = model.dstate;
- zz0 = z0.slice(1-1,$-1);
+ this.zz0 = z0.slice(1-1,$-1);
told = z0[$-1];
while (true) {
- [ok,nin,zz0,T,exprs] = scicos_getvalue("Set delay parameters",[["Number of inputs"],["Register initial condition"],["Max delay"]],list("vec",1,"vec",-1,"vec",1),exprs);
+ [ok,this.nin,this.zz0,this.T,exprs] = scicos_getvalue("Set delay parameters",[["Number of inputs"],["Register initial condition"],["Max delay"]],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (size(zz0,"*")<2) {
+ if (size(this.zz0,"*")<2) {
message("Register length must be at least 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[[nin],[1]],nin,1,[[1],[1]]);
+ [model,graphics,ok] = check_io(model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = [[zz0.slice()],[told]];
- model.rpar = T/(size(zz0,"*"));
+ model.dstate = [[this.zz0.slice()],[told]];
+ model.rpar = this.T/(size(this.zz0,"*"));
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/DELAYV_f.pickle b/js/Linear/DELAYV_f.pickle
index 0d1dde24..561006af 100644
--- a/js/Linear/DELAYV_f.pickle
+++ b/js/Linear/DELAYV_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+aS'T'
+p4
+aS'zz0'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js
index fb07b5bf..62b730f2 100644
--- a/js/Linear/DELAY_f.js
+++ b/js/Linear/DELAY_f.js
@@ -92,16 +92,16 @@ function DELAY_f() {
evtdly_exprs = evtdly.graphics.exprs;
exprs = [[evtdly_exprs[1-1]],[register_exprs]];
while (true) {
- [ok,dt,z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],[["Discretization time step"],["Register initial state"]],list("vec",1,"vec",-1),exprs);
+ [ok,this.dt,this.z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],[["Discretization time step"],["Register initial state"]],list("vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
mess = [];
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
mess = [[mess],["Register length must be at least 1"],[" "]];
ok = false;
}
- if (dt<=0) {
+ if (this.dt<=0) {
mess = [[mess],["Discretization time step must be positive"],[" "]];
ok = false;
}
@@ -109,14 +109,14 @@ function DELAY_f() {
message(mess);
} else {
evtdly.graphics.exprs[1-1] = exprs[1-1];
- if (evtdly.model.rpar!=dt) {
- evtdly.model.rpar = dt;
+ if (evtdly.model.rpar!=this.dt) {
+ evtdly.model.rpar = this.dt;
newpar[$+1-1] = ppath[2-1];
}
this.x.model.rpar.objs[ppath[2-1]-1] = evtdly;
register.graphics.exprs = exprs[2-1];
- if (or(register.model.dstate!=z0.slice())) {
- register.model.dstate = z0.slice();
+ if (or(register.model.dstate!=this.z0.slice())) {
+ register.model.dstate = this.z0.slice();
newpar[$+1-1] = ppath[1-1];
}
this.x.model.rpar.objs[ppath[1-1]-1] = register;
diff --git a/js/Linear/DELAY_f.pickle b/js/Linear/DELAY_f.pickle
index 0d1dde24..0c851782 100644
--- a/js/Linear/DELAY_f.pickle
+++ b/js/Linear/DELAY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'z0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index 42abb23c..c8cd5202 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/DIFF_c.sci" */
function DIFF_c() {
DIFF_c.prototype.define = function DIFF_c() {
- x0 = [[0],[0]];
+ this.x0 = [[0],[0]];
model = scicos_model();
model.sim = list("diffblk_c",10004);
model.in1 = 1;
model.out = 1;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(x0[1-1]))],[strcat(sci2exp(x0[2-1]))]];
+ 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);
return new BasicBlock(this.x);
@@ -26,14 +26,14 @@ function DIFF_c() {
model = arg1.model;
while (true) {
ask_again = false;
- [ok,x0,xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- N = size(x0,"*");
- xd0 = xd0.slice();
- Nxd = size(xd0,"*");
+ this.x0 = this.x0.slice();
+ N = size(this.x0,"*");
+ this.xd0 = this.xd0.slice();
+ Nxd = size(this.xd0,"*");
if ((N!=Nxd)) {
message("Incompatible sizes: states and their derivatives should have the same size ");
ask_again = true;
@@ -44,7 +44,7 @@ function DIFF_c() {
}
if (!ask_again) {
graphics.exprs = exprs;
- model.state = [[x0],[xd0]];
+ model.state = [[this.x0],[this.xd0]];
model.out = [N];
model.in1 = N;
this.x.graphics = graphics;
diff --git a/js/Linear/DIFF_c.pickle b/js/Linear/DIFF_c.pickle
index 0d1dde24..59a4988d 100644
--- a/js/Linear/DIFF_c.pickle
+++ b/js/Linear/DIFF_c.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+aS'xd0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js
index 2b06bb91..2cb1afd8 100644
--- a/js/Linear/DLR.js
+++ b/js/Linear/DLR.js
@@ -35,16 +35,16 @@ function DLR() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/DLR.pickle b/js/Linear/DLR.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/DLR.pickle
+++ b/js/Linear/DLR.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js
index 93e2925a..9b06c9e1 100644
--- a/js/Linear/DLR_f.js
+++ b/js/Linear/DLR_f.js
@@ -35,16 +35,16 @@ function DLR_f() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/DLR_f.pickle b/js/Linear/DLR_f.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/DLR_f.pickle
+++ b/js/Linear/DLR_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js
index a8d79e8e..43fddcd5 100644
--- a/js/Linear/DLSS.js
+++ b/js/Linear/DLSS.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Linear/DLSS.sci" */
function DLSS() {
DLSS.prototype.define = function DLSS() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ 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 = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -34,25 +34,25 @@ function DLSS() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
okD = true;
- if (size(D,"*")!=size(C,1)*size(B,2)) {
- if (size(D,"*")==1) {
- D = D*ones(C*B);
- } else if (size(D,"*")==0) {
- D = zeros(C*B);
+ if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
+ if (size(this.D,"*")==1) {
+ this.D = this.D*ones(this.C*this.B);
+ } else if (size(this.D,"*")==0) {
+ this.D = zeros(this.C*this.B);
} else {
okD = false;
}
@@ -63,9 +63,9 @@ function DLSS() {
[model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
@@ -76,7 +76,7 @@ function DLSS() {
} else {
model.dep_ut = [false,false];
}
- model.dstate = x0.slice();
+ model.dstate = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/DLSS.pickle b/js/Linear/DLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/DLSS.pickle
+++ b/js/Linear/DLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js
index 5f138020..f90a3df0 100644
--- a/js/Linear/DLSS_f.js
+++ b/js/Linear/DLSS_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Linear/DLSS_f.sci" */
function DLSS_f() {
DLSS_f.prototype.define = function DLSS_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ 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 = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -34,28 +34,28 @@ function DLSS_f() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
@@ -66,7 +66,7 @@ function DLSS_f() {
} else {
model.dep_ut = [false,false];
}
- model.dstate = x0.slice();
+ model.dstate = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/DLSS_f.pickle b/js/Linear/DLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/DLSS_f.pickle
+++ b/js/Linear/DLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js
index f5b2186c..950b9b02 100644
--- a/js/Linear/DOLLAR.js
+++ b/js/Linear/DOLLAR.js
@@ -2,14 +2,14 @@
function DOLLAR() {
DOLLAR.prototype.define = function DOLLAR() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = list("dollar4",4);
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,47 +31,47 @@ function DOLLAR() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
if (!ok) {
break;
}
- out = [size(a,1),size(a,2)];
+ out = [size(this.a,1),size(this.a,2)];
if (out==0) {
out = [];
}
in1 = out;
model.sim = list("dollar4_m",4);
- model.odstate = list(a);
+ model.odstate = list(this.a);
model.dstate = [];
- if (this.type[(a)==1-1]) {
- if (isreal(a)) {
+ if (this.type[(this.a)==1-1]) {
+ if (isreal(this.a)) {
it = 1;
ot = 1;
- if ((size(a,1)==1||size(a,2)==1)) {
+ if ((size(this.a,1)==1||size(this.a,2)==1)) {
model.sim = list("dollar4",4);
- model.dstate = a.slice();
+ model.dstate = this.a.slice();
model.odstate = list();
}
} else {
it = 2;
ot = 2;
}
- } else if ((typeof(a)=="int32")) {
+ } else if ((typeof(this.a)=="int32")) {
it = 3;
ot = 3;
- } else if ((typeof(a)=="int16")) {
+ } else if ((typeof(this.a)=="int16")) {
it = 4;
ot = 4;
- } else if ((typeof(a)=="int8")) {
+ } else if ((typeof(this.a)=="int8")) {
it = 5;
ot = 5;
- } else if ((typeof(a)=="uint32")) {
+ } else if ((typeof(this.a)=="uint32")) {
it = 6;
ot = 6;
- } else if ((typeof(a)=="uint16")) {
+ } else if ((typeof(this.a)=="uint16")) {
it = 7;
ot = 7;
- } else if ((typeof(a)=="uint8")) {
+ } else if ((typeof(this.a)=="uint8")) {
it = 8;
ot = 8;
} else {
@@ -79,7 +79,7 @@ function DOLLAR() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-inh,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle
index 54a16ece..bf5abc50 100644
--- a/js/Linear/DOLLAR.pickle
+++ b/js/Linear/DOLLAR.pickle
@@ -2,10 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-aS'type'
+aS'x'
p3
-atp4
-Rp5
+aS'inh'
+p4
+aS'type'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js
index bdb02f50..a892a191 100644
--- a/js/Linear/DOLLAR_f.js
+++ b/js/Linear/DOLLAR_f.js
@@ -2,14 +2,14 @@
function DOLLAR_f() {
DOLLAR_f.prototype.define = function DOLLAR_f() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = "dollar";
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,21 +31,21 @@ function DOLLAR_f() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- out = size(a,"*");
+ out = size(this.a,"*");
if (out==0) {
out = [];
}
in1 = out;
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,-1,-1,ones(1-inh,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-1,-1,ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = a;
+ model.dstate = this.a;
model.in1 = in1;
model.out = out;
this.x.graphics = graphics;
diff --git a/js/Linear/DOLLAR_f.pickle b/js/Linear/DOLLAR_f.pickle
index 0d1dde24..c11db162 100644
--- a/js/Linear/DOLLAR_f.pickle
+++ b/js/Linear/DOLLAR_f.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'inh'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js
index 4593731b..a4c52390 100644
--- a/js/Linear/DOLLAR_m.js
+++ b/js/Linear/DOLLAR_m.js
@@ -2,14 +2,14 @@
function DOLLAR_m() {
DOLLAR_m.prototype.define = function DOLLAR_m() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = list("dollar4",4);
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,47 +31,47 @@ function DOLLAR_m() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
if (!ok) {
break;
}
- out = [size(a,1),size(a,2)];
+ out = [size(this.a,1),size(this.a,2)];
if (out==0) {
out = [];
}
in1 = out;
model.sim = list("dollar4_m",4);
- model.odstate = list(a);
+ model.odstate = list(this.a);
model.dstate = [];
- if ((this.type[a-1]==1)) {
- if (isreal(a)) {
+ if ((this.type[this.a-1]==1)) {
+ if (isreal(this.a)) {
it = 1;
ot = 1;
- if ((size(a,1)==1||size(a,2)==1)) {
+ if ((size(this.a,1)==1||size(this.a,2)==1)) {
model.sim = list("dollar4",4);
- model.dstate = a.slice();
+ model.dstate = this.a.slice();
model.odstate = list();
}
} else {
it = 2;
ot = 2;
}
- } else if ((typeof(a)=="int32")) {
+ } else if ((typeof(this.a)=="int32")) {
it = 3;
ot = 3;
- } else if ((typeof(a)=="int16")) {
+ } else if ((typeof(this.a)=="int16")) {
it = 4;
ot = 4;
- } else if ((typeof(a)=="int8")) {
+ } else if ((typeof(this.a)=="int8")) {
it = 5;
ot = 5;
- } else if ((typeof(a)=="uint32")) {
+ } else if ((typeof(this.a)=="uint32")) {
it = 6;
ot = 6;
- } else if ((typeof(a)=="uint16")) {
+ } else if ((typeof(this.a)=="uint16")) {
it = 7;
ot = 7;
- } else if ((typeof(a)=="uint8")) {
+ } else if ((typeof(this.a)=="uint8")) {
it = 8;
ot = 8;
} else {
@@ -79,7 +79,7 @@ function DOLLAR_m() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-inh,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle
index 54a16ece..bf5abc50 100644
--- a/js/Linear/DOLLAR_m.pickle
+++ b/js/Linear/DOLLAR_m.pickle
@@ -2,10 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-aS'type'
+aS'x'
p3
-atp4
-Rp5
+aS'inh'
+p4
+aS'type'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index 54f2883e..f3dc5f21 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/GAINBLK.sci" */
function GAINBLK() {
GAINBLK.prototype.define = function GAINBLK() {
- gain = 1;
+ this.gain = 1;
in1 = -1;
out = -1;
in2 = -2;
@@ -12,10 +12,10 @@ function GAINBLK() {
model.out = out;
model.in2 = in2;
model.out2 = out2;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(gain))];
+ exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,88 +34,88 @@ function GAINBLK() {
exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
- [ok,gain,over,exprs] = scicos_getvalue("Set gain block parameters",[["Gain"],["Do On Overflow(0=Nothing 1=Saturate 2=Error)"]],list("mat",[-1,-1],"vec",1),exprs);
+ [ok,this.gain,this.over,exprs] = scicos_getvalue("Set gain block parameters",[["Gain"],["Do On Overflow(0=Nothing 1=Saturate 2=Error)"]],list("mat",[-1,-1],"vec",1),exprs);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- if (typeof(gain)=="constant") {
- if (isreal(gain)) {
+ if (typeof(this.gain)=="constant") {
+ if (isreal(this.gain)) {
it = 1;
ot = 1;
model.sim = list("gainblk",4);
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
model.opar = list();
} else {
message("type is not supported");
ok = false;
}
} else {
- if ((over==0)) {
- if ((typeof(gain)=="int32")) {
+ if ((this.over==0)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32n",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16n",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8n",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32n",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16n",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8n",4);
} else {
message("type is not supported.");
ok = false;
}
- } else if ((over==1)) {
- if ((typeof(gain)=="int32")) {
+ } else if ((this.over==1)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32s",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16s",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8s",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32s",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16s",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8s",4);
} else {
message("type is not supported.");
ok = false;
}
- } else if ((over==2)) {
- if ((typeof(gain)=="int32")) {
+ } else if ((this.over==2)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32e",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16e",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8e",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32e",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16e",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8e",4);
} else {
@@ -127,10 +127,10 @@ function GAINBLK() {
ok = false;
}
model.rpar = [];
- model.opar = list(gain.slice());
+ model.opar = list(this.gain.slice());
}
if (ok) {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
if (out*in1!=1) {
[model,graphics,ok] = set_io(model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
} else {
diff --git a/js/Linear/GAINBLK.pickle b/js/Linear/GAINBLK.pickle
index 0d1dde24..d56a68c8 100644
--- a/js/Linear/GAINBLK.pickle
+++ b/js/Linear/GAINBLK.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'over'
+p3
+aS'gain'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js
index cad23a75..55f816d0 100644
--- a/js/Linear/GAINBLK_f.js
+++ b/js/Linear/GAINBLK_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Linear/GAINBLK_f.sci" */
function GAINBLK_f() {
GAINBLK_f.prototype.define = function GAINBLK_f() {
- gain = 1;
+ this.gain = 1;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = "gain";
model.in1 = in1;
model.out = out;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(gain))];
+ exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function GAINBLK_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/GAINBLK_f.pickle b/js/Linear/GAINBLK_f.pickle
index 0d1dde24..ccf9a9b1 100644
--- a/js/Linear/GAINBLK_f.pickle
+++ b/js/Linear/GAINBLK_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'gain'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js
index 5188382b..3a722b6f 100644
--- a/js/Linear/GAIN_f.js
+++ b/js/Linear/GAIN_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Linear/GAIN_f.sci" */
function GAIN_f() {
GAIN_f.prototype.define = function GAIN_f() {
- gain = 1;
+ this.gain = 1;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = "gain";
model.in1 = 1;
model.out = 1;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function GAIN_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/GAIN_f.pickle b/js/Linear/GAIN_f.pickle
index 0d1dde24..ccf9a9b1 100644
--- a/js/Linear/GAIN_f.pickle
+++ b/js/Linear/GAIN_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'gain'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 12b96030..281555c3 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/INTEGRAL.sci" */
function INTEGRAL() {
INTEGRAL.prototype.define = function INTEGRAL() {
- maxp = 1;
+ this.maxp = 1;
minp = -1;
rpar = [];
model = scicos_model();
@@ -12,7 +12,7 @@ function INTEGRAL() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[maxp],[minp]]);
+ exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.id = "1/s";
@@ -29,37 +29,37 @@ function INTEGRAL() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,reinit,satur,maxp,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);
+ [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) {
break;
}
- x0 = x0.slice();
- maxp = maxp.slice();
- lowp = lowp.slice();
- if (reinit!=0) {
- reinit = 1;
+ this.x0 = this.x0.slice();
+ this.maxp = this.maxp.slice();
+ this.lowp = this.lowp.slice();
+ if (this.reinit!=0) {
+ this.reinit = 1;
}
- if (satur!=0) {
- satur = 1;
- if (size(maxp,"*")==1) {
- maxp = maxp*ones(x0);
+ if (this.satur!=0) {
+ this.satur = 1;
+ if (size(this.maxp,"*")==1) {
+ this.maxp = this.maxp*ones(this.x0);
}
- if (size(lowp,"*")==1) {
- lowp = lowp*ones(x0);
+ if (size(this.lowp,"*")==1) {
+ this.lowp = this.lowp*ones(this.x0);
}
- if ((size(x0,1)!=size(maxp,1)||size(x0,1)!=size(lowp,1))) {
+ if ((size(this.x0,1)!=size(this.maxp,1)||size(this.x0,1)!=size(this.lowp,1))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(maxp<=lowp)) {
+ } else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(x0>maxp)||or(x0<lowp)) {
+ } else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[maxp],[lowp]];
- model.nzcross = size(x0,1);
- model.nmode = size(x0,1);
+ rpar = [[this.maxp],[this.lowp]];
+ model.nzcross = size(this.x0,1);
+ model.nmode = size(this.x0,1);
}
} else {
rpar = [];
@@ -68,8 +68,8 @@ function INTEGRAL() {
}
if (ok) {
model.rpar = rpar;
- model.state = x0;
- [model,graphics,ok] = check_io(model,graphics,size(x0,1)*[[1],[ones(reinit,1)]],size(x0,1),ones(reinit,1),[]);
+ 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),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/INTEGRAL.pickle b/js/Linear/INTEGRAL.pickle
index 0d1dde24..32ad86b3 100644
--- a/js/Linear/INTEGRAL.pickle
+++ b/js/Linear/INTEGRAL.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'maxp'
p2
-atp3
-Rp4
+aS'reinit'
+p3
+aS'satur'
+p4
+aS'lowp'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js
index 4f62850c..155617c8 100644
--- a/js/Linear/INTEGRAL_f.js
+++ b/js/Linear/INTEGRAL_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/INTEGRAL_f.sci" */
function INTEGRAL_f() {
INTEGRAL_f.prototype.define = function INTEGRAL_f() {
- x0 = 0;
+ this.x0 = 0;
model = scicos_model();
model.sim = "integr";
model.in1 = 1;
model.out = 1;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = strcat(sci2exp(x0));
+ exprs = strcat(sci2exp(this.x0));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,12 +25,12 @@ function INTEGRAL_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
+ [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 = x0;
+ model.state = this.x0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/INTEGRAL_f.pickle b/js/Linear/INTEGRAL_f.pickle
index 0d1dde24..f41d682d 100644
--- a/js/Linear/INTEGRAL_f.pickle
+++ b/js/Linear/INTEGRAL_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js
index a065917a..ba1620bc 100644
--- a/js/Linear/INTEGRAL_m.js
+++ b/js/Linear/INTEGRAL_m.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/INTEGRAL_m.sci" */
function INTEGRAL_m() {
INTEGRAL_m.prototype.define = function INTEGRAL_m() {
- maxp = 1;
+ this.maxp = 1;
minp = -1;
rpar = [];
model = scicos_model();
@@ -14,7 +14,7 @@ function INTEGRAL_m() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[maxp],[minp]]);
+ exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,61 +30,61 @@ function INTEGRAL_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,reinit,satur,maxp,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);
+ [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) {
break;
}
- if (isreal(x0)) {
+ if (isreal(this.x0)) {
Datatype = 1;
} else {
Datatype = 2;
}
- if (reinit!=0) {
- reinit = 1;
+ if (this.reinit!=0) {
+ this.reinit = 1;
}
- if (satur!=0) {
- satur = 1;
+ if (this.satur!=0) {
+ this.satur = 1;
if (Datatype==1) {
- if (size(maxp,"*")==1) {
- maxp = maxp*ones(x0);
+ if (size(this.maxp,"*")==1) {
+ this.maxp = this.maxp*ones(this.x0);
}
- if (size(lowp,"*")==1) {
- lowp = lowp*ones(x0);
+ if (size(this.lowp,"*")==1) {
+ this.lowp = this.lowp*ones(this.x0);
}
- if ((size(x0)!=size(maxp)||size(x0)!=size(lowp))) {
+ if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(maxp<=lowp)) {
+ } else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(x0>maxp)||or(x0<lowp)) {
+ } else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[real(maxp.slice())],[real(lowp.slice())]];
- model.nzcross = size(x0,"*");
- model.nmode = size(x0,"*");
+ rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
+ model.nzcross = size(this.x0,"*");
+ model.nmode = size(this.x0,"*");
}
} else if ((Datatype==2)) {
- if (size(maxp,"*")==1) {
- maxp = math.complex(maxp*ones(x0),(maxp*ones(x0)));
+ if (size(this.maxp,"*")==1) {
+ this.maxp = math.complex(this.maxp*ones(this.x0),(this.maxp*ones(this.x0)));
}
- if (size(lowp,"*")==1) {
- lowp = math.complex(lowp*ones(x0),(lowp*ones(x0)));
+ if (size(this.lowp,"*")==1) {
+ this.lowp = math.complex(this.lowp*ones(this.x0),(this.lowp*ones(this.x0)));
}
- if ((size(x0)!=size(maxp)||size(x0)!=size(lowp))) {
+ if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(real(maxp)<=real(lowp))||or(imag(maxp)<=imag(lowp))) {
+ } else if (or(real(this.maxp)<=real(this.lowp))||or(imag(this.maxp)<=imag(this.lowp))) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(real(x0)>real(maxp))||or(real(x0)<real(lowp))||or(imag(x0)>imag(maxp))||or(imag(x0)<imag(lowp))) {
+ } else if (or(real(this.x0)>real(this.maxp))||or(real(this.x0)<real(this.lowp))||or(imag(this.x0)>imag(this.maxp))||or(imag(this.x0)<imag(this.lowp))) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[real(maxp.slice())],[real(lowp.slice())],[imag(maxp.slice())],[imag(lowp.slice())]];
- model.nzcross = 2*size(x0,"*");
- model.nmode = 2*size(x0,"*");
+ 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,"*");
}
}
} else {
@@ -95,23 +95,23 @@ function INTEGRAL_m() {
if (ok) {
model.rpar = rpar;
if ((Datatype==1)) {
- model.state = real(x0.slice());
+ model.state = real(this.x0.slice());
model.sim = list("integral_func",4);
- it = [[1],[ones(reinit,1)]];
+ it = [[1],[ones(this.reinit,1)]];
ot = 1;
} else if ((Datatype==2)) {
- model.state = [[real(x0.slice())],[imag(x0.slice())]];
+ model.state = [[real(this.x0.slice())],[imag(this.x0.slice())]];
model.sim = list("integralz_func",4);
- it = [[2],[2*ones(reinit,1)]];
+ it = [[2],[2*ones(this.reinit,1)]];
ot = 2;
} else {
message("Datatype is not supported");
ok = false;
}
if (ok) {
- in1 = [size(x0,1)*[[1],[ones(reinit,1)]],size(x0,2)*[[1],[ones(reinit,1)]]];
- out = size(x0);
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(reinit,1),[]);
+ 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),[]);
}
}
if (ok) {
diff --git a/js/Linear/INTEGRAL_m.pickle b/js/Linear/INTEGRAL_m.pickle
index 0d1dde24..32ad86b3 100644
--- a/js/Linear/INTEGRAL_m.pickle
+++ b/js/Linear/INTEGRAL_m.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'maxp'
p2
-atp3
-Rp4
+aS'reinit'
+p3
+aS'satur'
+p4
+aS'lowp'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/PID.js b/js/Linear/PID.js
index d4590682..af3d8d97 100644
--- a/js/Linear/PID.js
+++ b/js/Linear/PID.js
@@ -47,7 +47,7 @@ function PID() {
PID.prototype.set = function PID() {
ppath = list(0,0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ o = arg1.model.rpar.objs[this.i-1];
if (typeof(o)=="Link") {
from = arg1.model.rpar.objs[o.from[1-1]-1];
to = arg1.model.rpar.objs[o.to[1-1]-1];
@@ -87,17 +87,17 @@ function PID() {
d_old = xx3.model.rpar;
y = 0;
while (true) {
- [ok,p,i,d,exprs0] = scicos_getvalue("Set PID parameters",[["Proportional"],["Integral"],["Derivation"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",[["Proportional"],["Integral"],["Derivation"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- xx1.graphics.exprs = exprs0[1-1];
- xx1.model.rpar = p;
- xx2.graphics.exprs = exprs0[2-1];
- xx2.model.rpar = i;
- xx3.graphics.exprs = exprs0[3-1];
- xx3.model.rpar = d;
+ xx1.graphics.exprs = this.exprs0[1-1];
+ xx1.model.rpar = this.p;
+ xx2.graphics.exprs = this.exprs0[2-1];
+ xx2.model.rpar = this.i;
+ xx3.graphics.exprs = this.exprs0[3-1];
+ xx3.model.rpar = this.d;
arg1.model.rpar.objs[ppath[1-1]-1] = xx1;
arg1.model.rpar.objs[ppath[2-1]-1] = xx2;
arg1.model.rpar.objs[ppath[3-1]-1] = xx3;
@@ -105,7 +105,7 @@ function PID() {
}
}
needcompile = 0;
- if (!(p_old==p&&i_old==i&&d_old==d)) {
+ if (!(p_old==this.p&&i_old==this.i&&d_old==this.d)) {
newpar[size(newpar)+1-1] = ppath[1-1];
newpar[size(newpar)+1-1] = ppath[2-1];
newpar[size(newpar)+1-1] = ppath[3-1];
diff --git a/js/Linear/PID.pickle b/js/Linear/PID.pickle
index 0d1dde24..4a58e5bc 100644
--- a/js/Linear/PID.pickle
+++ b/js/Linear/PID.pickle
@@ -2,8 +2,16 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'i'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'exprs0'
+p4
+aS'd'
+p5
+aS'p'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js
index 2dac88e7..6abd8f6d 100644
--- a/js/Linear/REGISTER.js
+++ b/js/Linear/REGISTER.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Linear/REGISTER.sci" */
function REGISTER() {
REGISTER.prototype.define = function REGISTER() {
- z0 = zeros(10,1);
+ this.z0 = zeros(10,1);
model = scicos_model();
model.sim = list("delay4",4);
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(string(z0),";");
+ exprs = strcat(string(this.z0),";");
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,48 +29,48 @@ function REGISTER() {
exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
- [ok,z0,it,exprs] = scicos_getvalue("Set delay parameters",[["Register initial condition"],["Datatype (1=double 3=int32 ...)"]],list("vec",-1,"vec",1),exprs);
+ [ok,this.z0,this.it,exprs] = scicos_getvalue("Set delay parameters",[["Register initial condition"],["Datatype (1=double 3=int32 ...)"]],list("vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
ok = false;
}
- if (it==1) {
+ if (this.it==1) {
model.sim = list("delay4",4);
- z0 = double(z0);
- model.dstate = z0;
+ this.z0 = double(this.z0);
+ model.dstate = this.z0;
model.odstate = list();
} else {
- if (it==3) {
+ if (this.it==3) {
model.sim = list("delay4_i32",4);
- z0 = int32(z0);
- } else if (it==4) {
+ this.z0 = int32(this.z0);
+ } else if (this.it==4) {
model.sim = list("delay4_i16",4);
- z0 = int16(z0);
- } else if (it==5) {
+ this.z0 = int16(this.z0);
+ } else if (this.it==5) {
model.sim = list("delay4_i8",4);
- z0 = int8(z0);
- } else if (it==6) {
+ this.z0 = int8(this.z0);
+ } else if (this.it==6) {
model.sim = list("delay4_ui32",4);
- z0 = uint32(z0);
- } else if (it==7) {
+ this.z0 = uint32(this.z0);
+ } else if (this.it==7) {
model.sim = list("delay4_ui16",4);
- z0 = uint16(z0);
- } else if (it==8) {
+ this.z0 = uint16(this.z0);
+ } else if (this.it==8) {
model.sim = list("delay4_ui8",4);
- z0 = uint8(z0);
+ this.z0 = uint8(this.z0);
} else {
message("Datatype is not supported");
ok = false;
}
- model.odstate = list(z0);
+ model.odstate = list(this.z0);
model.dstate = [];
}
if (ok) {
in1 = [1,1];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/REGISTER.pickle b/js/Linear/REGISTER.pickle
index 0d1dde24..70e1e426 100644
--- a/js/Linear/REGISTER.pickle
+++ b/js/Linear/REGISTER.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'it'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js
index 9297f41b..7b00bd94 100644
--- a/js/Linear/REGISTER_f.js
+++ b/js/Linear/REGISTER_f.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Linear/REGISTER_f.sci" */
function REGISTER_f() {
REGISTER_f.prototype.define = function REGISTER_f() {
- z0 = zeros(10,1);
+ this.z0 = zeros(10,1);
model = scicos_model();
model.sim = "delay";
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(string(z0),";");
+ exprs = strcat(string(this.z0),";");
gr_i = [];
this.x = standard_define([2.5,2.5],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,17 +26,17 @@ function REGISTER_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
+ [ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
if (!ok) {
break;
}
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/REGISTER_f.pickle b/js/Linear/REGISTER_f.pickle
index 0d1dde24..105f5da0 100644
--- a/js/Linear/REGISTER_f.pickle
+++ b/js/Linear/REGISTER_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index 7b2c360e..11d99bd0 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -29,17 +29,17 @@ function SAMPHOLD_m() {
label = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
+ [ok,this.it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
if (!ok) {
break;
}
- if (((it<1)||(it>8))) {
+ if (((this.it<1)||(this.it>8))) {
message("Datatype is not supported");
ok = false;
}
if (ok) {
in1 = [model.in1,model.in2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
if (ok) {
graphics.exprs = exprs;
arg1.graphics = graphics;
diff --git a/js/Linear/SAMPHOLD_m.pickle b/js/Linear/SAMPHOLD_m.pickle
index 0d1dde24..35103638 100644
--- a/js/Linear/SAMPHOLD_m.pickle
+++ b/js/Linear/SAMPHOLD_m.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'it'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js
index 1b2a2efb..b6df0e3d 100644
--- a/js/Linear/SUMMATION.js
+++ b/js/Linear/SUMMATION.js
@@ -1,20 +1,20 @@
/* autogenerated from "macros/Linear/SUMMATION.sci" */
function SUMMATION() {
SUMMATION.prototype.define = function SUMMATION() {
- sgn = [[1],[-1]];
+ 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 = sgn;
+ model.ipar = this.sgn;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = sci2exp(sgn);
+ exprs = sci2exp(this.sgn);
gr_i = [];
this.x = standard_define([2,3],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new Summation(this.x);
}
SUMMATION.prototype.details = function SUMMATION() {
return this.x;
@@ -32,93 +32,93 @@ function SUMMATION() {
exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
- [ok,Datatype,sgn,satur,exprs] = scicos_getvalue("Set sum block parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["Number of inputs or sign vector (of +1, -1)"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",-1,"vec",1),exprs);
+ [ok,this.Datatype,this.sgn,this.satur,exprs] = scicos_getvalue("Set sum block parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["Number of inputs or sign vector (of +1, -1)"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- sgn = sgn.slice();
- if ((satur!=0&&satur!=1&&satur!=2)) {
+ this.sgn = this.sgn.slice();
+ if ((this.satur!=0&&this.satur!=1&&this.satur!=2)) {
message("Do on overflow must be 0,1,2");
ok = false;
}
- if (size(sgn,1)==1) {
- if (sgn<1) {
+ if (size(this.sgn,1)==1) {
+ if (this.sgn<1) {
message("Number of inputs must be > 0");
ok = false;
- } else if (sgn==1) {
+ } else if (this.sgn==1) {
in1 = -1;
in2 = -2;
- sgn = [];
+ this.sgn = [];
nout = 1;
nout2 = 1;
} else {
- in1 = -ones(sgn,1);
+ in1 = -ones(this.sgn,1);
in2 = 2*in1;
- sgn = ones(sgn,1);
+ this.sgn = ones(this.sgn,1);
nout = -1;
nout2 = -2;
}
} else {
- if (!and(abs(sgn)==1)) {
+ if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
ok = false;
} else {
- in1 = -ones(size(sgn,1),1);
+ in1 = -ones(size(this.sgn,1),1);
in2 = 2*in1;
nout = -1;
nout2 = -2;
}
}
- it = Datatype*ones(1,size(in1,1));
- ot = Datatype;
- if (Datatype==1) {
+ it = this.Datatype*ones(1,size(in1,1));
+ ot = this.Datatype;
+ if (this.Datatype==1) {
model.sim = list("summation",4);
- } else if (Datatype==2) {
+ } else if (this.Datatype==2) {
model.sim = list("summation_z",4);
- } else if (((Datatype<1)||(Datatype>8))) {
+ } else if (((this.Datatype<1)||(this.Datatype>8))) {
message("Datatype is not supported");
ok = false;
} else {
- if (satur==0) {
- if (Datatype==3) {
+ if (this.satur==0) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32n",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16n",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8n",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32n",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16n",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8n",4);
}
- } else if (satur==1) {
- if (Datatype==3) {
+ } else if (this.satur==1) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32s",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16s",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8s",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32s",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16s",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8s",4);
}
- } else if (satur==2) {
- if (Datatype==3) {
+ } else if (this.satur==2) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32e",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16e",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8e",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32e",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16e",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8e",4);
}
}
@@ -127,14 +127,14 @@ function SUMMATION() {
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
}
if (ok) {
- model.rpar = satur;
- model.ipar = sgn;
+ model.rpar = this.satur;
+ model.ipar = this.sgn;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new Summation(this.x);
}
}
diff --git a/js/Linear/SUMMATION.pickle b/js/Linear/SUMMATION.pickle
index 0d1dde24..34bf1982 100644
--- a/js/Linear/SUMMATION.pickle
+++ b/js/Linear/SUMMATION.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'satur'
+p4
+aS'sgn'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js
index 4d7dfc72..de30ee06 100644
--- a/js/Linear/TCLSS.js
+++ b/js/Linear/TCLSS.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Linear/TCLSS.sci" */
function TCLSS() {
TCLSS.prototype.define = function TCLSS() {
- x0 = 0;
- A = 0;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = 0;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
- nx = size(x0,"*");
+ 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 = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -37,28 +37,28 @@ function TCLSS() {
exprs = exprs[[1:4,7]-1];
}
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -69,9 +69,9 @@ function TCLSS() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
- if (D!=[]) {
+ if (this.D!=[]) {
model.sim = list("tcslti4",4);
} else {
model.sim = list("tcsltj4",4);
diff --git a/js/Linear/TCLSS.pickle b/js/Linear/TCLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/TCLSS.pickle
+++ b/js/Linear/TCLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js
index 95a6d6bb..8261306c 100644
--- a/js/Linear/TCLSS_f.js
+++ b/js/Linear/TCLSS_f.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Linear/TCLSS_f.sci" */
function TCLSS_f() {
TCLSS_f.prototype.define = function TCLSS_f() {
- x0 = 0;
- A = 0;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = 0;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
- nx = size(x0,"*");
+ 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 = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ 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];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ 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);
return new BasicBlock(this.x);
@@ -37,28 +37,28 @@ function TCLSS_f() {
exprs = exprs[[1:4,7]-1];
}
while (true) {
- [ok,A,B,C,D,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);
+ [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) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -69,9 +69,9 @@ function TCLSS_f() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
- if (D!=[]) {
+ if (this.D!=[]) {
model.sim = list("tcslti",1);
} else {
model.sim = list("tcsltj",1);
diff --git a/js/Linear/TCLSS_f.pickle b/js/Linear/TCLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/TCLSS_f.pickle
+++ b/js/Linear/TCLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index d90a39e1..47984ef6 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -2,18 +2,18 @@
function TIME_DELAY() {
TIME_DELAY.prototype.define = function TIME_DELAY() {
nin = 1;
- T = 1;
- init = 0;
- N = 1024;
+ 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 = [T,init];
- model.ipar = N;
+ model.rpar = [this.T,this.init];
+ model.ipar = this.N;
model.blocktype = "x";
model.dep_ut = [false,true];
- exprs = [[string(T)],[string(init)],[string(N)]];
+ exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
this.x = standard_define([3.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,15 +30,15 @@ function TIME_DELAY() {
model = arg1.model;
nin = model.in1[1-1];
while (true) {
- [ok,T,init,N,exprs] = scicos_getvalue("Set delay parameters",[["Delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [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) {
break;
}
- if (N<2) {
+ if (this.N<2) {
message("Buffer must be larger than 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
@@ -47,8 +47,8 @@ function TIME_DELAY() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[T],[init]];
- model.ipar = N;
+ model.rpar = [[this.T],[this.init]];
+ model.ipar = this.N;
model.dep_ut = [false,true];
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/TIME_DELAY.pickle b/js/Linear/TIME_DELAY.pickle
index 0d1dde24..07e46564 100644
--- a/js/Linear/TIME_DELAY.pickle
+++ b/js/Linear/TIME_DELAY.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'T'
+p4
+aS'N'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js
index 047aa265..e90443a8 100644
--- a/js/Linear/VARIABLE_DELAY.js
+++ b/js/Linear/VARIABLE_DELAY.js
@@ -2,18 +2,18 @@
function VARIABLE_DELAY() {
VARIABLE_DELAY.prototype.define = function VARIABLE_DELAY() {
nin = 1;
- T = 1;
- init = 0;
- N = 1024;
+ 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 = [T,init];
- model.ipar = N;
+ model.rpar = [this.T,this.init];
+ model.ipar = this.N;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(T)],[string(init)],[string(N)]];
+ exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,15 +30,15 @@ function VARIABLE_DELAY() {
model = arg1.model;
nin = model.in1[1-1];
while (true) {
- [ok,T,init,N,exprs] = scicos_getvalue("Set delay parameters",[["Max delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [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) {
break;
}
- if (N<2) {
+ if (this.N<2) {
message("Buffer must be larger than 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
@@ -47,8 +47,8 @@ function VARIABLE_DELAY() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[T],[init]];
- model.ipar = N;
+ model.rpar = [[this.T],[this.init]];
+ model.ipar = this.N;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/VARIABLE_DELAY.pickle b/js/Linear/VARIABLE_DELAY.pickle
index 0d1dde24..07e46564 100644
--- a/js/Linear/VARIABLE_DELAY.pickle
+++ b/js/Linear/VARIABLE_DELAY.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'T'
+p4
+aS'N'
+p5
+atp6
+Rp7
. \ No newline at end of file