Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 82905d1f authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Pull request #108: only consider entries where the EM is on for calculating efficiency values

Merge in VECTO/vecto-dev from VECTO/mq_vecto-dev:bugfix/VECTO-1487-xx to develop

* commit '0d4cf8f1':
  only consider entries where the EM is on for calculating efficiency values
parents b7ea83d5 0d4cf8f1
Branches
Tags
No related merge requests found
...@@ -326,6 +326,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -326,6 +326,7 @@ namespace TUGraz.VectoCore.OutputData
var selected = Data.AsEnumerable().Select(r => { var selected = Data.AsEnumerable().Select(r => {
var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName()); var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName());
return new { return new {
EM_off = r.Field<Scalar>(string.Format(ModalResultField.EM_Off_.GetCaption(), emPos.GetName())),
P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(), P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(),
emPos.GetName())), emPos.GetName())),
E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_em_mech_.GetCaption(), E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_em_mech_.GetCaption(),
...@@ -336,7 +337,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -336,7 +337,7 @@ namespace TUGraz.VectoCore.OutputData
}); });
var eMech = 0.SI<WattSecond>(); var eMech = 0.SI<WattSecond>();
var eEl = 0.SI<WattSecond>(); var eEl = 0.SI<WattSecond>();
foreach (var entry in selected.Where(x => x.P_em.IsSmaller(0))) { foreach (var entry in selected.Where(x => x.P_em.IsSmaller(0) && !x.EM_off.IsEqual(0))) {
eMech += entry.E_mech; eMech += entry.E_mech;
eEl += entry.E_el; eEl += entry.E_el;
} }
...@@ -353,6 +354,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -353,6 +354,7 @@ namespace TUGraz.VectoCore.OutputData
var selected = Data.AsEnumerable().Select(r => { var selected = Data.AsEnumerable().Select(r => {
var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName()); var dt = r.Field<Second>(ModalResultField.simulationInterval.GetName());
return new { return new {
EM_off = r.Field<Scalar>(string.Format(ModalResultField.EM_Off_.GetCaption(), emPos.GetName())),
P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(), P_em = r.Field<Watt>(string.Format(ModalResultField.P_EM_electricMotor_el_.GetCaption(),
emPos.GetName())), emPos.GetName())),
E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_mech_.GetCaption(), E_mech = r.Field<Watt>(string.Format(ModalResultField.P_EM_mech_.GetCaption(),
...@@ -363,7 +365,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -363,7 +365,7 @@ namespace TUGraz.VectoCore.OutputData
}); });
var eMech = 0.SI<WattSecond>(); var eMech = 0.SI<WattSecond>();
var eEl = 0.SI<WattSecond>(); var eEl = 0.SI<WattSecond>();
foreach (var entry in selected.Where(x => x.P_em.IsGreater(0))) { foreach (var entry in selected.Where(x => x.P_em.IsGreater(0) && !x.EM_off.IsEqual(0))) {
eMech += entry.E_mech; eMech += entry.E_mech;
eEl += entry.E_el; eEl += entry.E_el;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment