using InnovEnergy.Lib.Units.Composite; namespace InnovEnergy.Lib.Devices.AMPT; public class AmptStatus { public AmptStatus(DcBus? dc, IReadOnlyList strings) { Dc = dc; Strings = strings; } public DcBus? Dc { get; } public IReadOnlyList Strings { get; } public static AmptStatus Null => new AmptStatus(null, Array.Empty()); } // public static AmptStatus Parallel(IReadOnlyList stati) // { // if (stati.Count == 0) // { // return new AmptStatus // ( // Dc: DcBus.FromVoltageCurrent(0, 0), // Strings: Array.Empty() // ); // } // // 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); // }