Delete unecessary comment

Fix error in maxdischarging current
This commit is contained in:
atef 2024-02-23 13:10:45 +01:00
parent d500b500d9
commit 5d358fa269
1 changed files with 10 additions and 7 deletions

View File

@ -274,8 +274,6 @@ internal static class Program
(record.Relays is null ? "No relay Data available" : record.Relays.FiWarning ? "Alert: Fi Warning Detected" : "No Fi Warning Detected").WriteLine();
(record.Relays is null ? "No relay Data available" : record.Relays.FiError ? "Alert: Fi Error Detected" : "No Fi Error Detected") .WriteLine();
//record.ApplyConfigFile(minSoc:22, gridSetPoint:1);
record.Config.Save();
"===========================================".LogInfo();
@ -474,7 +472,6 @@ internal static class Program
var configFile = r.Config;
var maxBatteryDischargingCurrentLive = 0.0;
// This adapting the max discharging current to the current connected batteries // Connected to Dc Bus is not reliable yet
// if (r.Battery != null)
// {
@ -490,7 +487,7 @@ internal static class Program
const Int32 stringsByBattery = 5;
var numberOfBatteries = r.Battery.Devices.Count;
var numberOfTotalStrings = stringsByBattery * numberOfBatteries;
var dischargingCurrentByString = (configFile.MaxBatteryDischargingCurrent / configFile.Devices.BatteryNodes.Length) / stringsByBattery;
var dischargingCurrentByString = configFile.MaxBatteryDischargingCurrent / numberOfTotalStrings;
var boolList = new List<Boolean>();
@ -507,10 +504,16 @@ internal static class Program
if (numberOfTotalStrings != 0)
{
maxBatteryDischargingCurrentLive = dischargingCurrentByString * numberOfBatteriesStringActive / numberOfTotalStrings;
}
maxBatteryDischargingCurrentLive = dischargingCurrentByString * numberOfBatteriesStringActive;
}
//dischargingCurrentByString.WriteLine(" dischargingCurrentByString");
//numberOfBatteriesStringActive.WriteLine(" numberOfBatteriesStringActive");
//numberOfTotalStrings.WriteLine(" numberOfTotalStrings");
//maxBatteryDischargingCurrentLive.WriteLine(" maxBatteryDischargingCurrentLive");
}
// TODO The discharging current is well calculated but not communicated to live. Need to think about this
var devicesConfig = r.AcDc.Devices.All(d => d.Control.Ac.GridType == GridType.GridTied400V50Hz) ? configFile.GridTie : configFile.IslandMode; // TODO if any of the grid tie mode