diff --git a/VectoCommon/VectoCommon/Models/GearboxType.cs b/VectoCommon/VectoCommon/Models/GearboxType.cs index 8848ca9d2445f39af630008aef7b4a44391352c4..3a167b78b45085fe023c4209ebad49826fb8efe4 100644 --- a/VectoCommon/VectoCommon/Models/GearboxType.cs +++ b/VectoCommon/VectoCommon/Models/GearboxType.cs @@ -29,92 +29,92 @@ * Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology */ -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using TUGraz.VectoCommon.Utils; - -namespace TUGraz.VectoCommon.Models -{ - [SuppressMessage("ReSharper", "InconsistentNaming")] - public enum GearboxType - { - MT, // Manual Transmission - AMT, // Automated Manual Transmission - ATSerial, // Automatic Transmission - ATPowerSplit, - //Custom, - DrivingCycle - } - - public static class GearBoxTypeHelper - { - public static string GetLabel(this GearboxType type) - { - switch (type) { - case GearboxType.MT: - return "Manual Transmission (MT)"; - case GearboxType.AMT: - return "Automated Transmission (AMT)"; - case GearboxType.ATSerial: - return "Automatic Transmission - Serial (AT-S)"; - case GearboxType.ATPowerSplit: - return "Automatic Transmission - PowerSplit (AT-P)"; - case GearboxType.DrivingCycle: - return "Gear from Driving Cycle"; - default: - throw new ArgumentOutOfRangeException("GearboxType", type, null); - } - } - - [DebuggerStepThrough] - public static string ShortName(this GearboxType type) - { - return type.ToString(); - } - - [DebuggerStepThrough] - public static bool AutomaticTransmission(this GearboxType type) - { - return type == GearboxType.ATPowerSplit || type == GearboxType.ATSerial; - } - - [DebuggerStepThrough] - public static bool ManualTransmission(this GearboxType type) - { - return type == GearboxType.MT || type == GearboxType.AMT; - } - - public static Second TractionInterruption(this GearboxType type) - { - switch (type) { - case GearboxType.MT: - return 2.SI<Second>(); - case GearboxType.AMT: - return 1.SI<Second>(); - case GearboxType.ATSerial: - case GearboxType.ATPowerSplit: - return 0.0.SI<Second>(); - } - return 0.SI<Second>(); - } - - public static string ToXMLFormat(this GearboxType type) - { - switch (type) { - case GearboxType.MT: - return "SMT"; - case GearboxType.AMT: - return "AMT"; - case GearboxType.DrivingCycle: - return type.ToString(); - case GearboxType.ATSerial: - return "APT-S"; - case GearboxType.ATPowerSplit: - return "APT-P"; - default: - throw new ArgumentOutOfRangeException("GearboxType", type, null); - } - } - } +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using TUGraz.VectoCommon.Utils; + +namespace TUGraz.VectoCommon.Models +{ + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum GearboxType + { + MT, // Manual Transmission + AMT, // Automated Manual Transmission + ATSerial, // Automatic Transmission + ATPowerSplit, + //Custom, + DrivingCycle + } + + public static class GearBoxTypeHelper + { + public static string GetLabel(this GearboxType type) + { + switch (type) { + case GearboxType.MT: + return "Manual Transmission (MT)"; + case GearboxType.AMT: + return "Automated Transmission (AMT)"; + case GearboxType.ATSerial: + return "Automatic Transmission - Serial (AT-S)"; + case GearboxType.ATPowerSplit: + return "Automatic Transmission - PowerSplit (AT-P)"; + case GearboxType.DrivingCycle: + return "Gear from Driving Cycle"; + default: + throw new ArgumentOutOfRangeException("GearboxType", type, null); + } + } + + [DebuggerStepThrough] + public static string ShortName(this GearboxType type) + { + return type.ToString(); + } + + [DebuggerStepThrough] + public static bool AutomaticTransmission(this GearboxType type) + { + return type == GearboxType.ATPowerSplit || type == GearboxType.ATSerial; + } + + [DebuggerStepThrough] + public static bool ManualTransmission(this GearboxType type) + { + return type == GearboxType.MT || type == GearboxType.AMT; + } + + public static Second TractionInterruption(this GearboxType type) + { + switch (type) { + case GearboxType.MT: + return 2.SI<Second>(); + case GearboxType.AMT: + return 1.SI<Second>(); + case GearboxType.ATSerial: + case GearboxType.ATPowerSplit: + return 0.0.SI<Second>(); + } + return 0.SI<Second>(); + } + + public static string ToXMLFormat(this GearboxType type) + { + switch (type) { + case GearboxType.MT: + return "SMT"; + case GearboxType.AMT: + return "AMT"; + case GearboxType.DrivingCycle: + return type.ToString(); + case GearboxType.ATSerial: + return "APT-S"; + case GearboxType.ATPowerSplit: + return "APT-P"; + default: + throw new ArgumentOutOfRangeException("GearboxType", type, null); + } + } + } } \ No newline at end of file diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs index 6c0d51685511463e17ea510276844695c605f2d3..528d8cec22999c7814ec3df3ee1fcf54492d7cac 100644 --- a/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs +++ b/VectoCommon/VectoCommon/Resources/XMLNames.Designer.cs @@ -1735,7 +1735,7 @@ namespace TUGraz.VectoCommon.Resources { } /// <summary> - /// Looks up a localized string similar to AverageRRC. + /// Looks up a localized string similar to AverageRRCMotorVehicleTyres. /// </summary> public static string Report_Vehicle_AverageRRC { get { @@ -1743,6 +1743,15 @@ namespace TUGraz.VectoCommon.Resources { } } + /// <summary> + /// Looks up a localized string similar to AverageFuelEfficiencyLabelMotorVehicleTyres. + /// </summary> + public static string Report_Vehicle_AverageRRCLabel { + get { + return ResourceManager.GetString("Report_Vehicle_AverageRRCLabel", resourceCulture); + } + } + /// <summary> /// Looks up a localized string similar to AxleRatio. /// </summary> diff --git a/VectoCommon/VectoCommon/Resources/XMLNames.resx b/VectoCommon/VectoCommon/Resources/XMLNames.resx index dc624eead06586a9e5298b6f2a7fd3b187f0a362..e3fb4cdb4bab497c44a422a489b108114191722c 100644 --- a/VectoCommon/VectoCommon/Resources/XMLNames.resx +++ b/VectoCommon/VectoCommon/Resources/XMLNames.resx @@ -768,136 +768,136 @@ <data name="Axlegear_LineType" xml:space="preserve"> <value>LineType</value> </data> - <data name="Component_CertificationNumber" xml:space="preserve"> + <data name="Component_CertificationNumber" xml:space="preserve"> <value>CertificationNumber</value> </data> - <data name="Report_Results_FuelConsumption" xml:space="preserve"> + <data name="Report_Results_FuelConsumption" xml:space="preserve"> <value>FuelConsumption</value> </data> - <data name="Report_Results_CO2" xml:space="preserve"> + <data name="Report_Results_CO2" xml:space="preserve"> <value>CO2</value> </data> - <data name="Report_Results_Unit_Attr" xml:space="preserve"> + <data name="Report_Results_Unit_Attr" xml:space="preserve"> <value>unit</value> </data> - <data name="Report_Vehicle_VehicleGroup" xml:space="preserve"> + <data name="Report_Vehicle_VehicleGroup" xml:space="preserve"> <value>VehicleGroup</value> </data> - <data name="Report_Input_Signature" xml:space="preserve"> + <data name="Report_Input_Signature" xml:space="preserve"> <value>InputDataSignature</value> </data> - <data name="Report_GetGearbox_GearsCount" xml:space="preserve"> + <data name="Report_GetGearbox_GearsCount" xml:space="preserve"> <value>GearsCount</value> </data> - <data name="Report_Gearbox_TransmissionRatioFinalGear" xml:space="preserve"> + <data name="Report_Gearbox_TransmissionRatioFinalGear" xml:space="preserve"> <value>TransmissionRatioFinalGear</value> </data> - <data name="Report_Component_CertificationMethod" xml:space="preserve"> + <data name="Report_Component_CertificationMethod" xml:space="preserve"> <value>CertificationMethod</value> </data> - <data name="Report_Component_CertificationNumber" xml:space="preserve"> + <data name="Report_Component_CertificationNumber" xml:space="preserve"> <value>CertificationNumber</value> </data> - <data name="Report_AirDrag_CdxA" xml:space="preserve"> + <data name="Report_AirDrag_CdxA" xml:space="preserve"> <value>CdxA</value> </data> - <data name="Report_Tyre_TyreDimension" xml:space="preserve"> + <data name="Report_Tyre_TyreDimension" xml:space="preserve"> <value>TyreDimension</value> </data> - <data name="Report_Tyre_TyreCertificationNumber" xml:space="preserve"> + <data name="Report_Tyre_TyreCertificationNumber" xml:space="preserve"> <value>TyreCertificationNumber</value> </data> - <data name="Report_Tyre_TyreRRCDeclared" xml:space="preserve"> + <data name="Report_Tyre_TyreRRCDeclared" xml:space="preserve"> <value>TyreRRCDeclared</value> </data> - <data name="Report_Result_Mission" xml:space="preserve"> + <data name="Report_Result_Mission" xml:space="preserve"> <value>Mission</value> </data> - <data name="Report_Result_Result" xml:space="preserve"> + <data name="Report_Result_Result" xml:space="preserve"> <value>Result</value> </data> - <data name="Report_Result_Status_Attr" xml:space="preserve"> + <data name="Report_Result_Status_Attr" xml:space="preserve"> <value>status</value> </data> - <data name="Report_ApplicationInfo_ApplicationInformation" xml:space="preserve"> + <data name="Report_ApplicationInfo_ApplicationInformation" xml:space="preserve"> <value>ApplicationInformation</value> </data> - <data name="Report_ApplicationInfo_SimulationToolVersion" xml:space="preserve"> + <data name="Report_ApplicationInfo_SimulationToolVersion" xml:space="preserve"> <value>SimulationToolVersion</value> </data> - <data name="Report_ApplicationInfo_Date" xml:space="preserve"> + <data name="Report_ApplicationInfo_Date" xml:space="preserve"> <value>Date</value> </data> - <data name="Report_ResultEntry_Distance" xml:space="preserve"> + <data name="Report_ResultEntry_Distance" xml:space="preserve"> <value>Distance</value> </data> - <data name="Report_ResultEntry_SimulationParameters" xml:space="preserve"> + <data name="Report_ResultEntry_SimulationParameters" xml:space="preserve"> <value>SimulationParameters</value> </data> - <data name="Report_ResultEntry_TotalVehicleMass" xml:space="preserve"> + <data name="Report_ResultEntry_TotalVehicleMass" xml:space="preserve"> <value>TotalVehicleMass</value> </data> - <data name="Report_ResultEntry_Payload" xml:space="preserve"> + <data name="Report_ResultEntry_Payload" xml:space="preserve"> <value>Payload</value> </data> - <data name="Report_ResultEntry_FuelType" xml:space="preserve"> + <data name="Report_ResultEntry_FuelType" xml:space="preserve"> <value>FuelType</value> </data> - <data name="Report_ResultEntry_VehiclePerformance" xml:space="preserve"> + <data name="Report_ResultEntry_VehiclePerformance" xml:space="preserve"> <value>VehiclePerformance</value> </data> - <data name="Report_ResultEntry_AverageSpeed" xml:space="preserve"> + <data name="Report_ResultEntry_AverageSpeed" xml:space="preserve"> <value>AverageSpeed</value> </data> - <data name="Report_ResultEntry_MinSpeed" xml:space="preserve"> + <data name="Report_ResultEntry_MinSpeed" xml:space="preserve"> <value>MinSpeed</value> </data> - <data name="Report_ResultEntry_MaxSpeed" xml:space="preserve"> + <data name="Report_ResultEntry_MaxSpeed" xml:space="preserve"> <value>MaxSpeed</value> </data> - <data name="Report_ResultEntry_MaxDeceleration" xml:space="preserve"> + <data name="Report_ResultEntry_MaxDeceleration" xml:space="preserve"> <value>MaxDeceleration</value> </data> - <data name="Report_ResultEntry_MaxAcceleration" xml:space="preserve"> + <data name="Report_ResultEntry_MaxAcceleration" xml:space="preserve"> <value>MaxAcceleration</value> </data> - <data name="Report_ResultEntry_FullLoadDrivingtimePercentage" xml:space="preserve"> + <data name="Report_ResultEntry_FullLoadDrivingtimePercentage" xml:space="preserve"> <value>FullLoadDrivingtimePercentage</value> </data> - <data name="Report_ResultEntry_GearshiftCount" xml:space="preserve"> + <data name="Report_ResultEntry_GearshiftCount" xml:space="preserve"> <value>GearshiftCount</value> </data> - <data name="Report_Results_Error" xml:space="preserve"> + <data name="Report_Results_Error" xml:space="preserve"> <value>Error</value> </data> - <data name="Report_Results_ErrorDetails" xml:space="preserve"> + <data name="Report_Results_ErrorDetails" xml:space="preserve"> <value>ErrorDetails</value> </data> - <data name="Report_Vehicle_EngineRatedPower" xml:space="preserve"> + <data name="Report_Vehicle_EngineRatedPower" xml:space="preserve"> <value>EngineRatedPower</value> </data> - <data name="Report_Vehicle_EngineDisplacement" xml:space="preserve"> + <data name="Report_Vehicle_EngineDisplacement" xml:space="preserve"> <value>EngineDisplacement</value> </data> - <data name="Report_Vehicle_Retarder" xml:space="preserve"> + <data name="Report_Vehicle_Retarder" xml:space="preserve"> <value>Retarder</value> </data> - <data name="Report_Vehicle_AxleRatio" xml:space="preserve"> + <data name="Report_Vehicle_AxleRatio" xml:space="preserve"> <value>AxleRatio</value> </data> - <data name="Report_Vehicle_AverageRRC" xml:space="preserve"> - <value>AverageRRC</value> + <data name="Report_Vehicle_AverageRRC" xml:space="preserve"> + <value>AverageRRCMotorVehicleTyres</value> </data> - <data name="Report_Vehicle_TransmissionCertificationMethod" xml:space="preserve"> + <data name="Report_Vehicle_TransmissionCertificationMethod" xml:space="preserve"> <value>TransmissionMainCertificationMethod</value> </data> - <data name="Report_Result_Status" xml:space="preserve"> + <data name="Report_Result_Status" xml:space="preserve"> <value>Status</value> </data> - <data name="VectoManufacturerReport" xml:space="preserve"> + <data name="VectoManufacturerReport" xml:space="preserve"> <value>VectoOutput</value> </data> - <data name="VectoCustomerReport" xml:space="preserve"> + <data name="VectoCustomerReport" xml:space="preserve"> <value>VectoCustomerInformation</value> </data> <data name="Report_ResultEntry_AvgDrivingSpeed" xml:space="preserve"> @@ -993,4 +993,7 @@ <data name="Unit_W" xml:space="preserve"> <value>W</value> </data> + <data name="Report_Vehicle_AverageRRCLabel" xml:space="preserve"> + <value>AverageFuelEfficiencyLabelMotorVehicleTyres</value> + </data> </root> \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs index 29b2a1683d1e8ee4d5928c13cedb4dec5fafba0b..bfb163ad8bd48b068244d994d154dbd8ec326f28 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs @@ -114,6 +114,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter .Average(); retVal.CargoVolume = mission.MissionType != MissionType.Construction ? mission.TotalCargoVolume : 0.SI<CubicMeter>(); + retVal.VocationalVehicle = data.VocationalVehicle; + retVal.ADAS = CreateADAS(data.ADAS); + var axles = data.Axles; if (axles.Count < mission.AxleWeightDistribution.Length) { throw new VectoException( @@ -156,6 +159,16 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter return retVal; } + private VehicleData.ADASData CreateADAS(IAdvancedDriverAssistantSystemDeclarationInputData adas) + { + return new VehicleData.ADASData { + EngineStopStart = adas.EngineStopStart, + EcoRollWithoutengineStop = adas.EcoRollWitoutEngineStop, + EcoRollWithEngineStop = adas.EcoRollWithEngineStop, + PredictiveCruiseControl = adas.PredictiveCruiseControl + }; + } + private VehicleData CreateExemptedVehicleData(IVehicleDeclarationInputData data) { var exempted = SetCommonVehicleData(data); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 21a24b0fcd54c12f55003ceea4f4cfd38fab14d3..a5fcd6e7a2bc926365b371c67be1b327409ef525 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -34,6 +34,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using TUGraz.VectoCommon.Exceptions; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; @@ -203,6 +204,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data } return _averageRollingResistanceTruck.GetValueOrDefault(); } + protected internal set { _averageRollingResistanceTruck = value; } } public bool ZeroEmissionVehicle { get; internal set; } @@ -211,6 +213,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data 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; } + + public class ADASData + { + public bool EngineStopStart { get; internal set; } + public bool EcoRollWithoutengineStop { get; internal set; } + public bool EcoRollWithEngineStop { get; internal set; } + public PredictiveCruiseControlType PredictiveCruiseControl { get; internal set; } + } protected void ComputeRollResistanceAndReducedMassWheels() { @@ -249,7 +261,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data } RollResistanceCoefficientWithoutTrailer = rrcVehicle / vehicleWeightShare; TotalRollResistanceCoefficient = rrc; - _averageRollingResistanceTruck = averageRRC / vehicleWheels; + AverageRollingResistanceTruck = averageRRC / vehicleWheels; WheelsInertia = wheelsInertia; }