Code development platform for open source projects from the European Union institutions

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

bugfix calculating ice off time share

parent 88a0bb07
No related branches found
No related tags found
No related merge requests found
......@@ -551,12 +551,12 @@ namespace TUGraz.VectoCore.OutputData
public static Scalar ICEOffTimeShare(this IModalDataContainer data)
{
var iceOff = data.GetValues(x => new {
var iceOn = data.GetValues(x => new {
dt = x[ModalResultField.ICEOn.GetName()] is DBNull
? 0.SI<Second>()
: x.Field<Second>(ModalResultField.simulationInterval.GetName())
}).Sum(x => x.dt) ?? 0.SI<Second>();
return 100 * iceOff / data.Duration;
return 100 * (1 - iceOn / data.Duration);
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment