37 lines
1014 B
C#
37 lines
1014 B
C#
using InnovEnergy.Lib.StatusApi.DeviceTypes;
|
|
using InnovEnergy.Lib.Units.Composite;
|
|
|
|
namespace InnovEnergy.Lib.Devices.AMPT;
|
|
|
|
public class AmptStatus : IMppt
|
|
{
|
|
public AmptStatus(DcBus dc, IReadOnlyList<DcBus> strings)
|
|
{
|
|
Dc = dc;
|
|
Strings = strings;
|
|
}
|
|
|
|
public DcBus Dc { get; }
|
|
public IReadOnlyList<DcBus> Strings { get; }
|
|
}
|
|
|
|
|
|
// 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);
|
|
// } |