summaryrefslogtreecommitdiff
path: root/js/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'js/Misc')
-rw-r--r--js/Misc/CBLOCK4.js10
-rw-r--r--js/Misc/MBLOCK.js18
-rw-r--r--js/Misc/MBLOCK.pickle63
-rw-r--r--js/Misc/MPBLOCK.js16
-rw-r--r--js/Misc/MPBLOCK.pickle61
-rw-r--r--js/Misc/generic_block3.js10
6 files changed, 88 insertions, 90 deletions
diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js
index 7b3c01f0..45580e52 100644
--- a/js/Misc/CBLOCK4.js
+++ b/js/Misc/CBLOCK4.js
@@ -25,7 +25,7 @@ function CBLOCK4() {
var options = {
function_name:["Simulation function",this.function_name],
impli:["Is block implicit? (y,n)",this.impli],
- in1:["Input ports sizes",this.in1],
+ in:["Input ports sizes",this.in],
it:["Input ports type",this.it],
out:["Output port sizes",this.out],
ot:["Output ports type",this.ot],
@@ -51,7 +51,7 @@ function CBLOCK4() {
var ok = true;
this.function_name = arguments[0]["function_name"];
this.impli = arguments[0]["impli"];
- this.in1 = arguments[0]["in1"];
+ this.in = arguments[0]["in"];
this.it = arguments[0]["it"];
this.out = arguments[0]["out"];
this.ot = arguments[0]["ot"];
@@ -68,7 +68,7 @@ function CBLOCK4() {
this.auto0 = arguments[0]["auto0"];
this.depu = parseBoolean(arguments[0]["depu"]);
this.dept = parseBoolean(arguments[0]["dept"]);
- var lab = [arguments[0]["function_name"], arguments[0]["impli"], arguments[0]["in1"], arguments[0]["it"], arguments[0]["out"], arguments[0]["ot"], arguments[0]["ci"], arguments[0]["co"], arguments[0]["xx"], arguments[0]["z"], arguments[0]["oz"], arguments[0]["rpar"], arguments[0]["ipar"], arguments[0]["opar"], arguments[0]["nmode"], arguments[0]["nzcr"], arguments[0]["auto0"], arguments[0]["depu"], arguments[0]["dept"]];
+ var lab = [arguments[0]["function_name"], arguments[0]["impli"], arguments[0]["in"], arguments[0]["it"], arguments[0]["out"], arguments[0]["ot"], arguments[0]["ci"], arguments[0]["co"], arguments[0]["xx"], arguments[0]["z"], arguments[0]["oz"], arguments[0]["rpar"], arguments[0]["ipar"], arguments[0]["opar"], arguments[0]["nmode"], arguments[0]["nzcr"], arguments[0]["auto0"], arguments[0]["depu"], arguments[0]["dept"]];
if (!ok) {
break;
}
@@ -117,7 +117,7 @@ function CBLOCK4() {
var tt = [];
}
var tt = label[2-1];
- var tmpvar0 = set_io(this.model,this.graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tmpvar0 = set_io(this.model,this.graphics,list(this.in,this.it),list(this.out,this.ot),this.ci,this.co);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
@@ -166,7 +166,7 @@ function CBLOCK4() {
var ary = getData(graphics.exprs);
this.function_name = ary[0];
this.impli = ary[1];
- this.in1 = ary[2];
+ this.in = ary[2];
this.it = ary[3];
this.out = ary[4];
this.ot = ary[5];
diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js
index a5bec067..a9a5eed3 100644
--- a/js/Misc/MBLOCK.js
+++ b/js/Misc/MBLOCK.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/MBLOCK.sci" */
function MBLOCK() {
MBLOCK.prototype.define = function MBLOCK() {
- this.in1 = ["u1"];
+ this.in = ["u1"];
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["E"]];
@@ -9,7 +9,7 @@ function MBLOCK() {
var paramv = list(0.1,.0001);
this.pprop = [[0],[0]];
var nameF = "generic";
- var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
+ var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([false,true]);
@@ -21,7 +21,7 @@ function MBLOCK() {
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([30004]));
- mo.inputs = this.in1;
+ mo.inputs = this.in;
mo.outputs = this.out;
this.model.in = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
@@ -92,7 +92,7 @@ function MBLOCK() {
var ok = false;
}
if (ok) {
- for (i=1;i<=size(this.in1,"*");i+=1) {
+ for (i=1;i<=size(this.in,"*");i+=1) {
var r = false;
var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
@@ -101,7 +101,7 @@ function MBLOCK() {
}
}
if (!ok) {
- messagebox([["Invalid variable name for the input "+string(i)+"."],["\""+this.in1[i-1]+"\""],["Please choose another variable name."]],"modal","error");
+ messagebox([["Invalid variable name for the input "+string(i)+"."],["\""+this.in[i-1]+"\""],["Please choose another variable name."]],"modal","error");
}
}
if (ok) {
@@ -150,7 +150,7 @@ function MBLOCK() {
}
}
if (ok) {
- if (or(size(this.intype)!=size(this.in1))) {
+ if (or(size(this.intype)!=size(this.in))) {
messagebox("Input variables are not well defined!","modal","error");
var ok = false;
}
@@ -193,7 +193,7 @@ function MBLOCK() {
if (ok) {
var intypex = find(this.intype=="I");
var outtypex = find(this.outtype=="I");
- var tmpvar1 = set_io(this.model,this.graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var tmpvar1 = set_io(this.model,this.graphics,list([ones(this.in),ones(this.in)],ones(this.in)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
@@ -255,7 +255,7 @@ function MBLOCK() {
var tt = [];
}
}
- var tmpvar2 = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop);
+ var tmpvar2 = MODCOM(this.funam,tt,this.in,this.out,param,paramv,this.pprop);
var ok = tmpvar2[0];
var tt = tmpvar2[1];
if (!ok) {
@@ -265,7 +265,7 @@ function MBLOCK() {
if (ok) {
var mo = modelica();
mo.model = nameF;
- mo.inputs = this.in1;
+ mo.inputs = this.in;
mo.outputs = this.out;
if (max(this.pprop)>0) {
mo.parameters = list(transpose(param),paramv,transpose(this.pprop));
diff --git a/js/Misc/MBLOCK.pickle b/js/Misc/MBLOCK.pickle
index 1738aed5..43de5b80 100644
--- a/js/Misc/MBLOCK.pickle
+++ b/js/Misc/MBLOCK.pickle
@@ -96,67 +96,66 @@ g7
sS'Tparam_lab'
p24
g7
-sS'exprs.out'
+sS'in'
p25
+S'vector_string'
+p26
+sS'exprs.out'
+p27
g7
sS'graphics.in_implicit'
-p26
+p28
NsS'typ'
-p27
+p29
S'vector'
-p28
+p30
sS'getvalue_txt'
-p29
+p31
g2
sS'mo.inputs'
-p30
-S'vector_string'
-p31
-sS'param'
p32
+NsS'param'
+p33
g20
sS'gr_i'
-p33
-g28
-sS'paramv'
p34
+g30
+sS'paramv'
+p35
g12
sS'exprs.funtxt'
-p35
-g28
-sS'x.graphics.in_implicit'
p36
-g31
-sS'mo.parameters'
+g30
+sS'x.graphics.in_implicit'
p37
+g26
+sS'mo.parameters'
+p38
g12
sS'Tparam_sz'
-p38
+p39
g7
sS'pprop'
-p39
+p40
g20
sS'model.out'
-p40
+p41
g7
sS'model.sim'
-p41
+p42
g12
sS'model.equations'
-p42
+p43
g5
sS'mo.outputs'
-p43
+p44
g20
sS'intype'
-p44
-g31
-sS'x.graphics.out_implicit'
p45
-g20
-sS'in1'
+g26
+sS'x.graphics.out_implicit'
p46
-g31
+g20
sS'model.rpar'
p47
g20
@@ -225,14 +224,14 @@ p70
g2
sS'y'
p71
-g28
+g30
sS'x'
p72
-g28
+g30
sS'model'
p73
g5
sS'tt'
p74
-g28
+g30
s. \ No newline at end of file
diff --git a/js/Misc/MPBLOCK.js b/js/Misc/MPBLOCK.js
index 50121a28..e7c3a0ce 100644
--- a/js/Misc/MPBLOCK.js
+++ b/js/Misc/MPBLOCK.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/MPBLOCK.sci" */
function MPBLOCK() {
MPBLOCK.prototype.define = function MPBLOCK() {
- this.in1 = ["u"];
+ this.in = ["u"];
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["I"]];
@@ -9,7 +9,7 @@ function MPBLOCK() {
var paramv = list();
var pprop = [];
var nameF = "myModel";
- var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
+ var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,true]);
@@ -21,7 +21,7 @@ function MPBLOCK() {
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([10004]));
- mo.inputs = this.in1;
+ mo.inputs = this.in;
mo.outputs = this.out;
this.model.in = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
@@ -71,7 +71,7 @@ function MPBLOCK() {
var ok = false;
}
if (ok) {
- for (i=1;i<=size(this.in1,"*");i+=1) {
+ for (i=1;i<=size(this.in,"*");i+=1) {
var r = false;
var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
@@ -80,7 +80,7 @@ function MPBLOCK() {
}
}
if (!ok) {
- x_message([["Invalid variable name for the input "+string(i)+"."],["\""+this.in1[i-1]+"\""],["Please choose another variable name."]]);
+ x_message([["Invalid variable name for the input "+string(i)+"."],["\""+this.in[i-1]+"\""],["Please choose another variable name."]]);
}
}
if (ok) {
@@ -129,7 +129,7 @@ function MPBLOCK() {
}
}
if (ok) {
- if (or(size(this.intype)!=size(this.in1))) {
+ if (or(size(this.intype)!=size(this.in))) {
x_message("Input variables are not well defined!");
var ok = false;
}
@@ -172,7 +172,7 @@ function MPBLOCK() {
if (ok) {
var intypex = find(this.intype=="I");
var outtypex = find(this.outtype=="I");
- var tmpvar2 = set_io(this.model,this.graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var tmpvar2 = set_io(this.model,this.graphics,list([ones(this.in),ones(this.in)],ones(this.in)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
this.model = tmpvar2[0];
this.graphics = tmpvar2[1];
var ok = tmpvar2[2];
@@ -232,7 +232,7 @@ function MPBLOCK() {
if (ok) {
var mo = modelica();
mo.model = nameF;
- mo.inputs = this.in1;
+ mo.inputs = this.in;
mo.outputs = this.out;
if (pprop.length!=0) {
if (max(pprop)>0) {
diff --git a/js/Misc/MPBLOCK.pickle b/js/Misc/MPBLOCK.pickle
index 4f29b9b9..a80733c1 100644
--- a/js/Misc/MPBLOCK.pickle
+++ b/js/Misc/MPBLOCK.pickle
@@ -85,64 +85,63 @@ g4
sS'Tparam_lab'
p25
g4
-sS'exprs.out'
+sS'in'
p26
+S'vector_string'
+p27
+sS'exprs.out'
+p28
g4
sS'graphics.in_implicit'
-p27
+p29
NsS'typ'
-p28
+p30
S'vector'
-p29
+p31
sS'getvalue_txt'
-p30
+p32
g2
sS'mo.inputs'
-p31
-S'vector_string'
-p32
-sS'param'
p33
-g29
-sS'paramv'
+NsS'param'
p34
+g31
+sS'paramv'
+p35
g13
sS'gr_i'
-p35
-g29
-sS'x.graphics.in_implicit'
p36
-g32
-sS'mo.parameters'
+g31
+sS'x.graphics.in_implicit'
p37
+g27
+sS'mo.parameters'
+p38
g13
sS'Tparam_sz'
-p38
+p39
g4
sS'pprop'
-p39
-g29
-sS'model.out'
p40
+g31
+sS'model.out'
+p41
g4
sS'model.sim'
-p41
+p42
g13
sS'model.equations'
-p42
+p43
g7
sS'mo.outputs'
-p43
+p44
g21
sS'intype'
-p44
-g32
-sS'x.graphics.out_implicit'
p45
-g21
-sS'in1'
+g27
+sS'x.graphics.out_implicit'
p46
-g32
+g21
sS'model.rpar'
p47
g21
@@ -211,10 +210,10 @@ p70
g2
sS'y'
p71
-g29
+g31
sS'x'
p72
-g29
+g31
sS'model'
p73
g7
diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js
index 5ae91823..e27b29a3 100644
--- a/js/Misc/generic_block3.js
+++ b/js/Misc/generic_block3.js
@@ -29,7 +29,7 @@ function generic_block3() {
var options = {
function_name:["Simulation function",this.function_name],
funtyp:["Function type (0,1,2,..)",this.funtyp],
- in1:["Input ports sizes",this.in1],
+ in:["Input ports sizes",this.in],
it:["Input ports type",this.it],
out:["Output port sizes",this.out],
ot:["Output ports type",this.ot],
@@ -58,7 +58,7 @@ function generic_block3() {
var ok = true;
this.function_name = arguments[0]["function_name"];
this.funtyp = parseFloat(arguments[0]["funtyp"]);
- this.in1 = arguments[0]["in1"];
+ this.in = arguments[0]["in"];
this.it = arguments[0]["it"];
this.out = arguments[0]["out"];
this.ot = arguments[0]["ot"];
@@ -75,7 +75,7 @@ function generic_block3() {
this.auto0 = arguments[0]["auto0"];
this.depu = parseBoolean(arguments[0]["depu"]);
this.dept = parseBoolean(arguments[0]["dept"]);
- var lab = [arguments[0]["function_name"], arguments[0]["funtyp"], arguments[0]["in1"], arguments[0]["it"], arguments[0]["out"], arguments[0]["ot"], arguments[0]["ci"], arguments[0]["co"], arguments[0]["xx"], arguments[0]["z"], arguments[0]["oz"], arguments[0]["rpar"], arguments[0]["ipar"], arguments[0]["opar"], arguments[0]["nmode"], arguments[0]["nzcr"], arguments[0]["auto0"], arguments[0]["depu"], arguments[0]["dept"]];
+ var lab = [arguments[0]["function_name"], arguments[0]["funtyp"], arguments[0]["in"], arguments[0]["it"], arguments[0]["out"], arguments[0]["ot"], arguments[0]["ci"], arguments[0]["co"], arguments[0]["xx"], arguments[0]["z"], arguments[0]["oz"], arguments[0]["rpar"], arguments[0]["ipar"], arguments[0]["opar"], arguments[0]["nmode"], arguments[0]["nzcr"], arguments[0]["auto0"], arguments[0]["depu"], arguments[0]["dept"]];
if (!ok) {
break;
}
@@ -124,7 +124,7 @@ function generic_block3() {
}
var dep_ut = [this.depu,this.dept];
if (ok) {
- var tmpvar0 = set_io(this.model,this.graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tmpvar0 = set_io(this.model,this.graphics,list(this.in,this.it),list(this.out,this.ot),this.ci,this.co);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
@@ -159,7 +159,7 @@ function generic_block3() {
var ary = getData(graphics.exprs);
this.function_name = ary[0];
this.funtyp = ary[1];
- this.in1 = ary[2];
+ this.in = ary[2];
this.it = ary[3];
this.out = ary[4];
this.ot = ary[5];