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

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

HybridStrategy HaltAction: removed check for EngineStopStart ... not valid for hybrid vehicles.

parent 276a1975
No related branches found
No related tags found
No related merge requests found
......@@ -1368,34 +1368,30 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
protected virtual void HandleHaltAction(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun, List<HybridResultEntry> eval)
{
var iceOn = ModelData.VehicleData.ADAS.EngineStopStart ? DataBus.EngineInfo.EngineOn : true;
var iceOn = DataBus.EngineInfo.EngineOn;
if (ModelData.VehicleData.ADAS.EngineStopStart) {
if (VehicleHaltTimestamp == null) {
VehicleHaltTimestamp = absTime;
}
if (VehicleHaltTimestamp == null) {
VehicleHaltTimestamp = absTime;
}
if ((absTime - VehicleHaltTimestamp).IsGreaterOrEqual(
ModelData.DriverData.EngineStopStart.EngineOffStandStillActivationDelay)) {
if (EngineOffTimestamp == null) {
EngineOffTimestamp = absTime;
iceOn = false;
}
if ((absTime - VehicleHaltTimestamp).IsGreaterOrEqual(
ModelData.DriverData.EngineStopStart.EngineOffStandStillActivationDelay)) {
if (EngineOffTimestamp == null) {
EngineOffTimestamp = absTime;
iceOn = false;
}
}
if (EngineOffTimestamp != null &&
(absTime - EngineOffTimestamp).IsGreaterOrEqual(ModelData.DriverData.EngineStopStart
.MaxEngineOffTimespan)) {
iceOn = true;
}
if (EngineOffTimestamp != null &&
(absTime - EngineOffTimestamp).IsGreaterOrEqual(ModelData.DriverData.EngineStopStart
.MaxEngineOffTimespan)) {
iceOn = true;
}
var tmp = ResponseEmOff;
tmp.Setting.GearboxInNeutral = false;
//tmp.Setting.NextGear = startg
tmp.Setting.CombustionEngineOn = iceOn;
tmp.ICEOff = !iceOn;
eval.Add(tmp);
}
......
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