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

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

Merge pull request #440 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:develop to develop

* commit '13cc714d':
  write name of fuel type into json files
  fix: fuel type has no density; fix: time share per gear
  bugfix: output in vsum file if no fueldensity is available
  adapt testcase due to changes in fuel types
  correction of fuel properties
  extending driver strategy to handle unexpected responses
  handle the case when no vehicle idle speed is given
  update generic vehicles to match new file formats
  updating repo
  including xsd in project
  renaming files
parents 4b80e2f2 13cc714d
No related branches found
No related tags found
No related merge requests found
Showing
with 401 additions and 268 deletions
File added
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2016-10-13T10:06:43.0936564Z", "Date": "2017-06-22T11:15:06.0747543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 7 "FileVersion": 7
}, },
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"CurbWeightExtra": 0.0, "CurbWeightExtra": 0.0,
"Loading": 0.0, "Loading": 0.0,
"MassMax": 11.99, "MassMax": 11.99,
"CdA": 4.83,
"rdyn": 0.0, "rdyn": 0.0,
"CdCorrMode": "CdofVdecl", "CdCorrMode": "CdofVdecl",
"CdCorrFile": "", "CdCorrFile": "",
...@@ -31,6 +30,8 @@ ...@@ -31,6 +30,8 @@
"LossMap": "", "LossMap": "",
"Cycle": "" "Cycle": ""
}, },
"TorqueLimits": {},
"IdlingSpeed": 600.0,
"AxleConfig": { "AxleConfig": {
"Type": "4x2", "Type": "4x2",
"Axles": [ "Axles": [
...@@ -40,7 +41,8 @@ ...@@ -40,7 +41,8 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": false, "TwinTyres": false,
"RRCISO": 0.0065, "RRCISO": 0.0065,
"FzISO": 20850.0 "FzISO": 20850.0,
"Type": "VehicleNonDriven"
}, },
{ {
"Inertia": 6.5, "Inertia": 6.5,
...@@ -48,9 +50,11 @@ ...@@ -48,9 +50,11 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": true, "TwinTyres": true,
"RRCISO": 0.0075, "RRCISO": 0.0075,
"FzISO": 20850.0 "FzISO": 20850.0,
"Type": "VehicleDriven"
} }
] ]
} },
"CdA": 4.83
} }
} }
\ No newline at end of file
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2016-10-13T10:06:50.6286564Z", "Date": "2017-06-22T11:14:49.3067543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 3 "FileVersion": 4
}, },
"Body": { "Body": {
"SavedInDeclMode": true, "SavedInDeclMode": true,
...@@ -11,11 +11,18 @@ ...@@ -11,11 +11,18 @@
"Displacement": "6871", "Displacement": "6871",
"IdlingSpeed": 600.0, "IdlingSpeed": 600.0,
"Inertia": 3.56517, "Inertia": 3.56517,
"FullLoadCurve": "175kW.vfld",
"FuelMap": "175kW.vmap",
"WHTC-Urban": 1.04, "WHTC-Urban": 1.04,
"WHTC-Rural": 1.01, "WHTC-Rural": 1.01,
"WHTC-Motorway": 1.00, "WHTC-Motorway": 1.0,
"ColdHotBalancingFactor": 1.0 "WHTC-Engineering": 1.0,
"ColdHotBalancingFactor": 1.0,
"CFRegPer": 1.0,
"CFNCV": 1.0,
"RatedPower": 175000.0,
"RatedSpeed": 1950.0000000000002,
"MaxTorque": 1000.0,
"FuelType": 0,
"FullLoadCurve": "175kW.vfld",
"FuelMap": "175kW.vmap"
} }
} }
\ No newline at end of file
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2016-10-13T10:08:01.8366564Z", "Date": "2017-06-22T11:14:19.0107543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 7 "FileVersion": 7
}, },
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"CurbWeightExtra": 0.0, "CurbWeightExtra": 0.0,
"Loading": 0.0, "Loading": 0.0,
"MassMax": 18.0, "MassMax": 18.0,
"CdA": 5.3,
"rdyn": 0.0, "rdyn": 0.0,
"CdCorrMode": "CdofVdecl", "CdCorrMode": "CdofVdecl",
"CdCorrFile": "", "CdCorrFile": "",
...@@ -31,6 +30,8 @@ ...@@ -31,6 +30,8 @@
"LossMap": "", "LossMap": "",
"Cycle": "" "Cycle": ""
}, },
"TorqueLimits": {},
"IdlingSpeed": 600.0,
"AxleConfig": { "AxleConfig": {
"Type": "4x2", "Type": "4x2",
"Axles": [ "Axles": [
...@@ -40,7 +41,8 @@ ...@@ -40,7 +41,8 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": false, "TwinTyres": false,
"RRCISO": 0.0055, "RRCISO": 0.0055,
"FzISO": 33350.0 "FzISO": 33350.0,
"Type": "VehicleNonDriven"
}, },
{ {
"Inertia": 14.9, "Inertia": 14.9,
...@@ -48,9 +50,11 @@ ...@@ -48,9 +50,11 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": true, "TwinTyres": true,
"RRCISO": 0.0065, "RRCISO": 0.0065,
"FzISO": 33350.0 "FzISO": 33350.0,
"Type": "VehicleDriven"
} }
] ]
} },
"CdA": 5.3
} }
} }
\ No newline at end of file
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2016-10-13T10:08:08.3476564Z", "Date": "2017-06-22T11:14:03.7167543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 3 "FileVersion": 4
}, },
"Body": { "Body": {
"SavedInDeclMode": true, "SavedInDeclMode": true,
...@@ -11,11 +11,18 @@ ...@@ -11,11 +11,18 @@
"Displacement": "12740", "Displacement": "12740",
"IdlingSpeed": 600.0, "IdlingSpeed": 600.0,
"Inertia": 5.1498, "Inertia": 5.1498,
"FullLoadCurve": "325kW.vfld",
"FuelMap": "325kW.vmap",
"WHTC-Urban": 1.04, "WHTC-Urban": 1.04,
"WHTC-Rural": 1.01, "WHTC-Rural": 1.01,
"WHTC-Motorway": 1.00, "WHTC-Motorway": 1.0,
"ColdHotBalancingFactor": 1.0 "WHTC-Engineering": 1.0,
"ColdHotBalancingFactor": 1.0,
"CFRegPer": 1.0,
"CFNCV": 1.0,
"RatedPower": 325000.0,
"RatedSpeed": 1600.0,
"MaxTorque": 2400.0,
"FuelType": 0,
"FullLoadCurve": "325kW.vfld",
"FuelMap": "325kW.vmap"
} }
} }
\ No newline at end of file
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2017-05-19T08:36:54.5380903Z", "Date": "2017-06-22T11:16:11.6047543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 7 "FileVersion": 7
}, },
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"CurbWeightExtra": 0.0, "CurbWeightExtra": 0.0,
"Loading": 0.0, "Loading": 0.0,
"MassMax": 26.0, "MassMax": 26.0,
"CdA": 5.2,
"rdyn": 0.0, "rdyn": 0.0,
"CdCorrMode": "CdofVdecl", "CdCorrMode": "CdofVdecl",
"CdCorrFile": "", "CdCorrFile": "",
...@@ -32,6 +31,7 @@ ...@@ -32,6 +31,7 @@
"Cycle": "" "Cycle": ""
}, },
"TorqueLimits": {}, "TorqueLimits": {},
"IdlingSpeed": 600.0,
"AxleConfig": { "AxleConfig": {
"Type": "6x2", "Type": "6x2",
"Axles": [ "Axles": [
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": false, "TwinTyres": false,
"RRCISO": 0.0055, "RRCISO": 0.0055,
"FzISO": 33350.0 "FzISO": 33350.0,
"Type": "VehicleNonDriven"
}, },
{ {
"Inertia": 14.9, "Inertia": 14.9,
...@@ -49,7 +50,8 @@ ...@@ -49,7 +50,8 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": true, "TwinTyres": true,
"RRCISO": 0.0055, "RRCISO": 0.0055,
"FzISO": 33350.0 "FzISO": 33350.0,
"Type": "VehicleDriven"
}, },
{ {
"Inertia": 14.9, "Inertia": 14.9,
...@@ -57,9 +59,11 @@ ...@@ -57,9 +59,11 @@
"AxleWeightShare": 0.0, "AxleWeightShare": 0.0,
"TwinTyres": false, "TwinTyres": false,
"RRCISO": 0.0055, "RRCISO": 0.0055,
"FzISO": 33350.0 "FzISO": 33350.0,
"Type": "VehicleNonDriven"
} }
] ]
} },
"CdA": 5.2
} }
} }
\ No newline at end of file
{ {
"Header": { "Header": {
"CreatedBy": " ()", "CreatedBy": "",
"Date": "2017-05-19T08:13:02.2025457Z", "Date": "2017-06-22T11:15:58.5117543Z",
"AppVersion": "3", "AppVersion": "3",
"FileVersion": 3 "FileVersion": 4
}, },
"Body": { "Body": {
"SavedInDeclMode": true, "SavedInDeclMode": true,
...@@ -11,12 +11,18 @@ ...@@ -11,12 +11,18 @@
"Displacement": "7000", "Displacement": "7000",
"IdlingSpeed": 600.0, "IdlingSpeed": 600.0,
"Inertia": 3.6, "Inertia": 3.6,
"FullLoadCurve": "324kW.vfld",
"FuelMap": "350kW.vmap",
"WHTC-Urban": 1.0, "WHTC-Urban": 1.0,
"WHTC-Rural": 1.0, "WHTC-Rural": 1.0,
"WHTC-Motorway": 1.0, "WHTC-Motorway": 1.0,
"WHTC-Engineering": 1.0, "WHTC-Engineering": 1.0,
"ColdHotBalancingFactor": 1.0 "ColdHotBalancingFactor": 1.0,
"CFRegPer": 1.0,
"CFNCV": 1.0,
"RatedPower": 324000.0,
"RatedSpeed": 1600.0,
"MaxTorque": 2300.0,
"FuelType": 0,
"FullLoadCurve": "324kW.vfld",
"FuelMap": "350kW.vmap"
} }
} }
\ No newline at end of file
...@@ -362,7 +362,7 @@ Public Class VehicleForm ...@@ -362,7 +362,7 @@ Public Class VehicleForm
TbMassExtra.Text = vehicle.CurbMassExtra.ToGUIFormat() TbMassExtra.Text = vehicle.CurbMassExtra.ToGUIFormat()
TbLoad.Text = vehicle.Loading.ToGUIFormat() TbLoad.Text = vehicle.Loading.ToGUIFormat()
TBrdyn.Text = (vehicle.DynamicTyreRadius.Value() * 1000).ToGUIFormat() TBrdyn.Text = (vehicle.DynamicTyreRadius.Value() * 1000).ToGUIFormat()
tbVehIdlingSpeed.Text = vehicle.EngineIdleSpeed.AsRPM.ToGUIFormat() tbVehIdlingSpeed.Text = If(vehicle.EngineIdleSpeed Is Nothing, "", vehicle.EngineIdleSpeed.AsRPM.ToGUIFormat())
CbCdMode.SelectedValue = airdrag.CrossWindCorrectionMode CbCdMode.SelectedValue = airdrag.CrossWindCorrectionMode
TbCdFile.Text = TbCdFile.Text =
......
...@@ -55,7 +55,7 @@ Public Class JSONFileWriter ...@@ -55,7 +55,7 @@ Public Class JSONFileWriter
body.Add("RatedPower", eng.RatedPowerDeclared.Value()) body.Add("RatedPower", eng.RatedPowerDeclared.Value())
body.Add("RatedSpeed", eng.RatedSpeedDeclared.AsRPM) body.Add("RatedSpeed", eng.RatedSpeedDeclared.AsRPM)
body.Add("MaxTorque", eng.MaxTorqueDeclared.Value()) body.Add("MaxTorque", eng.MaxTorqueDeclared.Value())
body.Add("FuelType", eng.FuelType) body.Add("FuelType", eng.FuelType.ToString())
body.Add("FullLoadCurve", GetRelativePath(eng.FullLoadCurve.Source, Path.GetDirectoryName(filename))) body.Add("FullLoadCurve", GetRelativePath(eng.FullLoadCurve.Source, Path.GetDirectoryName(filename)))
......
...@@ -62,5 +62,5 @@ using System.Runtime.InteropServices; ...@@ -62,5 +62,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]
/*
* This file is part of VECTO.
*
* Copyright © 2012-2016 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System.Reflection;
[assembly: AssemblyVersion("3.1.2.903")]
[assembly: AssemblyFileVersion("3.1.2.903")]
/*
* This file is part of VECTO.
*
* Copyright © 2012-2016 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
<#@ template language="C#" #>
<#@ output extension=".cs"#>
using System.Reflection;
[assembly: AssemblyVersion("3.1.2.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("3.1.2.<#= this.RevisionNumber #>")]
<#+
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays;
#>
\ No newline at end of file
...@@ -74,6 +74,11 @@ ...@@ -74,6 +74,11 @@
<Compile Include="OutputData\IOutputFileWriter.cs" /> <Compile Include="OutputData\IOutputFileWriter.cs" />
<Compile Include="OutputData\IOutputPlugin.cs" /> <Compile Include="OutputData\IOutputPlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Version.cs">
<DependentUpon>Version.tt</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Resources\XMLNames.Designer.cs"> <Compile Include="Resources\XMLNames.Designer.cs">
<DependentUpon>XMLNames.resx</DependentUpon> <DependentUpon>XMLNames.resx</DependentUpon>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
...@@ -90,6 +95,10 @@ ...@@ -90,6 +95,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Version.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Version.cs</LastGenOutput>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\XMLNames.resx"> <EmbeddedResource Include="Resources\XMLNames.resx">
......
...@@ -32,13 +32,10 @@ ...@@ -32,13 +32,10 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
using System.Xml.Linq; using System.Xml.Linq;
using System.Xml.Schema; using System.Xml.Schema;
using System.Xml.XPath;
using NUnit.Framework; using NUnit.Framework;
using TUGraz.VectoCore.Utils; using TUGraz.VectoCore.Utils;
using TUGraz.VectoHashing; using TUGraz.VectoHashing;
...@@ -421,7 +418,6 @@ namespace VectoHashingTest ...@@ -421,7 +418,6 @@ namespace VectoHashingTest
TestCase(VectoComponents.Angledrive, "ANGL-"), TestCase(VectoComponents.Angledrive, "ANGL-"),
TestCase(VectoComponents.Airdrag, "AD-"), TestCase(VectoComponents.Airdrag, "AD-"),
TestCase(VectoComponents.Tyre, "TYRE-"), TestCase(VectoComponents.Tyre, "TYRE-"),
] ]
public void TestIdPrefix(VectoComponents component, string expectedPrefix) public void TestIdPrefix(VectoComponents component, string expectedPrefix)
{ {
......
This diff is collapsed.
...@@ -573,11 +573,29 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -573,11 +573,29 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Case<ResponseUnderload>(r => { Case<ResponseUnderload>(r => {
response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed,
gradient, r); gradient, r);
response.Switch().Case<ResponseGearShift>(() => { response.Switch().
DataBus.BrakePower = 0.SI<Watt>(); Case<ResponseGearShift>(() => {
response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, DataBus.BrakePower = 0.SI<Watt>();
gradient, r); response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed,
}); gradient, r);
}).
Case<ResponseOverload>(() => {
DataBus.BrakePower = 0.SI<Watt>();
if (DataBus.GearboxType.AutomaticTransmission() || DataBus.ClutchClosed(absTime)) {
if (DataBus.VehicleSpeed.IsGreater(0)) {
response = Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
} else {
if (RetryDistanceExceeded) {
response = Driver.DrivingActionAccelerate(absTime, ds, targetVelocity, gradient);
} else {
RetryDistanceExceeded = true;
response = new ResponseDrivingCycleDistanceExceeded() { MaxDistance = ds / 2 };
}
}
} else {
response = Driver.DrivingActionRoll(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
}
});
}); });
return response; return response;
} }
......
...@@ -369,7 +369,7 @@ namespace TUGraz.VectoCore.OutputData ...@@ -369,7 +369,7 @@ namespace TUGraz.VectoCore.OutputData
public static SI FuelConsumptionFinalLiterPer100Kilometer(this IModalDataContainer data) public static SI FuelConsumptionFinalLiterPer100Kilometer(this IModalDataContainer data)
{ {
var fuelConsumptionFinal = data.FuelConsumptionFinal(); var fuelConsumptionFinal = data.FuelConsumptionFinal();
if (fuelConsumptionFinal == null) { if (fuelConsumptionFinal == null || data.FuelData.FuelDensity == null) {
return null; return null;
} }
...@@ -538,12 +538,15 @@ namespace TUGraz.VectoCore.OutputData ...@@ -538,12 +538,15 @@ namespace TUGraz.VectoCore.OutputData
retVal[i] = 0.SI<Scalar>(); retVal[i] = 0.SI<Scalar>();
} }
data.GetValues(x => { var gearData = data.GetValues(x => new {
var gear = x.Field<uint>((int)ModalResultField.Gear); Gear = x.Field<uint>((int)ModalResultField.Gear),
retVal[gear] += x.Field<Second>((int)ModalResultField.simulationInterval).Value(); dt = x.Field<Second>((int)ModalResultField.simulationInterval)
return gear; // not used
}); });
foreach (var entry in gearData) {
retVal[entry.Gear] += entry.dt.Value();
}
var duration = Duration(data).Value(); var duration = Duration(data).Value();
for (uint i = 0; i <= gearCount; i++) { for (uint i = 0; i <= gearCount; i++) {
retVal[i] = 100 * retVal[i] / duration; retVal[i] = 100 * retVal[i] / duration;
......
...@@ -462,13 +462,15 @@ namespace TUGraz.VectoCore.OutputData ...@@ -462,13 +462,15 @@ namespace TUGraz.VectoCore.OutputData
if (fcfinal != null) { if (fcfinal != null) {
row[FCFINAL_KM] = fcfinal.ConvertTo().Gramm.Per.Kilo.Meter; row[FCFINAL_KM] = fcfinal.ConvertTo().Gramm.Per.Kilo.Meter;
} }
row[FCFINAL_LITERPER100KM] = modData.FuelConsumptionFinalLiterPer100Kilometer();
if (vehicleLoading != null && !vehicleLoading.IsEqual(0)) { var fcPer100lkm = modData.FuelConsumptionFinalLiterPer100Kilometer();
row[FCFINAL_LITERPER100TKM] = (modData.FuelConsumptionFinalLiterPer100Kilometer() ?? 0.SI()) / row[FCFINAL_LITERPER100KM] = fcPer100lkm;
if (vehicleLoading != null && !vehicleLoading.IsEqual(0) && fcPer100lkm != null) {
row[FCFINAL_LITERPER100TKM] = fcPer100lkm /
vehicleLoading.ConvertTo().Ton; vehicleLoading.ConvertTo().Ton;
} }
if (cargoVolume > 0) { if (cargoVolume > 0 && fcPer100lkm != null) {
row[FCFINAL_LiterPer100M3KM] = (modData.FuelConsumptionFinalLiterPer100Kilometer() ?? 0.SI()) / cargoVolume; row[FCFINAL_LiterPer100M3KM] = fcPer100lkm / cargoVolume;
} }
var kilogramPerMeter = modData.CO2PerMeter(); var kilogramPerMeter = modData.CO2PerMeter();
......
FuelType , FuelDensity [kg/m3] , CO2 per FuelWeight [kgCo2/kgFuel] , Lower Heating Value [kJ/kg] FuelType , FuelDensity [kg/m3] , CO2 per FuelWeight [kgCo2/kgFuel] , Lower Heating Value [kJ/kg]
Diesel CI , 832 , 3.16 , 42700 Diesel CI , 836 , 3.13 , 42700
Ethanol CI , 794 , 1.91 , 29200 Ethanol CI , 820 , 1.83 , 25400
Petrol PI , 745 , 3.17 , 41500 Petrol PI , 750 , 3.04 , 41500
Ethanol PI , 794 , 1.91 , 29200 Ethanol PI , 786 , 2.09 , 29200
LPG , , 3.02 , 46000 LPG , , 3.02 , 46000
NG , , 2.54 , 45100 NG , , 2.54 , 45100
\ No newline at end of file
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