2023-05-06 13:41:20 +00:00
|
|
|
using InnovEnergy.Lib.Units.Composite;
|
2023-03-09 11:40:47 +00:00
|
|
|
|
2023-02-25 14:53:58 +00:00
|
|
|
namespace InnovEnergy.Lib.Devices.AMPT;
|
2023-02-16 12:57:06 +00:00
|
|
|
|
2023-06-20 07:50:47 +00:00
|
|
|
public class AmptStatus
|
2023-06-13 10:53:37 +00:00
|
|
|
{
|
2023-06-20 07:50:47 +00:00
|
|
|
public AmptStatus(DcBus? dc, IReadOnlyList<DcBus> strings)
|
2023-06-13 10:53:37 +00:00
|
|
|
{
|
|
|
|
Dc = dc;
|
|
|
|
Strings = strings;
|
|
|
|
}
|
|
|
|
|
2023-06-20 07:50:47 +00:00
|
|
|
public DcBus? Dc { get; }
|
2023-06-13 10:53:37 +00:00
|
|
|
public IReadOnlyList<DcBus> Strings { get; }
|
2023-06-20 07:50:47 +00:00
|
|
|
|
2023-06-22 08:13:21 +00:00
|
|
|
public static AmptStatus Null => new AmptStatus(null, Array.Empty<DcBus>());
|
2023-06-13 10:53:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
// }
|