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 da1f5b1b authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

do not disengage during dry-run

parent 89e111b6
No related branches found
No related tags found
No related merge requests found
......@@ -349,15 +349,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var inAngularVelocity = outAngularVelocity * ModelData.Gears[Gear].Ratio;
if (dryRun) {
if ((DataBus.DriverBehavior == DrivingBehavior.Braking || DataBus.DriverBehavior == DrivingBehavior.Coasting) &&
inAngularVelocity < DataBus.EngineIdleSpeed &&
DataBus.VehicleSpeed < Constants.SimulationSettings.VehicleStopClutchDisengageSpeed) {
Disengaged = true;
_engageTime = absTime + dt;
_strategy.Disengage(absTime, dt, outTorque, outAngularVelocity);
Log.Debug("EngineSpeed is below IdleSpeed, Gearbox disengage!");
return new ResponseEngineSpeedTooLow { Source = this, GearboxPowerRequest = outTorque * outAngularVelocity };
}
var dryRunResponse = NextComponent.Request(absTime, dt, inTorque, inAngularVelocity, true);
dryRunResponse.GearboxPowerRequest = outTorque * (PreviousState.OutAngularVelocity + outAngularVelocity) / 2.0;
return dryRunResponse;
......@@ -448,7 +439,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (DataBus.ExecutionMode == ExecutionMode.Declaration) {
throw new VectoException(
"Gear {0} LossMap data was extrapolated in Declaration Mode: range for loss map is not sufficient: n:{1}, torque:{2}, ratio:{3}",
Gear, CurrentState.OutAngularVelocity.ConvertTo().Rounds.Per.Minute, CurrentState.OutTorque,
Gear, CurrentState.InAngularVelocity.ConvertTo().Rounds.Per.Minute, CurrentState.InTorque,
ModelData.Gears[Gear].Ratio);
}
}
......
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