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

adapt cost function: if gearbox is disengaged (e.g. for P3 or P4), set the...

adapt cost function: if gearbox is disengaged (e.g. for P3 or P4), set the fuel cost to NaN if T_ice,out != 0, otherwise calculate fuel costs with idling point
parent 41b2f5fd
Branches
Tags
No related merge requests found
......@@ -916,6 +916,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
SetBatteryCosts(resp, dt, tmp);
var absTime = DataBus.AbsTime; // todo!
if (DataBus.GearboxInfo.GearEngaged(absTime)) {
if (allowIceOff && resp.Engine.TorqueOutDemand.IsEqual(0)) {
// no torque from ICE requested, ICE could be turned off
......@@ -927,9 +929,29 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
tmp.FuelCosts = ModelData.EngineData.Fuels.Sum(
x => (x.ConsumptionMap.GetFuelConsumptionValue(resp.Engine.TotalTorqueDemand, resp.Engine.EngineSpeed)
* x.FuelData.LowerHeatingValueVecto * dt).Value());
//}
}
}
} else {
if (!resp.Engine.TorqueOutDemand.IsEqual(0, 1e-3)) {
tmp.FuelCosts = double.NaN;
tmp.IgnoreReason |= resp.Engine.TorqueOutDemand.IsGreater(0)
? HybridConfigurationIgnoreReason.EngineTorqueDemandTooHigh
: HybridConfigurationIgnoreReason.EngineTorqueDemandTooLow;
}
if (allowIceOff && resp.Engine.TorqueOutDemand.IsEqual(0, 1e-3)) {
// no torque from ICE requested, ICE could be turned off
tmp.FuelCosts = 0;
tmp.ICEOff = true;
} else {
if (!double.IsNaN(tmp.FuelCosts)) {
tmp.FuelCosts = ModelData.EngineData.Fuels.Sum(
x => (x.ConsumptionMap.GetFuelConsumptionValue(0.SI<NewtonMeter>(), resp.Engine.EngineSpeed)
* x.FuelData.LowerHeatingValueVecto * dt).Value());
}
}
}
var maxSoC = Math.Min(ModelData.BatteryData.MaxSOC, StrategyParameters.MaxSoC);
var minSoC = Math.Max(ModelData.BatteryData.MinSOC, StrategyParameters.MinSoC);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment