Commit f86f0520 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

examples: fix attribute names

parent f7d82e7b
...@@ -51,7 +51,7 @@ int main(int argc, char *argv[]) { ...@@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
ecs->connect({ Node::GND, n1 }); ecs->connect({ Node::GND, n1 });
r1->connect({ Node::GND, n1 }); r1->connect({ Node::GND, n1 });
intf.addImport(ecs->attribute<Complex>("i_ref"), 0); intf.addImport(ecs->attribute<Complex>("I_ref"), 0);
intf.addExport(ecs->attribute<Complex>("v_comp"), 0); intf.addExport(ecs->attribute<Complex>("v_comp"), 0);
auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{ecs, r1}); auto sys = SystemTopology(50, SystemNodeList{n1}, SystemComponentList{ecs, r1});
......
...@@ -76,7 +76,7 @@ int main(int argc, char *argv[]) { ...@@ -76,7 +76,7 @@ int main(int argc, char *argv[]) {
vs1->connect({ Node::GND, n1 }); vs1->connect({ Node::GND, n1 });
r01->connect({ n1, n2 }); r01->connect({ n1, n2 });
intf.addImport(evs->attribute<Complex>("v_ref"), 0); intf.addImport(evs->attribute<Complex>("V_ref"), 0);
intf.addExport(evs->attribute<Complex>("i_comp"), 0); intf.addExport(evs->attribute<Complex>("i_comp"), 0);
auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{evs, vs1, r01}); auto sys = SystemTopology(50, SystemNodeList{n1, n2}, SystemComponentList{evs, vs1, r01});
...@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) { ...@@ -99,7 +99,7 @@ int main(int argc, char *argv[]) {
//auto ecs_switch = CurrentSource::make("i_switch", GND, 1, Complex(0, 0)); //auto ecs_switch = CurrentSource::make("i_switch", GND, 1, Complex(0, 0));
//auto r01 = Resistor::make("r_0_1", 0, 1, 1); //auto r01 = Resistor::make("r_0_1", 0, 1, 1);
intf.addImport(ecs->attribute<Complex>("i_ref"), 0); intf.addImport(ecs->attribute<Complex>("I_ref"), 0);
intf.addExport(ecs->attribute<Complex>("v_comp"), 0); intf.addExport(ecs->attribute<Complex>("v_comp"), 0);
//intf.addImport(ecs_switch->attribute('CurrentRef'), 1); //intf.addImport(ecs_switch->attribute('CurrentRef'), 1);
......
...@@ -80,7 +80,7 @@ int main(int argc, char *argv[]) ...@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
comps = SystemComponentList{evs, vs, l1, r1}; comps = SystemComponentList{evs, vs, l1, r1};
nodes = SystemNodeList{Node::GND, n1, n2, n3}; nodes = SystemNodeList{Node::GND, n1, n2, n3};
intf.addImport(evs->attribute<Complex>("v_ref"), 0); intf.addImport(evs->attribute<Complex>("V_ref"), 0);
intf.addExport(evs->attribute<Complex>("i_comp"), 0); intf.addExport(evs->attribute<Complex>("i_comp"), 0);
} }
else if (String(argv[1]) == "1") { else if (String(argv[1]) == "1") {
...@@ -109,7 +109,7 @@ int main(int argc, char *argv[]) ...@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
comps = SystemComponentList{ecs, sw, r2A, r2B}; comps = SystemComponentList{ecs, sw, r2A, r2B};
nodes = SystemNodeList{Node::GND, n4, n5}; nodes = SystemNodeList{Node::GND, n4, n5};
intf.addImport(ecs->attribute<Complex>("i_ref"), 0); intf.addImport(ecs->attribute<Complex>("I_ref"), 0);
intf.addExport(ecs->attribute<Complex>("v_comp"), 0); intf.addExport(ecs->attribute<Complex>("v_comp"), 0);
} }
else { else {
......
...@@ -60,7 +60,7 @@ int main(int argc, char* argv[]) ...@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
auto sys = SystemTopology(50, SystemNodeList{Node::GND, n1, n2, n3, n4}, SystemComponentList{evs, rs, rl, ll, rL}); auto sys = SystemTopology(50, SystemNodeList{Node::GND, n1, n2, n3, n4}, SystemComponentList{evs, rs, rl, ll, rL});
auto intf = Interface("/villas1-in", "/villas1-out"); auto intf = Interface("/villas1-in", "/villas1-out");
intf.addImport(evs->attribute<Complex>("v_ref"), 0); intf.addImport(evs->attribute<Complex>("V_ref"), 0);
intf.addExport(evs->attribute<Complex>("i_comp"), 0); intf.addExport(evs->attribute<Complex>("i_comp"), 0);
Real timeStep = 0.001; Real timeStep = 0.001;
......
...@@ -64,7 +64,7 @@ int main(int argc, char* argv[]) ...@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
auto intf = Interface("/villas1-in", "/villas1-out", &conf); auto intf = Interface("/villas1-in", "/villas1-out", &conf);
intf.addImport(evs->attribute<Complex>("v_ref"), 0); intf.addImport(evs->attribute<Complex>("V_ref"), 0);
intf.addExport(evs->attribute<Complex>("i_comp"), 0); intf.addExport(evs->attribute<Complex>("i_comp"), 0);
Real timeStep = 0.001; Real timeStep = 0.001;
......
...@@ -93,7 +93,7 @@ int main(int argc, char *argv[]) { ...@@ -93,7 +93,7 @@ int main(int argc, char *argv[]) {
sys.mComponents.push_back(filtP_profile); sys.mComponents.push_back(filtP_profile);
// Register interface current source and voltage drop // Register interface current source and voltage drop
intf1.addImport(ecs->attribute<Complex>("i_ref"), 0); intf1.addImport(ecs->attribute<Complex>("I_ref"), 0);
intf1.addExport(ecs->attribute<Complex>("v_comp"), 0); intf1.addExport(ecs->attribute<Complex>("v_comp"), 0);
// TODO: gain by 20e8 // TODO: gain by 20e8
...@@ -166,7 +166,7 @@ int main(int argc, char *argv[]) { ...@@ -166,7 +166,7 @@ int main(int argc, char *argv[]) {
// Register voltage source reference and current flowing through source // Register voltage source reference and current flowing through source
// multiply with -1 to consider passive sign convention // multiply with -1 to consider passive sign convention
intf1.addImport(evs->attribute<Complex>("v_ref"), 0); intf1.addImport(evs->attribute<Complex>("V_ref"), 0);
// TODO: invalid sign // TODO: invalid sign
intf1.addExport(evs->attribute<Complex>("i_comp"), 0); intf1.addExport(evs->attribute<Complex>("i_comp"), 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment