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