diff options
author | ASP1234 | 2016-07-12 10:08:17 +0000 |
---|---|---|
committer | ASP1234 | 2016-07-12 10:08:17 +0000 |
commit | 21eb583fa4e278c8bbeaa7e760a3004760cd667d (patch) | |
tree | 321111e372b6f5b5f1c7e84328b43e5ccaf464a7 /data_structures_correct/VsourceAC.js | |
parent | b0434f8e6acae956aedc0239da70be326fdcf2a3 (diff) | |
parent | a0a37b2eb0f8912f5f62166c57b760d35d5760f0 (diff) | |
download | xcos-on-web-21eb583fa4e278c8bbeaa7e760a3004760cd667d.tar.gz xcos-on-web-21eb583fa4e278c8bbeaa7e760a3004760cd667d.tar.bz2 xcos-on-web-21eb583fa4e278c8bbeaa7e760a3004760cd667d.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'data_structures_correct/VsourceAC.js')
-rw-r--r-- | data_structures_correct/VsourceAC.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/data_structures_correct/VsourceAC.js b/data_structures_correct/VsourceAC.js new file mode 100644 index 0000000..59cc3b4 --- /dev/null +++ b/data_structures_correct/VsourceAC.js @@ -0,0 +1,37 @@ +function VsourceAC() { + + VsourceAC.prototype.define = function VsourceAC() { + var model = scicos_model(); + model.in = new ScilabDouble([1]); + model.out = new ScilabDouble([1]); + + this.VA = 220; + + this.FR = 50; + model.rpar = new ScilabDouble([this.VA], [this.FR]); + model.sim = new ScilabString(["VsourceAC"]); + model.blocktype = new ScilabString(["c"]); + model.dep_ut = new ScilabBoolean([true, false]); + + var mo = modelica_function(); + mo.model = new ScilabString(["VsourceAC"]); + mo.inputs = new ScilabString(["p"]); + mo.outputs = new ScilabString(["n"]); + mo.parameters = list(new ScilabString(["VA"], ["f"]), list(new ScilabDouble([this.VA]), new ScilabDouble([this.FR]))); + model.equations = mo; + + var exprs = new ScilabString([this.VA], [this.FR]); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"VsourceAC\",sz(1),sz(2));"]); + + this.x = standard_define([2, 2], model, exprs, list(gr_i, 0)); + this.x.graphics.in_implicit = new ScilabString(["I"]); + this.x.graphics.out_implicit = new ScilabString(["I"]); + + return new BasicBlock(this.x); + } + + VsourceAC.prototype.details = function VsourceAC() { + return this.x; + } +} |