Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 7fb95b95 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

move creation of mod-data postprocessing to separate method

parent 1c124b6e
No related branches found
No related tags found
No related merge requests found
......@@ -159,19 +159,14 @@ namespace TUGraz.VectoCore.OutputData
Data = new ModalResults(false);
CurrentRow = Data.NewRow();
PostProcessingCorrection = GetModDataPostprocessor(runData);
if (runData.JobType == VectoSimulationJobType.BatteryElectricVehicle ||
runData.JobType == VectoSimulationJobType.IEPC_E) {
PostProcessingCorrection = new BatteryElectricPostprocessingCorrection();
return;
}
var isSerialHybrid = runData.JobType == VectoSimulationJobType.IEPC_S ||
runData.JobType == VectoSimulationJobType.SerialHybridVehicle;
PostProcessingCorrection = isSerialHybrid
? new SerialHybridModalDataPostprocessingCorrection()
: new ModalDataPostprocessingCorrection();
var multipleEngineModes = runData.EngineData?.MultipleEngineFuelModes ?? false;
var multipleEngineModes = runData.EngineData?.MultipleEngineFuelModes ?? false;
var fuels = runData.EngineData?.Fuels ?? new List<CombustionEngineFuelData>();
foreach (var fuel in fuels) {
var entry = fuel.FuelData;
......@@ -203,6 +198,20 @@ namespace TUGraz.VectoCore.OutputData
}
protected IModalDataPostProcessor GetModDataPostprocessor(VectoRunData runData)
{
switch (runData.JobType) {
case VectoSimulationJobType.BatteryElectricVehicle:
case VectoSimulationJobType.IEPC_E:
return new BatteryElectricPostprocessingCorrection();
case VectoSimulationJobType.IEPC_S:
case VectoSimulationJobType.SerialHybridVehicle:
return new SerialHybridModalDataPostprocessingCorrection();
default:
return new ModalDataPostprocessingCorrection();
}
}
public int JobRunId => _runData.JobRunId;
public string RunName => _runData.JobName;
......
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