summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2018-09-18 17:38:01 +0530
committerSunil Shetye2018-10-08 11:24:12 +0530
commitf6d537573102a160601aa5c070f63455204d5f9d (patch)
tree7d61bbc8303725a3f9b0ab4e9662ab1ce962565d
parentf389f174481df676c841ebcc87a7b8b313921bbc (diff)
downloadsci2js-f6d537573102a160601aa5c070f63455204d5f9d.tar.gz
sci2js-f6d537573102a160601aa5c070f63455204d5f9d.tar.bz2
sci2js-f6d537573102a160601aa5c070f63455204d5f9d.zip
use this.in instead of this.in1HEADmaster
-rw-r--r--combined.js310
-rw-r--r--js/Branching/MUX.js34
-rw-r--r--js/Branching/MUX.pickle45
-rw-r--r--js/Branching/MUX_f.js34
-rw-r--r--js/Branching/MUX_f.pickle45
-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
-rw-r--r--js/Sinks/AFFICH_m.js24
-rw-r--r--js/Sinks/AFFICH_m.pickle44
-rw-r--r--js/Sinks/CMSCOPE.js34
-rw-r--r--js/Sinks/CMSCOPE.pickle33
-rw-r--r--js/Sinks/WFILE_f.js24
-rw-r--r--js/Sinks/WFILE_f.pickle31
-rw-r--r--js/Sinks/WRITEC_f.js24
-rw-r--r--js/Sinks/WRITEC_f.pickle51
-rw-r--r--js/Sources/STEP.js22
-rw-r--r--js/Sources/STEP.pickle58
-rw-r--r--js/Threshold/GENERAL_f.js30
-rw-r--r--js/Threshold/GENERAL_f.pickle70
-rw-r--r--js/Threshold/ZCROSS_f.js30
-rw-r--r--js/Threshold/ZCROSS_f.pickle64
-rwxr-xr-xsci2jsyacc.py2
26 files changed, 590 insertions, 597 deletions
diff --git a/combined.js b/combined.js
index e4cf7d80..86cf29df 100644
--- a/combined.js
+++ b/combined.js
@@ -1123,15 +1123,15 @@ function ISELECT_m() {
/* autogenerated from "macros/Branching/MUX.sci" */
function MUX() {
MUX.prototype.define = function MUX() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["multiplex"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -1143,7 +1143,7 @@ function MUX() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -1151,45 +1151,45 @@ function MUX() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>31) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>31) {
message("Block must have at least two input ports and at most 31");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
+ if (size(this.in,"*")<2||or(this.in==0)||size(this.in,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -1203,22 +1203,22 @@ function MUX() {
MUX.prototype.importset = function MUX() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX.prototype.getContainer = function MUX() { return new BasicBlock(this.x); }
}
/* autogenerated from "macros/Branching/MUX_f.sci" */
function MUX_f() {
MUX_f.prototype.define = function MUX_f() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["mux"]), new ScilabDouble([1]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([0.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -1230,7 +1230,7 @@ function MUX_f() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -1238,45 +1238,45 @@ function MUX_f() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>8) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>8) {
message("Block must have at least two input ports and at most eight");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
+ if (size(this.in,"*")<2||size(this.in,"*")>8||or(this.in==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -1290,7 +1290,7 @@ function MUX_f() {
MUX_f.prototype.importset = function MUX_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX_f.prototype.getContainer = function MUX_f() { return new BasicBlock(this.x); }
}
@@ -13928,7 +13928,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],
@@ -13954,7 +13954,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"];
@@ -13971,7 +13971,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;
}
@@ -14020,7 +14020,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];
@@ -14069,7 +14069,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];
@@ -15209,7 +15209,7 @@ function LOGICAL_OP() {
/* 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"]];
@@ -15217,7 +15217,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]);
@@ -15229,7 +15229,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)]);
@@ -15300,7 +15300,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) {
@@ -15309,7 +15309,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) {
@@ -15358,7 +15358,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;
}
@@ -15401,7 +15401,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];
@@ -15463,7 +15463,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) {
@@ -15473,7 +15473,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));
@@ -15615,7 +15615,7 @@ function MEMORY_f() {
/* 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"]];
@@ -15623,7 +15623,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]);
@@ -15635,7 +15635,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)]);
@@ -15685,7 +15685,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) {
@@ -15694,7 +15694,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) {
@@ -15743,7 +15743,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;
}
@@ -15786,7 +15786,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];
@@ -15846,7 +15846,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) {
@@ -16977,7 +16977,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],
@@ -17006,7 +17006,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"];
@@ -17023,7 +17023,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;
}
@@ -17072,7 +17072,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];
@@ -17107,7 +17107,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];
@@ -19430,14 +19430,14 @@ function AFFICH_m() {
this.colr = 1;
this.nt = 5;
this.nd = 1;
- this.in1 = [1,1];
+ this.in = [1,1];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["affich2"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble([this.in1[1-1][1-1]]);
- this.model.in2 = new ScilabDouble([this.in1[1-1][2-1]]);
+ this.model.in = new ScilabDouble([this.in[1-1][1-1]]);
+ this.model.in2 = new ScilabDouble([this.in[1-1][2-1]]);
this.model.evtin = new ScilabDouble([1]);
- this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]);
- this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
+ this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in[1-1][1-1]*this.in[1-1][2-1],1)]);
+ this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in[1-1][1-1]]);
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabDouble([]);
this.model.dep_ut = new ScilabBoolean([true,false]);
@@ -19454,7 +19454,7 @@ function AFFICH_m() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set parameters";
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
font:["Font number",this.font],
fontsize:["Font size",this.fontsize],
colr:["Color",this.colr],
@@ -19468,14 +19468,14 @@ function AFFICH_m() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = inverse(arguments[0]["in1"]);
+ this.in = inverse(arguments[0]["in"]);
this.font = parseFloat(arguments[0]["font"]);
this.fontsize = parseFloat(arguments[0]["fontsize"]);
this.colr = parseFloat(arguments[0]["colr"]);
this.nt = parseFloat(arguments[0]["nt"]);
this.nd = parseFloat(arguments[0]["nd"]);
this.herit = arguments[0]["herit"];
- var exprs = [arguments[0]["in1"], arguments[0]["font"], arguments[0]["fontsize"], arguments[0]["colr"], arguments[0]["nt"], arguments[0]["nd"], arguments[0]["herit"]];
+ var exprs = [arguments[0]["in"], arguments[0]["font"], arguments[0]["fontsize"], arguments[0]["colr"], arguments[0]["nt"], arguments[0]["nd"], arguments[0]["herit"]];
if (!ok) {
break;
}
@@ -19509,14 +19509,14 @@ function AFFICH_m() {
throw "user error";
}
if (ok) {
- var tmpvar0 = set_io(this.model,this.graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,this.graphics,list(this.in,1),list(),ones(1-this.herit,1),[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
if (ok) {
- this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
- this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]);
+ this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in[1-1][1-1]]);
+ this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in[1-1][1-1]*this.in[1-1][2-1],1)]);
this.model.evtin = new ScilabDouble([ones(1-this.herit,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
this.x.graphics = this.graphics;
@@ -19532,7 +19532,7 @@ function AFFICH_m() {
AFFICH_m.prototype.importset = function AFFICH_m() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.font = ary[1];
this.fontsize = ary[2];
this.colr = ary[3];
@@ -20582,7 +20582,7 @@ function CMATVIEW() {
function CMSCOPE() {
CMSCOPE.prototype.define = function CMSCOPE() {
this.win = -1;
- this.in1 = [[1],[1]];
+ this.in = [[1],[1]];
this.wdim = [[-1],[-1]];
this.wpos = [[-1],[-1]];
this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
@@ -20594,15 +20594,15 @@ function CMSCOPE() {
var period = transpose(this.per.slice());
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmscope"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble(this.in1);
+ this.model.in = new ScilabDouble([this.in]);
this.model.in2 = new ScilabDouble([1],[1]);
this.model.intyp = new ScilabDouble([1],[1]);
this.model.evtin = new ScilabDouble([1]);
this.model.rpar = new ScilabDouble([0],[period.slice()],[yy.slice()]);
- this.model.ipar = new ScilabDouble([this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]);
+ this.model.ipar = new ScilabDouble([this.win],[size(this.in,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in.slice()],[this.clrs.slice(1-1,sum(this.in))]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
+ var exprs = [[strcat(string(this.in)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CMSCOPE\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -20614,7 +20614,7 @@ function CMSCOPE() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set Scope parameters";
var options = {
- in1:["Input ports sizes",this.in1.toString().replace(/,/g," ")],
+ in:["Input ports sizes",this.in.toString().replace(/,/g," ")],
clrs:["Drawing colors (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")],
win:["Output window number (-1 for automatic)",this.win],
wpos:["Output window position",this.wpos.toString().replace(/,/g," ")],
@@ -20632,7 +20632,7 @@ function CMSCOPE() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = inverse(arguments[0]["in1"]);
+ this.in = inverse(arguments[0]["in"]);
this.clrs = inverse(arguments[0]["clrs"]);
this.win = parseFloat(arguments[0]["win"]);
this.wpos = inverse(arguments[0]["wpos"]);
@@ -20643,21 +20643,21 @@ function CMSCOPE() {
this.N = parseFloat(arguments[0]["N"]);
this.heritance = arguments[0]["heritance"];
this.nom = arguments[0]["nom"];
- var exprs = [arguments[0]["in1"], arguments[0]["clrs"], arguments[0]["win"], arguments[0]["wpos"], arguments[0]["wdim"], arguments[0]["ymin"], arguments[0]["ymax"], arguments[0]["per"], arguments[0]["N"], arguments[0]["heritance"], arguments[0]["nom"]];
+ var exprs = [arguments[0]["in"], arguments[0]["clrs"], arguments[0]["win"], arguments[0]["wpos"], arguments[0]["wdim"], arguments[0]["ymin"], arguments[0]["ymax"], arguments[0]["per"], arguments[0]["N"], arguments[0]["heritance"], arguments[0]["nom"]];
if (!ok) {
break;
}
var mess = [];
- if (size(this.in1,"*")<=0) {
+ if (size(this.in,"*")<=0) {
var mess = [[mess],["Block must have at least one input port"],[" "]];
var ok = false;
}
- if (min(this.in1)<=0) {
+ if (min(this.in)<=0) {
var mess = [[mess],["Port sizes must be positive"],[" "]];
var ok = false;
}
- if (size(this.clrs,"*")<sum(this.in1)) {
- var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
+ if (size(this.clrs,"*")<sum(this.in)) {
+ var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in))+")"],[" "]];
var ok = false;
}
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
@@ -20699,10 +20699,10 @@ function CMSCOPE() {
throw "user error";
}
if (ok) {
- this.in1 = this.in1.slice();
- var a = size(this.in1,1);
+ this.in = this.in.slice();
+ var a = size(this.in,1);
var in2 = ones(a,1);
- var tmpvar0 = set_io(this.model,this.graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
+ var tmpvar0 = set_io(this.model,this.graphics,list([this.in,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
@@ -20718,8 +20718,8 @@ function CMSCOPE() {
var period = transpose(this.per.slice());
var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
var rpar = [[0],[period.slice()],[yy.slice()]];
- this.clrs = this.clrs.slice(1-1,sum(this.in1));
- var ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ this.clrs = this.clrs.slice(1-1,sum(this.in));
+ var ipar = [[this.win],[size(this.in,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in.slice()],[this.clrs.slice()],[this.heritance]];
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
this.model.dstate = new ScilabDouble([]);
this.model.rpar = new ScilabDouble(rpar);
@@ -20741,7 +20741,7 @@ function CMSCOPE() {
CMSCOPE.prototype.importset = function CMSCOPE() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.clrs = ary[1];
this.win = ary[2];
this.wpos = ary[3];
@@ -21479,21 +21479,21 @@ function TRASH_f() {
/* autogenerated from "macros/Sinks/WFILE_f.sci" */
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
- this.in1 = 1;
- var nin = sum(this.in1);
+ this.in = 1;
+ var nin = sum(this.in);
var frmt = "(7(e10.3,1x))";
var fname = "foo";
var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["writef"]);
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtin = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble([-1],[lunit],[zeros((nin+1)*this.N,1)]);
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
+ var exprs = [[sci2exp(this.in)],[fname],[frmt],[string(this.N)]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WFILE_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -21512,7 +21512,7 @@ function WFILE_f() {
var frmt = exprs[3-1];
this.set_param_popup_title = msprintf("Set %s block parameters","WFILE_f");
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
fname1:["Output File Name",this.fname1],
frmt1:["Output Format",this.frmt1],
N:["Buffer Size",this.N],
@@ -21532,16 +21532,16 @@ function WFILE_f() {
var frmt = exprs[3-1];
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = parseFloat(arguments[0]["in"]);
this.fname1 = parseFloat(arguments[0]["fname1"]);
this.frmt1 = parseFloat(arguments[0]["frmt1"]);
this.N = parseFloat(arguments[0]["N"]);
- var exprs = [arguments[0]["in1"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"]];
+ var exprs = [arguments[0]["in"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- var nin = this.in1;
+ this.in = int(this.in);
+ var nin = this.in;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
@@ -21568,8 +21568,8 @@ function WFILE_f() {
} else if (this.N<2) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Must be greater than 1.");
var ok = false;
- } else if (this.in1<=0) {
- block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
+ } else if (this.in<=0) {
+ block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in),"Strictly positive integer expected.");
var ok = false;
}
if (ok) {
@@ -21595,7 +21595,7 @@ function WFILE_f() {
WFILE_f.prototype.importset = function WFILE_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.fname1 = ary[1];
this.frmt1 = ary[2];
this.N = ary[3];
@@ -21697,8 +21697,8 @@ function WRITEAU_f() {
/* autogenerated from "macros/Sinks/WRITEC_f.sci" */
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
- this.in1 = 1;
- var nin = sum(this.in1);
+ this.in = 1;
+ var nin = sum(this.in);
var frmt = "c ";
var fname = "foo";
this.swap = 0;
@@ -21706,13 +21706,13 @@ function WRITEC_f() {
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writec"]), new ScilabDouble([2]));
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtin = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble([-1],[lunit],[zeros((nin+1)*this.N,1)]);
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
+ var exprs = [[sci2exp(this.in)],[fname],[frmt],[string(this.N),string(this.swap)]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WRITEC_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([4,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -21729,7 +21729,7 @@ function WRITEC_f() {
var frmt = exprs[3-1];
this.set_param_popup_title = msprintf("Set %s block parameters","WRITEC_f");
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
fname1:["Output File Name",this.fname1],
frmt1:["Output Format",this.frmt1],
N:["Buffer Size",this.N],
@@ -21746,17 +21746,17 @@ function WRITEC_f() {
var frmt = exprs[3-1];
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = parseFloat(arguments[0]["in"]);
this.fname1 = parseFloat(arguments[0]["fname1"]);
this.frmt1 = arguments[0]["frmt1"];
this.N = parseFloat(arguments[0]["N"]);
this.swap = parseFloat(arguments[0]["swap"]);
- var exprs = [arguments[0]["in1"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"], arguments[0]["swap"]];
+ var exprs = [arguments[0]["in"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"], arguments[0]["swap"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- var nin = this.in1;
+ this.in = int(this.in);
+ var nin = this.in;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
@@ -21783,8 +21783,8 @@ function WRITEC_f() {
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
var ok = false;
- } else if (this.in1<=0) {
- block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
+ } else if (this.in<=0) {
+ block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in),"Strictly positive integer expected.");
var ok = false;
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
@@ -21813,7 +21813,7 @@ function WRITEC_f() {
WRITEC_f.prototype.importset = function WRITEC_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.fname1 = ary[1];
this.frmt1 = ary[2];
this.N = ary[3];
@@ -24364,7 +24364,7 @@ function STEP() {
this.set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION");
var options = {
temps:["Step Time",this.temps],
- in1:["Initial Value",this.in1],
+ in:["Initial Value",this.in],
fi:["Final Value",this.fi],
}
return options;
@@ -24374,21 +24374,21 @@ function STEP() {
while (true) {
var ok = true;
this.temps = arguments[0]["temps"];
- this.in1 = arguments[0]["in1"];
+ this.in = arguments[0]["in"];
this.fi = arguments[0]["fi"];
- var exprs = [arguments[0]["temps"], arguments[0]["in1"], arguments[0]["fi"]];
+ var exprs = [arguments[0]["temps"], arguments[0]["in"], arguments[0]["fi"]];
if (!ok) {
break;
}
- this.in1 = this.in1.slice();
+ this.in = this.in.slice();
this.fi = this.fi.slice();
- if (size(this.in1,"*")!=size(this.fi,"*")) {
- if (size(this.in1,"*")==1) {
- this.in1 = this.in1*ones(this.fi);
+ if (size(this.in,"*")!=size(this.fi,"*")) {
+ if (size(this.in,"*")==1) {
+ this.in = this.in*ones(this.fi);
} else if (size(this.fi,"*")==1) {
- this.fi = this.fi*ones(this.in1);
+ this.fi = this.fi*ones(this.in);
} else {
- block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected.");
+ block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in,"*"),size(this.fi,"*")),"Same sizes expected.");
var ok = false;
}
}
@@ -24405,7 +24405,7 @@ function STEP() {
if (this.temps==0) {
var rpar = [[this.fi],[this.fi]];
} else {
- var rpar = [[this.in1],[this.fi]];
+ var rpar = [[this.in],[this.fi]];
}
this.model.rpar = new ScilabDouble(rpar);
this.graphics.exprs = new ScilabDouble([exprs]);
@@ -24423,7 +24423,7 @@ function STEP() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
this.temps = ary[0];
- this.in1 = ary[1];
+ this.in = ary[1];
this.fi = ary[2];
}
STEP.prototype.getContainer = function STEP() { return new BasicBlock(this.x); }
@@ -24817,18 +24817,18 @@ function TKSCALE() {
function GENERAL_f() {
GENERAL_f.prototype.define = function GENERAL_f() {
var rpar = [[0],[0],[0],[0]];
- this.in1 = 1;
+ this.in = 1;
this.out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
- this.model.nzcross = new ScilabDouble([this.in1]);
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.nzcross = new ScilabDouble([this.in]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtout = new ScilabDouble([ones(this.out,1)]);
this.model.rpar = new ScilabDouble([0],[0],[0],[0]);
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
+ var exprs = [[strcat(sci2exp(this.in))],[strcat(sci2exp(this.out))]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENERAL_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -24839,13 +24839,13 @@ function GENERAL_f() {
GENERAL_f.prototype.get = function GENERAL_f() {
var exprs = this.graphics.exprs;
var rpar = this.model.rpar;
- this.in1 = this.model.in;
+ this.in = this.model.in;
this.out = this.model.evtout;
- var nin = sum(this.in1);
+ var nin = sum(this.in);
var nout = sum(this.out);
this.set_param_popup_title = "Set General Zero-Crossing parameters";
var options = {
- in1:["Input size",this.in1],
+ in:["Input size",this.in],
out:["Number of event output",this.out],
}
return options;
@@ -24853,22 +24853,22 @@ function GENERAL_f() {
GENERAL_f.prototype.set = function GENERAL_f() {
var exprs = this.graphics.exprs;
var rpar = this.model.rpar;
- this.in1 = this.model.in;
+ this.in = this.model.in;
this.out = this.model.evtout;
- var nin = sum(this.in1);
+ var nin = sum(this.in);
var nout = sum(this.out);
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = arguments[0]["in"];
this.out = parseFloat(arguments[0]["out"]);
- var exprs = [arguments[0]["in1"], arguments[0]["out"]];
+ var exprs = [arguments[0]["in"], arguments[0]["out"]];
if (ok) {
- var tmpvar0 = check_io(this.model,this.graphics,this.in1,[],[],ones(this.out,1));
+ var tmpvar0 = check_io(this.model,this.graphics,this.in,[],[],ones(this.out,1));
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
if (ok) {
var nout1 = this.out;
- var nin1 = this.in1;
+ var nin1 = this.in;
if (nout==nout1&&nin==nin1) {
var rp = matrix(rpar,nout,2^(2*nin));
} else {
@@ -24878,7 +24878,7 @@ function GENERAL_f() {
var result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
if (result.length!=0) {
rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.rpar = new ScilabDouble(rp.slice());
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
@@ -24895,7 +24895,7 @@ function GENERAL_f() {
GENERAL_f.prototype.importset = function GENERAL_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.out = ary[1];
}
GENERAL_f.prototype.getContainer = function GENERAL_f() { return new BasicBlock(this.x); }
@@ -24967,17 +24967,17 @@ function POSTONEG_f() {
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
var rpar = [[-1],[-1],[0],[0]];
- this.in1 = 1;
+ this.in = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
- this.model.in = new ScilabDouble([this.in1]);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = new ScilabDouble([-1],[-1],[0],[0]);
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = strcat(sci2exp(this.in1));
+ var exprs = strcat(sci2exp(this.in));
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -24989,7 +24989,7 @@ function ZCROSS_f() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set Zero-Crossing parameters";
var options = {
- in1:["Input size",this.in1],
+ in:["Input size",this.in],
}
return options;
}
@@ -24997,24 +24997,24 @@ function ZCROSS_f() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- if (this.in1<=0) {
+ this.in = int(this.in);
+ if (this.in<=0) {
message("Block must have at least one input");
throw "user error";
} else {
var kk = 0;
- for (jj=1;jj<=this.in1;jj+=1) {
- var kk = kk+2^(this.in1+jj-1);
+ for (jj=1;jj<=this.in;jj+=1) {
+ var kk = kk+2^(this.in+jj-1);
}
- this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
+ this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in)-kk,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.in = new ScilabDouble([this.in1]);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.firing = new ScilabDouble([-1]);
this.x.graphics = this.graphics;
this.x.model = this.model;
@@ -25029,7 +25029,7 @@ function ZCROSS_f() {
ZCROSS_f.prototype.importset = function ZCROSS_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
ZCROSS_f.prototype.getContainer = function ZCROSS_f() { return new BasicBlock(this.x); }
}
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index c42892d9..9a601e8f 100644
--- a/js/Branching/MUX.js
+++ b/js/Branching/MUX.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX.sci" */
function MUX() {
MUX.prototype.define = function MUX() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["multiplex"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -21,7 +21,7 @@ function MUX() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -29,45 +29,45 @@ function MUX() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>31) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>31) {
message("Block must have at least two input ports and at most 31");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
+ if (size(this.in,"*")<2||or(this.in==0)||size(this.in,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -81,7 +81,7 @@ function MUX() {
MUX.prototype.importset = function MUX() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX.prototype.getContainer = function MUX() { return new BasicBlock(this.x); }
}
diff --git a/js/Branching/MUX.pickle b/js/Branching/MUX.pickle
index 101416ce..dbcaa8bc 100644
--- a/js/Branching/MUX.pickle
+++ b/js/Branching/MUX.pickle
@@ -25,54 +25,53 @@ sS'ok'
p5
S'boolean'
p6
-sS'model.blocktype'
+sS'model.in'
p7
-S'string'
+S'vector'
p8
sS'x.graphics'
p9
S'object'
p10
-sS'graphics.exprs'
+sS'in'
p11
-NsS'in1'
-p12
g4
sS'model.dep_ut'
-p13
+p12
S'vector_boolean'
-p14
+p13
sS'exprs'
+p14
+S'string'
p15
-g8
sS'x.model'
p16
NsS'gr_i'
p17
-S'vector'
+g8
+sS'graphics.exprs'
p18
-sS'model.in'
+NsS'graphics'
p19
-g18
-sS'graphics'
-p20
g10
sS'y'
-p21
-g18
+p20
+g8
sS'x'
-p22
-g18
+p21
+g8
sS'model'
-p23
+p22
g10
sS'model.ipar'
+p23
+NsS'typ'
p24
-g4
-sS'typ'
-p25
-g18
+g8
sS'nout'
-p26
+p25
g4
+sS'model.blocktype'
+p26
+g15
s. \ No newline at end of file
diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js
index 274150dd..8e50d327 100644
--- a/js/Branching/MUX_f.js
+++ b/js/Branching/MUX_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX_f.sci" */
function MUX_f() {
MUX_f.prototype.define = function MUX_f() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["mux"]), new ScilabDouble([1]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([0.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -21,7 +21,7 @@ function MUX_f() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -29,45 +29,45 @@ function MUX_f() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>8) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>8) {
message("Block must have at least two input ports and at most eight");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
+ if (size(this.in,"*")<2||size(this.in,"*")>8||or(this.in==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -81,7 +81,7 @@ function MUX_f() {
MUX_f.prototype.importset = function MUX_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX_f.prototype.getContainer = function MUX_f() { return new BasicBlock(this.x); }
}
diff --git a/js/Branching/MUX_f.pickle b/js/Branching/MUX_f.pickle
index 101416ce..dbcaa8bc 100644
--- a/js/Branching/MUX_f.pickle
+++ b/js/Branching/MUX_f.pickle
@@ -25,54 +25,53 @@ sS'ok'
p5
S'boolean'
p6
-sS'model.blocktype'
+sS'model.in'
p7
-S'string'
+S'vector'
p8
sS'x.graphics'
p9
S'object'
p10
-sS'graphics.exprs'
+sS'in'
p11
-NsS'in1'
-p12
g4
sS'model.dep_ut'
-p13
+p12
S'vector_boolean'
-p14
+p13
sS'exprs'
+p14
+S'string'
p15
-g8
sS'x.model'
p16
NsS'gr_i'
p17
-S'vector'
+g8
+sS'graphics.exprs'
p18
-sS'model.in'
+NsS'graphics'
p19
-g18
-sS'graphics'
-p20
g10
sS'y'
-p21
-g18
+p20
+g8
sS'x'
-p22
-g18
+p21
+g8
sS'model'
-p23
+p22
g10
sS'model.ipar'
+p23
+NsS'typ'
p24
-g4
-sS'typ'
-p25
-g18
+g8
sS'nout'
-p26
+p25
g4
+sS'model.blocktype'
+p26
+g15
s. \ No newline at end of file
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];
diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js
index 5daa5b0f..e0c9e793 100644
--- a/js/Sinks/AFFICH_m.js
+++ b/js/Sinks/AFFICH_m.js
@@ -6,14 +6,14 @@ function AFFICH_m() {
this.colr = 1;
this.nt = 5;
this.nd = 1;
- this.in1 = [1,1];
+ this.in = [1,1];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["affich2"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble([this.in1[1-1][1-1]]);
- this.model.in2 = new ScilabDouble([this.in1[1-1][2-1]]);
+ this.model.in = new ScilabDouble([this.in[1-1][1-1]]);
+ this.model.in2 = new ScilabDouble([this.in[1-1][2-1]]);
this.model.evtin = new ScilabDouble([1]);
- this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]);
- this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
+ this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in[1-1][1-1]*this.in[1-1][2-1],1)]);
+ this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in[1-1][1-1]]);
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabDouble([]);
this.model.dep_ut = new ScilabBoolean([true,false]);
@@ -30,7 +30,7 @@ function AFFICH_m() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set parameters";
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
font:["Font number",this.font],
fontsize:["Font size",this.fontsize],
colr:["Color",this.colr],
@@ -44,14 +44,14 @@ function AFFICH_m() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = inverse(arguments[0]["in1"]);
+ this.in = inverse(arguments[0]["in"]);
this.font = parseFloat(arguments[0]["font"]);
this.fontsize = parseFloat(arguments[0]["fontsize"]);
this.colr = parseFloat(arguments[0]["colr"]);
this.nt = parseFloat(arguments[0]["nt"]);
this.nd = parseFloat(arguments[0]["nd"]);
this.herit = arguments[0]["herit"];
- var exprs = [arguments[0]["in1"], arguments[0]["font"], arguments[0]["fontsize"], arguments[0]["colr"], arguments[0]["nt"], arguments[0]["nd"], arguments[0]["herit"]];
+ var exprs = [arguments[0]["in"], arguments[0]["font"], arguments[0]["fontsize"], arguments[0]["colr"], arguments[0]["nt"], arguments[0]["nd"], arguments[0]["herit"]];
if (!ok) {
break;
}
@@ -85,14 +85,14 @@ function AFFICH_m() {
throw "user error";
}
if (ok) {
- var tmpvar0 = set_io(this.model,this.graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,this.graphics,list(this.in,1),list(),ones(1-this.herit,1),[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
if (ok) {
- this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
- this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]);
+ this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in[1-1][1-1]]);
+ this.model.dstate = new ScilabDouble([-1],[0],[0],[1],[1],[0],[zeros(this.in[1-1][1-1]*this.in[1-1][2-1],1)]);
this.model.evtin = new ScilabDouble([ones(1-this.herit,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
this.x.graphics = this.graphics;
@@ -108,7 +108,7 @@ function AFFICH_m() {
AFFICH_m.prototype.importset = function AFFICH_m() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.font = ary[1];
this.fontsize = ary[2];
this.colr = ary[3];
diff --git a/js/Sinks/AFFICH_m.pickle b/js/Sinks/AFFICH_m.pickle
index b4ebd3aa..53b7cd38 100644
--- a/js/Sinks/AFFICH_m.pickle
+++ b/js/Sinks/AFFICH_m.pickle
@@ -39,42 +39,42 @@ S'double'
p6
sS'x.model'
p7
-NsS'font'
+NsS'in'
p8
+S'vector'
+p9
+sS'font'
+p10
g6
sS'model.in2'
-p9
+p11
g6
sS'x.graphics'
-p10
+p12
g4
sS'nd'
-p11
+p13
g6
sS'model.evtin'
-p12
+p14
g6
sS'nt'
-p13
+p15
g6
sS'model.firing'
-p14
-S'vector'
-p15
-sS'model.label'
p16
-S'string'
+g9
+sS'model.label'
p17
-sS'model.sim'
+S'string'
p18
-S'list'
+sS'model.sim'
p19
-sS'mess'
+S'list'
p20
-g2
-sS'in1'
+sS'mess'
p21
-g15
+g2
sS'fontsize'
p22
g6
@@ -88,14 +88,14 @@ p25
g2
sS'typ'
p26
-g15
+g9
sS'ok'
p27
S'boolean'
p28
sS'model.blocktype'
p29
-g17
+g18
sS'model.dep_ut'
p30
S'vector_boolean'
@@ -105,13 +105,13 @@ p32
g2
sS'gr_i'
p33
-g15
+g9
sS'y'
p34
-g15
+g9
sS'x'
p35
-g15
+g9
sS'model'
p36
g4
diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js
index a99952de..8d40f03f 100644
--- a/js/Sinks/CMSCOPE.js
+++ b/js/Sinks/CMSCOPE.js
@@ -2,7 +2,7 @@
function CMSCOPE() {
CMSCOPE.prototype.define = function CMSCOPE() {
this.win = -1;
- this.in1 = [[1],[1]];
+ this.in = [[1],[1]];
this.wdim = [[-1],[-1]];
this.wpos = [[-1],[-1]];
this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
@@ -14,15 +14,15 @@ function CMSCOPE() {
var period = transpose(this.per.slice());
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmscope"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble(this.in1);
+ this.model.in = new ScilabDouble([this.in]);
this.model.in2 = new ScilabDouble([1],[1]);
this.model.intyp = new ScilabDouble([1],[1]);
this.model.evtin = new ScilabDouble([1]);
this.model.rpar = new ScilabDouble([0],[period.slice()],[yy.slice()]);
- this.model.ipar = new ScilabDouble([this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]);
+ this.model.ipar = new ScilabDouble([this.win],[size(this.in,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in.slice()],[this.clrs.slice(1-1,sum(this.in))]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
+ var exprs = [[strcat(string(this.in)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"CMSCOPE\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -34,7 +34,7 @@ function CMSCOPE() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set Scope parameters";
var options = {
- in1:["Input ports sizes",this.in1.toString().replace(/,/g," ")],
+ in:["Input ports sizes",this.in.toString().replace(/,/g," ")],
clrs:["Drawing colors (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")],
win:["Output window number (-1 for automatic)",this.win],
wpos:["Output window position",this.wpos.toString().replace(/,/g," ")],
@@ -52,7 +52,7 @@ function CMSCOPE() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = inverse(arguments[0]["in1"]);
+ this.in = inverse(arguments[0]["in"]);
this.clrs = inverse(arguments[0]["clrs"]);
this.win = parseFloat(arguments[0]["win"]);
this.wpos = inverse(arguments[0]["wpos"]);
@@ -63,21 +63,21 @@ function CMSCOPE() {
this.N = parseFloat(arguments[0]["N"]);
this.heritance = arguments[0]["heritance"];
this.nom = arguments[0]["nom"];
- var exprs = [arguments[0]["in1"], arguments[0]["clrs"], arguments[0]["win"], arguments[0]["wpos"], arguments[0]["wdim"], arguments[0]["ymin"], arguments[0]["ymax"], arguments[0]["per"], arguments[0]["N"], arguments[0]["heritance"], arguments[0]["nom"]];
+ var exprs = [arguments[0]["in"], arguments[0]["clrs"], arguments[0]["win"], arguments[0]["wpos"], arguments[0]["wdim"], arguments[0]["ymin"], arguments[0]["ymax"], arguments[0]["per"], arguments[0]["N"], arguments[0]["heritance"], arguments[0]["nom"]];
if (!ok) {
break;
}
var mess = [];
- if (size(this.in1,"*")<=0) {
+ if (size(this.in,"*")<=0) {
var mess = [[mess],["Block must have at least one input port"],[" "]];
var ok = false;
}
- if (min(this.in1)<=0) {
+ if (min(this.in)<=0) {
var mess = [[mess],["Port sizes must be positive"],[" "]];
var ok = false;
}
- if (size(this.clrs,"*")<sum(this.in1)) {
- var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
+ if (size(this.clrs,"*")<sum(this.in)) {
+ var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in))+")"],[" "]];
var ok = false;
}
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
@@ -119,10 +119,10 @@ function CMSCOPE() {
throw "user error";
}
if (ok) {
- this.in1 = this.in1.slice();
- var a = size(this.in1,1);
+ this.in = this.in.slice();
+ var a = size(this.in,1);
var in2 = ones(a,1);
- var tmpvar0 = set_io(this.model,this.graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
+ var tmpvar0 = set_io(this.model,this.graphics,list([this.in,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
@@ -138,8 +138,8 @@ function CMSCOPE() {
var period = transpose(this.per.slice());
var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
var rpar = [[0],[period.slice()],[yy.slice()]];
- this.clrs = this.clrs.slice(1-1,sum(this.in1));
- var ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ this.clrs = this.clrs.slice(1-1,sum(this.in));
+ var ipar = [[this.win],[size(this.in,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in.slice()],[this.clrs.slice()],[this.heritance]];
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
this.model.dstate = new ScilabDouble([]);
this.model.rpar = new ScilabDouble(rpar);
@@ -161,7 +161,7 @@ function CMSCOPE() {
CMSCOPE.prototype.importset = function CMSCOPE() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.clrs = ary[1];
this.win = ary[2];
this.wpos = ary[3];
diff --git a/js/Sinks/CMSCOPE.pickle b/js/Sinks/CMSCOPE.pickle
index 77b192bf..e35f69ce 100644
--- a/js/Sinks/CMSCOPE.pickle
+++ b/js/Sinks/CMSCOPE.pickle
@@ -60,41 +60,41 @@ p11
g2
sS'x.model'
p12
-NsS'ymin'
+NsS'in'
p13
g2
-sS'model.in2'
+sS'ymin'
p14
g2
-sS'model.intyp'
+sS'model.in2'
p15
g2
-sS'ymax'
+sS'model.intyp'
p16
g2
-sS'x.graphics'
+sS'ymax'
p17
+g2
+sS'x.graphics'
+p18
g9
sS'graphics.exprs'
-p18
-NsS'per'
p19
+NsS'per'
+p20
g2
sS'model.evtin'
-p20
+p21
g7
sS'graphics.id'
-p21
-NsS'model.label'
p22
-NsS'model.sim'
+NsS'model.label'
p23
-S'list'
+NsS'model.sim'
p24
-sS'mess'
+S'list'
p25
-g2
-sS'in1'
+sS'mess'
p26
g2
sS'in2'
@@ -111,8 +111,7 @@ p30
g2
sS'model.in'
p31
-g2
-sS'wdim'
+NsS'wdim'
p32
g2
sS'model.ipar'
diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js
index f8d4fc7c..a101bba9 100644
--- a/js/Sinks/WFILE_f.js
+++ b/js/Sinks/WFILE_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Sinks/WFILE_f.sci" */
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
- this.in1 = 1;
- var nin = sum(this.in1);
+ this.in = 1;
+ var nin = sum(this.in);
var frmt = "(7(e10.3,1x))";
var fname = "foo";
var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["writef"]);
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtin = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble([-1],[lunit],[zeros((nin+1)*this.N,1)]);
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
+ var exprs = [[sci2exp(this.in)],[fname],[frmt],[string(this.N)]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WFILE_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -34,7 +34,7 @@ function WFILE_f() {
var frmt = exprs[3-1];
this.set_param_popup_title = msprintf("Set %s block parameters","WFILE_f");
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
fname1:["Output File Name",this.fname1],
frmt1:["Output Format",this.frmt1],
N:["Buffer Size",this.N],
@@ -54,16 +54,16 @@ function WFILE_f() {
var frmt = exprs[3-1];
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = parseFloat(arguments[0]["in"]);
this.fname1 = parseFloat(arguments[0]["fname1"]);
this.frmt1 = parseFloat(arguments[0]["frmt1"]);
this.N = parseFloat(arguments[0]["N"]);
- var exprs = [arguments[0]["in1"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"]];
+ var exprs = [arguments[0]["in"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- var nin = this.in1;
+ this.in = int(this.in);
+ var nin = this.in;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
@@ -90,8 +90,8 @@ function WFILE_f() {
} else if (this.N<2) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Must be greater than 1.");
var ok = false;
- } else if (this.in1<=0) {
- block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
+ } else if (this.in<=0) {
+ block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in),"Strictly positive integer expected.");
var ok = false;
}
if (ok) {
@@ -117,7 +117,7 @@ function WFILE_f() {
WFILE_f.prototype.importset = function WFILE_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.fname1 = ary[1];
this.frmt1 = ary[2];
this.N = ary[3];
diff --git a/js/Sinks/WFILE_f.pickle b/js/Sinks/WFILE_f.pickle
index b6e60adf..46d57deb 100644
--- a/js/Sinks/WFILE_f.pickle
+++ b/js/Sinks/WFILE_f.pickle
@@ -40,33 +40,33 @@ sS'model.dep_ut'
p7
S'vector_boolean'
p8
-sS'warnMessage'
+sS'in'
p9
S'double'
p10
-sS'x.graphics'
+sS'warnMessage'
p11
+g10
+sS'x.graphics'
+p12
g6
sS'lunit'
-p12
+p13
g10
sS'fname'
-p13
-S'string'
p14
-sS'frmt'
+S'string'
p15
-g14
-sS'model.evtin'
+sS'frmt'
p16
+g15
+sS'model.evtin'
+p17
g10
sS'model.sim'
-p17
-g14
-sS'nin'
p18
-g10
-sS'in1'
+g15
+sS'nin'
p19
g10
sS'N'
@@ -80,8 +80,7 @@ p22
g10
sS'model.in'
p23
-g10
-sS'graphics'
+NsS'graphics'
p24
g6
sS'model.ipar'
@@ -97,7 +96,7 @@ S'boolean'
p29
sS'model.blocktype'
p30
-g14
+g15
sS'frmt1'
p31
g10
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index 42165bc6..e6c8c204 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Sinks/WRITEC_f.sci" */
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
- this.in1 = 1;
- var nin = sum(this.in1);
+ this.in = 1;
+ var nin = sum(this.in);
var frmt = "c ";
var fname = "foo";
this.swap = 0;
@@ -10,13 +10,13 @@ function WRITEC_f() {
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writec"]), new ScilabDouble([2]));
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtin = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble([-1],[lunit],[zeros((nin+1)*this.N,1)]);
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
+ var exprs = [[sci2exp(this.in)],[fname],[frmt],[string(this.N),string(this.swap)]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"WRITEC_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([4,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -33,7 +33,7 @@ function WRITEC_f() {
var frmt = exprs[3-1];
this.set_param_popup_title = msprintf("Set %s block parameters","WRITEC_f");
var options = {
- in1:["Input Size",this.in1],
+ in:["Input Size",this.in],
fname1:["Output File Name",this.fname1],
frmt1:["Output Format",this.frmt1],
N:["Buffer Size",this.N],
@@ -50,17 +50,17 @@ function WRITEC_f() {
var frmt = exprs[3-1];
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = parseFloat(arguments[0]["in"]);
this.fname1 = parseFloat(arguments[0]["fname1"]);
this.frmt1 = arguments[0]["frmt1"];
this.N = parseFloat(arguments[0]["N"]);
this.swap = parseFloat(arguments[0]["swap"]);
- var exprs = [arguments[0]["in1"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"], arguments[0]["swap"]];
+ var exprs = [arguments[0]["in"], arguments[0]["fname1"], arguments[0]["frmt1"], arguments[0]["N"], arguments[0]["swap"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- var nin = this.in1;
+ this.in = int(this.in);
+ var nin = this.in;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
@@ -87,8 +87,8 @@ function WRITEC_f() {
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
var ok = false;
- } else if (this.in1<=0) {
- block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
+ } else if (this.in<=0) {
+ block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in),"Strictly positive integer expected.");
var ok = false;
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
@@ -117,7 +117,7 @@ function WRITEC_f() {
WRITEC_f.prototype.importset = function WRITEC_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.fname1 = ary[1];
this.frmt1 = ary[2];
this.N = ary[3];
diff --git a/js/Sinks/WRITEC_f.pickle b/js/Sinks/WRITEC_f.pickle
index 3217f2a0..98ca4424 100644
--- a/js/Sinks/WRITEC_f.pickle
+++ b/js/Sinks/WRITEC_f.pickle
@@ -45,47 +45,46 @@ sS'model.dep_ut'
p7
S'vector_boolean'
p8
-sS'x.graphics'
+sS'in'
p9
-g4
-sS'lunit'
-p10
S'double'
+p10
+sS'x.graphics'
p11
-sS'swap'
+g4
+sS'lunit'
p12
-g11
-sS'fname'
+g10
+sS'swap'
p13
-S'string'
+g10
+sS'fname'
p14
-sS'frmt'
+S'string'
p15
-g14
-sS'model.evtin'
+sS'frmt'
p16
-g11
-sS'model.sim'
+g15
+sS'model.evtin'
p17
-S'list'
+g10
+sS'model.sim'
p18
-sS'nin'
+S'list'
p19
-g11
-sS'fmts'
+sS'nin'
p20
-S'vector_string'
+g10
+sS'fmts'
p21
-sS'in1'
+S'vector_string'
p22
-g11
sS'N'
p23
-g11
+g10
sS'model.in'
p24
-g11
-sS'graphics.exprs'
+NsS'graphics.exprs'
p25
NsS'model.ipar'
p26
@@ -100,13 +99,13 @@ S'boolean'
p30
sS'model.blocktype'
p31
-g14
+g15
sS'frmt1'
p32
-g14
+g15
sS'fname1'
p33
-g11
+g10
sS'exprs'
p34
g2
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js
index e8e19127..c4aa813e 100644
--- a/js/Sources/STEP.js
+++ b/js/Sources/STEP.js
@@ -26,7 +26,7 @@ function STEP() {
this.set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION");
var options = {
temps:["Step Time",this.temps],
- in1:["Initial Value",this.in1],
+ in:["Initial Value",this.in],
fi:["Final Value",this.fi],
}
return options;
@@ -36,21 +36,21 @@ function STEP() {
while (true) {
var ok = true;
this.temps = arguments[0]["temps"];
- this.in1 = arguments[0]["in1"];
+ this.in = arguments[0]["in"];
this.fi = arguments[0]["fi"];
- var exprs = [arguments[0]["temps"], arguments[0]["in1"], arguments[0]["fi"]];
+ var exprs = [arguments[0]["temps"], arguments[0]["in"], arguments[0]["fi"]];
if (!ok) {
break;
}
- this.in1 = this.in1.slice();
+ this.in = this.in.slice();
this.fi = this.fi.slice();
- if (size(this.in1,"*")!=size(this.fi,"*")) {
- if (size(this.in1,"*")==1) {
- this.in1 = this.in1*ones(this.fi);
+ if (size(this.in,"*")!=size(this.fi,"*")) {
+ if (size(this.in,"*")==1) {
+ this.in = this.in*ones(this.fi);
} else if (size(this.fi,"*")==1) {
- this.fi = this.fi*ones(this.in1);
+ this.fi = this.fi*ones(this.in);
} else {
- block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected.");
+ block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in,"*"),size(this.fi,"*")),"Same sizes expected.");
var ok = false;
}
}
@@ -67,7 +67,7 @@ function STEP() {
if (this.temps==0) {
var rpar = [[this.fi],[this.fi]];
} else {
- var rpar = [[this.in1],[this.fi]];
+ var rpar = [[this.in],[this.fi]];
}
this.model.rpar = new ScilabDouble(rpar);
this.graphics.exprs = new ScilabDouble([exprs]);
@@ -85,7 +85,7 @@ function STEP() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
this.temps = ary[0];
- this.in1 = ary[1];
+ this.in = ary[1];
this.fi = ary[2];
}
STEP.prototype.getContainer = function STEP() { return new BasicBlock(this.x); }
diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle
index d750f79c..bb59932e 100644
--- a/js/Sources/STEP.pickle
+++ b/js/Sources/STEP.pickle
@@ -17,54 +17,54 @@ p7
atp8
Rp9
.(dp0
-S'graphics'
+S'graphics.exprs'
p1
-S'object'
+NsS'rpar'
p2
-sS'rpar'
-p3
S'matrix'
-p4
+p3
sS'x.model'
+p4
+NsS'in'
p5
-NsS'model.out'
+S'string'
p6
-S'double'
+sS'model.out'
p7
-sS'x.graphics'
+S'double'
p8
-g2
-sS'model.evtin'
+sS'x.graphics'
p9
-g7
-sS'model.firing'
+S'object'
p10
-g7
-sS'model.sim'
+sS'model.evtin'
p11
-S'list'
+g8
+sS'model.firing'
p12
-sS'model.evtout'
+g8
+sS'model.sim'
p13
-g7
-sS'model.out2'
+S'list'
p14
-g7
-sS'in1'
+sS'model.evtout'
p15
-S'string'
+g8
+sS'model.out2'
p16
+g8
sS'model.rpar'
p17
-g4
+g3
sS'model.outtyp'
p18
-g7
-sS'graphics.exprs'
+g8
+sS'graphics'
p19
-NsS'fi'
+g10
+sS'fi'
p20
-g16
+g6
sS'typ'
p21
S'vector'
@@ -75,14 +75,14 @@ S'boolean'
p24
sS'model.blocktype'
p25
-g16
+g6
sS'model.dep_ut'
p26
S'vector_boolean'
p27
sS'exprs'
p28
-g4
+g3
sS'gr_i'
p29
g22
@@ -94,5 +94,5 @@ p31
g22
sS'model'
p32
-g2
+g10
s. \ No newline at end of file
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js
index ef70faba..a63700e8 100644
--- a/js/Threshold/GENERAL_f.js
+++ b/js/Threshold/GENERAL_f.js
@@ -2,18 +2,18 @@
function GENERAL_f() {
GENERAL_f.prototype.define = function GENERAL_f() {
var rpar = [[0],[0],[0],[0]];
- this.in1 = 1;
+ this.in = 1;
this.out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
- this.model.nzcross = new ScilabDouble([this.in1]);
- this.model.in = new ScilabDouble([this.in1]);
+ this.model.nzcross = new ScilabDouble([this.in]);
+ this.model.in = new ScilabDouble([this.in]);
this.model.evtout = new ScilabDouble([ones(this.out,1)]);
this.model.rpar = new ScilabDouble([0],[0],[0],[0]);
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
+ var exprs = [[strcat(sci2exp(this.in))],[strcat(sci2exp(this.out))]];
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENERAL_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
@@ -24,13 +24,13 @@ function GENERAL_f() {
GENERAL_f.prototype.get = function GENERAL_f() {
var exprs = this.graphics.exprs;
var rpar = this.model.rpar;
- this.in1 = this.model.in;
+ this.in = this.model.in;
this.out = this.model.evtout;
- var nin = sum(this.in1);
+ var nin = sum(this.in);
var nout = sum(this.out);
this.set_param_popup_title = "Set General Zero-Crossing parameters";
var options = {
- in1:["Input size",this.in1],
+ in:["Input size",this.in],
out:["Number of event output",this.out],
}
return options;
@@ -38,22 +38,22 @@ function GENERAL_f() {
GENERAL_f.prototype.set = function GENERAL_f() {
var exprs = this.graphics.exprs;
var rpar = this.model.rpar;
- this.in1 = this.model.in;
+ this.in = this.model.in;
this.out = this.model.evtout;
- var nin = sum(this.in1);
+ var nin = sum(this.in);
var nout = sum(this.out);
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
+ this.in = arguments[0]["in"];
this.out = parseFloat(arguments[0]["out"]);
- var exprs = [arguments[0]["in1"], arguments[0]["out"]];
+ var exprs = [arguments[0]["in"], arguments[0]["out"]];
if (ok) {
- var tmpvar0 = check_io(this.model,this.graphics,this.in1,[],[],ones(this.out,1));
+ var tmpvar0 = check_io(this.model,this.graphics,this.in,[],[],ones(this.out,1));
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
if (ok) {
var nout1 = this.out;
- var nin1 = this.in1;
+ var nin1 = this.in;
if (nout==nout1&&nin==nin1) {
var rp = matrix(rpar,nout,2^(2*nin));
} else {
@@ -63,7 +63,7 @@ function GENERAL_f() {
var result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
if (result.length!=0) {
rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.rpar = new ScilabDouble(rp.slice());
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
@@ -80,7 +80,7 @@ function GENERAL_f() {
GENERAL_f.prototype.importset = function GENERAL_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
this.out = ary[1];
}
GENERAL_f.prototype.getContainer = function GENERAL_f() { return new BasicBlock(this.x); }
diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle
index b652bc60..c400603c 100644
--- a/js/Threshold/GENERAL_f.pickle
+++ b/js/Threshold/GENERAL_f.pickle
@@ -30,80 +30,80 @@ sS'result'
p6
S'double'
p7
-sS'out'
+sS'in'
p8
g7
-sS'nin1'
+sS'out'
p9
-NsS'rp'
+g7
+sS'nin1'
p10
+NsS'rp'
+p11
g7
sS'x.graphics'
-p11
+p12
g2
sS'typ'
-p12
-S'vector'
p13
-sS'model.firing'
+S'vector'
p14
+sS'model.firing'
+p15
g7
sS'model.sim'
-p15
-S'list'
p16
-sS'model.evtout'
+S'list'
p17
-g7
-sS'nin'
+sS'model.evtout'
p18
g7
-sS'rp.slice(1-1,nout1).slice(1-1,2*n)'
+sS'nin'
p19
g7
-sS'in1'
+sS'rp.slice(1-1,nout1).slice(1-1,2*n)'
p20
g7
-sS'model.rpar'
+sS'in1'
p21
+NsS'model.rpar'
+p22
g4
sS'model.in'
-p22
-g7
-sS'graphics.exprs'
p23
-NsS'nout1'
+NsS'graphics.exprs'
p24
-NsS'model.nzcross'
+NsS'nout1'
p25
-g7
-sS'model.blocktype'
+NsS'model.nzcross'
p26
-S'string'
+NsS'model.blocktype'
p27
-sS'model.dep_ut'
+S'string'
p28
-S'vector_boolean'
+sS'model.dep_ut'
p29
-sS'n'
+S'vector_boolean'
p30
+sS'n'
+p31
g7
sS'exprs'
-p31
+p32
g4
sS'gr_i'
-p32
-g13
-sS'y'
p33
-g13
-sS'x'
+g14
+sS'y'
p34
-g13
-sS'model'
+g14
+sS'x'
p35
+g14
+sS'model'
+p36
g2
sS'nout'
-p36
+p37
g7
s. \ No newline at end of file
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index cae284ce..3a5c73bb 100644
--- a/js/Threshold/ZCROSS_f.js
+++ b/js/Threshold/ZCROSS_f.js
@@ -2,17 +2,17 @@
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
var rpar = [[-1],[-1],[0],[0]];
- this.in1 = 1;
+ this.in = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
- this.model.in = new ScilabDouble([this.in1]);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = new ScilabDouble([-1],[-1],[0],[0]);
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = strcat(sci2exp(this.in1));
+ var exprs = strcat(sci2exp(this.in));
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -24,7 +24,7 @@ function ZCROSS_f() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set Zero-Crossing parameters";
var options = {
- in1:["Input size",this.in1],
+ in:["Input size",this.in],
}
return options;
}
@@ -32,24 +32,24 @@ function ZCROSS_f() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- this.in1 = int(this.in1);
- if (this.in1<=0) {
+ this.in = int(this.in);
+ if (this.in<=0) {
message("Block must have at least one input");
throw "user error";
} else {
var kk = 0;
- for (jj=1;jj<=this.in1;jj+=1) {
- var kk = kk+2^(this.in1+jj-1);
+ for (jj=1;jj<=this.in;jj+=1) {
+ var kk = kk+2^(this.in+jj-1);
}
- this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
+ this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in)-kk,1)]);
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.in = new ScilabDouble([this.in1]);
- this.model.nzcross = new ScilabDouble([this.in1]);
+ this.model.in = new ScilabDouble([this.in]);
+ this.model.nzcross = new ScilabDouble([this.in]);
this.model.firing = new ScilabDouble([-1]);
this.x.graphics = this.graphics;
this.x.model = this.model;
@@ -64,7 +64,7 @@ function ZCROSS_f() {
ZCROSS_f.prototype.importset = function ZCROSS_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
ZCROSS_f.prototype.getContainer = function ZCROSS_f() { return new BasicBlock(this.x); }
}
diff --git a/js/Threshold/ZCROSS_f.pickle b/js/Threshold/ZCROSS_f.pickle
index 2aac3c07..6b29920c 100644
--- a/js/Threshold/ZCROSS_f.pickle
+++ b/js/Threshold/ZCROSS_f.pickle
@@ -21,64 +21,62 @@ sS'model.evtout'
p3
S'double'
p4
-sS'model.blocktype'
+sS'model.in'
p5
-S'string'
+NsS'x.graphics'
p6
-sS'x.graphics'
-p7
S'object'
-p8
+p7
sS'kk'
+p8
+S'string'
p9
-g6
sS'model.nzcross'
p10
-g4
-sS'graphics.exprs'
+NsS'graphics'
p11
-NsS'in1'
-p12
-g4
+g7
sS'model.rpar'
-p13
+p12
S'matrix'
-p14
+p13
sS'rpar'
-p15
-g14
+p14
+g13
sS'exprs'
-p16
+p15
g4
sS'x.model'
-p17
+p16
NsS'gr_i'
-p18
+p17
S'vector'
-p19
+p18
sS'model.dep_ut'
-p20
+p19
S'vector_boolean'
+p20
+sS'graphics.exprs'
p21
-sS'model.in'
+NsS'in'
p22
g4
-sS'graphics'
-p23
-g8
sS'y'
-p24
-g19
+p23
+g18
sS'x'
-p25
-g19
+p24
+g18
sS'model'
-p26
-g8
+p25
+g7
sS'typ'
-p27
-g19
+p26
+g18
sS'model.firing'
-p28
+p27
g4
+sS'model.blocktype'
+p28
+g9
s. \ No newline at end of file
diff --git a/sci2jsyacc.py b/sci2jsyacc.py
index 176f0799..4ce30f8b 100755
--- a/sci2jsyacc.py
+++ b/sci2jsyacc.py
@@ -1620,6 +1620,8 @@ def print_var(var):
l = var.find('.')
basevar = var[:l] if l != -1 else var
if basevar in GLOBAL_VARS:
+ if var == 'in1':
+ var = 'in'
ret = 'this.%s' % (var)
else:
ret = '%s' % (var)