summaryrefslogtreecommitdiff
path: root/js/Linear
diff options
context:
space:
mode:
Diffstat (limited to 'js/Linear')
-rw-r--r--js/Linear/BIGSOM_f.js13
-rw-r--r--js/Linear/BIGSOM_f.pickle16
-rw-r--r--js/Linear/CLINDUMMY_f.js4
-rw-r--r--js/Linear/CLINDUMMY_f.pickle10
-rw-r--r--js/Linear/CLR.js13
-rw-r--r--js/Linear/CLR.pickle14
-rw-r--r--js/Linear/CLR_f.js13
-rw-r--r--js/Linear/CLR_f.pickle14
-rw-r--r--js/Linear/CLSS.js17
-rw-r--r--js/Linear/CLSS.pickle16
-rw-r--r--js/Linear/CLSS_f.js17
-rw-r--r--js/Linear/CLSS_f.pickle16
-rw-r--r--js/Linear/DELAYV_f.js13
-rw-r--r--js/Linear/DELAYV_f.pickle16
-rw-r--r--js/Linear/DELAY_f.js9
-rw-r--r--js/Linear/DELAY_f.pickle18
-rw-r--r--js/Linear/DERIV.js6
-rw-r--r--js/Linear/DERIV.pickle10
-rw-r--r--js/Linear/DIFF_c.js13
-rw-r--r--js/Linear/DIFF_c.pickle18
-rw-r--r--js/Linear/DLR.js13
-rw-r--r--js/Linear/DLR.pickle14
-rw-r--r--js/Linear/DLR_f.js13
-rw-r--r--js/Linear/DLR_f.pickle14
-rw-r--r--js/Linear/DLSS.js17
-rw-r--r--js/Linear/DLSS.pickle16
-rw-r--r--js/Linear/DLSS_f.js17
-rw-r--r--js/Linear/DLSS_f.pickle16
-rw-r--r--js/Linear/DOLLAR.js17
-rw-r--r--js/Linear/DOLLAR.pickle18
-rw-r--r--js/Linear/DOLLAR_f.js17
-rw-r--r--js/Linear/DOLLAR_f.pickle12
-rw-r--r--js/Linear/DOLLAR_m.js17
-rw-r--r--js/Linear/DOLLAR_m.pickle18
-rw-r--r--js/Linear/GAINBLK.js17
-rw-r--r--js/Linear/GAINBLK.pickle14
-rw-r--r--js/Linear/GAINBLK_f.js13
-rw-r--r--js/Linear/GAINBLK_f.pickle12
-rw-r--r--js/Linear/GAIN_f.js13
-rw-r--r--js/Linear/GAIN_f.pickle12
-rw-r--r--js/Linear/INTEGRAL.js13
-rw-r--r--js/Linear/INTEGRAL.pickle20
-rw-r--r--js/Linear/INTEGRAL_f.js13
-rw-r--r--js/Linear/INTEGRAL_f.pickle16
-rw-r--r--js/Linear/INTEGRAL_m.js13
-rw-r--r--js/Linear/INTEGRAL_m.pickle20
-rw-r--r--js/Linear/PID.js12
-rw-r--r--js/Linear/PID.pickle20
-rw-r--r--js/Linear/REGISTER.js17
-rw-r--r--js/Linear/REGISTER.pickle18
-rw-r--r--js/Linear/REGISTER_f.js13
-rw-r--r--js/Linear/REGISTER_f.pickle16
-rw-r--r--js/Linear/SAMPHOLD.js4
-rw-r--r--js/Linear/SAMPHOLD.pickle10
-rw-r--r--js/Linear/SAMPHOLD_m.js9
-rw-r--r--js/Linear/SAMPHOLD_m.pickle14
-rw-r--r--js/Linear/SAMPLEHOLD_f.js4
-rw-r--r--js/Linear/SAMPLEHOLD_f.pickle10
-rw-r--r--js/Linear/SOM_f.js18
-rw-r--r--js/Linear/SOM_f.pickle10
-rw-r--r--js/Linear/SUMMATION.js21
-rw-r--r--js/Linear/SUMMATION.pickle18
-rw-r--r--js/Linear/SUM_f.js6
-rw-r--r--js/Linear/SUM_f.pickle10
-rw-r--r--js/Linear/TCLSS.js17
-rw-r--r--js/Linear/TCLSS.pickle16
-rw-r--r--js/Linear/TCLSS_f.js17
-rw-r--r--js/Linear/TCLSS_f.pickle16
-rw-r--r--js/Linear/TIME_DELAY.js13
-rw-r--r--js/Linear/TIME_DELAY.pickle18
-rw-r--r--js/Linear/VARIABLE_DELAY.js13
-rw-r--r--js/Linear/VARIABLE_DELAY.pickle18
72 files changed, 604 insertions, 415 deletions
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js
index 81ce262a..2305b2bc 100644
--- a/js/Linear/BIGSOM_f.js
+++ b/js/Linear/BIGSOM_f.js
@@ -9,9 +9,9 @@ function BIGSOM_f() {
this.model.rpar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = sci2exp(this.sgn);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BIGSOM_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,3],this.model,exprs,gr_i);
+ this.exprs = sci2exp(this.sgn);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BIGSOM_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,3],this.model,this.exprs,this.gr_i);
return new BigSom(this.x);
}
BIGSOM_f.prototype.details = function BIGSOM_f() {
@@ -24,12 +24,13 @@ function BIGSOM_f() {
}
BIGSOM_f.prototype.set = function BIGSOM_f() {
this.sgn = inverse(arguments[0]["sgn"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
this.model = arg1.model;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
while (true) {
- [ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
+ [ok,this.sgn,this.exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -40,7 +41,7 @@ function BIGSOM_f() {
var ok = tmpvar0[2];
if (ok) {
this.model.rpar = new ScilabDouble(this.sgn.slice());
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/BIGSOM_f.pickle b/js/Linear/BIGSOM_f.pickle
index dab5333b..8b298173 100644
--- a/js/Linear/BIGSOM_f.pickle
+++ b/js/Linear/BIGSOM_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'graphics'
p2
-aS'model'
+aS'exprs'
p3
-aS'sgn'
+aS'gr_i'
p4
-aS'graphics'
+aS'sgn'
p5
-atp6
-Rp7
+aS'x'
+p6
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'sgn'
p1
diff --git a/js/Linear/CLINDUMMY_f.js b/js/Linear/CLINDUMMY_f.js
index 13b249d4..ff8a9769 100644
--- a/js/Linear/CLINDUMMY_f.js
+++ b/js/Linear/CLINDUMMY_f.js
@@ -8,8 +8,8 @@ function CLINDUMMY_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabDouble([]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLINDUMMY_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,[],gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLINDUMMY_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,[],this.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 90b6cfdc..3927fc87 100644
--- a/js/Linear/CLINDUMMY_f.pickle
+++ b/js/Linear/CLINDUMMY_f.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js
index d48d4a76..0ae65202 100644
--- a/js/Linear/CLR.js
+++ b/js/Linear/CLR.js
@@ -6,7 +6,7 @@ function CLR() {
var B = 1;
var C = 1;
var D = 0;
- var exprs = [["1"],["1+s"]];
+ this.exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -15,8 +15,8 @@ function CLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLR\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLR\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
CLR.prototype.details = function CLR() {
@@ -32,9 +32,10 @@ function CLR() {
CLR.prototype.set = function CLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var x0 = this.model.state;
var rpar = this.model.rpar;
@@ -44,7 +45,7 @@ function CLR() {
var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),this.exprs);
if (!ok) {
break;
}
@@ -59,7 +60,7 @@ function CLR() {
var B = tmpvar0[1];
var C = tmpvar0[2];
var D = tmpvar0[3];
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var tmpvar1 = size(A);
var ns1 = tmpvar1[0];
var ns1 = tmpvar1[1];
diff --git a/js/Linear/CLR.pickle b/js/Linear/CLR.pickle
index 26e70f19..b567f246 100644
--- a/js/Linear/CLR.pickle
+++ b/js/Linear/CLR.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'num'
p2
-aS'model'
+aS'exprs'
p3
-aS'num'
+aS'gr_i'
p4
aS'den'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js
index e567e751..b18af850 100644
--- a/js/Linear/CLR_f.js
+++ b/js/Linear/CLR_f.js
@@ -6,7 +6,7 @@ function CLR_f() {
var B = 1;
var C = 1;
var D = 0;
- var exprs = [["1"],["1+s"]];
+ this.exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([1]);
@@ -15,8 +15,8 @@ function CLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLR_f\",sz(1),sz(2));"]);
- this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLR_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2.5,2.5],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
CLR_f.prototype.details = function CLR_f() {
@@ -32,9 +32,10 @@ function CLR_f() {
CLR_f.prototype.set = function CLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var x0 = this.model.state;
var rpar = this.model.rpar;
@@ -44,7 +45,7 @@ function CLR_f() {
var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),this.exprs);
if (!ok) {
break;
}
@@ -59,7 +60,7 @@ function CLR_f() {
var B = tmpvar0[1];
var C = tmpvar0[2];
var D = tmpvar0[3];
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var tmpvar1 = size(A);
var ns1 = tmpvar1[0];
var ns1 = tmpvar1[1];
diff --git a/js/Linear/CLR_f.pickle b/js/Linear/CLR_f.pickle
index 26e70f19..b567f246 100644
--- a/js/Linear/CLR_f.pickle
+++ b/js/Linear/CLR_f.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'num'
p2
-aS'model'
+aS'exprs'
p3
-aS'num'
+aS'gr_i'
p4
aS'den'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js
index a5c78f5c..c3aa0444 100644
--- a/js/Linear/CLSS.js
+++ b/js/Linear/CLSS.js
@@ -16,9 +16,9 @@ function CLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLSS\",sz(1),sz(2));"]);
- this.x = standard_define([4,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLSS\",sz(1),sz(2));"]);
+ this.x = standard_define([4,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
CLSS.prototype.details = function CLSS() {
@@ -40,15 +40,16 @@ function CLSS() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -81,7 +82,7 @@ function CLSS() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/CLSS.pickle b/js/Linear/CLSS.pickle
index fd7725aa..67df1cc8 100644
--- a/js/Linear/CLSS.pickle
+++ b/js/Linear/CLSS.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js
index df05e986..f1fd411b 100644
--- a/js/Linear/CLSS_f.js
+++ b/js/Linear/CLSS_f.js
@@ -16,9 +16,9 @@ function CLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLSS_f\",sz(1),sz(2));"]);
- this.x = standard_define([4,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CLSS_f\",sz(1),sz(2));"]);
+ this.x = standard_define([4,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
CLSS_f.prototype.details = function CLSS_f() {
@@ -40,15 +40,16 @@ function CLSS_f() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -71,7 +72,7 @@ function CLSS_f() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/CLSS_f.pickle b/js/Linear/CLSS_f.pickle
index 1746730e..5888cbdb 100644
--- a/js/Linear/CLSS_f.pickle
+++ b/js/Linear/CLSS_f.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js
index db1fe8e8..4aaadbfd 100644
--- a/js/Linear/DELAYV_f.js
+++ b/js/Linear/DELAYV_f.js
@@ -16,9 +16,9 @@ function DELAYV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([0,-1]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DELAYV_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DELAYV_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DELAYV_f.prototype.details = function DELAYV_f() {
@@ -36,16 +36,17 @@ function DELAYV_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.zz0 = inverse(arguments[0]["zz0"])
this.T = parseFloat(arguments[0]["T"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
this.nin = this.model.in1[1-1];
var z0 = this.model.dstate;
this.zz0 = z0.slice(1-1,$-1);
var told = z0[$-1];
while (true) {
- [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);
+ [ok,this.nin,this.zz0,this.T,this.exprs] = scicos_getvalue("Set delay parameters",["Number of inputs","Register initial condition","Max delay"],list("vec",1,"vec",-1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -64,7 +65,7 @@ function DELAYV_f() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.dstate = new ScilabDouble([this.zz0.slice()],[told]);
this.model.rpar = new ScilabDouble([this.T/(size(this.zz0,"*"))]);
this.x.graphics = this.graphics;
diff --git a/js/Linear/DELAYV_f.pickle b/js/Linear/DELAYV_f.pickle
index b7b3bf9b..ab2cd3e7 100644
--- a/js/Linear/DELAYV_f.pickle
+++ b/js/Linear/DELAYV_f.pickle
@@ -6,16 +6,20 @@ S'nin'
p2
aS'zz0'
p3
-aS'T'
+aS'exprs'
p4
-aS'graphics'
+aS'gr_i'
p5
-aS'x'
+aS'T'
p6
-aS'model'
+aS'graphics'
p7
-atp8
-Rp9
+aS'x'
+p8
+aS'model'
+p9
+atp10
+Rp11
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js
index dad5fa7c..c80050dc 100644
--- a/js/Linear/DELAY_f.js
+++ b/js/Linear/DELAY_f.js
@@ -78,6 +78,7 @@ function DELAY_f() {
DELAY_f.prototype.set = function DELAY_f() {
this.dt = arguments[0]["dt"]
this.z0 = arguments[0]["z0"]
+ this.exprs = inverse(arguments[0]["exprs"])
var ppath = list(0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
var o = arg1.model.rpar.objs[i-1];
@@ -97,9 +98,9 @@ function DELAY_f() {
var evtdly = this.x.model.rpar.objs[ppath[2-1]-1];
var register_exprs = register.graphics.exprs;
var evtdly_exprs = evtdly.graphics.exprs;
- var exprs = [[evtdly_exprs[1-1]],[register_exprs]];
+ this.exprs = [[evtdly_exprs[1-1]],[register_exprs]];
while (true) {
- [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);
+ [ok,this.dt,this.z0,this.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),this.exprs);
if (!ok) {
break;
}
@@ -115,13 +116,13 @@ function DELAY_f() {
if (!ok) {
message(mess);
} else {
- evtdly.graphics.exprs[1-1] = exprs[1-1];
+ evtdly.graphics.exprs[1-1] = this.exprs[1-1];
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];
+ register.graphics.exprs = this.exprs[2-1];
if (or(register.model.dstate!=this.z0.slice())) {
register.model.dstate = this.z0.slice();
newpar[$+1-1] = ppath[1-1];
diff --git a/js/Linear/DELAY_f.pickle b/js/Linear/DELAY_f.pickle
index 43dbf30a..ecc140bb 100644
--- a/js/Linear/DELAY_f.pickle
+++ b/js/Linear/DELAY_f.pickle
@@ -2,14 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'exprs'
p2
-aS'dt'
+aS'gr_i'
p3
-aS'z0'
+aS'graphics'
p4
-atp5
-Rp6
+aS'x'
+p5
+aS'model'
+p6
+aS'z0'
+p7
+aS'dt'
+p8
+atp9
+Rp10
.(dp0
S'diagram.objs[1-1]'
p1
diff --git a/js/Linear/DERIV.js b/js/Linear/DERIV.js
index 4809a060..afac05d0 100644
--- a/js/Linear/DERIV.js
+++ b/js/Linear/DERIV.js
@@ -7,9 +7,9 @@ function DERIV() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DERIV\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DERIV\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.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 2cad4c23..53cb8de0 100644
--- a/js/Linear/DERIV.pickle
+++ b/js/Linear/DERIV.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index 0583cc59..10147a4d 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -9,9 +9,9 @@ function DIFF_c() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DIFF_c\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DIFF_c\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DIFF_c.prototype.details = function DIFF_c() {
@@ -27,13 +27,14 @@ function DIFF_c() {
DIFF_c.prototype.set = function DIFF_c() {
this.x0 = inverse(arguments[0]["x0"])
this.xd0 = inverse(arguments[0]["xd0"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
var 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);
+ [ok,this.x0,this.xd0,this.exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -50,7 +51,7 @@ function DIFF_c() {
var ask_again = true;
}
if (!ask_again) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.state = new ScilabDouble([this.x0],[this.xd0]);
this.model.out = new ScilabDouble([N]);
this.model.in1 = new ScilabDouble([N]);
diff --git a/js/Linear/DIFF_c.pickle b/js/Linear/DIFF_c.pickle
index 89e4ed9e..74c91b8e 100644
--- a/js/Linear/DIFF_c.pickle
+++ b/js/Linear/DIFF_c.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'xd0'
p2
-aS'model'
+aS'exprs'
p3
-aS'xd0'
+aS'gr_i'
p4
-aS'x0'
-p5
aS'graphics'
+p5
+aS'x'
p6
-atp7
-Rp8
+aS'model'
+p7
+aS'x0'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js
index 3ca9726f..cc77c067 100644
--- a/js/Linear/DLR.js
+++ b/js/Linear/DLR.js
@@ -6,7 +6,7 @@ function DLR() {
var B = 1;
var C = 1;
var D = 0;
- var exprs = [["1"],["1+z"]];
+ this.exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dsslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -16,8 +16,8 @@ function DLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLR\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLR\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DLR.prototype.details = function DLR() {
@@ -33,16 +33,17 @@ function DLR() {
DLR.prototype.set = function DLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var x0 = this.model.dstate;
var ns = prod(size(x0));
var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),this.exprs);
if (!ok) {
break;
}
@@ -57,7 +58,7 @@ function DLR() {
var B = tmpvar0[1];
var C = tmpvar0[2];
var D = tmpvar0[3];
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var tmpvar1 = size(A);
var ns1 = tmpvar1[0];
var ns1 = tmpvar1[1];
diff --git a/js/Linear/DLR.pickle b/js/Linear/DLR.pickle
index fb9f58b1..486f8c81 100644
--- a/js/Linear/DLR.pickle
+++ b/js/Linear/DLR.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'num'
p2
-aS'model'
+aS'exprs'
p3
-aS'num'
+aS'gr_i'
p4
aS'den'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js
index c19a22cc..6cfe981b 100644
--- a/js/Linear/DLR_f.js
+++ b/js/Linear/DLR_f.js
@@ -6,7 +6,7 @@ function DLR_f() {
var B = 1;
var C = 1;
var D = 0;
- var exprs = [["1"],["1+z"]];
+ this.exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = new ScilabString(["dsslti"]);
this.model.in1 = new ScilabDouble([1]);
@@ -16,8 +16,8 @@ function DLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLR_f\",sz(1),sz(2));"]);
- this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLR_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2.5,2.5],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DLR_f.prototype.details = function DLR_f() {
@@ -33,16 +33,17 @@ function DLR_f() {
DLR_f.prototype.set = function DLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var x0 = this.model.dstate;
var ns = prod(size(x0));
var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,this.exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),this.exprs);
if (!ok) {
break;
}
@@ -57,7 +58,7 @@ function DLR_f() {
var B = tmpvar0[1];
var C = tmpvar0[2];
var D = tmpvar0[3];
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var tmpvar1 = size(A);
var ns1 = tmpvar1[0];
var ns1 = tmpvar1[1];
diff --git a/js/Linear/DLR_f.pickle b/js/Linear/DLR_f.pickle
index 78175358..77ebf7e1 100644
--- a/js/Linear/DLR_f.pickle
+++ b/js/Linear/DLR_f.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'num'
p2
-aS'model'
+aS'exprs'
p3
-aS'num'
+aS'gr_i'
p4
aS'den'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js
index 10a7659b..da2bcd88 100644
--- a/js/Linear/DLSS.js
+++ b/js/Linear/DLSS.js
@@ -15,9 +15,9 @@ function DLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLSS\",sz(1),sz(2));"]);
- this.x = standard_define([4,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLSS\",sz(1),sz(2));"]);
+ this.x = standard_define([4,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DLSS.prototype.details = function DLSS() {
@@ -39,15 +39,16 @@ function DLSS() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -80,7 +81,7 @@ function DLSS() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/DLSS.pickle b/js/Linear/DLSS.pickle
index 00de4180..eb7fb836 100644
--- a/js/Linear/DLSS.pickle
+++ b/js/Linear/DLSS.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js
index 5adc3864..1d9f045e 100644
--- a/js/Linear/DLSS_f.js
+++ b/js/Linear/DLSS_f.js
@@ -15,9 +15,9 @@ function DLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLSS_f\",sz(1),sz(2));"]);
- this.x = standard_define([4,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLSS_f\",sz(1),sz(2));"]);
+ this.x = standard_define([4,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DLSS_f.prototype.details = function DLSS_f() {
@@ -39,15 +39,16 @@ function DLSS_f() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -70,7 +71,7 @@ function DLSS_f() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/DLSS_f.pickle b/js/Linear/DLSS_f.pickle
index d32ef081..d909374f 100644
--- a/js/Linear/DLSS_f.pickle
+++ b/js/Linear/DLSS_f.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js
index aa9123cb..a67e959d 100644
--- a/js/Linear/DOLLAR.js
+++ b/js/Linear/DOLLAR.js
@@ -4,7 +4,7 @@ function DOLLAR() {
var z = 0;
this.inh = 0;
var in1 = 1;
- var exprs = string([[z],[this.inh]]);
+ this.exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -13,8 +13,8 @@ function DOLLAR() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DOLLAR.prototype.details = function DOLLAR() {
@@ -30,15 +30,16 @@ function DOLLAR() {
DOLLAR.prototype.set = function DOLLAR() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")<2) {
- exprs[2-1] = "0";
+ if (size(this.exprs,"*")<2) {
+ this.exprs[2-1] = "0";
}
while (true) {
- [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);
+ [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("mat",[-1,-2],"vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -92,7 +93,7 @@ function DOLLAR() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle
index 3b29c2b1..70bb77cf 100644
--- a/js/Linear/DOLLAR.pickle
+++ b/js/Linear/DOLLAR.pickle
@@ -4,18 +4,22 @@ p0
((lp1
S'a'
p2
-aS'inh'
+aS'exprs'
p3
-aS'graphics'
+aS'gr_i'
p4
-aS'x'
+aS'inh'
p5
-aS'model'
+aS'graphics'
p6
-aS'type'
+aS'x'
p7
-atp8
-Rp9
+aS'model'
+p8
+aS'type'
+p9
+atp10
+Rp11
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js
index b817ecc4..ec558ae4 100644
--- a/js/Linear/DOLLAR_f.js
+++ b/js/Linear/DOLLAR_f.js
@@ -4,7 +4,7 @@ function DOLLAR_f() {
var z = 0;
this.inh = 0;
var in1 = 1;
- var exprs = string([[z],[this.inh]]);
+ this.exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = new ScilabString(["dollar"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -13,8 +13,8 @@ function DOLLAR_f() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DOLLAR_f.prototype.details = function DOLLAR_f() {
@@ -30,15 +30,16 @@ function DOLLAR_f() {
DOLLAR_f.prototype.set = function DOLLAR_f() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")<2) {
- exprs[2-1] = "0";
+ if (size(this.exprs,"*")<2) {
+ this.exprs[2-1] = "0";
}
while (true) {
- [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);
+ [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("vec",-1,"vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -54,7 +55,7 @@ function DOLLAR_f() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.dstate = new ScilabDouble([this.a]);
this.model.in1 = new ScilabDouble(in1);
this.model.out = new ScilabDouble(out);
diff --git a/js/Linear/DOLLAR_f.pickle b/js/Linear/DOLLAR_f.pickle
index 2d4dde29..ab8ea4a7 100644
--- a/js/Linear/DOLLAR_f.pickle
+++ b/js/Linear/DOLLAR_f.pickle
@@ -4,16 +4,20 @@ p0
((lp1
S'a'
p2
-aS'x'
+aS'exprs'
p3
-aS'model'
+aS'gr_i'
p4
aS'inh'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'model.dstate'
p1
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js
index bf83bf51..2c0c4398 100644
--- a/js/Linear/DOLLAR_m.js
+++ b/js/Linear/DOLLAR_m.js
@@ -4,7 +4,7 @@ function DOLLAR_m() {
var z = 0;
this.inh = 0;
var in1 = 1;
- var exprs = string([[z],[this.inh]]);
+ this.exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -13,8 +13,8 @@ function DOLLAR_m() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_m\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DOLLAR_m\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
DOLLAR_m.prototype.details = function DOLLAR_m() {
@@ -30,15 +30,16 @@ function DOLLAR_m() {
DOLLAR_m.prototype.set = function DOLLAR_m() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")<2) {
- exprs[2-1] = "0";
+ if (size(this.exprs,"*")<2) {
+ this.exprs[2-1] = "0";
}
while (true) {
- [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);
+ [ok,this.a,this.inh,this.exprs] = scicos_getvalue("Set 1/z block parameters",["initial condition","Inherit (no:0, yes:1)"],list("mat",[-1,-2],"vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -92,7 +93,7 @@ function DOLLAR_m() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle
index 3b29c2b1..70bb77cf 100644
--- a/js/Linear/DOLLAR_m.pickle
+++ b/js/Linear/DOLLAR_m.pickle
@@ -4,18 +4,22 @@ p0
((lp1
S'a'
p2
-aS'inh'
+aS'exprs'
p3
-aS'graphics'
+aS'gr_i'
p4
-aS'x'
+aS'inh'
p5
-aS'model'
+aS'graphics'
p6
-aS'type'
+aS'x'
p7
-atp8
-Rp9
+aS'model'
+p8
+aS'type'
+p9
+atp10
+Rp11
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index fa1b00c6..a74d673f 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -15,9 +15,9 @@ function GAINBLK() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [strcat(sci2exp(this.gain))];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [strcat(sci2exp(this.gain))];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
GAINBLK.prototype.details = function GAINBLK() {
@@ -33,15 +33,16 @@ function GAINBLK() {
GAINBLK.prototype.set = function GAINBLK() {
this.gain = parseFloat(arguments[0]["gain"])
this.over = arguments[0]["over"]
+ this.exprs = inverse(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")==1) {
- var exprs = [[exprs],[sci2exp(0)]];
+ if (size(this.exprs,"*")==1) {
+ this.exprs = [[this.exprs],[sci2exp(0)]];
}
while (true) {
- [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);
+ [ok,this.gain,this.over,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain","Do On Overflow(0=Nothing 1=Saturate 2=Error)"],list("mat",[-1,-1],"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -153,7 +154,7 @@ function GAINBLK() {
}
}
if (ok) {
- this.graphics.exprs = new ScilabDouble(exprs);
+ this.graphics.exprs = new ScilabDouble(this.exprs);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/GAINBLK.pickle b/js/Linear/GAINBLK.pickle
index f102ec25..b7258a6b 100644
--- a/js/Linear/GAINBLK.pickle
+++ b/js/Linear/GAINBLK.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'over'
p2
-aS'model'
+aS'exprs'
p3
-aS'over'
+aS'gr_i'
p4
aS'gain'
p5
aS'graphics'
p6
-atp7
-Rp8
+aS'x'
+p7
+aS'model'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js
index df5a51b4..bf0f3b7e 100644
--- a/js/Linear/GAINBLK_f.js
+++ b/js/Linear/GAINBLK_f.js
@@ -11,9 +11,9 @@ function GAINBLK_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [strcat(sci2exp(this.gain))];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [strcat(sci2exp(this.gain))];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
GAINBLK_f.prototype.details = function GAINBLK_f() {
@@ -27,12 +27,13 @@ function GAINBLK_f() {
}
GAINBLK_f.prototype.set = function GAINBLK_f() {
this.gain = parseFloat(arguments[0]["gain"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),this.exprs[1-1]);
if (!ok) {
break;
}
@@ -47,7 +48,7 @@ function GAINBLK_f() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.rpar = new ScilabDouble(this.gain.slice());
this.x.graphics = this.graphics;
this.x.model = this.model;
diff --git a/js/Linear/GAINBLK_f.pickle b/js/Linear/GAINBLK_f.pickle
index 093ec5d1..9be62223 100644
--- a/js/Linear/GAINBLK_f.pickle
+++ b/js/Linear/GAINBLK_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'exprs'
p2
-aS'model'
+aS'gr_i'
p3
aS'gain'
p4
aS'graphics'
p5
-atp6
-Rp7
+aS'x'
+p6
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js
index 14a6fb54..73dcfdba 100644
--- a/js/Linear/GAIN_f.js
+++ b/js/Linear/GAIN_f.js
@@ -11,9 +11,9 @@ function GAIN_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAIN_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAIN_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
GAIN_f.prototype.details = function GAIN_f() {
@@ -27,12 +27,13 @@ function GAIN_f() {
}
GAIN_f.prototype.set = function GAIN_f() {
this.gain = parseFloat(arguments[0]["gain"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,this.exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),this.exprs[1-1]);
if (!ok) {
break;
}
@@ -47,7 +48,7 @@ function GAIN_f() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.rpar = new ScilabDouble(this.gain.slice());
this.x.graphics = this.graphics;
this.x.model = this.model;
diff --git a/js/Linear/GAIN_f.pickle b/js/Linear/GAIN_f.pickle
index f5ef8591..b56e466c 100644
--- a/js/Linear/GAIN_f.pickle
+++ b/js/Linear/GAIN_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'exprs'
p2
-aS'model'
+aS'gr_i'
p3
aS'gain'
p4
aS'graphics'
p5
-atp6
-Rp7
+aS'x'
+p6
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 95f66a49..7128c3bb 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -12,9 +12,9 @@ function INTEGRAL() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
this.x.graphics.id = "1/s";
return new BasicBlock(this.x);
}
@@ -37,12 +37,13 @@ function INTEGRAL() {
this.satur = parseFloat(arguments[0]["satur"])
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = arguments[0]["lowp"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
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);
+ [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,this.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),this.exprs);
if (!ok) {
break;
}
@@ -88,7 +89,7 @@ function INTEGRAL() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/INTEGRAL.pickle b/js/Linear/INTEGRAL.pickle
index 715932be..2c6a4954 100644
--- a/js/Linear/INTEGRAL.pickle
+++ b/js/Linear/INTEGRAL.pickle
@@ -6,20 +6,24 @@ S'maxp'
p2
aS'reinit'
p3
-aS'satur'
+aS'exprs'
p4
-aS'lowp'
+aS'gr_i'
p5
-aS'graphics'
+aS'satur'
p6
-aS'x'
+aS'lowp'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js
index bd98770c..36995956 100644
--- a/js/Linear/INTEGRAL_f.js
+++ b/js/Linear/INTEGRAL_f.js
@@ -9,9 +9,9 @@ function INTEGRAL_f() {
this.model.state = new ScilabDouble([this.x0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = strcat(sci2exp(this.x0));
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = strcat(sci2exp(this.x0));
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
INTEGRAL_f.prototype.details = function INTEGRAL_f() {
@@ -24,16 +24,17 @@ function INTEGRAL_f() {
}
INTEGRAL_f.prototype.set = function INTEGRAL_f() {
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
+ [ok,this.x0,this.exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),this.exprs);
if (!ok) {
break;
}
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.state = new ScilabDouble([this.x0]);
this.x.graphics = this.graphics;
this.x.model = this.model;
diff --git a/js/Linear/INTEGRAL_f.pickle b/js/Linear/INTEGRAL_f.pickle
index 9f391ce4..0fd0a5a0 100644
--- a/js/Linear/INTEGRAL_f.pickle
+++ b/js/Linear/INTEGRAL_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'exprs'
p2
-aS'model'
+aS'gr_i'
p3
-aS'x0'
-p4
aS'graphics'
+p4
+aS'x'
p5
-atp6
-Rp7
+aS'model'
+p6
+aS'x0'
+p7
+atp8
+Rp9
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js
index feda531e..07d5480e 100644
--- a/js/Linear/INTEGRAL_m.js
+++ b/js/Linear/INTEGRAL_m.js
@@ -14,9 +14,9 @@ function INTEGRAL_m() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_m\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTEGRAL_m\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
INTEGRAL_m.prototype.details = function INTEGRAL_m() {
@@ -38,12 +38,13 @@ function INTEGRAL_m() {
this.satur = parseFloat(arguments[0]["satur"])
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = parseFloat(arguments[0]["lowp"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
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);
+ [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,this.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]),this.exprs);
if (!ok) {
break;
}
@@ -131,7 +132,7 @@ function INTEGRAL_m() {
}
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/INTEGRAL_m.pickle b/js/Linear/INTEGRAL_m.pickle
index 70608a46..21951779 100644
--- a/js/Linear/INTEGRAL_m.pickle
+++ b/js/Linear/INTEGRAL_m.pickle
@@ -6,20 +6,24 @@ S'maxp'
p2
aS'reinit'
p3
-aS'satur'
+aS'exprs'
p4
-aS'lowp'
+aS'gr_i'
p5
-aS'graphics'
+aS'satur'
p6
-aS'x'
+aS'lowp'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/PID.js b/js/Linear/PID.js
index 037ed7a5..439f4907 100644
--- a/js/Linear/PID.js
+++ b/js/Linear/PID.js
@@ -35,8 +35,8 @@ function PID() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = new ScilabDouble([false,false]);
this.model.rpar = new ScilabDouble([scs_m]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PID\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,[],gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PID\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,[],this.gr_i);
return new BasicBlock(this.x);
}
PID.prototype.details = function PID() {
@@ -87,17 +87,17 @@ function PID() {
}
var newpar = list();
var xx1 = arg1.model.rpar.objs[ppath[1-1]-1];
- exprs[1-1] = xx1.graphics.exprs[1-1];
+ this.exprs[1-1] = xx1.graphics.exprs[1-1];
var p_old = xx1.model.rpar;
var xx2 = arg1.model.rpar.objs[ppath[2-1]-1];
- exprs[2-1] = xx2.graphics.exprs[1-1];
+ this.exprs[2-1] = xx2.graphics.exprs[1-1];
var i_old = xx2.model.rpar;
var xx3 = arg1.model.rpar.objs[ppath[3-1]-1];
- exprs[3-1] = xx3.graphics.exprs[1-1];
+ this.exprs[3-1] = xx3.graphics.exprs[1-1];
var d_old = xx3.model.rpar;
var y = 0;
while (true) {
- [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);
+ [ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",["Proportional","Integral","Derivation"],list("vec",-1,"vec",-1,"vec",-1),this.exprs);
if (!ok) {
break;
}
diff --git a/js/Linear/PID.pickle b/js/Linear/PID.pickle
index 102e13cd..f2b15d1a 100644
--- a/js/Linear/PID.pickle
+++ b/js/Linear/PID.pickle
@@ -4,18 +4,24 @@ p0
((lp1
S'd'
p2
-aS'i'
+aS'p'
p3
-aS'exprs0'
+aS'i'
p4
-aS'p'
+aS'exprs0'
p5
-aS'x'
+aS'exprs'
p6
-aS'model'
+aS'gr_i'
p7
-atp8
-Rp9
+aS'graphics'
+p8
+aS'x'
+p9
+aS'model'
+p10
+atp11
+Rp12
.(dp0
S'xx3'
p1
diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js
index 85227456..7d0077d3 100644
--- a/js/Linear/REGISTER.js
+++ b/js/Linear/REGISTER.js
@@ -10,9 +10,9 @@ function REGISTER() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = strcat(string(this.z0),";");
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"REGISTER\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = strcat(string(this.z0),";");
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"REGISTER\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
REGISTER.prototype.details = function REGISTER() {
@@ -28,15 +28,16 @@ function REGISTER() {
REGISTER.prototype.set = function REGISTER() {
this.z0 = parseFloat(arguments[0]["z0"])
this.it = arguments[0]["it"]
+ this.exprs = inverse(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,1)==1) {
- var exprs = [[exprs],[sci2exp(1)]];
+ if (size(this.exprs,1)==1) {
+ this.exprs = [[this.exprs],[sci2exp(1)]];
}
while (true) {
- [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);
+ [ok,this.z0,this.it,this.exprs] = scicos_getvalue("Set delay parameters",["Register initial condition","Datatype (1=double 3=int32 ...)"],list("vec",-1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -83,7 +84,7 @@ function REGISTER() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble(exprs);
+ this.graphics.exprs = new ScilabDouble(this.exprs);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/REGISTER.pickle b/js/Linear/REGISTER.pickle
index 2798b374..8dd4c7e1 100644
--- a/js/Linear/REGISTER.pickle
+++ b/js/Linear/REGISTER.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'it'
p2
-aS'model'
+aS'exprs'
p3
-aS'z0'
+aS'gr_i'
p4
-aS'it'
-p5
aS'graphics'
+p5
+aS'x'
p6
-atp7
-Rp8
+aS'model'
+p7
+aS'z0'
+p8
+atp9
+Rp10
.(dp0
S'model.odstate'
p1
diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js
index 272606f6..478fe1e2 100644
--- a/js/Linear/REGISTER_f.js
+++ b/js/Linear/REGISTER_f.js
@@ -10,9 +10,9 @@ function REGISTER_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = strcat(string(this.z0),";");
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"REGISTER_f\",sz(1),sz(2));"]);
- this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
+ this.exprs = strcat(string(this.z0),";");
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"REGISTER_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2.5,2.5],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
REGISTER_f.prototype.details = function REGISTER_f() {
@@ -25,12 +25,13 @@ function REGISTER_f() {
}
REGISTER_f.prototype.set = function REGISTER_f() {
this.z0 = parseFloat(arguments[0]["z0"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
+ [ok,this.z0,this.exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),this.exprs);
if (!ok) {
break;
}
@@ -39,7 +40,7 @@ function REGISTER_f() {
var ok = false;
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.dstate = new ScilabDouble([this.z0]);
this.x.graphics = this.graphics;
this.x.model = this.model;
diff --git a/js/Linear/REGISTER_f.pickle b/js/Linear/REGISTER_f.pickle
index f2f06042..0fb58e59 100644
--- a/js/Linear/REGISTER_f.pickle
+++ b/js/Linear/REGISTER_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'exprs'
p2
-aS'model'
+aS'gr_i'
p3
-aS'z0'
-p4
aS'graphics'
+p4
+aS'x'
p5
-atp6
-Rp7
+aS'model'
+p6
+aS'z0'
+p7
+atp8
+Rp9
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SAMPHOLD.js b/js/Linear/SAMPHOLD.js
index aed7855f..3664af57 100644
--- a/js/Linear/SAMPHOLD.js
+++ b/js/Linear/SAMPHOLD.js
@@ -9,8 +9,8 @@ function SAMPHOLD() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPHOLD\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model," ",gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPHOLD\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model," ",this.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 19d5dc6e..32879b77 100644
--- a/js/Linear/SAMPHOLD.pickle
+++ b/js/Linear/SAMPHOLD.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index 3eb05779..07015edf 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -13,8 +13,8 @@ function SAMPHOLD_m() {
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([true,false]);
var label = [sci2exp(1)];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPHOLD_m\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,label,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPHOLD_m\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,label,this.gr_i);
return new BasicBlock(this.x);
}
SAMPHOLD_m.prototype.details = function SAMPHOLD_m() {
@@ -28,13 +28,14 @@ function SAMPHOLD_m() {
}
SAMPHOLD_m.prototype.set = function SAMPHOLD_m() {
this.it = arguments[0]["it"]
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.x.model.firing = [];
this.graphics = arg1.graphics;
var label = this.graphics.exprs;
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);
+ [ok,this.it,this.exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
if (!ok) {
break;
}
@@ -49,7 +50,7 @@ function SAMPHOLD_m() {
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
arg1.graphics = this.graphics;
arg1.model = this.model;
this.x = arg1;
diff --git a/js/Linear/SAMPHOLD_m.pickle b/js/Linear/SAMPHOLD_m.pickle
index 3b628187..9bae4649 100644
--- a/js/Linear/SAMPHOLD_m.pickle
+++ b/js/Linear/SAMPHOLD_m.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'it'
p2
-aS'model'
+aS'exprs'
p3
-aS'it'
+aS'gr_i'
p4
aS'graphics'
p5
-atp6
-Rp7
+aS'x'
+p6
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'arg1'
p1
diff --git a/js/Linear/SAMPLEHOLD_f.js b/js/Linear/SAMPLEHOLD_f.js
index 7241ba3a..8489ab24 100644
--- a/js/Linear/SAMPLEHOLD_f.js
+++ b/js/Linear/SAMPLEHOLD_f.js
@@ -9,8 +9,8 @@ function SAMPLEHOLD_f() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPLEHOLD_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model," ",gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAMPLEHOLD_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model," ",this.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 cee05e84..8e96cab8 100644
--- a/js/Linear/SAMPLEHOLD_f.pickle
+++ b/js/Linear/SAMPLEHOLD_f.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js
index 1a130333..06f1177f 100644
--- a/js/Linear/SOM_f.js
+++ b/js/Linear/SOM_f.js
@@ -9,9 +9,9 @@ function SOM_f() {
this.model.rpar = new ScilabDouble(sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[sci2exp(1)],[sci2exp(sgn)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SOM_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = [[sci2exp(1)],[sci2exp(sgn)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SOM_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
SOM_f.prototype.details = function SOM_f() {
@@ -26,12 +26,12 @@ function SOM_f() {
this.x = arg1;
this.graphics = arg1.graphics;
this.model = arg1.model;
- var exprs = this.graphics.exprs;
- if (size(exprs,"*")==2) {
- var exprs = exprs[2-1];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,"*")==2) {
+ this.exprs = this.exprs[2-1];
}
- if (size(exprs,"*")!=3) {
- var exprs = string(this.model.rpar);
+ if (size(this.exprs,"*")!=3) {
+ this.exprs = string(this.model.rpar);
}
if (this.graphics.flip) {
var labs = ["down","left","up"];
@@ -39,7 +39,7 @@ function SOM_f() {
var labs = ["down","right","up"];
}
var str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]];
- var str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]];
+ var str = [[str],[(part(labs.slice(),1,7)+this.exprs.slice())]];
message(str);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/SOM_f.pickle b/js/Linear/SOM_f.pickle
index 4b1a3d37..89465842 100644
--- a/js/Linear/SOM_f.pickle
+++ b/js/Linear/SOM_f.pickle
@@ -6,10 +6,14 @@ S'x'
p2
aS'model'
p3
-aS'graphics'
+aS'gr_i'
p4
-atp5
-Rp6
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js
index f0d68daf..afad8077 100644
--- a/js/Linear/SUMMATION.js
+++ b/js/Linear/SUMMATION.js
@@ -11,9 +11,9 @@ function SUMMATION() {
this.model.ipar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = sci2exp(this.sgn);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUMMATION\",sz(1),sz(2));"]);
- this.x = standard_define([2,3],this.model,exprs,gr_i);
+ this.exprs = sci2exp(this.sgn);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUMMATION\",sz(1),sz(2));"]);
+ this.x = standard_define([2,3],this.model,this.exprs,this.gr_i);
return new Summation(this.x);
}
SUMMATION.prototype.details = function SUMMATION() {
@@ -31,17 +31,18 @@ function SUMMATION() {
this.Datatype = arguments[0]["Datatype"]
this.sgn = inverse(arguments[0]["sgn"])
this.satur = arguments[0]["satur"]
+ this.exprs = inverse(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
this.model = arg1.model;
- var exprs = this.graphics.exprs;
- if (size(exprs,1)==1) {
- var exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
- } else if (size(exprs,1)==2) {
- var exprs = [[exprs],[sci2exp(0)]];
+ this.exprs = this.graphics.exprs;
+ if (size(this.exprs,1)==1) {
+ this.exprs = [[sci2exp(1)],[this.exprs],[sci2exp(0)]];
+ } else if (size(this.exprs,1)==2) {
+ this.exprs = [[this.exprs],[sci2exp(0)]];
}
while (true) {
- [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);
+ [ok,this.Datatype,this.sgn,this.satur,this.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),this.exprs);
if (!ok) {
break;
}
@@ -141,7 +142,7 @@ function SUMMATION() {
if (ok) {
this.model.rpar = new ScilabDouble([this.satur]);
this.model.ipar = new ScilabDouble([this.sgn]);
- this.graphics.exprs = new ScilabDouble(exprs);
+ this.graphics.exprs = new ScilabDouble(this.exprs);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
diff --git a/js/Linear/SUMMATION.pickle b/js/Linear/SUMMATION.pickle
index a06d452b..8539744e 100644
--- a/js/Linear/SUMMATION.pickle
+++ b/js/Linear/SUMMATION.pickle
@@ -4,18 +4,22 @@ p0
((lp1
S'Datatype'
p2
-aS'graphics'
+aS'sgn'
p3
-aS'satur'
+aS'exprs'
p4
-aS'sgn'
+aS'gr_i'
p5
-aS'x'
+aS'satur'
p6
-aS'model'
+aS'graphics'
p7
-atp8
-Rp9
+aS'x'
+p8
+aS'model'
+p9
+atp10
+Rp11
.(dp0
S'arg1'
p1
diff --git a/js/Linear/SUM_f.js b/js/Linear/SUM_f.js
index a80d7b1d..0c134618 100644
--- a/js/Linear/SUM_f.js
+++ b/js/Linear/SUM_f.js
@@ -7,9 +7,9 @@ function SUM_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUM_f\",sz(1),sz(2));"]);
- var exprs = [];
- this.x = standard_define([1,1],this.model,exprs,gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUM_f\",sz(1),sz(2));"]);
+ this.exprs = [];
+ this.x = standard_define([1,1],this.model,this.exprs,this.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 443c5bd9..96074d47 100644
--- a/js/Linear/SUM_f.pickle
+++ b/js/Linear/SUM_f.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js
index 2ffcd2c6..d65a0170 100644
--- a/js/Linear/TCLSS.js
+++ b/js/Linear/TCLSS.js
@@ -18,9 +18,9 @@ function TCLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TCLSS\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TCLSS\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
TCLSS.prototype.details = function TCLSS() {
@@ -42,15 +42,16 @@ function TCLSS() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -73,7 +74,7 @@ function TCLSS() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/TCLSS.pickle b/js/Linear/TCLSS.pickle
index bea58fef..79765239 100644
--- a/js/Linear/TCLSS.pickle
+++ b/js/Linear/TCLSS.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js
index 282a3f16..c1b6a82f 100644
--- a/js/Linear/TCLSS_f.js
+++ b/js/Linear/TCLSS_f.js
@@ -18,9 +18,9 @@ function TCLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TCLSS_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TCLSS_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
TCLSS_f.prototype.details = function TCLSS_f() {
@@ -42,15 +42,16 @@ function TCLSS_f() {
this.C = parseFloat(arguments[0]["C"])
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
+ this.exprs = parseFloat(arguments[0]["exprs"])
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
- if (size(exprs,"*")==7) {
- var exprs = exprs[[1:4,7]-1];
+ if (size(this.exprs,"*")==7) {
+ this.exprs = this.exprs[[1:4,7]-1];
}
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);
+ [ok,this.A,this.B,this.C,this.D,this.x0,this.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)"),this.exprs);
if (!ok) {
break;
}
@@ -73,7 +74,7 @@ function TCLSS_f() {
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
diff --git a/js/Linear/TCLSS_f.pickle b/js/Linear/TCLSS_f.pickle
index bea58fef..79765239 100644
--- a/js/Linear/TCLSS_f.pickle
+++ b/js/Linear/TCLSS_f.pickle
@@ -10,16 +10,20 @@ aS'B'
p4
aS'D'
p5
-aS'graphics'
+aS'exprs'
p6
-aS'x'
+aS'gr_i'
p7
-aS'model'
+aS'graphics'
p8
-aS'x0'
+aS'x'
p9
-atp10
-Rp11
+aS'model'
+p10
+aS'x0'
+p11
+atp12
+Rp13
.(dp0
S'arg1'
p1
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index b80c8c4e..8401943f 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -13,9 +13,9 @@ function TIME_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = new ScilabDouble([false,true]);
- var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TIME_DELAY\",sz(1),sz(2));"]);
- this.x = standard_define([3.5,2],this.model,exprs,gr_i);
+ this.exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"TIME_DELAY\",sz(1),sz(2));"]);
+ this.x = standard_define([3.5,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
TIME_DELAY.prototype.details = function TIME_DELAY() {
@@ -33,13 +33,14 @@ function TIME_DELAY() {
this.T = parseFloat(arguments[0]["T"])
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var 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);
+ [ok,this.T,this.init,this.N,this.exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -58,7 +59,7 @@ function TIME_DELAY() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.rpar = new ScilabDouble([this.T],[this.init]);
this.model.ipar = new ScilabDouble([this.N]);
this.model.dep_ut = new ScilabDouble([false,true]);
diff --git a/js/Linear/TIME_DELAY.pickle b/js/Linear/TIME_DELAY.pickle
index 6c948019..50fbebef 100644
--- a/js/Linear/TIME_DELAY.pickle
+++ b/js/Linear/TIME_DELAY.pickle
@@ -4,18 +4,22 @@ p0
((lp1
S'N'
p2
-aS'init'
+aS'exprs'
p3
-aS'T'
+aS'init'
p4
-aS'graphics'
+aS'gr_i'
p5
-aS'x'
+aS'T'
p6
-aS'model'
+aS'graphics'
p7
-atp8
-Rp9
+aS'x'
+p8
+aS'model'
+p9
+atp10
+Rp11
.(dp0
S'arg1'
p1
diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js
index 2dbf9bac..09352e17 100644
--- a/js/Linear/VARIABLE_DELAY.js
+++ b/js/Linear/VARIABLE_DELAY.js
@@ -13,9 +13,9 @@ function VARIABLE_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabDouble([false,false]);
- var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VARIABLE_DELAY\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VARIABLE_DELAY\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
VARIABLE_DELAY.prototype.details = function VARIABLE_DELAY() {
@@ -33,13 +33,14 @@ function VARIABLE_DELAY() {
this.T = parseFloat(arguments[0]["T"])
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var 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);
+ [ok,this.T,this.init,this.N,this.exprs] = scicos_getvalue("Set delay parameters",["Max delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
@@ -58,7 +59,7 @@ function VARIABLE_DELAY() {
var ok = tmpvar0[2];
}
if (ok) {
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.rpar = new ScilabDouble([this.T],[this.init]);
this.model.ipar = new ScilabDouble([this.N]);
this.x.graphics = this.graphics;
diff --git a/js/Linear/VARIABLE_DELAY.pickle b/js/Linear/VARIABLE_DELAY.pickle
index 8960040c..175985ac 100644
--- a/js/Linear/VARIABLE_DELAY.pickle
+++ b/js/Linear/VARIABLE_DELAY.pickle
@@ -4,18 +4,22 @@ p0
((lp1
S'N'
p2
-aS'init'
+aS'exprs'
p3
-aS'T'
+aS'init'
p4
-aS'graphics'
+aS'gr_i'
p5
-aS'x'
+aS'T'
p6
-aS'model'
+aS'graphics'
p7
-atp8
-Rp9
+aS'x'
+p8
+aS'model'
+p9
+atp10
+Rp11
.(dp0
S'arg1'
p1