Innovenergy_trunk/csharp/Lib/Devices/AMPT/AmptStatus.cs

38 lines
1.0 KiB
C#

using InnovEnergy.Lib.Units.Composite;
namespace InnovEnergy.Lib.Devices.AMPT;
public class AmptStatus
{
public AmptStatus(DcBus? dc, IReadOnlyList<DcBus> strings)
{
Dc = dc;
Strings = strings;
}
public DcBus? Dc { get; }
public IReadOnlyList<DcBus> Strings { get; }
public static AmptStatus Null => new AmptStatus(null, Array.Empty<DcBus>());
}
// public static AmptStatus Parallel(IReadOnlyList<AmptStatus> stati)
// {
// if (stati.Count == 0)
// {
// return new AmptStatus
// (
// Dc: DcBus.FromVoltageCurrent(0, 0),
// Strings: Array.Empty<DcBus>()
// );
// }
//
// var voltage = stati.Average(s => s.Dc.Voltage.Value);
// var current = stati.Sum(s => s.Dc.Current.Value);
// var dc = DcBus.FromVoltageCurrent(voltage, current);
//
// var strings = stati.SelectMany(s => s.Strings).ToList();
//
// return new AmptStatus(dc, strings);
// }