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

Skip to content
Snippets Groups Projects
Commit 1fe1a895 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

use factor method for completed bus calculations

parent d4322011
No related branches found
No related tags found
No related merge requests found
......@@ -209,12 +209,12 @@ namespace TUGraz.VectoCore.OutputData.XML {
protected internal static double CalculateFactorMethodFactor(IResult primaryResult,
XMLDeclarationReport.ResultEntry specific, XMLDeclarationReport.ResultEntry generic)
{
//return specific.EnergyConsumptionTotal.Value() / generic.EnergyConsumptionTotal.Value();
var energyConsumptionPrimary = primaryResult.EnergyConsumption.Sum(x => x.Value);
var energyConsumptionCompeted = energyConsumptionPrimary +
specific.EnergyConsumptionTotal / specific.Distance -
generic.EnergyConsumptionTotal / generic.Distance;
return energyConsumptionCompeted / energyConsumptionPrimary;
return specific.EnergyConsumptionTotal.Value() / generic.EnergyConsumptionTotal.Value();
// var energyConsumptionPrimary = primaryResult.EnergyConsumption.Sum(x => x.Value);
//var energyConsumptionCompeted = energyConsumptionPrimary +
// specific.EnergyConsumptionTotal / specific.Distance -
// generic.EnergyConsumptionTotal / generic.Distance;
//return energyConsumptionCompeted / energyConsumptionPrimary;
}
private XElement[] GetFuelConsumptionResults(XMLDeclarationReport.ResultEntry genericResult, XMLDeclarationReport.ResultEntry specificResult, IResult primaryResult)
......
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