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

Skip to content
Snippets Groups Projects
Commit f83679bf authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

calcuclate average voltage in case of a supercap for overload buffer calc

parent 4d7472f7
No related branches found
No related tags found
No related merge requests found
......@@ -654,10 +654,12 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun
(bs) => rd.BatteryData = bs,
(sc) => rd.SuperCapData = sc);
var averageVoltage = rd.BatteryData != null
? rd.BatteryData.CalculateAverageVoltage()
: (rd.SuperCapData.MaxVoltage - rd.SuperCapData.MinVoltage) / 2.0;
rd.ElectricMachinesData = DataAdapterGeneric.CreateElectricMachines(PrimaryVehicle.Components.ElectricMachines,
PrimaryVehicle.ElectricMotorTorqueLimits, rd.BatteryData.CalculateAverageVoltage(), null);
rd.ElectricMachinesData = DataAdapterGeneric.CreateElectricMachines(PrimaryVehicle.Components.ElectricMachines,
PrimaryVehicle.ElectricMotorTorqueLimits, averageVoltage, null);
......@@ -722,8 +724,12 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun
(bs) => rd.BatteryData = bs,
(sc) => rd.SuperCapData = sc);
var averageVoltage = rd.BatteryData != null
? rd.BatteryData.CalculateAverageVoltage()
: (rd.SuperCapData.MaxVoltage - rd.SuperCapData.MinVoltage) / 2.0;
rd.ElectricMachinesData = DataAdapterGeneric.CreateElectricMachines(PrimaryVehicle.Components.ElectricMachines,
PrimaryVehicle.ElectricMotorTorqueLimits, rd.BatteryData.CalculateAverageVoltage(), null);
PrimaryVehicle.ElectricMotorTorqueLimits, averageVoltage, null);
rd.VehicleData = DataAdapterSpecific.CreateVehicleData(PrimaryVehicle,
CompletedVehicle, _segment, mission, loading);
......
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