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 dda6aa82 authored by Harald Martini's avatar Harald Martini
Browse files

added helper method for max alternator power

parent b0a1f72b
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ using System; ...@@ -33,6 +33,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Linq;
using System.Xml; using System.Xml;
using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.Exceptions;
...@@ -971,6 +972,15 @@ namespace TUGraz.VectoCommon.InputData ...@@ -971,6 +972,15 @@ namespace TUGraz.VectoCommon.InputData
IList<IBusAuxElectricStorageDeclarationInputData> ElectricStorage { get; } IList<IBusAuxElectricStorageDeclarationInputData> ElectricStorage { get; }
} }
public static class ElectricSupplyDeclarationDataHelper
{
public static Watt GetMaxAlternatorPower(this IElectricSupplyDeclarationData electricSupply)
{
return electricSupply.Alternators?.Select(alt => alt.RatedCurrent * alt.RatedVoltage)?
.Max();
}
}
public interface IElectricConsumersDeclarationData public interface IElectricConsumersDeclarationData
{ {
bool? InteriorLightsLED { get; } bool? InteriorLightsLED { get; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment