From 5a03b87fbe226f511cd39f323425bd5b94d257dc Mon Sep 17 00:00:00 2001 From: "VKMTHD\\haraldmartini" <harald.martini@student.tugraz.at> Date: Mon, 30 Jan 2023 10:23:42 +0100 Subject: [PATCH] remove MaxNetPower2 --- VECTO/Input Files/Engine.vb | 1 - VECTO/Input Files/Gearbox.vb | 1 - VECTO/Input Files/MockVehicleInputData.vb | 1 - VECTO/Input Files/Vehicle.vb | 8 +----- .../JobEdit/Vehicle/VehicleViewModel.cs | 5 ---- .../InterimStageBusVehicleViewModel_v2_8.cs | 5 +--- .../InputData/DeclarationInputData.cs | 27 ++++++++++++++++--- .../XMLDeclarationVehicleDataProvider.cs | 10 ------- ...LDeclarationExemptedVehicleDataProvider.cs | 2 -- .../XMLDeclarationMultistageInputReader.cs | 1 - .../XMLEngineeringVehicleDataProvider.cs | 2 -- .../VehicleDataAdapter.cs | 2 -- .../Models/Simulation/Impl/ExemptedRun.cs | 2 +- .../SimulationComponent/Data/VehicleData.cs | 1 - .../XMLCustomerReport.cs | 2 +- .../XMLManufacturerReportExemptedTruck.cs | 4 --- .../Utils/MockDeclarationVehicleInputData.cs | 2 -- .../Utils/MockSimulationDataFactory.cs | 1 - .../Utils/MockVehicleInputData.cs | 1 - 19 files changed, 28 insertions(+), 50 deletions(-) diff --git a/VECTO/Input Files/Engine.vb b/VECTO/Input Files/Engine.vb index 91e58c9eaf..b4efb9ba1e 100644 --- a/VECTO/Input Files/Engine.vb +++ b/VECTO/Input Files/Engine.vb @@ -653,7 +653,6 @@ Public Class DummyVehicle Public Property HybridElectricHDV As Boolean Implements IVehicleDeclarationInputData.HybridElectricHDV Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1 - Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2 Public ReadOnly Property ExemptedTechnology As String Implements IVehicleDeclarationInputData.ExemptedTechnology Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass Public ReadOnly Property NumberPassengerSeatsUpperDeck As Integer? Implements IVehicleDeclarationInputData.NumberPassengerSeatsUpperDeck diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 6dad5ee105..213b4ef735 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -865,7 +865,6 @@ Public Class MockEngineeringVehicle Public Property HybridElectricHDV As Boolean Implements IVehicleDeclarationInputData.HybridElectricHDV Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1 - Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2 Public ReadOnly Property ExemptedTechnology As String Implements IVehicleDeclarationInputData.ExemptedTechnology Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass Public ReadOnly Property NumberPassengerSeatsUpperDeck As Integer? Implements IVehicleDeclarationInputData.NumberPassengerSeatsUpperDeck diff --git a/VECTO/Input Files/MockVehicleInputData.vb b/VECTO/Input Files/MockVehicleInputData.vb index cbb94692aa..0a2bcc4f47 100644 --- a/VECTO/Input Files/MockVehicleInputData.vb +++ b/VECTO/Input Files/MockVehicleInputData.vb @@ -39,7 +39,6 @@ Public Class MockVehicleInputData Public Property HybridElectricHDV As Boolean Implements IVehicleDeclarationInputData.HybridElectricHDV Public Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle Public Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1 - Public Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2 Public ReadOnly Property ExemptedTechnology As String Implements IVehicleDeclarationInputData.ExemptedTechnology Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass Public ReadOnly Property NumberPassengerSeatsUpperDeck As Integer? Implements IVehicleDeclarationInputData.NumberPassengerSeatsUpperDeck diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb index b8614bdab2..71a6b8bafe 100644 --- a/VECTO/Input Files/Vehicle.vb +++ b/VECTO/Input Files/Vehicle.vb @@ -895,13 +895,7 @@ end Property End Get End Property - Public ReadOnly Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2 - Get - Return Nothing - End Get - End Property - - Public ReadOnly Property ExemptedTechnology As String Implements IVehicleDeclarationInputData.ExemptedTechnology + Public ReadOnly Property ExemptedTechnology As String Implements IVehicleDeclarationInputData.ExemptedTechnology Public ReadOnly Property RegisteredClass As RegistrationClass? Implements IVehicleDeclarationInputData.RegisteredClass Public ReadOnly Property NumberPassengerSeatsUpperDeck As Integer? Implements IVehicleDeclarationInputData.NumberPassengerSeatsUpperDeck diff --git a/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/VehicleViewModel.cs b/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/VehicleViewModel.cs index 14bf6ca8db..93399103cf 100644 --- a/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/VehicleViewModel.cs +++ b/VECTO3GUI2020/ViewModel/Implementation/JobEdit/Vehicle/VehicleViewModel.cs @@ -274,11 +274,6 @@ namespace VECTO3GUI2020.ViewModel.Implementation.JobEdit.Vehicle set => throw new NotImplementedException(); } - public virtual Watt MaxNetPower2 - { - get => throw new NotImplementedException(); - set => throw new NotImplementedException(); - } public string ExemptedTechnology { get; } diff --git a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs index c1d1e80836..652da7f5a8 100644 --- a/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs +++ b/VECTO3GUI2020/ViewModel/MultiStage/Implementation/InterimStageBusVehicleViewModel_v2_8.cs @@ -1082,10 +1082,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation get { throw new NotImplementedException(); } } - public Watt MaxNetPower2 - { - get { throw new NotImplementedException(); } - } + diff --git a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs index a99e21957a..0616a430fb 100644 --- a/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs +++ b/VectoCommon/VectoCommon/InputData/DeclarationInputData.cs @@ -161,10 +161,11 @@ namespace TUGraz.VectoCommon.InputData bool DualFuelVehicle { get; } + /// <summary> + /// SumNetPower in 2nd amendment + /// </summary> Watt MaxNetPower1 { get; } - Watt MaxNetPower2 { get; } - string ExemptedTechnology { get; } // --- end @@ -804,7 +805,27 @@ namespace TUGraz.VectoCommon.InputData IList<ElectricMachineEntry<IElectricMotorDeclarationInputData>> Entries { get; } } - public class ElectricMachineEntry<T> where T : IElectricMotorDeclarationInputData + //public interface IElectricMachineEntry<T> + //{ + // T ElectricMachine { get; set; } + + // int Count { get; set; } + + // PowertrainPosition Position { get; set; } + + // double RatioADC { get; set; } + + // double[] RatioPerGear { get; set; } + + // double MechanicalTransmissionEfficiency { get; set; } + + // TableData MechanicalTransmissionLossMap { get; set; } + + // IADCDeclarationInputData ADC { get; set; } + //} + + + public class ElectricMachineEntry<T> where T : class, IElectricMotorDeclarationInputData { public T ElectricMachine { get; set; } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs index 7a8250bf57..e8f85d9de3 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationVehicleDataProvider.cs @@ -192,11 +192,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider ? GetDouble(XMLNames.Vehicle_MaxNetPower1).SI<Watt>() : null; - public virtual Watt MaxNetPower2 => - ElementExists(XMLNames.Vehicle_MaxNetPower2) - ? GetDouble(XMLNames.Vehicle_MaxNetPower2).SI<Watt>() - : null; - public virtual string ExemptedTechnology => null; public virtual RegistrationClass? RegisteredClass => RegistrationClass.unknown; @@ -293,8 +288,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public override Watt MaxNetPower1 => null; - public override Watt MaxNetPower2 => null; - public override VectoSimulationJobType VehicleType { get => VectoSimulationJobType.ConventionalVehicle; } public class ADASDefaultValues : IAdvancedDriverAssistantSystemDeclarationInputData { @@ -405,8 +398,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public override Watt MaxNetPower1 => GetDouble(XMLNames.Vehicle_MaxNetPower1).SI<Watt>(); - public override Watt MaxNetPower2 => GetDouble(XMLNames.Vehicle_MaxNetPower2).SI<Watt>(); - public override IVehicleComponentsDeclaration Components => null; #endregion @@ -579,7 +570,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider public bool HybridElectricHDV { get; } public bool DualFuelVehicle { get; } public virtual Watt MaxNetPower1 { get; } - public Watt MaxNetPower2 { get; } public virtual string ExemptedTechnology { get; } public RegistrationClass? RegisteredClass { get; } public VehicleCode? VehicleCode { get; } diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/v24/XMLDeclarationExemptedVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/v24/XMLDeclarationExemptedVehicleDataProvider.cs index c04f4fd92a..10dbe15500 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/v24/XMLDeclarationExemptedVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/v24/XMLDeclarationExemptedVehicleDataProvider.cs @@ -60,8 +60,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider.v24 public override Watt MaxNetPower1 => GetDouble("SumNetPower").SI<Watt>(); - public override Watt MaxNetPower2 => null; - public override string ExemptedTechnology => GetString("Technology"); public override IVehicleComponentsDeclaration Components => null; diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs index d7409a81fd..46ece69d99 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/Reader/Impl/XMLDeclarationMultistageInputReader.cs @@ -624,7 +624,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl public PerSecond EngineIdleSpeed => _primaryVehicle.Vehicle.EngineIdleSpeed; public Watt MaxNetPower1 => _primaryVehicle.Vehicle.MaxNetPower1; - public Watt MaxNetPower2 => _primaryVehicle.Vehicle.MaxNetPower2; public string ExemptedTechnology => _primaryVehicle.Vehicle.ExemptedTechnology; public ArchitectureID ArchitectureID => _primaryVehicle.Vehicle.ArchitectureID; diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs index 671ba8ca9a..d36e2cc30c 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Engineering/DataProvider/XMLEngineeringVehicleDataProvider.cs @@ -128,8 +128,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider public Watt MaxNetPower1 => null; - public Watt MaxNetPower2 => null; - public string ExemptedTechnology { get; } public virtual RegistrationClass? RegisteredClass => RegistrationClass.unknown; diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs index 2431752cf7..a6487417bc 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs @@ -216,7 +216,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen exempted.HybridElectricHDV = data.HybridElectricHDV; exempted.DualFuelVehicle = data.DualFuelVehicle; exempted.MaxNetPower1 = data.MaxNetPower1; - exempted.MaxNetPower2 = data.MaxNetPower2; return exempted; } } @@ -264,7 +263,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen exempted.HybridElectricHDV = data.HybridElectricHDV; exempted.DualFuelVehicle = data.DualFuelVehicle; exempted.MaxNetPower1 = data.MaxNetPower1; - exempted.MaxNetPower2 = data.MaxNetPower2; exempted.AxleConfiguration = data.AxleConfiguration; return exempted; } diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/ExemptedRun.cs b/VectoCore/VectoCore/Models/Simulation/Impl/ExemptedRun.cs index 4d58646be0..29f5cf0807 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/ExemptedRun.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/ExemptedRun.cs @@ -76,7 +76,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl throw new VectoException("Invalid input: at least one option of ZE-HDV, He-HDV, and DualFuelVehicle has to be set for an exempted vehicle!"); } - if (vehicleData.HybridElectricHDV && (vehicleData.MaxNetPower1 == null || vehicleData.MaxNetPower2 == null)) { + if (vehicleData.HybridElectricHDV && vehicleData.MaxNetPower1 == null) { throw new VectoException("For He-HDV both MaxNetPower1 and MaxNetPower2 have to be provided!"); } } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 739517b2cd..cf94949717 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -233,7 +233,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data public bool HybridElectricHDV { get; internal set; } public bool DualFuelVehicle { get; internal set; } public Watt MaxNetPower1 { get; internal set; } - public Watt MaxNetPower2 { get; internal set; } public bool? SleeperCab { get; internal set; } public ADASData ADAS { get; internal set; } public bool VocationalVehicle { get; internal set; } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/XMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/XMLCustomerReport.cs index de2e6cb785..05df4bf158 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/XMLCustomerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/XMLCustomerReport.cs @@ -121,7 +121,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new object[] { modelData.VehicleData.HybridElectricHDV ? new XElement(tns + XMLNames.Vehicle_MaxNetPower1, XMLHelper.ValueAsUnit(modelData.VehicleData.MaxNetPower1, XMLNames.Unit_W)) : null, - modelData.VehicleData.HybridElectricHDV ? new XElement(tns + XMLNames.Vehicle_MaxNetPower2, XMLHelper.ValueAsUnit(modelData.VehicleData.MaxNetPower2, XMLNames.Unit_W)) : null + }; } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/XMLManufacturerReportExemptedTruck.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/XMLManufacturerReportExemptedTruck.cs index 0d4eb6eed2..6d1d0c7998 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/XMLManufacturerReportExemptedTruck.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/XMLManufacturerReportExemptedTruck.cs @@ -55,10 +55,6 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport if (modelData.VehicleData.MaxNetPower1 != null) retVal.Add(new XElement(tns + XMLNames.Vehicle_MaxNetPower1, XMLHelper.ValueAsUnit(modelData.VehicleData.MaxNetPower1, XMLNames.Unit_W))); - if (modelData.VehicleData.MaxNetPower2 != null) { - retVal.Add(new XElement(tns + XMLNames.Vehicle_MaxNetPower2, - XMLHelper.ValueAsUnit(modelData.VehicleData.MaxNetPower2, XMLNames.Unit_W))); - } return retVal.ToArray(); } diff --git a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs index e37abccbfd..3d5bf40087 100644 --- a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs +++ b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs @@ -47,7 +47,6 @@ namespace TUGraz.VectoCore.Tests.Utils public bool HybridElectricHDV { get; } public bool DualFuelVehicle { get; } public Watt MaxNetPower1 { get; } - public Watt MaxNetPower2 { get; } public string ExemptedTechnology { get; } public RegistrationClass? RegisteredClass { get; set; } public int? NumberPassengerSeatsUpperDeck { get; set; } @@ -127,7 +126,6 @@ namespace TUGraz.VectoCore.Tests.Utils public ConsumerTechnology? DoorDriveTechnology { get; } public VehicleDeclarationType VehicleDeclarationType { get; } - public Watt MaxNetPower2 { get; } public string ExemptedTechnology { get; } public RegistrationClass? RegisteredClass { get; set; } public int? NumberPassengerSeatsUpperDeck { get; set; } diff --git a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs index ea65332b74..95879d9814 100644 --- a/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs +++ b/VectoCore/VectoCoreTest/Utils/MockSimulationDataFactory.cs @@ -282,7 +282,6 @@ namespace TUGraz.VectoCore.Tests.Utils public bool HybridElectricHDV { get; } public bool DualFuelVehicle { get; } public Watt MaxNetPower1 { get; } - public Watt MaxNetPower2 { get; } public string ExemptedTechnology { get; } public RegistrationClass? RegisteredClass { get; } public int? NumberPassengerSeatsUpperDeck { get; } diff --git a/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs index d52875e985..c00a314265 100644 --- a/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs +++ b/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs @@ -68,7 +68,6 @@ namespace TUGraz.VectoCore.Tests.Utils public Watt MaxNetPower1 { get; set; } - public Watt MaxNetPower2 { get; set; } public string ExemptedTechnology { get; } -- GitLab