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

Skip to content
Snippets Groups Projects
Commit 43b9d38c authored by Stefanos Doumpoulakis's avatar Stefanos Doumpoulakis
Browse files

improved reporting (simWorkWheelPositive, CO2)

parent b639c9f5
No related branches found
No related tags found
No related merge requests found
...@@ -272,10 +272,14 @@ namespace TUGraz.VectoCore.OutputData.XML ...@@ -272,10 +272,14 @@ namespace TUGraz.VectoCore.OutputData.XML
var vtpFcSimulated = vtpResult.VTPFcFinalSimulated var vtpFcSimulated = vtpResult.VTPFcFinalSimulated
.Select(x => Tuple.Create(x.Key, x.Value / vtpResult.VTPWorPWheelSimPos)) .Select(x => Tuple.Create(x.Key, x.Value / vtpResult.VTPWorPWheelSimPos))
.ToDictionary(x => x.Item1, x => x.Item2); .ToDictionary(x => x.Item1, x => x.Item2);
var fuels = DeclarationData.FuelData; var fuels = DeclarationData.FuelData;
var cVtp =
vtpFcMeasuredCorr.Sum(e => e.Value * fuels.Lookup(e.Key, vtpResult.TankSystem).CO2PerFuelWeightVTP) / var CO2Measured = vtpFcMeasured.Sum(e => e.Value * fuels.Lookup(e.Key, vtpResult.TankSystem).CO2PerFuelWeightVTP);
vtpFcSimulated.Sum(e => e.Value * fuels.Lookup(e.Key, vtpResult.TankSystem).CO2PerFuelWeightVTP); var CO2MeasuredCorrected = vtpFcMeasuredCorr.Sum(e => e.Value * fuels.Lookup(e.Key, vtpResult.TankSystem).CO2PerFuelWeightVTP);
var CO2Simulated = vtpFcSimulated.Sum(e => e.Value * fuels.Lookup(e.Key, vtpResult.TankSystem).CO2PerFuelWeightVTP);
var cVtp = CO2MeasuredCorrected / CO2Simulated;
var declaredCO2 = result.FuelConsumptionFinal[fuel.FuelType].TotalFuelConsumptionCorrected * fuel.CO2PerFuelWeight / result.Distance / result.Payload; var declaredCO2 = result.FuelConsumptionFinal[fuel.FuelType].TotalFuelConsumptionCorrected * fuel.CO2PerFuelWeight / result.Distance / result.Payload;
var verifiedCO2 = declaredCO2 * cVtp; var verifiedCO2 = declaredCO2 * cVtp;
var key = "g/t-km"; var key = "g/t-km";
...@@ -289,6 +293,9 @@ namespace TUGraz.VectoCore.OutputData.XML ...@@ -289,6 +293,9 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement( new XElement(
tns + "WorkPosVT", new XAttribute(XMLNames.Report_Results_Unit_Attr, "kWh"), tns + "WorkPosVT", new XAttribute(XMLNames.Report_Results_Unit_Attr, "kWh"),
vtpResult.VTPWorkPWheelPos.ConvertToKiloWattHour().ToXMLFormat(3)), vtpResult.VTPWorkPWheelPos.ConvertToKiloWattHour().ToXMLFormat(3)),
new XElement(
tns + "SimulatedWorkPosVT", new XAttribute(XMLNames.Report_Results_Unit_Attr, "kWh"),
vtpResult.VTPWorPWheelSimPos.ConvertToKiloWattHour().ToXMLFormat(3)),
vtpResult.FuelNCVs.Select(x => vtpResult.FuelNCVs.Select(x =>
new XElement( new XElement(
tns + "FuelNCV", tns + "FuelNCV",
...@@ -329,6 +336,18 @@ namespace TUGraz.VectoCore.OutputData.XML ...@@ -329,6 +336,18 @@ namespace TUGraz.VectoCore.OutputData.XML
new XElement( new XElement(
tns + "Verified", new XAttribute(XMLNames.Report_Results_Unit_Attr, key), tns + "Verified", new XAttribute(XMLNames.Report_Results_Unit_Attr, key),
new ConvertedSI(declaredCO2.Value(), verifiedCO2.UnitString).ToMinSignificantDigits(3, 2) new ConvertedSI(declaredCO2.Value(), verifiedCO2.UnitString).ToMinSignificantDigits(3, 2)
),
new XElement(
tns + "Measured", new XAttribute(XMLNames.Report_Results_Unit_Attr, CO2Measured.ConvertToGramPerKiloWattHour().Units),
CO2Measured.ConvertToGramPerKiloWattHour().Value.ToXMLFormat(3)
),
new XElement(
tns + "MeasuredCorrected", new XAttribute(XMLNames.Report_Results_Unit_Attr, CO2MeasuredCorrected.ConvertToGramPerKiloWattHour().Units),
CO2MeasuredCorrected.ConvertToGramPerKiloWattHour().Value.ToXMLFormat(3)
),
new XElement(
tns + "Simulated", new XAttribute(XMLNames.Report_Results_Unit_Attr, CO2Simulated.ConvertToGramPerKiloWattHour().Units),
CO2Simulated.ConvertToGramPerKiloWattHour().Value.ToXMLFormat(3)
) )
), ),
new XElement(tns + "C_VTP", cVtp.ToXMLFormat(4)), new XElement(tns + "C_VTP", cVtp.ToXMLFormat(4)),
......
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