Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

increase loop threshold for extreme driving conditions

parent 0f3b7fa7
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ namespace TUGraz.VectoCore.Configuration
{
public static class Constants
{
public const double RPMToRad = 2 * Math.PI / 60;
public const double RPMToRad = 2 * Math.PI / 60;
public const double Kilo = 1000;
public const double MeterPerSecondToKMH = 3.6;
public const double SecondsPerHour = 3600;
......@@ -88,7 +88,7 @@ namespace TUGraz.VectoCore.Configuration
//VectoMath.InclinationToAngle(0.25 / 100.0).Value();
public const int DriverSearchLoopThreshold = 100;
public const int DriverSearchLoopThreshold = 200;
public static readonly Watt EnginePowerSearchTolerance = 0.50.SI<Watt>(); // Watt
......
......@@ -192,8 +192,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
};
}
if (deltaFull.IsGreater(0.SI<NewtonMeter>()) &&
deltaDrag.IsSmaller(0.SI<NewtonMeter>())) {
if (
(deltaFull * avgEngineSpeed).IsGreater(0.SI<Watt>(), Constants.SimulationSettings.EnginePowerSearchTolerance) &&
(deltaDrag * avgEngineSpeed).IsSmaller(0.SI<Watt>(), Constants.SimulationSettings.EnginePowerSearchTolerance)) {
throw new VectoSimulationException(
"Unexpected condition: requested torque_out is above gearbox full-load and engine is below drag load! deltaFull: {0}, deltaDrag: {1}",
deltaFull, deltaDrag);
......
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