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 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
No related branches found
No related tags found
No related merge requests found
......@@ -1121,9 +1121,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
#region Implementation of IEngineControl
public bool CombustionEngineOn
{
get { return false; } set { } }
public bool CombustionEngineOn { get; set; }
#endregion
}
......
......@@ -227,7 +227,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
TestPowertrain.SuperCap?.Initialize(DataBus.BatteryInfo.StateOfCharge);
TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower;
var currentGear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear;
......@@ -1197,22 +1196,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
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
var emRecuperationTq = SearchAlgorithm.Search(
maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech /
......@@ -1230,7 +1213,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
},
evaluateFunction: emTq => {
var cfg = new HybridStrategyResponse {
CombustionEngineOn = iceOn,
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false,
NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......@@ -1253,10 +1236,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (emRecuperationTq.IsBetween(
firstResponse.ElectricMotor.MaxDriveTorque ?? 0.SI<NewtonMeter>(), firstResponse.ElectricMotor.MaxRecuperationTorque ?? 0.SI<NewtonMeter>())) {
var entry = new HybridResultEntry {
ICEOff = !iceOn,
ICEOff = !DataBus.EngineInfo.EngineOn,
Gear = nextGear,
Setting = new HybridStrategyResponse {
CombustionEngineOn = iceOn,
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false,
NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......@@ -1270,10 +1253,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (emRecuperationTq.IsGreater(0)) {
eval.Add(
new HybridResultEntry {
ICEOff = !iceOn,
ICEOff = !DataBus.EngineInfo.EngineOn,
Gear = nextGear,
Setting = new HybridStrategyResponse {
CombustionEngineOn = iceOn,
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false,
NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......
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