Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 7e7a27c2 authored by Harald Martini's avatar Harald Martini
Browse files

implement generic detoriation for in batterydataadapter

parent c6f8392d
No related branches found
No related tags found
No related merge requests found
......@@ -20,15 +20,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
return null;
}
var bat = batteryInputData.ElectricStorageElements.Where(x => x.REESSPack.StorageType == REESSType.Battery).ToArray();
var batteries = batteryInputData.ElectricStorageElements.Where(x => x.REESSPack.StorageType == REESSType.Battery).ToArray();
if (bat.Length == 0)
if (batteries.Length == 0)
{
return null;
}
var retVal = new BatterySystemData();
foreach (var entry in bat)
foreach (var entry in batteries)
{
var b = entry.REESSPack as IBatteryPackDeclarationInputData;
if (b == null)
......@@ -47,8 +47,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
}
var batteryData = new BatteryData() {
MinSOC = minSoc,
MaxSOC = maxSoc,
MinSOC = maxSoc * ((1d/2) * DeclarationData.Battery.GenericDeterioration)
+ minSoc * (1 - (1d/2) * DeclarationData.Battery.GenericDeterioration),
MaxSOC = (maxSoc * (1 - (1d/2) * DeclarationData.Battery.GenericDeterioration)
+ minSoc * ((1d/2) * DeclarationData.Battery.GenericDeterioration)),
MaxCurrent = BatteryMaxCurrentReader.Create(b.MaxCurrentMap),
Capacity = b.Capacity,
InternalResistance =
......
......@@ -1228,8 +1228,8 @@ namespace TUGraz.VectoCore.Models.Declaration
/// <summary>
/// Percentage of the maximum voltage of the battery
/// </summary>
private const double SOCMinHP = 0.2;
private const double SOCMaxHP = 0.8;
private const double SOCMinHP = 0.05;
private const double SOCMaxHP = 0.95;
private const double SOCMinHE = 0.05;
private const double SOCMaxHE = 0.95;
......@@ -1248,6 +1248,8 @@ namespace TUGraz.VectoCore.Models.Declaration
}
}
public static double GenericDeterioration => 0.05;
public static double GetMaxSoc(BatteryType type)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment