Code development platform for open source projects from the European Union institutions

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

extending PEV electric motor controller to not recuperate below certain speed...

extending PEV electric motor controller to not recuperate below certain speed when braking is required
parent 5b7f0e0a
No related branches found
No related tags found
No related merge requests found
using System.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Utils;
......@@ -34,12 +36,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
//var dragTorque = ElectricMotorData.DragCurve.Lookup()
return (-inertiaTorqueLoss); //.LimitTo(maxDriveTorque, maxRecuperationTorque);
}
if (DataBus.DriverInfo.DrivingAction == DrivingAction.Coast ||
DataBus.DriverInfo.DrivingAction == DrivingAction.Roll) {
return null;
}
if (DataBus.DriverInfo.DrivingAction == DrivingAction.Coast ||
DataBus.DriverInfo.DrivingAction == DrivingAction.Roll) {
return null;
}
if (DataBus.VehicleInfo.VehicleSpeed.IsSmallerOrEqual(Constants.SimulationSettings.ClutchDisengageWhenHaltingSpeed) && outTorque.IsSmaller(0)) {
return null;
}
if (maxDriveTorque == null) {
if (maxDriveTorque == null) {
return null;
}
......
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