From 4f3effc246c9880b3bece878f1f1124e40e96220 Mon Sep 17 00:00:00 2001 From: Harald Martini <harald.martini@student.tugraz.at> Date: Tue, 17 May 2022 08:45:17 +0200 Subject: [PATCH] use 0 Watt for engine power if no enginedata is available --- VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs index 94eb0b2430..d0fd0c53a6 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs @@ -237,7 +237,7 @@ namespace TUGraz.VectoCore.OutputData.XML WeightingGroup = DeclarationData.WeightingGroup.Lookup( modelData.VehicleData.VehicleClass, modelData.VehicleData.SleeperCab.Value, - modelData.EngineData.RatedPowerDeclared); + modelData.EngineData?.RatedPowerDeclared ?? Watt.Create(0)); } _weightingFactors = WeightingGroup == WeightingGroup.Unknown -- GitLab