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

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

Merge branch 'feature/VECTO-1240-hybrid-powertrain' of...

Merge branch 'feature/VECTO-1240-hybrid-powertrain' of https://citnet.tech.ec.europa.eu/CITnet/stash/scm/vecto/mq_vecto-dev into feature/VECTO-1240-hybrid-powertrain

# Conflicts:
#	VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs
parents 54ad3e97 e763a9c4
No related branches found
No related tags found
No related merge requests found
......@@ -849,7 +849,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
velocityWithOverspeed = DriverStrategy.ApplyOverspeed(velocityWithOverspeed);
}
if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() || (DataBus.ClutchInfo.ClutchClosed(absTime) &&DataBus.GearboxInfo.GearEngaged(absTime) )) {
if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() || (DataBus.ClutchInfo.ClutchClosed(absTime) && DataBus.GearboxInfo.GearEngaged(absTime) )) {
for (var i = 0; i < 3; i++) {
var retVal = HandleRequestEngaged(
absTime, ds, targetVelocity, gradient, prohibitOverspeed, velocityWithOverspeed, debug);
......@@ -1414,7 +1414,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Radian gradient)
{
IResponse response;
if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() || DataBus.ClutchInfo.ClutchClosed(absTime)) {
if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() || (DataBus.ClutchInfo.ClutchClosed(absTime) && DataBus.GearboxInfo.GearEngaged(absTime))) {
if (DataBus.VehicleInfo.VehicleSpeed.IsGreater(0)) {
response = Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
} else {
......
......@@ -246,7 +246,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (firstResponse.DeltaDragLoad.IsGreater(0)) {
// braking requested but engine operating point is not below drag curve.
if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) {
if (ElectricMotorCanPropellDuringTractionInterruption) {
if (DataBus.GearboxInfo.GearEngaged(absTime)) {
eval.AddRange(FindSolution(absTime, dt, outTorque, outAngularVelocity, dryRun));
} else {
EvaluateConfigsForGear(
absTime, dt, outTorque, outAngularVelocity, currentGear, AllowICEOff(absTime), eval, emPos);
}
}else if (DataBus.GearboxInfo.GearEngaged(absTime)) {
eval.AddRange(FindSolution(absTime, dt, outTorque, outAngularVelocity, dryRun));
} else {
eval.Add(ResponseEmOff);
......@@ -409,7 +416,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
EvaluateConfigsForGear(
absTime, dt, outTorque, outAngularVelocity, best.Gear + 1, AllowICEOff(absTime), newEval,
best.Setting.MechanicalAssistPower.First().Key);
best = DoSelectBestOption(newEval, absTime, dt, outTorque, outAngularVelocity, dryRun, currentGear);
if (newEval.Count > 0) {
best = DoSelectBestOption(newEval, absTime, dt, outTorque, outAngularVelocity, dryRun, currentGear);
}
}
if (best.IgnoreReason.EngineSpeedBelowDownshift()) {
//try downshift
......@@ -417,7 +426,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
EvaluateConfigsForGear(
absTime, dt, outTorque, outAngularVelocity, best.Gear - 1, AllowICEOff(absTime), newEval,
best.Setting.MechanicalAssistPower.First().Key);
best = DoSelectBestOption(newEval, absTime, dt, outTorque, outAngularVelocity, dryRun, currentGear);
if (newEval.Count > 0) {
best = DoSelectBestOption(newEval, absTime, dt, outTorque, outAngularVelocity, dryRun, currentGear);
}
}
return best;
}
......@@ -450,6 +461,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return best;
}
var allOverload = eval.Where(x => !(x.IgnoreReason.BatteryDemandExceeded() || x.IgnoreReason.BatterySoCTooLow()))
.All(x => x.IgnoreReason.EngineTorqueDemandTooHigh());
var allUnderload = eval.All(x => x.IgnoreReason.EngineTorqueDemandTooLow());
......@@ -653,11 +665,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
var minimumShiftTimePassed = (DataBus.GearboxInfo.LastShift + ModelData.GearboxData.ShiftTime).IsSmallerOrEqual(absTime);
var gearRangeUpshift = ModelData.GearshiftParameters.AllowedGearRangeUp;
var gearRangeDownshift = ModelData.GearshiftParameters.AllowedGearRangeDown;
if (dryRun || !minimumShiftTimePassed || (absTime - DataBus.GearboxInfo.LastUpshift).IsSmaller(ModelData.GearboxData.DownshiftAfterUpshiftDelay)
if (dryRun || !minimumShiftTimePassed || (absTime - DataBus.GearboxInfo.LastUpshift).IsSmaller(ModelData.GearboxData.DownshiftAfterUpshiftDelay/*, 0.1*/)
|| (DataBus.DriverInfo.DrivingAction == DrivingAction.Accelerate && DataBus.VehicleInfo.VehicleSpeed.IsSmaller(5.KMPHtoMeterPerSecond()))) {
gearRangeDownshift = 0;
}
if (dryRun || !minimumShiftTimePassed || (absTime - DataBus.GearboxInfo.LastDownshift).IsSmaller(ModelData.GearboxData.UpshiftAfterDownshiftDelay)
if (dryRun || !minimumShiftTimePassed || (absTime - DataBus.GearboxInfo.LastDownshift).IsSmaller(ModelData.GearboxData.UpshiftAfterDownshiftDelay/*,0.1*/)
|| (DataBus.DriverInfo.DrivingAction == DrivingAction.Accelerate && DataBus.VehicleInfo.VehicleSpeed.IsSmaller(5.KMPHtoMeterPerSecond()))) {
gearRangeUpshift = 0;
}
......
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