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

Skip to content
Snippets Groups Projects
Commit be6ce764 authored by Harald Martini's avatar Harald Martini
Browse files

ignore fan when ice is off, ignore steering pump when vehicle is stopped

parent fed90818
No related branches found
No related tags found
No related merge requests found
...@@ -79,11 +79,28 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -79,11 +79,28 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{ {
var auxiliarieIgnoredDuringVehicleStop = new[] { var auxiliarieIgnoredDuringVehicleStop = new[] {
Constants.Auxiliaries.IDs.Fan, Constants.Auxiliaries.IDs.SteeringPump,
};
var auxiliariesIgnoredWhenICEIsOff = new[] {
Constants.Auxiliaries.IDs.Fan
}; };
var sum = 0.SI<Watt>(); var sum = 0.SI<Watt>();
foreach (var aux in _auxData) { var consideredAuxiliaries = _auxData.AsEnumerable();
if (DataBus.VehicleInfo.VehicleStopped) {
consideredAuxiliaries = consideredAuxiliaries?.Where(aux => !auxiliarieIgnoredDuringVehicleStop.Contains(aux.Key));
}
if (DataBus.PowertrainInfo.HasCombustionEngine && !DataBus.EngineInfo.EngineOn) {
consideredAuxiliaries = consideredAuxiliaries?.Where(aux => !auxiliarieIgnoredDuringVehicleStop.Contains(aux.Key));
}
if (consideredAuxiliaries == null) {
return sum;
}
foreach (var aux in consideredAuxiliaries) {
var powerDemand = 0.SI<Watt>(); var powerDemand = 0.SI<Watt>();
if (DataBus.VehicleInfo.VehicleStopped) { if (DataBus.VehicleInfo.VehicleStopped) {
......
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