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

simulate ems cycles only if sufficient engine power is available

parent 3544e8d7
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ using System.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
......@@ -91,8 +92,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
};
Report.InitializeReport(powertrainConfig, segment);
}
var maxEnginePower = engineData.FullLoadCurve.FullLoadStationaryPower(engineData.FullLoadCurve.PreferredSpeed);
foreach (var mission in segment.Missions) {
if (mission.MissionType.IsEMS() && maxEnginePower.IsSmaller(DeclarationData.MinEnginePowerForEMS)) {
continue;
}
DrivingCycleData cycle;
lock (CyclesCacheLock) {
if (CyclesCache.ContainsKey(mission.MissionType)) {
......
......@@ -48,6 +48,8 @@ namespace TUGraz.VectoCore.Models.Declaration
{
public const string DeclarationDataResourcePrefix = "TUGraz.VectoCore.Resources.Declaration";
public static readonly Watt MinEnginePowerForEMS = 300e3.SI<Watt>();
private static DeclarationData _instance;
private Segments _segments;
private Wheels _wheels;
......@@ -63,6 +65,7 @@ namespace TUGraz.VectoCore.Models.Declaration
private Payloads _payloads;
private PTOTransmission _pto;
public static PTOTransmission PTOTransmission
{
get { return Instance()._pto ?? (Instance()._pto = new PTOTransmission()); }
......
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