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

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

handle missing ElectricEnergyConsumption in primary results

parent b1f87472
No related branches found
No related tags found
No related merge requests found
......@@ -106,9 +106,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
x.SelectSingleNode(
$".//*[local-name()='{XMLNames.Report_Result_EnergyConsumption}' and @unit='MJ/km']")?.InnerText
.ToDouble().SI(Unit.SI.Mega.Joule.Per.Kilo.Meter).Cast<JoulePerMeter>())).ToDictionary(x => x.Key, x => x.Value);
electricEnergyConsumption = GetNode(XMLNames.Report_ResultEntry_VIF_ElectricEnergyConsumption, xmlNode)
electricEnergyConsumption = GetNode(XMLNames.Report_ResultEntry_VIF_ElectricEnergyConsumption, xmlNode, required:false)?
.SelectSingleNode(
$".//*[local-name()='{XMLNames.Report_Result_EnergyConsumption}' and @unit='MJ/km']")?.InnerText
$".//*[local-name()='{XMLNames.Report_Result_EnergyConsumption}' and @unit='MJ/km']")?.InnerText?
.ToDouble().SI(Unit.SI.Mega.Joule.Per.Kilo.Meter).Cast<JoulePerMeter>();
}
......
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