diff options
author | Sunil Shetye | 2018-07-11 17:51:05 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-12 23:01:50 +0530 |
commit | 44a3807a94783e831070f0e003340af58dc64d16 (patch) | |
tree | cce50388afa463583d7a7aead34d40f5b02281f7 /js/Electrical | |
parent | 0047c3bea1d86b12a08544f6f0833c63e77f6eac (diff) | |
download | sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.gz sci2js-44a3807a94783e831070f0e003340af58dc64d16.tar.bz2 sci2js-44a3807a94783e831070f0e003340af58dc64d16.zip |
change graphics to object
Diffstat (limited to 'js/Electrical')
36 files changed, 330 insertions, 294 deletions
diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js index 6a8c2211..bdd17ed1 100644 --- a/js/Electrical/CCS.js +++ b/js/Electrical/CCS.js @@ -59,8 +59,8 @@ function CCS() { } CCS.prototype.set = function CCS() { this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; return new BasicBlock(this.x); diff --git a/js/Electrical/CCS.pickle b/js/Electrical/CCS.pickle index 0dd41936..86117e01 100644 --- a/js/Electrical/CCS.pickle +++ b/js/Electrical/CCS.pickle @@ -6,8 +6,10 @@ S'x' p2 aS'model' p3 -atp4 -Rp5 +aS'graphics' +p4 +atp5 +Rp6 .(dp0 S'arg1' p1 diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js index 98af660e..36aee0b6 100644 --- a/js/Electrical/CVS.js +++ b/js/Electrical/CVS.js @@ -59,8 +59,8 @@ function CVS() { } CVS.prototype.set = function CVS() { this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; return new BasicBlock(this.x); diff --git a/js/Electrical/CVS.pickle b/js/Electrical/CVS.pickle index 0dd41936..86117e01 100644 --- a/js/Electrical/CVS.pickle +++ b/js/Electrical/CVS.pickle @@ -6,8 +6,10 @@ S'x' p2 aS'model' p3 -atp4 -Rp5 +aS'graphics' +p4 +atp5 +Rp6 .(dp0 S'arg1' p1 diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js index d39a9755..1c37b386 100644 --- a/js/Electrical/Capacitor.js +++ b/js/Electrical/Capacitor.js @@ -37,8 +37,8 @@ function Capacitor() { this.C = parseFloat(arguments[0]["C"]) this.v = parseFloat(arguments[0]["v"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.C,this.v,exprs] = scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),exprs); @@ -46,9 +46,9 @@ function Capacitor() { break; } this.model.rpar = new ScilabDouble([this.C]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.C]), new ScilabDouble([this.v])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.C]), new ScilabDouble([this.v])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/Capacitor.pickle b/js/Electrical/Capacitor.pickle index 7c4bbd09..ecb39b69 100644 --- a/js/Electrical/Capacitor.pickle +++ b/js/Electrical/Capacitor.pickle @@ -6,12 +6,14 @@ S'x' p2 aS'model' p3 -aS'C' -p4 aS'v' +p4 +aS'C' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'arg1' p1 @@ -56,33 +58,33 @@ g8 sS'model.equations' p18 g8 -sS'model.equations.parameters[2]' -p19 -g15 sS'mo.outputs' -p20 +p19 g5 sS'x.graphics.out_implicit' -p21 +p20 g13 sS'model.rpar' -p22 +p21 S'matrix' -p23 +p22 sS'graphics.exprs' -p24 +p23 NsS'typ' -p25 +p24 g13 sS'model.blocktype' -p26 +p25 g5 sS'mo' -p27 +p26 g2 sS'model.dep_ut' -p28 +p27 g13 +sS'model.equations.parameters[2-1]' +p28 +g15 sS'exprs' p29 g5 diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index d4693242..1191ac64 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -33,8 +33,8 @@ function ConstantVoltage() { ConstantVoltage.prototype.set = function ConstantVoltage() { this.V = parseFloat(arguments[0]["V"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs); @@ -42,9 +42,9 @@ function ConstantVoltage() { break; } this.model.rpar = new ScilabDouble([this.V]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.V])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.V])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/ConstantVoltage.pickle b/js/Electrical/ConstantVoltage.pickle index 61da6484..2de4f0ac 100644 --- a/js/Electrical/ConstantVoltage.pickle +++ b/js/Electrical/ConstantVoltage.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'V' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 @@ -50,36 +52,36 @@ g5 sS'model.equations' p17 g8 -sS'model.equations.parameters[2]' -p18 -g15 sS'mo.outputs' -p19 +p18 g5 sS'x.graphics.out_implicit' -p20 +p19 g13 sS'model.rpar' -p21 +p20 g8 sS'V' -p22 +p21 g8 sS'typ' -p23 +p22 g13 sS'graphics' -p24 +p23 g2 sS'model.blocktype' -p25 +p24 g5 sS'mo' -p26 +p25 g8 sS'model.dep_ut' -p27 +p26 g13 +sS'model.equations.parameters[2-1]' +p27 +g15 sS'exprs' p28 g5 diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js index d98e47e0..be762e26 100644 --- a/js/Electrical/Diode.js +++ b/js/Electrical/Diode.js @@ -43,8 +43,8 @@ function Diode() { this.Maxexp = parseFloat(arguments[0]["Maxexp"]) this.R = parseFloat(arguments[0]["R"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.Ids,this.Vt,this.Maxexp,this.R,exprs] = scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs); @@ -53,8 +53,8 @@ function Diode() { } this.model.rpar = new ScilabDouble([this.Ids],[this.Vt],[this.Maxexp],[this.R]); this.model.equations.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R)); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/Diode.pickle b/js/Electrical/Diode.pickle index ca621468..0e45a349 100644 --- a/js/Electrical/Diode.pickle +++ b/js/Electrical/Diode.pickle @@ -2,20 +2,22 @@ c__builtin__ set p0 ((lp1 -S'Ids' +S'Maxexp' p2 -aS'Maxexp' +aS'Ids' p3 aS'R' p4 aS'Vt' p5 -aS'x' +aS'graphics' p6 -aS'model' +aS'x' p7 -atp8 -Rp9 +aS'model' +p8 +atp9 +Rp10 .(dp0 S'arg1' p1 diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index aeba6720..1d717593 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -63,8 +63,8 @@ function Gyrator() { this.G1 = arguments[0]["G1"] this.G2 = arguments[0]["G2"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; var exprs = this.x.graphics.exprs; diff --git a/js/Electrical/Gyrator.pickle b/js/Electrical/Gyrator.pickle index 3902cab3..6de599d3 100644 --- a/js/Electrical/Gyrator.pickle +++ b/js/Electrical/Gyrator.pickle @@ -10,8 +10,10 @@ aS'G2' p4 aS'G1' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'x.model.equations.parameters[2-1]' p1 diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index df8ab379..f65858f6 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -61,8 +61,8 @@ function IdealTransformer() { IdealTransformer.prototype.set = function IdealTransformer() { this.N = arguments[0]["N"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; var exprs = this.x.graphics.exprs; diff --git a/js/Electrical/IdealTransformer.pickle b/js/Electrical/IdealTransformer.pickle index 058113be..6420988c 100644 --- a/js/Electrical/IdealTransformer.pickle +++ b/js/Electrical/IdealTransformer.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'N' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'x.model.equations.parameters[2-1]' p1 diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index 2b9d4e20..b4f4c4bf 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -33,8 +33,8 @@ function Inductor() { Inductor.prototype.set = function Inductor() { this.L = parseFloat(arguments[0]["L"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs); @@ -42,9 +42,9 @@ function Inductor() { break; } this.model.rpar = new ScilabDouble([this.L]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.L])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.L])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/Inductor.pickle b/js/Electrical/Inductor.pickle index 7ae983ab..6fd3d126 100644 --- a/js/Electrical/Inductor.pickle +++ b/js/Electrical/Inductor.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'L' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 @@ -51,35 +53,35 @@ sS'model.equations' p16 S'double' p17 -sS'model.equations.parameters[2]' -p18 -g14 sS'mo.outputs' -p19 +p18 g5 sS'x.graphics.out_implicit' -p20 +p19 g8 sS'L' -p21 +p20 g17 sS'model.rpar' -p22 +p21 g17 sS'graphics.exprs' -p23 +p22 NsS'typ' -p24 +p23 g8 sS'model.blocktype' -p25 +p24 g5 sS'mo' -p26 +p25 g17 sS'model.dep_ut' -p27 +p26 g8 +sS'model.equations.parameters[2-1]' +p27 +g14 sS'exprs' p28 g5 diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index 7e4d8ae2..d92186dd 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -57,17 +57,17 @@ function NMOS() { this.dL = parseFloat(arguments[0]["dL"]) this.RDS = parseFloat(arguments[0]["RDS"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/NMOS.pickle b/js/Electrical/NMOS.pickle index 92dc0817..9990c4ba 100644 --- a/js/Electrical/NMOS.pickle +++ b/js/Electrical/NMOS.pickle @@ -18,14 +18,16 @@ aS'Vt' p8 aS'W' p9 -aS'dW' +aS'graphics' p10 aS'x' p11 aS'model' p12 -atp13 -Rp14 +aS'dW' +p13 +atp14 +Rp15 .(dp0 S'arg1' p1 @@ -79,45 +81,45 @@ g7 sS'RDS' p21 g7 -sS'model.equations.parameters[2]' -p22 -g18 sS'mo.outputs' -p23 +p22 S'matrix' -p24 +p23 sS'x.graphics.out_implicit' -p25 -g24 +p24 +g23 sS'L' -p26 +p25 g7 sS'W' -p27 +p26 g7 sS'graphics.exprs' -p28 +p27 NsS'typ' -p29 +p28 g16 sS'dW' -p30 +p29 g7 sS'dL' -p31 +p30 g7 sS'model.blocktype' -p32 +p31 g5 sS'mo' -p33 +p32 g2 sS'model.dep_ut' -p34 +p33 g16 +sS'model.equations.parameters[2-1]' +p34 +g18 sS'exprs' p35 -g24 +g23 sS'gr_i' p36 g16 diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index 1617b2f4..d2e8dde1 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -93,8 +93,8 @@ function NPN() { this.Vt = arguments[0]["Vt"] this.EMinMax = arguments[0]["EMinMax"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; var exprs = this.x.graphics.exprs; diff --git a/js/Electrical/NPN.pickle b/js/Electrical/NPN.pickle index 36212a2e..8930541b 100644 --- a/js/Electrical/NPN.pickle +++ b/js/Electrical/NPN.pickle @@ -34,14 +34,16 @@ aS'Vt' p16 aS'Br' p17 -aS'EMinMax' +aS'graphics' p18 -aS'x' +aS'EMinMax' p19 -aS'model' +aS'x' p20 -atp21 -Rp22 +aS'model' +p21 +atp22 +Rp23 .(dp0 S'x.model.equations.parameters[2-1]' p1 diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js index a2bedf1e..fc529cb8 100644 --- a/js/Electrical/OpAmp.js +++ b/js/Electrical/OpAmp.js @@ -39,17 +39,17 @@ function OpAmp() { this.SatH = arguments[0]["SatH"] this.SatL = arguments[0]["SatL"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (false) { [ok,this.OLGain,this.SatH,this.SatL,exprs] = scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble([this.OLGain]), new ScilabDouble([this.SatH]), new ScilabDouble([this.SatL])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.OLGain]), new ScilabDouble([this.SatH]), new ScilabDouble([this.SatL])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/OpAmp.pickle b/js/Electrical/OpAmp.pickle index 32c77948..4ca97336 100644 --- a/js/Electrical/OpAmp.pickle +++ b/js/Electrical/OpAmp.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'SatH' +S'OLGain' p2 -aS'x' +aS'graphics' p3 -aS'model' +aS'SatH' p4 -aS'SatL' +aS'x' p5 -aS'OLGain' +aS'model' p6 -atp7 -Rp8 +aS'SatL' +p7 +atp8 +Rp9 .(dp0 S'arg1' p1 @@ -55,48 +57,48 @@ g5 sS'model.equations' p17 g8 -sS'model.equations.parameters[2]' -p18 -g15 sS'mo.outputs' -p19 +p18 S'vector' -p20 +p19 sS'x.graphics.out_implicit' -p21 -g20 +p20 +g19 sS'model.rpar' -p22 -g20 +p21 +g19 sS'S' -p23 -g20 +p22 +g19 sS'graphics.exprs' -p24 +p23 NsS'Z' -p25 -g20 +p24 +g19 sS'typ' -p26 -g20 +p25 +g19 sS'model.blocktype' -p27 +p26 g5 sS'mo' -p28 +p27 g2 sS'model.dep_ut' +p28 +g19 +sS'model.equations.parameters[2-1]' p29 -g20 +g15 sS'exprs' p30 g5 sS'gr_i' p31 -g20 +g19 sS'y' p32 -g20 +g19 sS'x' p33 g8 diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index 59dc456b..f783dab0 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -57,17 +57,17 @@ function PMOS() { this.dL = parseFloat(arguments[0]["dL"]) this.RDS = parseFloat(arguments[0]["RDS"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.W]), new ScilabDouble([this.L]), new ScilabDouble([this.Beta]), new ScilabDouble([this.Vt]), new ScilabDouble([this.K2]), new ScilabDouble([this.K5]), new ScilabDouble([this.dW]), new ScilabDouble([this.dL]), new ScilabDouble([this.RDS])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/PMOS.pickle b/js/Electrical/PMOS.pickle index 92dc0817..9990c4ba 100644 --- a/js/Electrical/PMOS.pickle +++ b/js/Electrical/PMOS.pickle @@ -18,14 +18,16 @@ aS'Vt' p8 aS'W' p9 -aS'dW' +aS'graphics' p10 aS'x' p11 aS'model' p12 -atp13 -Rp14 +aS'dW' +p13 +atp14 +Rp15 .(dp0 S'arg1' p1 @@ -79,45 +81,45 @@ g7 sS'RDS' p21 g7 -sS'model.equations.parameters[2]' -p22 -g18 sS'mo.outputs' -p23 +p22 S'matrix' -p24 +p23 sS'x.graphics.out_implicit' -p25 -g24 +p24 +g23 sS'L' -p26 +p25 g7 sS'W' -p27 +p26 g7 sS'graphics.exprs' -p28 +p27 NsS'typ' -p29 +p28 g16 sS'dW' -p30 +p29 g7 sS'dL' -p31 +p30 g7 sS'model.blocktype' -p32 +p31 g5 sS'mo' -p33 +p32 g2 sS'model.dep_ut' -p34 +p33 g16 +sS'model.equations.parameters[2-1]' +p34 +g18 sS'exprs' p35 -g24 +g23 sS'gr_i' p36 g16 diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index 8cccbb43..4166537b 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -93,8 +93,8 @@ function PNP() { this.Vt = arguments[0]["Vt"] this.EMinMax = arguments[0]["EMinMax"] this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; this.x = arg1; var exprs = this.x.graphics.exprs; diff --git a/js/Electrical/PNP.pickle b/js/Electrical/PNP.pickle index 36212a2e..8930541b 100644 --- a/js/Electrical/PNP.pickle +++ b/js/Electrical/PNP.pickle @@ -34,14 +34,16 @@ aS'Vt' p16 aS'Br' p17 -aS'EMinMax' +aS'graphics' p18 -aS'x' +aS'EMinMax' p19 -aS'model' +aS'x' p20 -atp21 -Rp22 +aS'model' +p21 +atp22 +Rp23 .(dp0 S'x.model.equations.parameters[2-1]' p1 diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index ebbfc7d4..381dc950 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -33,8 +33,8 @@ function Resistor() { Resistor.prototype.set = function Resistor() { this.R = parseFloat(arguments[0]["R"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs); @@ -42,9 +42,9 @@ function Resistor() { break; } this.model.rpar = new ScilabDouble([this.R]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.R])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.R])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/Resistor.pickle b/js/Electrical/Resistor.pickle index 6b547a6b..c7940c9a 100644 --- a/js/Electrical/Resistor.pickle +++ b/js/Electrical/Resistor.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'R' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 @@ -51,35 +53,35 @@ g5 sS'model.equations' p17 g8 -sS'model.equations.parameters[2]' -p18 -g15 sS'mo.outputs' -p19 +p18 g5 sS'x.graphics.out_implicit' -p20 +p19 g13 sS'model.rpar' -p21 +p20 g8 sS'R' -p22 +p21 g8 sS'graphics.exprs' -p23 +p22 NsS'typ' -p24 +p23 g13 sS'model.blocktype' -p25 +p24 g5 sS'mo' -p26 +p25 g2 sS'model.dep_ut' -p27 +p26 g13 +sS'model.equations.parameters[2-1]' +p27 +g15 sS'exprs' p28 g5 diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index 56ac2b5c..c479539f 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -46,8 +46,8 @@ function SineVoltage() { this.offset = parseFloat(arguments[0]["offset"]) this.start = parseFloat(arguments[0]["start"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.V,this.ph,this.frq,this.offset,this.start,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); @@ -55,9 +55,9 @@ function SineVoltage() { break; } this.model.rpar = new ScilabDouble([this.V],[this.ph],[this.frq],[this.offset],[this.start]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.V]), new ScilabDouble([this.ph]), new ScilabDouble([this.frq]), new ScilabDouble([this.offset]), new ScilabDouble([this.start])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.V]), new ScilabDouble([this.ph]), new ScilabDouble([this.frq]), new ScilabDouble([this.offset]), new ScilabDouble([this.start])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/SineVoltage.pickle b/js/Electrical/SineVoltage.pickle index 43dfea75..db2b83d2 100644 --- a/js/Electrical/SineVoltage.pickle +++ b/js/Electrical/SineVoltage.pickle @@ -2,22 +2,24 @@ c__builtin__ set p0 ((lp1 -S'V' +S'graphics' p2 -aS'start' +aS'offset' p3 -aS'frq' +aS'start' p4 -aS'offset' +aS'frq' p5 -aS'x' +aS'V' p6 -aS'model' +aS'x' p7 -aS'ph' +aS'model' p8 -atp9 -Rp10 +aS'ph' +p9 +atp10 +Rp11 .(dp0 S'arg1' p1 @@ -71,36 +73,36 @@ g4 sS'model.equations' p21 g4 -sS'model.equations.parameters[2]' -p22 -g18 sS'mo.outputs' -p23 +p22 g6 sS'x.graphics.out_implicit' -p24 +p23 g9 sS'model.rpar' -p25 +p24 S'matrix' -p26 +p25 sS'graphics.exprs' -p27 +p26 NsS'typ' -p28 +p27 g9 sS'model.blocktype' -p29 +p28 g6 sS'graphics' -p30 +p29 g2 sS'model.dep_ut' -p31 +p30 g9 +sS'model.equations.parameters[2-1]' +p31 +g18 sS'exprs' p32 -g26 +g25 sS'gr_i' p33 g9 diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index e922c86e..927bd912 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -39,17 +39,17 @@ function Switch() { this.Ron = parseFloat(arguments[0]["Ron"]) this.Roff = parseFloat(arguments[0]["Roff"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.Ron,this.Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),exprs); if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble([this.Ron]), new ScilabDouble([this.Roff])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.Ron]), new ScilabDouble([this.Roff])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/Switch.pickle b/js/Electrical/Switch.pickle index c5cb0a1a..478106f5 100644 --- a/js/Electrical/Switch.pickle +++ b/js/Electrical/Switch.pickle @@ -10,8 +10,10 @@ aS'Roff' p4 aS'Ron' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'arg1' p1 @@ -53,54 +55,54 @@ g5 sS'model.equations' p17 g8 -sS'model.equations.parameters[2]' -p18 -g15 sS'mo.outputs' -p19 +p18 g5 sS'x.graphics.out_implicit' -p20 +p19 S'vector' -p21 +p20 sS'model.rpar' -p22 +p21 g8 sS'S' -p23 +p22 g12 sS'graphics.exprs' -p24 +p23 NsS'Z' -p25 +p24 g8 sS'typ' -p26 -g21 +p25 +g20 sS'model.blocktype' -p27 +p26 g5 sS'Roff' -p28 +p27 g8 sS'Ron' -p29 +p28 g8 sS'mo' -p30 +p29 g2 sS'model.dep_ut' +p30 +g20 +sS'model.equations.parameters[2-1]' p31 -g21 +g15 sS'exprs' p32 g5 sS'gr_i' p33 -g21 +g20 sS'y' p34 -g21 +g20 sS'x' p35 g8 diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js index 8938dc9c..755932ea 100644 --- a/js/Electrical/VVsourceAC.js +++ b/js/Electrical/VVsourceAC.js @@ -35,8 +35,8 @@ function VVsourceAC() { VVsourceAC.prototype.set = function VVsourceAC() { this.FR = parseFloat(arguments[0]["FR"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs); @@ -44,9 +44,9 @@ function VVsourceAC() { break; } this.model.rpar = new ScilabDouble([this.FR]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.FR])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.FR])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/VVsourceAC.pickle b/js/Electrical/VVsourceAC.pickle index 37940c47..0d8e9a0a 100644 --- a/js/Electrical/VVsourceAC.pickle +++ b/js/Electrical/VVsourceAC.pickle @@ -8,8 +8,10 @@ aS'model' p3 aS'FR' p4 -atp5 -Rp6 +aS'graphics' +p5 +atp6 +Rp7 .(dp0 S'FR' p1 @@ -58,32 +60,32 @@ g2 sS'model.equations' p20 g2 -sS'model.equations.parameters[2]' -p21 -g18 sS'mo.outputs' -p22 +p21 g4 sS'x.graphics.out_implicit' -p23 +p22 g11 sS'model.rpar' -p24 +p23 g11 sS'graphics.exprs' -p25 +p24 NsS'typ' -p26 +p25 g11 sS'model.blocktype' -p27 +p26 g4 sS'mo' -p28 +p27 g2 sS'model.dep_ut' -p29 +p28 g11 +sS'model.equations.parameters[2-1]' +p29 +g18 sS'exprs' p30 g11 diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js index b96151e9..6ed2395b 100644 --- a/js/Electrical/VsourceAC.js +++ b/js/Electrical/VsourceAC.js @@ -37,8 +37,8 @@ function VsourceAC() { this.VA = parseFloat(arguments[0]["VA"]) this.FR = parseFloat(arguments[0]["FR"]) this.x = arg1; - var graphics = arg1.graphics; - var exprs = graphics.exprs; + this.graphics = arg1.graphics; + var exprs = this.graphics.exprs; this.model = arg1.model; while (true) { [ok,this.VA,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),exprs); @@ -46,9 +46,9 @@ function VsourceAC() { break; } this.model.rpar = new ScilabDouble([this.VA],[this.FR]); - this.model.equations.parameters[2] = list(new ScilabDouble([this.VA]), new ScilabDouble([this.FR])); - graphics.exprs = exprs; - this.x.graphics = graphics; + this.model.equations.parameters[2-1] = list(new ScilabDouble([this.VA]), new ScilabDouble([this.FR])); + this.graphics.exprs = new ScilabDouble([exprs]); + this.x.graphics = this.graphics; this.x.model = this.model; break; } diff --git a/js/Electrical/VsourceAC.pickle b/js/Electrical/VsourceAC.pickle index 20868c5c..59a36993 100644 --- a/js/Electrical/VsourceAC.pickle +++ b/js/Electrical/VsourceAC.pickle @@ -6,12 +6,14 @@ S'x' p2 aS'model' p3 -aS'FR' -p4 aS'VA' +p4 +aS'FR' p5 -atp6 -Rp7 +aS'graphics' +p6 +atp7 +Rp8 .(dp0 S'FR' p1 @@ -59,36 +61,36 @@ g2 sS'model.equations' p19 g2 -sS'model.equations.parameters[2]' -p20 -g17 sS'mo.outputs' -p21 +p20 g4 sS'x.graphics.out_implicit' -p22 +p21 g11 sS'model.rpar' -p23 +p22 S'matrix' -p24 +p23 sS'graphics.exprs' -p25 +p24 NsS'typ' -p26 +p25 g11 sS'model.blocktype' -p27 +p26 g4 sS'mo' -p28 +p27 g2 sS'model.dep_ut' -p29 +p28 g11 +sS'model.equations.parameters[2-1]' +p29 +g17 sS'exprs' p30 -g24 +g23 sS'gr_i' p31 g11 |