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

adapt driver model: in case of smart bus aux, issue non-dry run request in...

adapt driver model: in case of smart bus aux, issue non-dry run request in brake action to set excessive power
parent eb4e034b
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -60,6 +60,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public DriverData DriverData { get; protected set; } public DriverData DriverData { get; protected set; }
protected readonly IDriverStrategy DriverStrategy; protected readonly IDriverStrategy DriverStrategy;
protected readonly bool smartBusAux;
public DrivingAction DrivingAction { get; protected internal set; } public DrivingAction DrivingAction { get; protected internal set; }
...@@ -69,6 +70,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -69,6 +70,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
DriverStrategy = strategy; DriverStrategy = strategy;
strategy.Driver = this; strategy.Driver = this;
DriverAcceleration = 0.SI<MeterPerSquareSecond>(); DriverAcceleration = 0.SI<MeterPerSquareSecond>();
var busAux = container.RunData.BusAuxiliaries;
smartBusAux = busAux != null && (busAux.PneumaticUserInputsConfig.SmartAirCompression ||
busAux.ElectricalUserInputsConfig.SmartElectrical);
} }
...@@ -509,8 +513,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -509,8 +513,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
operatingPoint; operatingPoint;
DriverAcceleration = operatingPoint.Acceleration; DriverAcceleration = operatingPoint.Acceleration;
var response = previousResponse ?? var response = !smartBusAux && previousResponse != null
NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration, ? previousResponse
: NextComponent.Request(
absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration,
gradient); gradient);
var point = operatingPoint; var point = operatingPoint;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment