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

Skip to content
Snippets Groups Projects
Commit b24e8fef authored by Michael KRISPER's avatar Michael KRISPER
Browse files

fuel consumption extrapolation not allowed

parent 22fce00b
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,6 @@ using TUGraz.VectoCore.Models.Connector.Ports;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
......@@ -339,8 +338,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
container[ModalResultField.Tq_drag] = CurrentState.FullDragTorque;
try {
var fc = ModelData.ConsumptionMap.GetFuelConsumption(CurrentState.EngineTorque, avgEngineSpeed,
allowExtrapolation: (DataBus.ExecutionMode != ExecutionMode.Declaration));
var fc = ModelData.ConsumptionMap.GetFuelConsumption(CurrentState.EngineTorque, avgEngineSpeed);
//TODO mk-2015-11-11: calculate aux start stop correction
var fcAux = fc;
......@@ -354,19 +352,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
container[ModalResultField.FCWHTCc] = fcWHTC;
container[ModalResultField.FCAAUX] = fcAAUX;
container[ModalResultField.FCFinal] = fcFinal;
if (ModelData.ConsumptionMap.Extrapolated) {
Log.Warn("FuelMap Extrapolated: n_eng_avg: {0} Tq: {1}, FC: {2}", avgEngineSpeed.ConvertTo().Rounds.Per.Minute,
CurrentState.EngineTorque, fc);
}
} catch (VectoException ex) {
Log.Warn("FuelMap: {0} n_eng_avg: {1} Tq: {2}", ex.Message, avgEngineSpeed.ConvertTo().Rounds.Per.Minute,
} catch (Exception) {
Log.Error("FuelMap Extrapolated: n_eng_avg: {0} Tq: {1}", avgEngineSpeed.ConvertTo().Rounds.Per.Minute,
CurrentState.EngineTorque);
container[ModalResultField.FCMap] = null;
container[ModalResultField.FCAUXc] = null;
container[ModalResultField.FCWHTCc] = null;
container[ModalResultField.FCAAUX] = null;
container[ModalResultField.FCFinal] = null;
throw;
}
}
......
......@@ -36,7 +36,6 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms.DataVisualization.Charting;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
......
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