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

Skip to content
Snippets Groups Projects
Commit 2954f9a3 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

vif: correct writing battery soc limits: write in percent, correct ninject binding

parent e449eda5
No related branches found
No related tags found
No related merge requests found
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Data;
using System.Xml;
using System.Xml.Linq;
......@@ -89,8 +90,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
var result = new XElement(_vif + XMLNames.ElectricEnergyStorage_Battery,
new XElement(_vif + XMLNames.Battery_StringID, reess.StringId),
new XElement(_vif + "REESS", GetReess(battery)),
battery.MinSOC.HasValue ? new XElement(_vif + XMLNames.Battery_SOCmin, battery.MinSOC.Value) : null,
battery.MaxSOC.HasValue ? new XElement(_vif + XMLNames.Battery_SOCmax, battery.MaxSOC.Value) : null
battery.MinSOC.HasValue ? new XElement(_vif + XMLNames.Battery_SOCmin, Math.Round(battery.MinSOC.Value * 100, MidpointRounding.AwayFromZero)) : null,
battery.MaxSOC.HasValue ? new XElement(_vif + XMLNames.Battery_SOCmax, Math.Round(battery.MaxSOC.Value * 100, MidpointRounding.AwayFromZero)) : null
);
return result;
......
......@@ -198,7 +198,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
Bind<IXMLMultistepIntermediateReport>().To<IEPC_CompletedBus_VIF>().Named(MRFNinjectModule.VehicleTypeAndArchitectureStringHelper.CreateName.Invoke(MRFNinjectModule.VehicleTypeAndArchitectureStringHelper.ToParams(VehicleCategoryHelper.PrimaryBus,
VectoSimulationJobType.BatteryElectricVehicle,
ArchitectureID.UNKNOWN,
ArchitectureID.E_IEPC,
false,
true,
false)));
......
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