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

fix case where gearshift happens and braking results in negative braking power...

fix case where gearshift happens and braking results in negative braking power - perform roll action
parent 1efba218
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ namespace TUGraz.VectoCommon.Models { ...@@ -12,6 +12,7 @@ namespace TUGraz.VectoCommon.Models {
public class HybridStrategyLimitedResponse : IHybridStrategyResponse public class HybridStrategyLimitedResponse : IHybridStrategyResponse
{ {
public Watt Delta { get; set; } public Watt Delta { get; set; }
public PerSecond DeltaEngineSpeed { get; set; }
} }
public class HybridStrategyResponse : IHybridStrategyResponse public class HybridStrategyResponse : IHybridStrategyResponse
......
...@@ -1383,6 +1383,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -1383,6 +1383,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
response = Driver.DrivingActionBrake( response = Driver.DrivingActionBrake(
absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed,
gradient, r); gradient, r);
if (response is ResponseOverload) {
response = Driver.DrivingActionRoll(absTime, ds,
DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
}
}).Case<ResponseOverload>( }).Case<ResponseOverload>(
() => { () => {
DataBus.Brakes.BrakePower = 0.SI<Watt>(); DataBus.Brakes.BrakePower = 0.SI<Watt>();
......
...@@ -102,7 +102,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -102,7 +102,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (dryRun) { if (dryRun) {
return new ResponseDryRun(this) { return new ResponseDryRun(this) {
DeltaDragLoad = ovl.Delta, DeltaDragLoad = ovl.Delta,
DeltaFullLoad = ovl.Delta DeltaFullLoad = ovl.Delta,
DeltaEngineSpeed = ovl.DeltaEngineSpeed
}; };
} }
return new ResponseOverload(this) { return new ResponseOverload(this) {
......
...@@ -239,7 +239,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -239,7 +239,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
RequestDryRun(absTime, dt, outTorque, outAngularVelocity, currentGear, maxEmDriveSetting); RequestDryRun(absTime, dt, outTorque, outAngularVelocity, currentGear, maxEmDriveSetting);
if (maxEmDriveResponse.DeltaFullLoad.IsSmallerOrEqual(0)) { if (maxEmDriveResponse.DeltaFullLoad.IsSmallerOrEqual(0)) {
return new HybridStrategyLimitedResponse() { return new HybridStrategyLimitedResponse() {
Delta = outTorque * outAngularVelocity - StrategyParameters.MaxDrivetrainPower Delta = outTorque * outAngularVelocity - StrategyParameters.MaxDrivetrainPower,
DeltaEngineSpeed = maxEmDriveResponse.DeltaEngineSpeed
}; };
} }
...@@ -260,7 +261,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -260,7 +261,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
delta = (outTorque - maxTorque) * outAngularVelocity; delta = (outTorque - maxTorque) * outAngularVelocity;
} }
return new HybridStrategyLimitedResponse() { return new HybridStrategyLimitedResponse() {
Delta = delta Delta = delta,
DeltaEngineSpeed = maxEmDriveResponse.DeltaEngineSpeed
}; };
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
"Enabled": false "Enabled": false
}, },
"DownshiftAfterUpshiftDelay": 6.0, "DownshiftAfterUpshiftDelay": 6.0,
"UpshiftAfterDownshiftDelay": 10.0, "UpshiftAfterDownshiftDelay": 6.0,
"UpshiftMinAcceleration": 0.1, "UpshiftMinAcceleration": 0.1,
"PowershiftShiftTime": 0.8 "PowershiftShiftTime": 0.8
} }
......
...@@ -58,8 +58,7 @@ ...@@ -58,8 +58,7 @@
"Interurban", "Interurban",
"MunicipalUtility", "MunicipalUtility",
"Suburban", "Suburban",
"Urban", "Urban"
] ]
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment