diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs index 9f8e5543cfe13ecba693a91be2215b57d5d015cd..f29644d0fd6043e890607faf395034e1acf6f557 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -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().