Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 6529a9e5 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

reverted HybridStrategy to original state before changes of EngineStart...

reverted HybridStrategy to original state before changes of EngineStart (changes did not have any effect)
parent e99a5ef2
Branches
Tags
No related merge requests found
...@@ -1121,9 +1121,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -1121,9 +1121,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
#region Implementation of IEngineControl #region Implementation of IEngineControl
public bool CombustionEngineOn public bool CombustionEngineOn { get; set; }
{
get { return false; } set { } }
#endregion #endregion
} }
......
...@@ -227,7 +227,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -227,7 +227,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
} }
TestPowertrain.SuperCap?.Initialize(DataBus.BatteryInfo.StateOfCharge); TestPowertrain.SuperCap?.Initialize(DataBus.BatteryInfo.StateOfCharge);
TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower; TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower;
var currentGear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear; var currentGear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear;
...@@ -1197,22 +1196,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1197,22 +1196,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return; return;
} }
var iceOn = DataBus.EngineInfo.EngineOn;
// if Hybrid P1 and Engine is off, the search for recuperation torque is not possible:
// Therefore, either switch on engine (if reasonable), or do not search at all.
if (emPos == PowertrainPosition.HybridP1 && !DataBus.EngineCtl.CombustionEngineOn) {
var gearboxIn = firstResponse.Gearbox.InputSpeed * firstResponse.Gearbox.InputTorque;
var eMotor = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP1);
var powerToleranceEl = 0.1 * eMotor.MaxPowerDrive(DataBus.BatteryInfo.InternalVoltage, firstResponse.Gearbox.InputSpeed);
if (gearboxIn - firstResponse.Engine.DragPower < powerToleranceEl) {
DataBus.EngineCtl.CombustionEngineOn = true;
iceOn = true;
} else {
return;
}
}
// full recuperation is not possible - ICE would need to propel - search max possible EM torque // full recuperation is not possible - ICE would need to propel - search max possible EM torque
var emRecuperationTq = SearchAlgorithm.Search( var emRecuperationTq = SearchAlgorithm.Search(
maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech / maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech /
...@@ -1230,7 +1213,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1230,7 +1213,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}, },
evaluateFunction: emTq => { evaluateFunction: emTq => {
var cfg = new HybridStrategyResponse { var cfg = new HybridStrategyResponse {
CombustionEngineOn = iceOn, CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false, GearboxInNeutral = false,
NextGear = nextGear, NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> { MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
...@@ -1253,10 +1236,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1253,10 +1236,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (emRecuperationTq.IsBetween( if (emRecuperationTq.IsBetween(
firstResponse.ElectricMotor.MaxDriveTorque ?? 0.SI<NewtonMeter>(), firstResponse.ElectricMotor.MaxRecuperationTorque ?? 0.SI<NewtonMeter>())) { firstResponse.ElectricMotor.MaxDriveTorque ?? 0.SI<NewtonMeter>(), firstResponse.ElectricMotor.MaxRecuperationTorque ?? 0.SI<NewtonMeter>())) {
var entry = new HybridResultEntry { var entry = new HybridResultEntry {
ICEOff = !iceOn, ICEOff = !DataBus.EngineInfo.EngineOn,
Gear = nextGear, Gear = nextGear,
Setting = new HybridStrategyResponse { Setting = new HybridStrategyResponse {
CombustionEngineOn = iceOn, CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false, GearboxInNeutral = false,
NextGear = nextGear, NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> { MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
...@@ -1270,10 +1253,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1270,10 +1253,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (emRecuperationTq.IsGreater(0)) { if (emRecuperationTq.IsGreater(0)) {
eval.Add( eval.Add(
new HybridResultEntry { new HybridResultEntry {
ICEOff = !iceOn, ICEOff = !DataBus.EngineInfo.EngineOn,
Gear = nextGear, Gear = nextGear,
Setting = new HybridStrategyResponse { Setting = new HybridStrategyResponse {
CombustionEngineOn = iceOn, CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false, GearboxInNeutral = false,
NextGear = nextGear, NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> { MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment