diff options
Diffstat (limited to 'js/Electrical')
-rw-r--r-- | js/Electrical/CCS.js | 10 | ||||
-rw-r--r-- | js/Electrical/CVS.js | 10 | ||||
-rw-r--r-- | js/Electrical/Capacitor.js | 14 | ||||
-rw-r--r-- | js/Electrical/ConstantVoltage.js | 16 | ||||
-rw-r--r-- | js/Electrical/CurrentSensor.js | 8 | ||||
-rw-r--r-- | js/Electrical/Diode.js | 10 | ||||
-rw-r--r-- | js/Electrical/Ground.js | 6 | ||||
-rw-r--r-- | js/Electrical/Gyrator.js | 10 | ||||
-rw-r--r-- | js/Electrical/IdealTransformer.js | 10 | ||||
-rw-r--r-- | js/Electrical/Inductor.js | 12 | ||||
-rw-r--r-- | js/Electrical/MOTOR.js | 4 | ||||
-rw-r--r-- | js/Electrical/NMOS.js | 12 | ||||
-rw-r--r-- | js/Electrical/NPN.js | 10 | ||||
-rw-r--r-- | js/Electrical/OpAmp.js | 12 | ||||
-rw-r--r-- | js/Electrical/PMOS.js | 12 | ||||
-rw-r--r-- | js/Electrical/PNP.js | 10 | ||||
-rw-r--r-- | js/Electrical/PotentialSensor.js | 6 | ||||
-rw-r--r-- | js/Electrical/Resistor.js | 16 | ||||
-rw-r--r-- | js/Electrical/SineVoltage.js | 8 | ||||
-rw-r--r-- | js/Electrical/Switch.js | 14 | ||||
-rw-r--r-- | js/Electrical/VVsourceAC.js | 8 | ||||
-rw-r--r-- | js/Electrical/VariableResistor.js | 10 | ||||
-rw-r--r-- | js/Electrical/VoltageSensor.js | 8 | ||||
-rw-r--r-- | js/Electrical/VsourceAC.js | 8 |
24 files changed, 122 insertions, 122 deletions
diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js index 2278d75e..694226ca 100644 --- a/js/Electrical/CCS.js +++ b/js/Electrical/CCS.js @@ -31,19 +31,19 @@ function CCS() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = []; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2.1,3],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js index 612038a5..aa3b3e1d 100644 --- a/js/Electrical/CVS.js +++ b/js/Electrical/CVS.js @@ -31,19 +31,19 @@ function CVS() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = []; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2.1,3],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js index 8096f50d..a096cc88 100644 --- a/js/Electrical/Capacitor.js +++ b/js/Electrical/Capacitor.js @@ -5,17 +5,17 @@ function Capacitor() { this.C = 0.01; this.v = 0; this.model.rpar = [[this.C],[this.v]]; - this.model.sim = new ScilabString("Capacitor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["Capacitor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Capacitor"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list(["C","v"],list(this.C,this.v),[0,1]); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = string([[this.C],[this.v]]); gr_i = []; this.x = standard_define([2,1.1],this.model,exprs,list(gr_i,0)); @@ -45,8 +45,8 @@ function Capacitor() { if (!ok) { break; } - this.model.rpar = new ScilabDouble(this.C); - this.model.equations.parameters[2] = list(new ScilabDouble(this.C),new ScilabDouble(this.v)); + 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.x.model = this.model; diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index ab61e88f..b38412a4 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -3,18 +3,18 @@ function ConstantVoltage() { ConstantVoltage.prototype.define = function ConstantVoltage() { this.V = 0.01; this.model = scicos_model(); - this.model.rpar = new ScilabDouble(this.V); - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.sim = new ScilabString("ConstantVoltage"); - this.model.blocktype = new ScilabString("c"); + this.model.rpar = new ScilabDouble([this.V]); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.sim = new ScilabString(["ConstantVoltage"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,false]; mo = modelica(); mo.model = "ConstantVoltage"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list("V",list(this.V)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = string(this.V); gr_i = []; this.x = standard_define([1.5,1.1],this.model,exprs,list(gr_i,0)); @@ -41,8 +41,8 @@ function ConstantVoltage() { if (!ok) { break; } - this.model.rpar = new ScilabDouble(this.V); - this.model.equations.parameters[2] = list(new ScilabDouble(this.V)); + 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.x.model = this.model; diff --git a/js/Electrical/CurrentSensor.js b/js/Electrical/CurrentSensor.js index 2736b21f..012f2595 100644 --- a/js/Electrical/CurrentSensor.js +++ b/js/Electrical/CurrentSensor.js @@ -2,16 +2,16 @@ function CurrentSensor() { CurrentSensor.prototype.define = function CurrentSensor() { this.model = scicos_model(); - this.model.in1 = new ScilabDouble(1); + this.model.in1 = new ScilabDouble([1]); this.model.out = [[1],[1]]; - this.model.sim = new ScilabString("CurrentSensor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["CurrentSensor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "CurrentSensor"; mo.inputs = "p"; mo.outputs = [["n"],["i"]]; - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = []; gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js index 318a1d5e..1b0e2795 100644 --- a/js/Electrical/Diode.js +++ b/js/Electrical/Diode.js @@ -7,17 +7,17 @@ function Diode() { this.R = 1.e8; this.model = scicos_model(); this.model.rpar = [[this.Ids],[this.Vt],[this.Maxexp],[this.R]]; - this.model.in1 = new ScilabDouble(1); - this.model.out = new ScilabDouble(1); - this.model.sim = new ScilabString("Diode"); - this.model.blocktype = new ScilabString("c"); + this.model.in1 = new ScilabDouble([1]); + this.model.out = new ScilabDouble([1]); + this.model.sim = new ScilabString(["Diode"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Diode"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]); gr_i = []; this.x = standard_define([2,1],this.model,exprs,list(gr_i,0)); diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js index 3703cb30..867c9a7a 100644 --- a/js/Electrical/Ground.js +++ b/js/Electrical/Ground.js @@ -4,13 +4,13 @@ function Ground() { this.model = scicos_model(); this.model.in1 = [1]; this.model.out = []; - this.model.sim = new ScilabString("Ground"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["Ground"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Ground"; mo.inputs = "p"; - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = ""; gr_i = []; this.x = standard_define([1,1],this.model,exprs,list(gr_i,0)); diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index 54f316eb..4f664525 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -31,19 +31,19 @@ function Gyrator() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = [["1"],["1"]]; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index 3279b603..134085ce 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -31,19 +31,19 @@ function IdealTransformer() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = ["1"]; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index 86ad7fbb..034abf89 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -5,16 +5,16 @@ function Inductor() { this.model.in1 = [1]; this.model.out = [1]; this.L = 1.e-5; - this.model.rpar = new ScilabDouble(this.L); - this.model.sim = new ScilabString("Inductor"); - this.model.blocktype = new ScilabString("c"); + this.model.rpar = new ScilabDouble([this.L]); + this.model.sim = new ScilabString(["Inductor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Inductor"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list("L",list(this.L)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = string(this.L); gr_i = []; this.x = standard_define([2,0.9],this.model,exprs,list(gr_i,0)); @@ -41,8 +41,8 @@ function Inductor() { if (!ok) { break; } - this.model.rpar = new ScilabDouble(this.L); - this.model.equations.parameters[2] = list(new ScilabDouble(this.L)); + 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.x.model = this.model; diff --git a/js/Electrical/MOTOR.js b/js/Electrical/MOTOR.js index 967936fb..f9fce6ce 100644 --- a/js/Electrical/MOTOR.js +++ b/js/Electrical/MOTOR.js @@ -4,8 +4,8 @@ function MOTOR() { this.model = scicos_model(); this.model.out = [[1],[1]]; this.model.in1 = [1]; - this.model.sim = new ScilabString("motor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["motor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; gr_i = []; exprs = ""; diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index 1ed6e464..3bcaa14d 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -11,17 +11,17 @@ function NMOS() { this.dW = -2.5e-6; this.dL = -1.5e-6; this.RDS = 1.e+7; - this.model.sim = new ScilabString("NMOS"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["NMOS"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "NMOS"; mo.outputs = [["D"],["B"],["S"]]; mo.inputs = "G"; mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -65,7 +65,7 @@ function NMOS() { 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)); + 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.x.model = this.model; diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index 9f7544db..8f903938 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -31,19 +31,19 @@ function NPN() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]]; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js index 630e5f77..b1b1222a 100644 --- a/js/Electrical/OpAmp.js +++ b/js/Electrical/OpAmp.js @@ -4,17 +4,17 @@ function OpAmp() { S = []; Z = []; this.model = scicos_model(); - this.model.sim = new ScilabString("OpAmp"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["OpAmp"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = this.model.sim; mo.inputs = [["in_p"],["in_n"]]; mo.outputs = ["out"]; mo.parameters = list(S,Z); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); this.model.rpar = Z; exprs = string(Z); gr_i = []; @@ -47,7 +47,7 @@ function OpAmp() { if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble(this.OLGain),new ScilabDouble(this.SatH),new ScilabDouble(this.SatL)); + 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.x.model = this.model; diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index 551367d6..e9c629a6 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -11,17 +11,17 @@ function PMOS() { this.dW = -2.5e-6; this.dL = -2.1e-6; this.RDS = 1.e+7; - this.model.sim = new ScilabString("PMOS"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["PMOS"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "PMOS"; mo.outputs = [["D"],["B"],["S"]]; mo.inputs = "G"; mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -65,7 +65,7 @@ function PMOS() { 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)); + 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.x.model = this.model; diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index 836bf673..99b0ccae 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -31,19 +31,19 @@ function PNP() { } this.model = scicos_model(); mo = modelica(); - this.model.sim = new ScilabString(ModelName); + this.model.sim = new ScilabString([ModelName]); mo.inputs = MI; mo.outputs = MO; this.model.rpar = PrametersValue; mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName)); exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]]; gr_i = []; - this.model.blocktype = new ScilabString("c"); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [false,true]; mo.model = ModelName; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(MI,"*"),1)); - this.model.out = new ScilabDouble(ones(size(MO,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(MI,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(MO,"*"),1)]); this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); this.x.graphics.in_implicit = Typein; this.x.graphics.out_implicit = Typeout; diff --git a/js/Electrical/PotentialSensor.js b/js/Electrical/PotentialSensor.js index 98959cd1..42757248 100644 --- a/js/Electrical/PotentialSensor.js +++ b/js/Electrical/PotentialSensor.js @@ -5,14 +5,14 @@ function PotentialSensor() { this.model.in1 = [1]; this.model.out = [1]; this.model.rpar = []; - this.model.sim = new ScilabString("PotentialSensor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["PotentialSensor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "PotentialSensor"; mo.inputs = "p"; mo.outputs = ["v"]; - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); gr_i = []; this.x = standard_define([2,2],this.model,"",list(gr_i,0)); this.x.graphics.in_implicit = ["I"]; diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 3cdf9f1f..efec6abd 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -3,18 +3,18 @@ function Resistor() { Resistor.prototype.define = function Resistor() { this.model = scicos_model(); this.R = 0.01; - this.model.rpar = new ScilabDouble(this.R); - this.model.sim = new ScilabString("resistor"); - this.model.blocktype = new ScilabString("c"); + this.model.rpar = new ScilabDouble([this.R]); + this.model.sim = new ScilabString(["resistor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "Resistor"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list("R",list(this.R)); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = string(this.R); gr_i = []; this.x = standard_define([2,1],this.model,exprs,list(gr_i,0)); @@ -41,8 +41,8 @@ function Resistor() { if (!ok) { break; } - this.model.rpar = new ScilabDouble(this.R); - this.model.equations.parameters[2] = list(new ScilabDouble(this.R)); + 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.x.model = this.model; diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index acf54cb3..8e0943c7 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -10,15 +10,15 @@ function SineVoltage() { this.offset = 0; this.start = 0; this.model.rpar = [[this.V],[this.ph],[this.frq],[this.offset],[this.start]]; - this.model.sim = new ScilabString("SineVoltage"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["SineVoltage"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "SineVoltage"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,gr_i); @@ -55,7 +55,7 @@ function SineVoltage() { break; } this.model.rpar = [[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)); + 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.x.model = this.model; diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index 524b91d6..be1ff9fd 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -6,18 +6,18 @@ function Switch() { this.Roff = 1e5; S = [["Ron"],["Roff"]]; Z = eval(S); - this.model.sim = new ScilabString("Switch"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["Switch"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = this.model.sim; mo.inputs = [["p"],["inp"]]; mo.outputs = "n"; mo.parameters = list(S,Z); - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); - this.model.rpar = new ScilabDouble(Z); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); + this.model.rpar = new ScilabDouble([Z]); exprs = string(Z); gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); @@ -47,7 +47,7 @@ function Switch() { if (!ok) { break; } - this.model.equations.parameters[2] = list(new ScilabDouble(this.Ron),new ScilabDouble(this.Roff)); + this.model.equations.parameters[2] = list(new ScilabDouble([this.Ron]), new ScilabDouble([this.Roff])); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js index bbe4a54e..04dc5e9f 100644 --- a/js/Electrical/VVsourceAC.js +++ b/js/Electrical/VVsourceAC.js @@ -7,15 +7,15 @@ function VVsourceAC() { VA = 220; this.FR = 50; this.model.rpar = [this.FR]; - this.model.sim = new ScilabString("VVsourceAC"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["VVsourceAC"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "VVsourceAC"; mo.inputs = ["p","VA"]; mo.outputs = "n"; mo.parameters = list(["f"],list(this.FR)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = [string(this.FR)]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); @@ -44,7 +44,7 @@ function VVsourceAC() { break; } this.model.rpar = [this.FR]; - this.model.equations.parameters[2] = list(new ScilabDouble(this.FR)); + this.model.equations.parameters[2] = list(new ScilabDouble([this.FR])); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; diff --git a/js/Electrical/VariableResistor.js b/js/Electrical/VariableResistor.js index f9aaff39..6bf1e3b8 100644 --- a/js/Electrical/VariableResistor.js +++ b/js/Electrical/VariableResistor.js @@ -2,16 +2,16 @@ function VariableResistor() { VariableResistor.prototype.define = function VariableResistor() { this.model = scicos_model(); - this.model.sim = new ScilabString("VariableResistor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["VariableResistor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "VariableResistor"; mo.inputs = ["p","R"]; mo.outputs = "n"; - this.model.equations = new ScilabDouble(mo); - this.model.in1 = new ScilabDouble(ones(size(mo.inputs,"*"),1)); - this.model.out = new ScilabDouble(ones(size(mo.outputs,"*"),1)); + this.model.equations = new ScilabDouble([mo]); + this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]); + this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]); exprs = []; gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js index b32c3766..af2cf818 100644 --- a/js/Electrical/VoltageSensor.js +++ b/js/Electrical/VoltageSensor.js @@ -2,16 +2,16 @@ function VoltageSensor() { VoltageSensor.prototype.define = function VoltageSensor() { this.model = scicos_model(); - this.model.in1 = new ScilabDouble(1); + this.model.in1 = new ScilabDouble([1]); this.model.out = [[1],[1]]; - this.model.sim = new ScilabString("VoltageSensor"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["VoltageSensor"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "VoltageSensor"; mo.inputs = "p"; mo.outputs = [["n"],["v"]]; - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = []; gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js index cda321e2..f9895aa9 100644 --- a/js/Electrical/VsourceAC.js +++ b/js/Electrical/VsourceAC.js @@ -7,15 +7,15 @@ function VsourceAC() { this.VA = 220; this.FR = 50; this.model.rpar = [[this.VA],[this.FR]]; - this.model.sim = new ScilabString("VsourceAC"); - this.model.blocktype = new ScilabString("c"); + this.model.sim = new ScilabString(["VsourceAC"]); + this.model.blocktype = new ScilabString(["c"]); this.model.dep_ut = [true,false]; mo = modelica(); mo.model = "VsourceAC"; mo.inputs = "p"; mo.outputs = "n"; mo.parameters = list([["VA"],["f"]],list(this.VA,this.FR)); - this.model.equations = new ScilabDouble(mo); + this.model.equations = new ScilabDouble([mo]); exprs = [[string(this.VA)],[string(this.FR)]]; gr_i = []; this.x = standard_define([2,2],this.model,exprs,list(gr_i,0)); @@ -46,7 +46,7 @@ function VsourceAC() { break; } this.model.rpar = [[this.VA],[this.FR]]; - this.model.equations.parameters[2] = list(new ScilabDouble(this.VA),new ScilabDouble(this.FR)); + this.model.equations.parameters[2] = list(new ScilabDouble([this.VA]), new ScilabDouble([this.FR])); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; |