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

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

Merge pull request #630 in VECTO/vecto-sim from...

Merge pull request #630 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:bugfix/VECTO-728-simulation-aborts-when-vehicle-s-max-speed to master

* commit 'fcfbd316':
  try to search operating point once more, in case the first one was due to an engine speed too high
parents 6a105ba0 fcfbd316
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Radian gradient,
IResponse previousResponse = null)
{
DrivingAction = DrivingAction.Accelerate;
DrivingAction = DrivingAction.Accelerate;
IterationStatistics.Increment(this, "Accelerate");
Log.Debug("DrivingAction Accelerate");
var operatingPoint = ComputeAcceleration(ds, targetVelocity);
......@@ -267,6 +267,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
retVal.Switch().
Case<ResponseSuccess>(() => operatingPoint = nextOperatingPoint).
Case<ResponseGearShift>(() => operatingPoint = nextOperatingPoint).
Case<ResponseOverload>(
r => {
nextOperatingPoint = SearchOperatingPoint(absTime, ds, gradient, operatingPoint.Acceleration,
r);
DriverAcceleration = nextOperatingPoint.Acceleration;
retVal = NextComponent.Request(absTime, nextOperatingPoint.SimulationInterval,
nextOperatingPoint.Acceleration, gradient);
}).
Default(
r => {
throw new UnexpectedResponseException("DrivingAction Accelerate after Overload", r);
......
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