From 06ea3284eefed58994c373f6aa887129acd965f0 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 9 Jun 2021 09:12:59 +0200 Subject: [PATCH] fix testcase --- .../Models/SimulationComponent/Impl/BusAuxiliariesAdapter.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/BusAuxiliariesAdapter.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/BusAuxiliariesAdapter.cs index 33317317cb..434b08694a 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/BusAuxiliariesAdapter.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/BusAuxiliariesAdapter.cs @@ -139,6 +139,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl (AdditionalAux?.PowerDemandESSEngineOn(0.SI<Second>(), 1.SI<Second>(), angularSpeed) ?? 0.SI<Watt>()); var avgAngularSpeed = (CurrentState.AngularSpeed + PreviousState.AngularSpeed) / 2.0; + if (avgAngularSpeed.IsEqual(0)) { + return 0.SI<NewtonMeter>(); + } return CurrentState.PowerDemand / avgAngularSpeed; } -- GitLab