diff --git a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf index bf6495d9f0173b25baaefd98e378fb3395bf934f..ca16e6238dc30bb3dba4e6881bc904576e0da4da 100644 Binary files a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf and b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf differ diff --git a/VectoConsole/Properties/Version.cs b/VectoConsole/Properties/Version.cs index ddfc3a7ffbf70b04809623c14bb3d0c959279a15..7ccddbb78d24ad98e6fce07342d7ef68c1d55995 100644 --- a/VectoConsole/Properties/Version.cs +++ b/VectoConsole/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("3.1.1.1054")] -[assembly: AssemblyFileVersion("3.1.1.1054")] +[assembly: AssemblyVersion("3.2.1.1054")] +[assembly: AssemblyFileVersion("3.2.1.1054")] \ No newline at end of file diff --git a/VectoConsole/Properties/Version.tt b/VectoConsole/Properties/Version.tt index 8401823d7f18676afbd59d04c5f6409fd78d60f1..36eedf7a0282add635d4894fc96c1cd7645b783c 100644 --- a/VectoConsole/Properties/Version.tt +++ b/VectoConsole/Properties/Version.tt @@ -31,9 +31,7 @@ <#@ template language="C#" #> <#@ output extension=".cs"#> +<#@ include file="../../VectoCore/VectoCore/VersionNumber.t4" once="true" #> using System.Reflection; -[assembly: AssemblyVersion("3.1.1.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("3.1.1.<#= this.RevisionNumber #>")] -<#+ - int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2015, 1, 1)).TotalDays; -#> \ No newline at end of file +[assembly: AssemblyVersion("<#= GetVectoCoreVersionNumber() #>")] +[assembly: AssemblyFileVersion("<#= GetVectoCoreVersionNumber() #>")] \ No newline at end of file diff --git a/VectoCore/VectoCore/Configuration/Constants.cs b/VectoCore/VectoCore/Configuration/Constants.cs index 306c57e0fce6e3e3b86fdb366b4eac48ca921756..b4ed52a403292ee4ee3bd4fd9d6551cdb0332ed3 100644 --- a/VectoCore/VectoCore/Configuration/Constants.cs +++ b/VectoCore/VectoCore/Configuration/Constants.cs @@ -156,6 +156,9 @@ namespace TUGraz.VectoCore.Configuration public static readonly Kilogram MaximumGrossVehicleWeight = 40000.SI<Kilogram>(); public static readonly Kilogram MaximumGrossVehicleWeightEMS = 60000.SI<Kilogram>(); + + public static readonly MeterPerSecond HighwaySpeedThreshold = 70.KMPHtoMeterPerSecond(); + public static readonly MeterPerSecond RuralSpeedThreshold = 50.KMPHtoMeterPerSecond(); } public static class XML diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index 134faae46af37f0e85d2338f187b99c868a6ed3c..148899b410a44306dce012881ee9a697167342f1 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -337,10 +337,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl var motorway = auxData.First(x => x.ID == auxId && x.MissionType == MissionType.LongHaul); aux.AddCycle(auxId, entry => { - if (entry.VehicleTargetSpeed >= 70.KMPHtoMeterPerSecond()) { + if (entry.VehicleTargetSpeed >= Constants.SimulationSettings.HighwaySpeedThreshold) { return motorway.PowerDemand; } - if (entry.VehicleTargetSpeed >= 50.KMPHtoMeterPerSecond()) { + if (entry.VehicleTargetSpeed >= Constants.SimulationSettings.RuralSpeedThreshold) { return rural.PowerDemand; } return urban.PowerDemand; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index ccb327146c37dad75928cb500a998b2690516157..5029b0ba3c44ac0afa12b4a8e13efd659da5ec4c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -391,7 +391,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var fc = result.Value; var fcAux = fc; - var fcWHTC = fcAux * ModelData.FuelConsumptionCorrectionFactor; + var fcWHTC = fcAux * WHTCCorrectionFactor; var fcAAUX = fcWHTC; var advancedAux = EngineAux as BusAuxiliariesAdapter; if (advancedAux != null) { @@ -407,6 +407,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl container[ModalResultField.FCFinal] = fcFinal; } + protected virtual double WHTCCorrectionFactor + { + get { return ModelData.FuelConsumptionCorrectionFactor; } + } + protected override void DoCommitSimulationStep() { AdvanceState(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs index 885e702c41bdd4a66c9b72835bbfeda732398d72..d89e7bd5204e62fc0516dc1b78eec3e1a00220b1 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCombustionEngine.cs @@ -157,5 +157,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { return DataBus.CycleData.LeftSample.EngineSpeed; } - } + + protected override double WHTCCorrectionFactor + { + get { + if (DataBus.CycleData.LeftSample.VehicleTargetSpeed >= Constants.SimulationSettings.HighwaySpeedThreshold) { + return ModelData.WHTCMotorway; + } + if (DataBus.CycleData.LeftSample.VehicleTargetSpeed >= Constants.SimulationSettings.RuralSpeedThreshold) { + return ModelData.WHTCRural; + } + return ModelData.WHTCUrban; + } + } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs index ac092759f34f4bda001a67ff4ba8645e4695ba29..c556de1b25f04232b53adbe7cccd08ae9dc2fb7c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/VTPCycle.cs @@ -183,5 +183,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl // 0.3.KMPHtoMeterPerSecond()); } } + + protected override void DoWriteModalResults(IModalDataContainer container) + { + base.DoWriteModalResults(container); + container[ModalResultField.v_act] = CycleIterator.LeftSample.VehicleTargetSpeed; + } } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Integration/VTP/VTPTest.cs b/VectoCore/VectoCoreTest/Integration/VTP/VTPTest.cs index 6d77ce105c9434e72e250bb3c928dbce7465d51f..d33fe77c8f13cb65d135eecf6268a55ed955fd53 100644 --- a/VectoCore/VectoCoreTest/Integration/VTP/VTPTest.cs +++ b/VectoCore/VectoCoreTest/Integration/VTP/VTPTest.cs @@ -29,6 +29,7 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ +using System.IO; using NUnit.Framework; using TUGraz.VectoCommon.Models; using TUGraz.VectoCore.InputData.FileIO.JSON; @@ -41,10 +42,16 @@ namespace TUGraz.VectoCore.Tests.Integration.VTP [TestFixture] public class VTPTest { - [TestCase()] + [OneTimeSetUp] + public void Init() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + + [TestCase()] public void RunVTP() { - var jobFile = @"TestData\Integration\VTPMode\GenericVehicle\class_5_generic_vehicle.vecto"; + var jobFile = @"TestData\Integration\VTPMode\GenericVehicle\class_5_generic vehicle.vecto"; var fileWriter = new FileOutputWriter(jobFile); var sumWriter = new SummaryDataContainer(fileWriter); diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index be6b194369b96545624463281052b60be49d112a..c2f426ba7c09a9ea0604f68fee93a14e88cce305 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -83,7 +83,7 @@ <Compile Include="Integration\CoachAdvancedAuxPowertrain.cs" /> <Compile Include="Integration\CoachPowerTrain.cs" /> <Compile Include="Integration\DriverStrategy\SimpleCycles.cs" /> - <Compile Include="Integration\EPTP\EPTPTest.cs" /> + <Compile Include="Integration\VTP\VTPTest.cs" /> <Compile Include="Integration\FuelTypesTest.cs" /> <Compile Include="Integration\FullCycleDeclarationTest.cs"> <SubType>Code</SubType>