From ed2788e9f73dbee82ef4f39130af156078951189 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Mon, 26 Apr 2021 11:15:36 +0200 Subject: [PATCH] fix testcases after making soc exponent in cost function a parameter, fix in combustion engine when vehicle stops --- .../SimulationComponent/Impl/StopStartCombustionEngine.cs | 2 +- .../VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/StopStartCombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/StopStartCombustionEngine.cs index a86772cbd6..6fce8459ee 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/StopStartCombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/StopStartCombustionEngine.cs @@ -84,7 +84,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl { //throw new VectoSimulationException("Combustion engine cannot supply outtorque when switched off (T_out: {0})", outTorque); } CurrentState.EngineOn = false; - CurrentState.EngineSpeed = DataBus.VehicleInfo.VehicleStopped ? ModelData.IdleSpeed : outAngularVelocity; //ModelData.IdleSpeed; + CurrentState.EngineSpeed = DataBus.VehicleInfo.VehicleStopped || outAngularVelocity.IsEqual(0) ? ModelData.IdleSpeed : outAngularVelocity; //ModelData.IdleSpeed; CurrentState.EngineTorque = 0.SI<NewtonMeter>(); CurrentState.EngineTorqueOut = 0.SI<NewtonMeter>(); CurrentState.EnginePower = 0.SI<Watt>(); diff --git a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs index e0d6899ca0..521c7def0b 100644 --- a/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Hybrid/ParallelHybridTest.cs @@ -1360,6 +1360,7 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid MinICEOnTime = 3.SI<Second>(), ICEStartPenaltyFactor = 0, //MaxDrivetrainPower = maxDriveTrainPower ?? 1e12.SI<Watt>(), + CostFactorSOCExponent = 5, }; } -- GitLab