diff options
Diffstat (limited to 'js/Hydraulics/PerteDP.js')
-rw-r--r-- | js/Hydraulics/PerteDP.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Hydraulics/PerteDP.js b/js/Hydraulics/PerteDP.js index fd909028..f7f741bb 100644 --- a/js/Hydraulics/PerteDP.js +++ b/js/Hydraulics/PerteDP.js @@ -22,9 +22,9 @@ function PerteDP() { this.model.equations = new ScilabDouble([mo]); this.model.in = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); - this.exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]]; - this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PerteDP\",sz(1),sz(2));"]); - this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabDouble(this.exprs),list(this.gr_i,0)); + var exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]]; + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"PerteDP\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([2,1]),this.model,new ScilabDouble(exprs),list(gr_i,0)); this.x.graphics.in_implicit = ["I"]; this.x.graphics.out_implicit = ["I"]; return new BasicBlock(this.x); @@ -44,7 +44,7 @@ function PerteDP() { return options; } PerteDP.prototype.set = function PerteDP() { - this.exprs = this.graphics.exprs; + var exprs = this.graphics.exprs; while (true) { var ok = true; this.L = parseFloat(arguments[0]["L"]); @@ -58,7 +58,7 @@ function PerteDP() { } this.model.rpar = new ScilabDouble([this.L],[this.D],[this.lambda],[this.z1],[this.z2],[this.p_rho]); this.model.equations.parameters[2-1] = list(new ScilabDouble([this.L]), new ScilabDouble([this.D]), new ScilabDouble([this.lambda]), new ScilabDouble([this.z1]), new ScilabDouble([this.z2]), new ScilabDouble([this.p_rho])); - this.graphics.exprs = new ScilabDouble([this.exprs]); + this.graphics.exprs = new ScilabDouble([exprs]); this.x.graphics = this.graphics; this.x.model = this.model; break; |