summaryrefslogtreecommitdiff
path: root/js/Electrical/VsourceAC.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/VsourceAC.js')
-rw-r--r--js/Electrical/VsourceAC.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js
index 9dd180d9..c1cf8acc 100644
--- a/js/Electrical/VsourceAC.js
+++ b/js/Electrical/VsourceAC.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Electrical/VsourceAC.sci" */
function VsourceAC() {
VsourceAC.prototype.define = function VsourceAC() {
- model = scicos_model();
- model.in1 = [1];
- model.out = [1];
+ this.model = scicos_model();
+ this.model.in1 = [1];
+ this.model.out = [1];
this.VA = 220;
this.FR = 50;
- model.rpar = [[this.VA],[this.FR]];
- model.sim = "VsourceAC";
- model.blocktype = "c";
- model.dep_ut = [true,false];
+ this.model.rpar = [[this.VA],[this.FR]];
+ 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));
- model.equations = mo;
+ this.model.equations = new ScilabDouble(mo);
exprs = [[string(this.VA)],[string(this.FR)]];
gr_i = [];
- this.x = standard_define([2,2],model,exprs,list(gr_i,0));
+ this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -39,17 +39,17 @@ function VsourceAC() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ 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);
if (!ok) {
break;
}
- model.rpar = [[this.VA],[this.FR]];
- model.equations.parameters[2-1] = list(this.VA,this.FR);
+ this.model.rpar = [[this.VA],[this.FR]];
+ this.model.equations.parameters[('2', 'double')] = list(this.VA,this.FR);
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
return new BasicBlock(this.x);