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

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,7 +60,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public DriverData DriverData { get; protected set; }
protected readonly IDriverStrategy DriverStrategy;
protected readonly bool smartBusAux;
public DrivingAction DrivingAction { get; protected internal set; }
public Driver(IVehicleContainer container, DriverData driverData, IDriverStrategy strategy) : base(container)
......@@ -69,6 +70,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
DriverStrategy = strategy;
strategy.Driver = this;
DriverAcceleration = 0.SI<MeterPerSquareSecond>();
var busAux = container.RunData.BusAuxiliaries;
smartBusAux = busAux != null && (busAux.PneumaticUserInputsConfig.SmartAirCompression ||
busAux.ElectricalUserInputsConfig.SmartElectrical);
}
......@@ -509,9 +513,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
operatingPoint;
DriverAcceleration = operatingPoint.Acceleration;
var response = previousResponse ??
NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration,
gradient);
var response = !smartBusAux && previousResponse != null
? previousResponse
: NextComponent.Request(
absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration,
gradient);
var point = operatingPoint;
response.Switch().
......
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