Add reference and Window Dc/Dc voltage to the config file

This commit is contained in:
atef 2023-07-24 10:50:41 +02:00
parent f8cdcb420d
commit a677c878e8
1 changed files with 49 additions and 29 deletions

View File

@ -14,34 +14,47 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true };
public required Double MinSoc { get; set; }
public required UnixTime LastEoc { get; set; }
public required Double PConstant { get; set; }
public required Double GridSetPoint { get; set; }
public required Double BatterySelfDischargePower { get; set; }
public required Double HoldSocZone { get; set; }
public required Double MinSoc { get; set; }
public required UnixTime LastEoc { get; set; }
public required Double PConstant { get; set; }
public required Double GridSetPoint { get; set; }
public required Double BatterySelfDischargePower { get; set; }
public required Double HoldSocZone { get; set; }
public required Double MaxDcBusVoltage { get; set; }
public required Double MinDcBusVoltage { get; set; }
public required Double ReferenceDcBusVoltage { get; set; }
public required Double MaxDcLinkVoltageFromAcDc { get; set; }
public required Double MinDcLinkVoltageFromAcDc { get; set; }
public required Double ReferenceDcLinkVoltageFromAcDc { get; set; }
public required DeviceConfig Devices { get; set; }
public required S3Config? S3 { get; set; }
public required Double LowerDcLinkVoltageFromDc { get; set; }
public required Double ReferenceDcLinkVoltageFromDc { get; set; }
public required Double UpperDcLinkVoltageFromDc { get; set; }
public required Double MaxBatteryChargingCurrent { get; set; }
public required Double MaxBatteryDischargingCurrent { get; set; }
public required Double MaxChargeBatteryVoltage { get; set; }
public required Double MinDischargeBatteryVoltage { get; set; }
public required DeviceConfig Devices { get; set; }
public required S3Config? S3 { get; set; }
#if DEBUG
public static Config Default => new()
{
MinSoc = 20,
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
PConstant = .5,
GridSetPoint = 0,
BatterySelfDischargePower = 200,
HoldSocZone = 1, // TODO: find better name,
MinDcBusVoltage = 690,
ReferenceDcBusVoltage = 750,
MaxDcBusVoltage = 810,
MinSoc = 20,
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
PConstant = .5,
GridSetPoint = 0,
BatterySelfDischargePower = 200,
HoldSocZone = 1, // TODO: find better name,
MinDcBusVoltage = 690,
ReferenceDcBusVoltage = 750,
MaxDcBusVoltage = 810,
LowerDcBusVoltageWindow = 50,
ReferenceDcBusVoltageWindow = 750,
UpperDcBusVoltageWindow = 50,
Devices = new ()
{
TruConvertAcIp = new() { Host = "localhost", Port = 5001},
@ -58,15 +71,22 @@ public class Config //TODO: let IE choose from config files (Json) and connect t
#else
public static Config Default => new()
{
MinSoc = 20,
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
PConstant = .5,
GridSetPoint = 0,
BatterySelfDischargePower = 200,
HoldSocZone = 1, // TODO: find better name,
MinDcBusVoltage = 690,
ReferenceDcBusVoltage = 750,
MaxDcBusVoltage = 810,
MinSoc = 20,
LastEoc = UnixTime.Epoch, // TODO: remove, use new LastEoc feature from BMS
PConstant = .5,
GridSetPoint = 0,
BatterySelfDischargePower = 200,
HoldSocZone = 1, // TODO: find better name,
MinDcLinkVoltageFromAcDc = 690,
ReferenceDcLinkVoltageFromAcDc = 750,
MaxDcLinkVoltageFromAcDc = 810,
LowerDcLinkVoltageFromDc = 50,
ReferenceDcLinkVoltageFromDc = 750,
UpperDcLinkVoltageFromDc = 50,
MaxBatteryChargingCurrent = 210,
MaxBatteryDischargingCurrent = 210,
MaxChargeBatteryVoltage = 57,
MinDischargeBatteryVoltage = 0,
S3 = new()
{
Bucket = "saliomameiringen",