diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/HybridStrategyParameters.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/HybridStrategyParameters.cs index d1775d3b3b19d70d56d5406a2d20bd7d106adf08..22ff32595089b75b50175802ac9d8e8de5f8186b 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/HybridStrategyParameters.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/HybridStrategyParameters.cs @@ -14,5 +14,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data { public Second AuxReserveTime { get; set; } public Second AuxReserveChargeTime { get; set; } + + public Second MinICEOnTime { get; set; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index 4635e1ac35acdea7c7514045f172e8504f8fff0a..9f2afff3d3e83b603c2546ba104777339a544e1f 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -24,7 +24,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies public class HybridStrategy : LoggingObject, IHybridControlStrategy { - public static readonly Second MIN_ICE_ON_TIME = 3.SI<Second>(); public class StrategyState { @@ -91,7 +90,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies IceIdlingCosts = ModelData.EngineData.Fuels.Sum( x => (x.ConsumptionMap.GetFuelConsumptionValue(0.SI<NewtonMeter>(), ModelData.EngineData.IdleSpeed) - * x.FuelData.LowerHeatingValueVecto * MIN_ICE_ON_TIME).Value()); + * x.FuelData.LowerHeatingValueVecto * StrategyParameters.MinICEOnTime).Value()); // create testcontainer var modData = new ModalDataContainer(runData, null, new[] { FuelData.Diesel }, null, false); @@ -206,7 +205,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies protected virtual bool AllowICEOff(Second absTime) { return PreviousState.ICEStartTStmp == null || - PreviousState.ICEStartTStmp.IsSmaller(absTime + MIN_ICE_ON_TIME); + (PreviousState.ICEStartTStmp + StrategyParameters.MinICEOnTime).IsSmaller(absTime); } protected virtual void HandleBrakeAction(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun, List<HybridResultEntry> eval) diff --git a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs index 992b8125c79929ef833567b183aceb9126fc7aa0..ea2e0376cdedb0dbab5d9fea97b7d029a0261bc6 100644 --- a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs @@ -696,7 +696,8 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid MaxSoC = 0.8, TargetSoC = 0.5, AuxReserveTime = 5.SI<Second>(), - AuxReserveChargeTime = 2.SI<Second>() + AuxReserveChargeTime = 2.SI<Second>(), + MinICEOnTime = 3.SI<Second>() }; }