diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index 709e8e69f07a6b58b43b6202e06fb63762c4e4fb..9e02762146cec9192fccc94c6985c6f6ba276f6e 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -346,25 +346,6 @@ namespace TUGraz.VectoCore.Models.Declaration public static class Driver { - internal static JObject adasParams; - - static Driver() - { - ReadAdasConfig(); - } - - // TODO: MQ 2019-11-26 remove, once the parameters are fixed! make fields above read-only or const - internal static void ReadAdasConfig() - { - var expectedFile = @"Declaration\ADASParameters.json"; - if (!File.Exists(expectedFile)) { - return; - } - using (var reader = File.OpenText(expectedFile)) { - adasParams = (JObject)(JToken.ReadFrom(new JsonTextReader(reader)).GetEx(JsonKeys.JsonBody)); - } - } - public static class LookAhead { public const bool Enabled = true; @@ -400,34 +381,6 @@ namespace TUGraz.VectoCore.Models.Declaration public static class PCC { - // TODO: MQ 2019-11-26 remove, once the parameters are fixed! make fields above read-only or const - static PCC() - { - ReadAdasConfig(); - if (adasParams == null) { - return; - } - - if (adasParams["PCCEnableSpeed"] != null) { - PCCEnableSpeed = adasParams.GetEx<double>("PCCEnableSpeed").KMPHtoMeterPerSecond(); - } - if (adasParams["MinSpeed"] != null) { - MinSpeed = adasParams.GetEx<double>("MinSpeed").KMPHtoMeterPerSecond(); - } - if (adasParams["PreviewDistanceUseCase1"] != null) { - PreviewDistanceUseCase1 = adasParams.GetEx<double>("PreviewDistanceUseCase1").SI<Meter>(); - } - if (adasParams["PreviewDistanceUseCase2"] != null) { - PreviewDistanceUseCase2 = adasParams.GetEx<double>("PreviewDistanceUseCase2").SI<Meter>(); - } - if (adasParams["Underspeed"] != null) { - Underspeed = adasParams.GetEx<double>("Underspeed").KMPHtoMeterPerSecond(); - } - if (adasParams["OverspeedUseCase3"] != null) { - OverspeedUseCase3 = adasParams.GetEx<double>("OverspeedUseCase3").KMPHtoMeterPerSecond(); - } - } - public static readonly MeterPerSecond PCCEnableSpeed = 80.KMPHtoMeterPerSecond(); public static readonly MeterPerSecond MinSpeed = 50.KMPHtoMeterPerSecond(); public static readonly Meter PreviewDistanceUseCase1 = 1500.SI<Meter>(); diff --git a/VectoCore/VectoCore/Models/Declaration/Segments.cs b/VectoCore/VectoCore/Models/Declaration/Segments.cs index 421c9420998d18831ed7cb00a44bfc1e8b2c4c90..b56b4f59924d8c78ecadd61ecf27e3f59e6a53b8 100644 --- a/VectoCore/VectoCore/Models/Declaration/Segments.cs +++ b/VectoCore/VectoCore/Models/Declaration/Segments.cs @@ -198,18 +198,10 @@ namespace TUGraz.VectoCore.Models.Declaration var weight = grossVehicleWeight; GetLoadings(out lowLoad, out refLoad, payloads, (p, l) => GetLoading(p, weight, vehicleWeight, trailers, l), maxLoad); - // TODO: MQ 2021-11-15 REMOVE IN OFFICIAL VERSION! - Stream cycleFile; - var cycleFileName = Path.Combine("DeclarationMissions", - missionType.ToString().Replace("EMS", "") + ".vdri"); - if (File.Exists(cycleFileName)) { - cycleFile = File.OpenRead(cycleFileName); - } else { - cycleFile = RessourceHelper.ReadStream(DeclarationData.DeclarationDataResourcePrefix + + var cycleFile = RessourceHelper.ReadStream(DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + missionType.ToString().Replace("EMS", "") + Constants.FileExtensions.CycleFile); - } var mission = new Mission { MissionType = missionType, diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs index 2370cb81ef57516fdadf53aece984ee33aa4ddfe..d882a0866fd895751a1b3cf191358e77a6895370 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/SimulatorFactory.cs @@ -137,8 +137,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl public bool ModalResults1Hz { get; set; } public bool ActualModalData { get; set; } - public bool SerializeVectoRunData { get; set; } - /// <summary> /// Creates powertrain and initializes it with the component's data. /// </summary> @@ -184,14 +182,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl WriteModalResults = _mode != ExecutionMode.Declaration || WriteModalResults }; - // TODO: MQ 20200410 - Remove for official release! - if (SerializeVectoRunData) { - File.WriteAllText( - Path.Combine( - (ModWriter as FileOutputWriter)?.BasePath ?? "", $"{data.JobName}_{data.Cycle.Name}{data.ModFileSuffix}.json"), - JsonConvert.SerializeObject(data, Formatting.Indented)); - } - var builder = new PowertrainBuilder( modContainer, modData => { if (SumData != null) {