diff --git a/VectoCommon/VectoCommon/BusAuxiliaries/ISSMDeclarationInputs.cs b/VectoCommon/VectoCommon/BusAuxiliaries/ISSMDeclarationInputs.cs index f51463013d440f3b3c78a1a90c093846a67dc641..c0642f776681f84f6c7ed7644f921e1f5e363f74 100644 --- a/VectoCommon/VectoCommon/BusAuxiliaries/ISSMDeclarationInputs.cs +++ b/VectoCommon/VectoCommon/BusAuxiliaries/ISSMDeclarationInputs.cs @@ -287,6 +287,11 @@ namespace TUGraz.VectoCommon.BusAuxiliaries return retVal.Value; } + public static string ToXML(this HeatPumpType type) + { + return type.GetLabel(); + } + public static string GetLabel(this HeatPumpType? type) { diff --git a/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs b/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs index e96fb5094ab019dba56d89aee0c4fff71b6cbbd0..b9d35194a160ac091e34b350387b64913dd653c4 100644 --- a/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs @@ -70,7 +70,7 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData if (data.Rows.Count < 4) { throw new VectoException( - "TransmissionLossMap for {0} must consist of at least four lines with numeric values (below file header", gearName); + "TransmissionLossMap for {0} must consist of at least four lines with numeric values (below file header)", gearName); } List<TransmissionLossMap.GearLossMapEntry> entries; diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs index a858f92554d07e752c9437ba0c0e3ebb7c1c9106..c295e8304b2339bc7a132dffaf7cbc26205b4641 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Generic/DeclarationDataAdapterGenericCompletedBus.cs @@ -27,7 +27,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener private readonly IDriverDataAdapter _driverDataAdapter = new CompletedBusGenericDriverDataAdapter(); private readonly IAxleGearDataAdapter _axleGearDataAdapter = new GenericCompletedBusAxleGearDataAdapter(); private readonly IAngledriveDataAdapter _angledriveDataAdapter = new GenericAngledriveDataAdapter(); - private readonly IGearboxDataAdapter _gearboxDataAdapter = new GearboxDataAdapter(new GenericCompletedBusTorqueConverterDataAdapter()); + private readonly IGearboxDataAdapter _gearboxDataAdapter = new GenericCompletedBusGearboxDataAdapter(new GenericCompletedBusTorqueConverterDataAdapter()); private readonly IPrimaryBusAuxiliaryDataAdapter _auxDataAdapter = new PrimaryBusAuxiliaryDataAdapter(); #endregion @@ -76,8 +76,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener public ShiftStrategyParameters CreateGearshiftData(GearboxData gbx, double axleRatio, PerSecond engineIdlingSpeed) { - throw new NotFiniteNumberException(); - //return _gearboxDataAdapter.CreateGearshiftData(gbx, axleRatio, engineIdlingSpeed, gbx.Type, gbx.Gears.Count); + //throw new NotImplementedException(); + return _gearboxDataAdapter.CreateGearshiftData(axleRatio, engineIdlingSpeed, gbx.Type, gbx.Gears.Count); + //gbx, axleRatio, engineIdlingSpeed, gbx.Type, gbx.Gears.Count); } public RetarderData CreateRetarderData(IRetarderInputData retarderData, PowertrainPosition position = PowertrainPosition.HybridPositionNotSet) diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Specific/DeclarationDataAdapterSpecificCompletedBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Specific/DeclarationDataAdapterSpecificCompletedBus.cs index 92680d2c5bf0341ed75831df445d2f2f14b445bf..366a5bf2e400cc94386986e73c687910953c109c 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Specific/DeclarationDataAdapterSpecificCompletedBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/CompletedBus/Specific/DeclarationDataAdapterSpecificCompletedBus.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices; using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; @@ -23,7 +24,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Speci public abstract class CompletedBusDeclarationBase : AbstractSimulationDataAdapter, ISpecificCompletedBusDeclarationDataAdapter { private readonly IDriverDataAdapter _driverDataAdapter = new CompletedBusSpecificDriverDataAdapter(); - + protected readonly IVehicleDataAdapter _vehicleDataAdapter = new CompletedBusSpecificVehicleDataAdapter(); + protected readonly IAirdragDataAdapter _airdragDataAdapter = new CompletedBusSpecificAirdragDataAdapter(); + private readonly IEngineDataAdapter _engineDataAdapter = new GenericCombustionEngineComponentDataAdapter(); + private readonly ICompletedBusAuxiliaryDataAdapter _auxDataAdapter = new SpecificCompletedBusAuxiliaryDataAdapter(new PrimaryBusAuxiliaryDataAdapter()); @@ -32,32 +36,33 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Speci public IAuxiliaryConfig CreateBusAuxiliariesData(Mission mission, IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, VectoRunData runData) { - throw new NotImplementedException(); - - } - - + //throw new NotImplementedException(); + return _auxDataAdapter.CreateBusAuxiliariesData(mission, primaryVehicle, completedVehicle, runData); + } public VehicleData CreateVehicleData(IVehicleDeclarationInputData primaryVehicle, IVehicleDeclarationInputData completedVehicle, Segment segment, Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading) { - throw new NotImplementedException(); + return _vehicleDataAdapter.CreateVehicleData(primaryVehicle, completedVehicle, segment, mission, + loading); } public IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData, IBusAuxiliariesDeclarationData busAuxData, - MissionType missionType, VehicleClass vehicleClass, Meter vehicleLength, int? numSteeredAxles) + MissionType missionType, VehicleClass vehicleClass, Meter vehicleLength, int? numSteeredAxles, VectoSimulationJobType jobType) { - throw new NotImplementedException(); + //throw new NotImplementedException(); + return _auxDataAdapter.CreateAuxiliaryData(auxData, busAuxData, missionType, vehicleClass, + vehicleLength, numSteeredAxles, jobType); } public AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission) { - throw new NotImplementedException(); + return _airdragDataAdapter.CreateAirdragData(completedVehicle, mission); } public CombustionEngineData CreateEngineData(IVehicleDeclarationInputData primaryVehicle, int modeIdx, Mission mission) { - throw new NotImplementedException(); + return _engineDataAdapter.CreateEngineData(primaryVehicle, modeIdx, mission); } #endregion diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs index e8ef3e49ab9ef9c3c3066da3b96b9048f946308e..e312ad10bfe741a63c1415dc469ac8257f976eae 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/IDeclarationDataAdapter.cs @@ -158,7 +158,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData, IBusAuxiliariesDeclarationData busAuxData, MissionType missionType, VehicleClass vehicleClass, - Meter vehicleLength, int? numSteeredAxles); + Meter vehicleLength, int? numSteeredAxles, VectoSimulationJobType jobType); AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission); diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AirdragDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AirdragDataAdapter.cs index 9b13abe430caee036de569613fc31d57f2f82745..380e4297ae275ad96058021d665728bc03d60b92 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AirdragDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AirdragDataAdapter.cs @@ -19,6 +19,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen AirdragData CreateAirdragData( IAirdragDeclarationInputData airdragInputData, Mission mission, Segment segment); + + AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission); } public static class AirdragDataAdapterHelper @@ -166,18 +168,11 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen return retVal; } - } - - public class SingleBusAirdragDataAdapter - { - #region Overrides of AirdragDataAdapter - public AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission) + public virtual AirdragData CreateAirdragData(IVehicleDeclarationInputData completedVehicle, Mission mission) { if (!mission.BusParameter.AirDragMeasurementAllowed || - completedVehicle.Components.AirdragInputData?.AirDragArea == null) - { - return new AirdragData() - { + completedVehicle.Components.AirdragInputData?.AirDragArea == null) { + return new AirdragData() { CertificationMethod = CertificationMethod.StandardValues, DeclaredAirdragArea = mission.DefaultCDxA, CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup( @@ -205,7 +200,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen return retVal; } - - #endregion } + + public class CompletedBusSpecificAirdragDataAdapter : AirdragDataAdapter { } + + public class SingleBusAirdragDataAdapter : CompletedBusSpecificAirdragDataAdapter { } + } diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs index 61bc9bcdbaa85ff3e6a39c4eb35483cf6ef212bf..6f6ac82bce8fde50d58f35d456e4359feddbb663 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/AuxiliaryDataAdapter.cs @@ -923,31 +923,10 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen { _primaryBusDataAdapter = primaryBusDataAdapter as PrimaryBusAuxiliaryDataAdapter; } - private double GetNumberOfPassengers(Mission mission, Meter length, Meter width, double registeredPassengerSeats, - double registeredPassengersStanding, LoadingType loading) - { - var busFloorArea = DeclarationData.BusAuxiliaries.CalculateBusFloorSurfaceArea(length, width); - var passengerCountRef = busFloorArea * (loading == LoadingType.LowLoading - ? mission.BusParameter.PassengerDensityLow - : mission.BusParameter.PassengerDensityRef); - - if (loading != LoadingType.ReferenceLoad && loading != LoadingType.LowLoading) - { - throw new VectoException("Unhandled loading type: {0}", loading); - } - - var passengerCount = registeredPassengerSeats + - (mission.MissionType == MissionType.Coach ? 0 : registeredPassengersStanding); - - return loading == LoadingType.ReferenceLoad - ? VectoMath.Min(passengerCountRef, passengerCount) - : VectoMath.Min(passengerCountRef * mission.MissionType.GetLowLoadFactorBus(), passengerCount); - } - + #region Avarage Current Demand Calculation - - protected bool VehicleHasElectricalConsumer(string consumerName, IBusAuxiliariesDeclarationData busAux) + protected override bool VehicleHasElectricalConsumer(string consumerName, IBusAuxiliariesDeclarationData busAux) { if (consumerName == "Day running lights LED bonus" && (bool)busAux.ElectricConsumers.DayrunninglightsLED) return true; @@ -1215,7 +1194,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen ssmInputs.BusVolumeVentilation = (ventilationLength - correctionLengthDrivetrainVolume) * correctedBusWidth * internalHeight; ssmInputs.UValue = DeclarationData.BusAuxiliaries.UValue(completedVehicle.VehicleCode.GetFloorType()); - ssmInputs.NumberOfPassengers = GetNumberOfPassengers( + ssmInputs.NumberOfPassengers = DeclarationData.GetNumberOfPassengers( mission, internalLength, correctedBusWidth, (completedVehicle.NumberPassengerSeatsLowerDeck ?? 0) + (completedVehicle.NumberPassengerSeatsUpperDeck ?? 0), (completedVehicle.NumberPassengersStandingLowerDeck ?? 0) + (completedVehicle.NumberPassengersStandingUpperDeck ?? 0), diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs index 4c3dc27c82420a786a99c85c917d0142697fe632..7c3558e49c6be865930424fce88bc928a0af95b2 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/GearBoxDataAdapter.cs @@ -388,6 +388,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen public const double GearEfficiencyDirectGear = 0.98; public const double GearEfficiencyIndirectGear = 0.96; public const double GearEfficiencyAT = 0.925; + public GenericCompletedBusGearboxDataAdapter(ITorqueConverterDataAdapter torqueConverterDataAdapter) : base( torqueConverterDataAdapter) { @@ -417,4 +418,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen #endregion } + + public class CompletedSpecifigBusGearboxDataAdapter : GenericCompletedBusGearboxDataAdapter + { + public CompletedSpecifigBusGearboxDataAdapter(ITorqueConverterDataAdapter torqueConverterDataAdapter) : base(torqueConverterDataAdapter) { } + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs index 3844df0481a59bea1f2ecf04eee419fea4d079c7..0f3d5b3394bc8ee55eef5af9c06ff81d24a287e4 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SimulationComponents/VehicleDataAdapter.cs @@ -17,8 +17,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen VehicleData CreateVehicleData(IVehicleDeclarationInputData data, Segment segment, Mission mission, Kilogram loading, double? passengerCount, bool allowVocational); VehicleData CreateExemptedVehicleData(IVehicleDeclarationInputData data); + + VehicleData CreateVehicleData(IVehicleDeclarationInputData primaryVehicle, + IVehicleDeclarationInputData completedVehicle, Segment segment, Mission mission, + KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading); + } - internal abstract class VehicleDataAdapter : ComponentDataAdapterBase, IVehicleDataAdapter + internal abstract class VehicleDataAdapter : ComponentDataAdapterBase, IVehicleDataAdapter { public static NewtonMeter VehMaxTorque( ITransmissionInputData gear, int numGears, @@ -94,6 +99,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen return DoCreateExemptedVehicleData(data); } + public virtual VehicleData CreateVehicleData(IVehicleDeclarationInputData primaryVehicle, + IVehicleDeclarationInputData completedVehicle, Segment segment, Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading) + { + throw new NotImplementedException("Method only applicable for completed specific bus!"); + } + protected abstract VehicleData DoCreateExemptedVehicleData(IVehicleDeclarationInputData data); protected static VehicleData GetVehicleData(IVehicleDeclarationInputData data, @@ -290,6 +301,74 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen #endregion } + internal class CompletedBusSpecificVehicleDataAdapter : IVehicleDataAdapter + { + protected IVehicleDataAdapter completedBusGenericDataAdapter = new CompletedBusGenericVehicleDataAdapter(); + + #region Overrides of IVehicleDataAdapter + + public VehicleData CreateVehicleData(IVehicleDeclarationInputData data, Segment segment, Mission mission, Kilogram loading, + double? passengerCount, bool allowVocational) + { + throw new NotImplementedException(); + } + + public VehicleData CreateExemptedVehicleData(IVehicleDeclarationInputData data) + { + throw new NotImplementedException(); + } + + public VehicleData CreateVehicleData(IVehicleDeclarationInputData primaryVehicle, + IVehicleDeclarationInputData completedVehicle, Segment segment, Mission mission, + KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading) + { + if (completedVehicle.NumberPassengerSeatsLowerDeck == null) { + throw new VectoException("NumberOfPassengerSeatsLowerDeck input parameter is required"); + } + if (completedVehicle.NumberPassengerSeatsUpperDeck == null) { + throw new VectoException("NumberOfPassengerSeatsUpperDeck input parameter is required"); + } + if (completedVehicle.NumberPassengersStandingLowerDeck == null) { + throw new VectoException("NumberOfPassengersStandingLowerDeck input parameter is required"); + } + if (completedVehicle.NumberPassengersStandingUpperDeck == null) { + throw new VectoException("NumberOfPassengersStandingUpperDeck input parameter is required"); + } + var passengers = DeclarationData.GetNumberOfPassengers( + mission, completedVehicle.Length, completedVehicle.Width, + completedVehicle.NumberPassengerSeatsLowerDeck.Value + completedVehicle.NumberPassengerSeatsUpperDeck.Value, + completedVehicle.NumberPassengersStandingLowerDeck.Value + completedVehicle.NumberPassengersStandingUpperDeck.Value, + loading.Key); + + var vehicleData = completedBusGenericDataAdapter.CreateVehicleData(primaryVehicle, segment, mission, loading.Value.Item1, loading.Value.Item2, false); + vehicleData.InputData = completedVehicle; + vehicleData.VIN = completedVehicle.VIN; + vehicleData.LegislativeClass = completedVehicle.LegislativeClass; + vehicleData.VehicleCategory = VehicleCategory.HeavyBusCompletedVehicle; + vehicleData.Manufacturer = completedVehicle.Manufacturer; + vehicleData.ModelName = completedVehicle.Model; + vehicleData.ManufacturerAddress = completedVehicle.ManufacturerAddress; + vehicleData.CurbMass = completedVehicle.CurbMassChassis; + + vehicleData.Loading = passengers * mission.MissionType.GetAveragePassengerMass(); + vehicleData.PassengerCount = passengers; + vehicleData.GrossVehicleMass = completedVehicle.GrossVehicleMassRating; + vehicleData.DigestValueInput = completedVehicle.DigestValue?.DigestValue ?? ""; + + vehicleData.RegisteredClass = completedVehicle.RegisteredClass; + + vehicleData.VehicleCode = completedVehicle.VehicleCode; + if (vehicleData.TotalVehicleMass.IsGreater(vehicleData.GrossVehicleMass)) { + throw new VectoException("Total Vehicle Mass exceeds Gross Vehicle Mass for completed bus specific ({0}/{1})", + vehicleData.TotalVehicleMass, vehicleData.GrossVehicleMass); + } + return vehicleData; + } + + + #endregion + } + internal class SingleBusVehicleDataAdapter : VehicleDataAdapter { #region Overrides of VehicleDataAdapter diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs index 11edef3935ec7efd3f5345bee7068c4c14f8b982..46799d384314c0000afb4e174f361d12c455c193 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/SingleBus/DeclarationDataAdapterSingleBus.cs @@ -22,7 +22,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SingleBus public static readonly GearboxType[] SupportedGearboxTypes = { GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial }; - private SingleBusAirdragDataAdapter _airdragDataAdapter = new SingleBusAirdragDataAdapter(); + private IAirdragDataAdapter _airdragDataAdapter = new SingleBusAirdragDataAdapter(); private IGearboxDataAdapter _gearboxDataAdapter = new GearboxDataAdapter(new TorqueConverterDataAdapter()); private ICompletedBusAuxiliaryDataAdapter _busAuxiliaryDataAdapter = diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs index 210bd7c0d3174aae651257e99f3e08b74ce6d7fb..c47269a5e25d0d395214d76468818b14c18ea346 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationMode/CompletedBusRunDataFactory/DeclarationModeCompletedBusRunDataFactory.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Data.Common; using System.Linq; using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; @@ -12,6 +13,7 @@ using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Impl; +using TUGraz.VectoCore.Models.SimulationComponent.Impl.Shiftstrategies; using TUGraz.VectoCore.OutputData; namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRunDataFactory @@ -23,8 +25,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun private Segment _segmentCompletedBus; private AxleGearData _axlegearData; private AngledriveData _angledriveData; - private GearboxData _gearboxData; - private ShiftStrategyParameters _gearshiftData; + //private GearboxData _gearboxData; + //private ShiftStrategyParameters _gearshiftData; private RetarderData _retarderData; private DriverData _driverData ; @@ -120,7 +122,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun AirdragData = DataAdapterGeneric.CreateAirdragData(null, mission, new Segment()), EngineData = DataAdapterGeneric.CreateEngineData(PrimaryVehicle, modeIdx, mission), ElectricMachinesData = new List<Tuple<PowertrainPosition, ElectricMotorData>>(), - GearboxData = _gearboxData, + //GearboxData = _gearboxData, AxleGearData = _axlegearData, AngledriveData = _angledriveData, Aux = DataAdapterGeneric.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData, @@ -138,13 +140,23 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun InputDataHash = DataProvider.MultistageJobInputData.XMLHash, SimulationType = SimulationType.DistanceCycle, VehicleDesignSpeed = _segmentCompletedBus.DesignSpeed, - GearshiftParameters = _gearshiftData, + //GearshiftParameters = _gearshiftData, }; simulationRunData.EngineData.FuelMode = 0; simulationRunData.VehicleData.VehicleClass = _segmentCompletedBus.VehicleClass; simulationRunData.BusAuxiliaries = DataAdapterGeneric.CreateBusAuxiliariesData(mission, PrimaryVehicle, simulationRunData); - + var shiftStrategyName = + PowertrainBuilder.GetShiftStrategyName(PrimaryVehicle.Components.GearboxInputData.Type, + PrimaryVehicle.VehicleType); + simulationRunData.GearboxData = DataAdapterGeneric.CreateGearboxData(PrimaryVehicle, simulationRunData, + ShiftPolygonCalculator.Create(shiftStrategyName, simulationRunData.GearshiftParameters)); + simulationRunData.GearshiftParameters = + DataAdapterGeneric.CreateGearshiftData( + simulationRunData.GearboxData, + (simulationRunData.AxleGearData?.AxleGear.Ratio ?? 1.0) * (simulationRunData.AngledriveData?.Angledrive.Ratio ?? 1.0), + PrimaryVehicle.EngineIdleSpeed + ); return simulationRunData; } protected virtual VectoRunData CreateVectoRunDataSpecific(Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, int modeIdx) @@ -160,12 +172,12 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun AirdragData = DataAdapterSpecific.CreateAirdragData(CompletedVehicle, mission), EngineData = DataAdapterSpecific.CreateEngineData(PrimaryVehicle, modeIdx, mission), ElectricMachinesData = new List<Tuple<PowertrainPosition, ElectricMotorData>>(), - GearboxData = _gearboxData, + //GearboxData = _gearboxData, AxleGearData = _axlegearData, AngledriveData = _angledriveData, Aux = DataAdapterSpecific.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData, PrimaryVehicle.Components.BusAuxiliaries, mission.MissionType, _segmentCompletedBus.VehicleClass, CompletedVehicle.Length, - PrimaryVehicle.Components.AxleWheels.NumSteeredAxles), + PrimaryVehicle.Components.AxleWheels.NumSteeredAxles, PrimaryVehicle.VehicleType), Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()), Retarder = _retarderData, DriverData = _driverData, @@ -177,12 +189,23 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun InputDataHash = DataProvider.MultistageJobInputData.XMLHash,// right hash?!? SimulationType = SimulationType.DistanceCycle, VehicleDesignSpeed = _segmentCompletedBus.DesignSpeed, - GearshiftParameters = _gearshiftData, + //GearshiftParameters = _gearshiftData, }; simulationRunData.EngineData.FuelMode = 0; simulationRunData.VehicleData.VehicleClass = _segmentCompletedBus.VehicleClass; simulationRunData.BusAuxiliaries = DataAdapterSpecific.CreateBusAuxiliariesData(mission, PrimaryVehicle, CompletedVehicle, simulationRunData); + var shiftStrategyName = + PowertrainBuilder.GetShiftStrategyName(PrimaryVehicle.Components.GearboxInputData.Type, + PrimaryVehicle.VehicleType); + simulationRunData.GearboxData = DataAdapterGeneric.CreateGearboxData(PrimaryVehicle, simulationRunData, + ShiftPolygonCalculator.Create(shiftStrategyName, simulationRunData.GearshiftParameters)); + simulationRunData.GearshiftParameters = + DataAdapterGeneric.CreateGearshiftData( + simulationRunData.GearboxData, + (simulationRunData.AxleGearData?.AxleGear.Ratio ?? 1.0) * (simulationRunData.AngledriveData?.Angledrive.Ratio ?? 1.0), + PrimaryVehicle.EngineIdleSpeed + ); return simulationRunData; } protected virtual Segment GetPrimarySegment(IVehicleDeclarationInputData primaryVehicle) @@ -271,36 +294,32 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.CompletedBusRun _segmentCompletedBus = GetCompletedSegment(CompletedVehicle, PrimaryVehicle.AxleConfiguration); - var tmpVehicleData = DataAdapterSpecific.CreateVehicleData(PrimaryVehicle, CompletedVehicle, _segmentCompletedBus, _segmentCompletedBus.Missions.First(), - _segmentCompletedBus.Missions.First().Loadings.First()); - tmpVehicleData.VehicleCategory = VehicleCategory.GenericBusVehicle; - - var combustionEngineData = DataAdapterGeneric.CreateEngineData(PrimaryVehicle, 0, _segmentCompletedBus.Missions.First()); + //var combustionEngineData = DataAdapterGeneric.CreateEngineData(PrimaryVehicle, 0, _segmentCompletedBus.Missions.First()); _axlegearData = DataAdapterGeneric.CreateAxleGearData(PrimaryVehicle.Components.AxleGearInputData); _angledriveData = DataAdapterGeneric.CreateAngledriveData(PrimaryVehicle.Components.AngledriveInputData); - var tmpRunData = new VectoRunData() - { - GearboxData = new GearboxData() - { - Type = PrimaryVehicle.Components.GearboxInputData.Type, - } - }; - var tmpStrategy = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData)); + //var tmpRunData = new VectoRunData() + //{ + // GearboxData = new GearboxData() + // { + // Type = PrimaryVehicle.Components.GearboxInputData.Type, + // } + //}; + //var tmpStrategy = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData)); - _gearboxData = DataAdapterGeneric.CreateGearboxData(PrimaryVehicle, new VectoRunData() { EngineData = combustionEngineData, AxleGearData = _axlegearData, VehicleData = tmpVehicleData }, - tmpStrategy); + //_gearboxData = DataAdapterGeneric.CreateGearboxData(PrimaryVehicle, new VectoRunData() { EngineData = combustionEngineData, AxleGearData = _axlegearData, VehicleData = tmpVehicleData }, + // tmpStrategy); - _gearshiftData = DataAdapterGeneric.CreateGearshiftData( - _gearboxData, _axlegearData.AxleGear.Ratio * (_angledriveData?.Angledrive.Ratio ?? 1.0), combustionEngineData.IdleSpeed); + //_gearshiftData = DataAdapterGeneric.CreateGearshiftData( + // _gearboxData, _axlegearData.AxleGear.Ratio * (_angledriveData?.Angledrive.Ratio ?? 1.0), combustionEngineData.IdleSpeed); _retarderData = DataAdapterGeneric.CreateRetarderData(PrimaryVehicle.Components.RetarderInputData); _driverData = DataAdapterGeneric.CreateDriverData(_segmentCompletedBus); - _driverData.AccelerationCurve = AccelerationCurveReader.ReadFromStream(_segmentCompletedBus.AccelerationFile); + //_driverData.AccelerationCurve = AccelerationCurveReader.ReadFromStream(_segmentCompletedBus.AccelerationFile); } diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs index 17625e41092ba0b2261a5d2bdd54e8dae53cf746..7b0b85913c354cd35b077d87c7936be5429796c6 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/EngineeringModeVectoRunDataFactory.cs @@ -47,6 +47,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Battery; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Models.SimulationComponent.Impl; +using TUGraz.VectoCore.Models.SimulationComponent.Impl.Shiftstrategies; using TUGraz.VectoCore.Utils; [assembly: InternalsVisibleTo("VectoCoreTest")] @@ -518,22 +519,22 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl var vehicle = InputDataProvider.JobInputData.Vehicle; var engineData = dao.CreateEngineData(vehicle, engineMode); engineData.FuelMode = modeIdx; - var tempVehicle = dao.CreateVehicleData(vehicle); + //var tempVehicle = dao.CreateVehicleData(vehicle); var axlegearData = dao.CreateAxleGearData(vehicle.Components.AxleGearInputData); - var tmpRunData = new VectoRunData() { - JobType = InputDataProvider.JobInputData.JobType, - GearboxData = new GearboxData() { - Type = vehicle.Components.GearboxInputData.Type, - } - }; - var tmpStrategy = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData)); - var gearboxData = dao.CreateGearboxData( - InputDataProvider, new VectoRunData() { - EngineData = engineData, - VehicleData = tempVehicle, - AxleGearData = axlegearData - }, tmpStrategy); + //var tmpRunData = new VectoRunData() { + // JobType = InputDataProvider.JobInputData.JobType, + // GearboxData = new GearboxData() { + // Type = vehicle.Components.GearboxInputData.Type, + // } + //}; + //var tmpStrategy = PowertrainBuilder.GetShiftStrategy(new SimplePowertrainContainer(tmpRunData)); + //var gearboxData = dao.CreateGearboxData( + // InputDataProvider, new VectoRunData() { + // EngineData = engineData, + // VehicleData = tempVehicle, + // AxleGearData = axlegearData + // }, tmpStrategy); var crossWindRequired = vehicle.Components.AirdragInputData.CrossWindCorrectionMode == CrossWindCorrectionMode.VAirBetaLookupTable; @@ -541,16 +542,6 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl var ptoTransmissionData = dao.CreatePTOTransmissionData(vehicle.Components.PTOTransmissionInputData); - if (InputDataProvider.JobInputData.Vehicle.PTO_DriveGear != null && - InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed != null) { - driver.PTODriveMinSpeed = InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed / - axlegearData.AxleGear.Ratio / - gearboxData.Gears[InputDataProvider.JobInputData.Vehicle.PTO_DriveGear.Gear].Ratio / - (angledriveData?.Angledrive.Ratio ?? 1.0) * vehicle.DynamicTyreRadius; - driver.PTODriveRoadsweepingGear = InputDataProvider.JobInputData.Vehicle.PTO_DriveGear; - engineData.PTORoadSweepEngineSpeed = - InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed; - } var ptoCycleWhileDrive = InputDataProvider.JobInputData.Vehicle.Components.PTOTransmissionInputData @@ -568,69 +559,112 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl var superCap = dao.CreateSuperCapData(vehicle.Components.ElectricStorage, vehicle.InitialSOC); var averageVoltage = battery != null ? CalculateAverageVoltage(battery): null; - var electricMachines = - dao.CreateElectricMachines(vehicle.Components.ElectricMachines, - vehicle.ElectricMotorTorqueLimits, averageVoltage, gearboxData.GearList) ?? - new List<Tuple<PowertrainPosition, ElectricMotorData>>(); - var powertrainPosition = electricMachines.FirstOrDefault(e => e.Item1 != PowertrainPosition.GEN)?.Item1 ?? PowertrainPosition.HybridPositionNotSet; - var jobType = electricMachines.Count > 0 && (battery != null || superCap != null) - ? VectoSimulationJobType.ParallelHybridVehicle - : VectoSimulationJobType.ConventionalVehicle; - - if (powertrainPosition == PowertrainPosition.HybridP2 && gearboxData.Type.AutomaticTransmission()) { - throw new VectoException( - "Powertrain Architecture 'hybrid electric vehicle, P2' with AT transmission not supported"); - } var vehicleData = dao.CreateVehicleData(vehicle); - var gearshiftParams = dao.CreateGearshiftData( - gearboxData.Type, InputDataProvider.DriverInputData.GearshiftInputData, - axlegearData.AxleGear.Ratio * (angledriveData?.Angledrive.Ratio ?? 1.0), - engineData.IdleSpeed); - if (gearshiftParams == null) { - gearshiftParams = new ShiftStrategyParameters() { - StartSpeed = DeclarationData.GearboxTCU.StartSpeed, - StartAcceleration = DeclarationData.GearboxTCU.StartAcceleration, - TimeBetweenGearshifts = DeclarationData.Gearbox.MinTimeBetweenGearshifts, - DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, - UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, - UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration, - }; - } + //var gearshiftParams = dao.CreateGearshiftData( + // gearboxData.Type, InputDataProvider.DriverInputData.GearshiftInputData, + // axlegearData.AxleGear.Ratio * (angledriveData?.Angledrive.Ratio ?? 1.0), + // engineData.IdleSpeed); + //if (gearshiftParams == null) { + // gearshiftParams = new ShiftStrategyParameters() { + // StartSpeed = DeclarationData.GearboxTCU.StartSpeed, + // StartAcceleration = DeclarationData.GearboxTCU.StartAcceleration, + // TimeBetweenGearshifts = DeclarationData.Gearbox.MinTimeBetweenGearshifts, + // DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, + // UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, + // UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration, + // }; + //} - var hybridParameters = jobType == VectoSimulationJobType.ParallelHybridVehicle - ? dao.CreateHybridStrategyParameters(InputDataProvider.JobInputData, engineData, gearboxData) - : null; - yield return new VectoRunData { + + var retVal = new VectoRunData { JobName = InputDataProvider.JobInputData.JobName, - JobType = jobType, + //JobType = jobType, EngineData = engineData, - GearboxData = gearboxData, + //GearboxData = gearboxData, AxleGearData = axlegearData, AngledriveData = angledriveData, VehicleData = vehicleData, AirdragData = dao.CreateAirdragData(vehicle.Components.AirdragInputData, vehicle), DriverData = driver, Aux = dao.CreateAuxiliaryData(vehicle.Components.AuxiliaryInputData), - BusAuxiliaries = - dao.CreateBusAuxiliariesData(vehicle.Components.AuxiliaryInputData, vehicleData, jobType), - Retarder = dao.CreateRetarderData(vehicle.Components.RetarderInputData, powertrainPosition), + //BusAuxiliaries = + // dao.CreateBusAuxiliariesData(vehicle.Components.AuxiliaryInputData, vehicleData, jobType), + //Retarder = dao.CreateRetarderData(vehicle.Components.RetarderInputData, powertrainPosition), PTO = ptoTransmissionData, Cycle = new DrivingCycleProxy(drivingCycle, cycle.Name), ExecutionMode = ExecutionMode.Engineering, PTOCycleWhileDrive = ptoCycleWhileDrive, - ElectricMachinesData = electricMachines, - HybridStrategyParameters = hybridParameters, + //ElectricMachinesData = electricMachines, + //HybridStrategyParameters = hybridParameters, BatteryData = battery, SuperCapData = superCap, SimulationType = SimulationType.DistanceCycle | SimulationType.MeasuredSpeedCycle | SimulationType.PWheel, - GearshiftParameters = gearshiftParams, + //GearshiftParameters = gearshiftParams, ElectricAuxDemand = InputDataProvider.JobInputData.Vehicle.Components.AuxiliaryInputData .Auxiliaries.ElectricPowerDemand, }; + + var shiftStrategyName = + PowertrainBuilder.GetShiftStrategyName(vehicle.Components.GearboxInputData.Type, + vehicle.VehicleType); + var gearshiftParams = + dao.CreateGearshiftData( + vehicle.Components.GearboxInputData.Type, InputDataProvider.DriverInputData.GearshiftInputData, + (retVal.AxleGearData?.AxleGear.Ratio ?? 1.0) * (retVal.AngledriveData?.Angledrive.Ratio ?? 1.0), + engineData.IdleSpeed + ); + if (gearshiftParams == null) { + gearshiftParams = new ShiftStrategyParameters() { + StartSpeed = DeclarationData.GearboxTCU.StartSpeed, + StartAcceleration = DeclarationData.GearboxTCU.StartAcceleration, + TimeBetweenGearshifts = DeclarationData.Gearbox.MinTimeBetweenGearshifts, + DownshiftAfterUpshiftDelay = DeclarationData.Gearbox.DownshiftAfterUpshiftDelay, + UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, + UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration, + }; + } + retVal.GearshiftParameters = gearshiftParams; + retVal.GearboxData = dao.CreateGearboxData(InputDataProvider, retVal, + ShiftPolygonCalculator.Create(shiftStrategyName, retVal.GearshiftParameters)); + + var electricMachines = + dao.CreateElectricMachines(vehicle.Components.ElectricMachines, + vehicle.ElectricMotorTorqueLimits, averageVoltage, retVal.GearboxData.GearList) ?? + new List<Tuple<PowertrainPosition, ElectricMotorData>>(); + var powertrainPosition = electricMachines.FirstOrDefault(e => e.Item1 != PowertrainPosition.GEN)?.Item1 ?? PowertrainPosition.HybridPositionNotSet; + + var jobType = electricMachines.Count > 0 && (battery != null || superCap != null) + ? VectoSimulationJobType.ParallelHybridVehicle + : VectoSimulationJobType.ConventionalVehicle; + + retVal.JobType = jobType; + retVal.ElectricMachinesData = electricMachines; + retVal.Retarder = dao.CreateRetarderData(vehicle.Components.RetarderInputData, powertrainPosition); + retVal.BusAuxiliaries = + dao.CreateBusAuxiliariesData(vehicle.Components.AuxiliaryInputData, vehicleData, jobType); + if (powertrainPosition == PowertrainPosition.HybridP2 && retVal.GearboxData.Type.AutomaticTransmission()) { + throw new VectoException( + "Powertrain Architecture 'hybrid electric vehicle, P2' with AT transmission not supported"); + } + retVal.HybridStrategyParameters = jobType == VectoSimulationJobType.ParallelHybridVehicle + ? dao.CreateHybridStrategyParameters(InputDataProvider.JobInputData, engineData, retVal.GearboxData) + : null; + if (InputDataProvider.JobInputData.Vehicle.PTO_DriveGear != null && + InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed != null) { + driver.PTODriveMinSpeed = InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed / + axlegearData.AxleGear.Ratio / + retVal.GearboxData.Gears[InputDataProvider.JobInputData.Vehicle.PTO_DriveGear.Gear].Ratio / + (angledriveData?.Angledrive.Ratio ?? 1.0) * vehicle.DynamicTyreRadius; + driver.PTODriveRoadsweepingGear = InputDataProvider.JobInputData.Vehicle.PTO_DriveGear; + engineData.PTORoadSweepEngineSpeed = + InputDataProvider.JobInputData.Vehicle.PTO_DriveEngineSpeed; + } + + yield return retVal; } } } diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index a1a2c597d980550c744adda0ebab31f228c02c49..2d35df18df56d9537edc0149d86c7cb2f11054fb 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -198,7 +198,25 @@ namespace TUGraz.VectoCore.Models.Declaration return Declaration.WeightingGroup.Unknown; } + public static double GetNumberOfPassengers(Mission mission, Meter length, Meter width, double registeredPassengerSeats, + double registeredPassengersStanding, LoadingType loading) + { + var busFloorArea = DeclarationData.BusAuxiliaries.CalculateBusFloorSurfaceArea(length, width); + var passengerCountRef = busFloorArea * (loading == LoadingType.LowLoading + ? mission.BusParameter.PassengerDensityLow + : mission.BusParameter.PassengerDensityRef); + + if (loading != LoadingType.ReferenceLoad && loading != LoadingType.LowLoading) { + throw new VectoException("Unhandled loading type: {0}", loading); + } + var passengerCount = registeredPassengerSeats + + (mission.MissionType == MissionType.Coach ? 0 : registeredPassengersStanding); + + return loading == LoadingType.ReferenceLoad + ? VectoMath.Min(passengerCountRef, passengerCount) + : VectoMath.Min(passengerCountRef * mission.MissionType.GetLowLoadFactorBus(), passengerCount); + } public static class BusAuxiliaries { diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs index 24072017b3c996b9a1dce63fb9bf995624f5b3c5..b383b8e0a16d6c2b85c28e0f45c4403629468859 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs @@ -8,6 +8,7 @@ using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Resources; using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReport; using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter; using TUGraz.VectoCore.Utils; @@ -196,8 +197,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation #region CompletedBus - public abstract class CustomerInformationFileCompletedBus : CustomerInformationFile + public abstract class CustomerInformationFileCompletedBus : CustomerInformationFile, IXMLCustomerReportCompletedBus { + private bool _allSuccess; + private int _resultCount; protected XElement InputDataIntegrityPrimaryVehicle { get; set; } protected XElement ManufacturerReportIntegrityPrimaryVehicle { get; set; } @@ -238,6 +241,21 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation XMLHelper.GetApplicationInfo(Cif_0_9) }; } + + #region Implementation of IXMLCustomerReportCompletedBus + + public void WriteResult(XMLDeclarationReport.ResultEntry genericResult, XMLDeclarationReport.ResultEntry specificResult, IResult primaryResult) + { + _allSuccess &= genericResult.Status == VectoRun.Status.Success; + _allSuccess &= specificResult.Status == VectoRun.Status.Success; + _resultCount++; + //Results.Add( + // genericResult.Status == VectoRun.Status.Success && specificResult.Status == VectoRun.Status.Success + // ? GetSuccessResultEntry(genericResult, specificResult, primaryResult) + // : GetErrorResultEntry(genericResult, specificResult, primaryResult)); + } + + #endregion } public class Conventional_CompletedBusCIF : CustomerInformationFileCompletedBus diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/IXMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/IXMLCustomerReport.cs index c839d9e332410d9e2843d2d0aeab42306396aae8..38f56789049ef3e060b063a54b53f84d9601c6f7 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/IXMLCustomerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/IXMLCustomerReport.cs @@ -1,4 +1,5 @@ using System.Xml.Linq; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCore.Models.Simulation.Data; namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile @@ -10,4 +11,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation void WriteResult(XMLDeclarationReport.ResultEntry resultValue); void GenerateReport(XElement resultSignature); } + + public interface IXMLCustomerReportCompletedBus + { + void WriteResult(XMLDeclarationReport.ResultEntry genericResult, + XMLDeclarationReport.ResultEntry specificResult, IResult primaryResult); + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/IXMLManufacturerReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/IXMLManufacturerReport.cs index 3a38e047c05a1d61ce5abea364d317b50eef0b26..f6507d5c7f1afaea454aabd98ae59ce12df881c9 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/IXMLManufacturerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/IXMLManufacturerReport.cs @@ -12,4 +12,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport void WriteResult(XMLDeclarationReport.ResultEntry resultValue); void GenerateReport(); } + + public interface IXMLManufacturerReportCompletedBus + { + void WriteResult(XMLDeclarationReport.ResultEntry genericResult, + XMLDeclarationReport.ResultEntry specificResult, IResult primaryResult); + } } \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReport/CompletedBusManufacturerReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReport/CompletedBusManufacturerReport.cs index c4f5cd22cf40bd19163e5d891ba6bfe9d7ff3ba9..c41e5b166cdd8f3a5d4a67ff966de376edba15fc 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReport/CompletedBusManufacturerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReport/CompletedBusManufacturerReport.cs @@ -7,14 +7,16 @@ using TUGraz.VectoCommon.Exceptions; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Resources; using TUGraz.VectoCore.Models.Simulation.Data; +using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter; using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReport { - internal abstract class CompletedBusManufacturerReportBase : AbstractManufacturerReport + internal abstract class CompletedBusManufacturerReportBase : AbstractManufacturerReport, IXMLManufacturerReportCompletedBus { protected XNamespace _mrf = XNamespace.Get("urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9"); + private bool _allSuccess; public CompletedBusManufacturerReportBase(IManufacturerReportFactory MRFReportFactory) : base(MRFReportFactory) { } public override void Initialize(VectoRunData modelData) @@ -32,6 +34,21 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. : inputData.JobInputData.ConsolidateManufacturingStage.Signature.ToXML(_di)); } + #region Implementation of IXMLManufacturerReportCompletedBus + + public virtual void WriteResult(XMLDeclarationReport.ResultEntry genericResult, + XMLDeclarationReport.ResultEntry specificResult, IResult primaryResult) + { + _allSuccess &= genericResult.Status == VectoRun.Status.Success; + _allSuccess &= specificResult.Status == VectoRun.Status.Success; + //Results.Add( + // genericResult.Status == VectoRun.Status.Success && specificResult.Status == VectoRun.Status.Success + // ? GetSuccessResultEntry(genericResult, specificResult, primaryResult) + // : GetErrorResultEntry(genericResult, specificResult, primaryResult)); + + } + + #endregion } internal class Conventional_CompletedBusManufacturerReport : CompletedBusManufacturerReportBase diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs index 752e6a2da04553d2072716cf90ad972cf3a06d1e..c391c4410327aa9ffafd9627f3a7dcd3c7b82108 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReportCompletedVehicle.cs @@ -92,8 +92,8 @@ namespace TUGraz.VectoCore.OutputData.XML { genericResult.VehicleClass, genericResult.Mission, genericResult.Payload); } - (ManufacturerRpt as XMLManufacturerReportCompletedBus).WriteResult(genericResult, specificResult, primaryResult); - (CustomerRpt as XMLCustomerReportCompletedBus).WriteResult(genericResult, specificResult, primaryResult); + (ManufacturerRpt as IXMLManufacturerReportCompletedBus)?.WriteResult(genericResult, specificResult, primaryResult); + (CustomerRpt as IXMLCustomerReportCompletedBus)?.WriteResult(genericResult, specificResult, primaryResult); } GenerateReports(); diff --git a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs index 23ae50dff9a49887968ceecd4551e61bd024ebf4..9e79f79954005cfbe5f53cb286b5aa58784deda4 100644 --- a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs +++ b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs @@ -134,6 +134,16 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus var hvacCfgNode = completedXML.SelectSingleNode("//*[local-name()='SystemConfiguration']"); hvacCfgNode.InnerText = hvacConfig.ToXmlFormat(); + var (hpDriver, hpPassenger) = GetHeatpumps(hvacConfig); + var hpDriverCoolingNode = + completedXML.SelectSingleNode( + "//*[local-name()='HeatPumpTypeDriverCompartment']/*[local-name()='Cooling']"); + hpDriverCoolingNode.InnerText = hpDriver.ToXML(); + var hpPassengerCoolingNode = + completedXML.SelectSingleNode( + "//*[local-name()='HeatPumpTypePassengerCompartment']/*[local-name()='Cooling']"); + hpPassengerCoolingNode.InnerText = hpPassenger.ToXML(); + var airDuctsNode = completedXML.SelectSingleNode("//*[local-name()='SeparateAirDistributionDucts']"); airDuctsNode.InnerText = XmlConvert.ToString(separateDucts); var modified = XmlReader.Create(new StringReader(completedXML.OuterXml)); @@ -159,6 +169,27 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus return completedVif as IMultistepBusInputDataProvider; } + + private (HeatPumpType, HeatPumpType) GetHeatpumps(BusHVACSystemConfiguration? hvacConfig) + { + var mapping = new Dictionary<BusHVACSystemConfiguration, Tuple<HeatPumpType, HeatPumpType>>() { + { BusHVACSystemConfiguration.Configuration1, Tuple.Create(HeatPumpType.none, HeatPumpType.none) }, + { BusHVACSystemConfiguration.Configuration2, Tuple.Create(HeatPumpType.non_R_744_2_stage, HeatPumpType.none) }, + { BusHVACSystemConfiguration.Configuration3, Tuple.Create(HeatPumpType.none, HeatPumpType.none) }, + { BusHVACSystemConfiguration.Configuration4, Tuple.Create(HeatPumpType.non_R_744_2_stage, HeatPumpType.none) }, + { BusHVACSystemConfiguration.Configuration5, Tuple.Create(HeatPumpType.none, HeatPumpType.non_R_744_3_stage) }, + { BusHVACSystemConfiguration.Configuration6, Tuple.Create(HeatPumpType.none, HeatPumpType.non_R_744_3_stage) }, + { BusHVACSystemConfiguration.Configuration7, Tuple.Create(HeatPumpType.non_R_744_2_stage, HeatPumpType.non_R_744_3_stage) }, + { BusHVACSystemConfiguration.Configuration8, Tuple.Create(HeatPumpType.none, HeatPumpType.non_R_744_3_stage) }, + { BusHVACSystemConfiguration.Configuration9, Tuple.Create(HeatPumpType.none, HeatPumpType.non_R_744_3_stage) }, + { BusHVACSystemConfiguration.Configuration10, Tuple.Create(HeatPumpType.none, HeatPumpType.non_R_744_3_stage) }, + }; + if (!hvacConfig.HasValue || !mapping.ContainsKey(hvacConfig.Value)) { + throw new VectoException("invalid hvac configuration"); + } + var entry = mapping[hvacConfig.Value]; + return (entry.Item1, entry.Item2); + } } public class MockCompletedBusInputData : IInputDataProvider, IMultistepBusInputDataProvider diff --git a/VectoCore/VectoCoreTest/TestData/Integration/Buses/FactorMethod/vecto_vehicle-primary_heavyBus_ESS_electricFanSTP.RSLT_VIF.xml b/VectoCore/VectoCoreTest/TestData/Integration/Buses/FactorMethod/vecto_vehicle-primary_heavyBus_ESS_electricFanSTP.RSLT_VIF.xml index 85b6fdbe8b653d755076db116aed27c1aa40a3a5..d564477b67997c8fa895a50beebc98fbf9957fea 100644 --- a/VectoCore/VectoCoreTest/TestData/Integration/Buses/FactorMethod/vecto_vehicle-primary_heavyBus_ESS_electricFanSTP.RSLT_VIF.xml +++ b/VectoCore/VectoCoreTest/TestData/Integration/Buses/FactorMethod/vecto_vehicle-primary_heavyBus_ESS_electricFanSTP.RSLT_VIF.xml @@ -1,17 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <VectoOutputMultistep xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" - xmlns:di="http://www.w3.org/2000/09/xmldsig#" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" - xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" - xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3" - xmlns:vif0.1="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" - xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1 ./../../../../../VectoCore/Resources/XSD/VectoOutputMultistep.0.1.xsd"> +xmlns:vif="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" +xmlns:di="http://www.w3.org/2000/09/xmldsig#" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3" xmlns:vif0.1="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationOutput:VehicleInterimFile:v0.1 ./../../../../../VectoCore/Resources/XSD/VectoOutputMultistep.0.1.xsd"> <PrimaryVehicle> <Data xsi:type="PrimaryVehicleDataType" id="VIF-65de7efe65ee4b4cac4c"> <Vehicle xsi:type="ConventionalVehicleVIFType"> - <ManufacturerPrimaryVehicle>Generic Truck Manufacturer</ManufacturerPrimaryVehicle> - <ManufacturerAddressPrimaryVehicle>Street, ZIP City</ManufacturerAddressPrimaryVehicle> + <Manufacturer>Generic Truck Manufacturer</Manufacturer> + <ManufacturerAddress>Street, ZIP City</ManufacturerAddress> <Model>Generic Model</Model> <VIN>VEH-1234567890_nonSmart</VIN> <Date>2017-02-15T11:00:00Z</Date> @@ -25,12 +21,12 @@ <RetarderRatio>1.000</RetarderRatio> <AngledriveType>None</AngledriveType> <ZeroEmissionVehicle>false</ZeroEmissionVehicle> - <ADAS xmlns:adas="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xsi:type="adas:AdvancedDriverAssistantSystemsType"> - <adas:EngineStopStart>true</adas:EngineStopStart> - <adas:EcoRollWithoutEngineStop>false</adas:EcoRollWithoutEngineStop> - <adas:EcoRollWithEngineStop>true</adas:EcoRollWithEngineStop> - <adas:PredictiveCruiseControl>none</adas:PredictiveCruiseControl> - </ADAS> + <vif:ADAS xsi:type="ADAS_Conventional_Type" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4"> + <EngineStopStart>true</EngineStopStart> + <EcoRollWithoutEngineStop>false</EcoRollWithoutEngineStop> + <EcoRollWithEngineStop>true</EcoRollWithEngineStop> + <PredictiveCruiseControl>none</PredictiveCruiseControl> + </vif:ADAS> <TorqueLimits xmlns:tcl="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xsi:type="tcl:TorqueLimitsType"> <tcl:Entry gear="6" maxTorque="1800"/> <tcl:Entry gear="1" maxTorque="2500"/> @@ -49,9 +45,9 @@ <RatedPower>380000</RatedPower> <MaxEngineTorque>2400</MaxEngineTorque> <WHRType> - <MechanicalOutputICE xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3">false</MechanicalOutputICE> - <MechanicalOutputDrivetrain xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3">false</MechanicalOutputDrivetrain> - <ElectricalOutput xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3">false</ElectricalOutput> + <MechanicalOutputICE>false</MechanicalOutputICE> + <MechanicalOutputDrivetrain>false</MechanicalOutputDrivetrain> + <ElectricalOutput>false</ElectricalOutput> </WHRType> <Mode> <IdlingSpeed>560</IdlingSpeed> @@ -269,7 +265,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">17.81185</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31SD</PrimaryVehicleSubgroup> @@ -283,7 +278,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">21.37501</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31SD</PrimaryVehicleSubgroup> @@ -297,7 +291,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">14.37972</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31SD</PrimaryVehicleSubgroup> @@ -311,7 +304,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">17.36588</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31SD</PrimaryVehicleSubgroup> @@ -325,7 +317,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">12.72559</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31SD</PrimaryVehicleSubgroup> @@ -339,7 +330,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">15.58182</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -353,7 +343,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">18.89946</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -367,7 +356,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">22.89746</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -381,7 +369,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">15.23384</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -395,7 +382,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">18.56793</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -409,7 +395,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">13.41841</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P31DD</PrimaryVehicleSubgroup> @@ -423,7 +408,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">16.61045</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32SD</PrimaryVehicleSubgroup> @@ -437,7 +421,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">10.88604</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32SD</PrimaryVehicleSubgroup> @@ -451,7 +434,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">12.24260</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32SD</PrimaryVehicleSubgroup> @@ -465,7 +447,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">8.63290</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32SD</PrimaryVehicleSubgroup> @@ -479,7 +460,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">9.09409</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32DD</PrimaryVehicleSubgroup> @@ -493,7 +473,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">11.25244</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32DD</PrimaryVehicleSubgroup> @@ -507,7 +486,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">12.91147</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32DD</PrimaryVehicleSubgroup> @@ -521,7 +499,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">9.09497</EnergyConsumption> </Fuel> - </Result> <Result status="success"> <PrimaryVehicleSubgroup>P32DD</PrimaryVehicleSubgroup> @@ -535,7 +512,6 @@ <Fuel type="NG CI"> <EnergyConsumption unit="MJ/km">9.65550</EnergyConsumption> </Fuel> - </Result> </Results> <ApplicationInformation> diff --git a/VectoMockup/VectoMockup/Ninject/CIFMockupModule.cs b/VectoMockup/VectoMockup/Ninject/CIFMockupModule.cs index 80dc0573315abdb38d7c46e0f7c9b8963e40b676..3e1076da0e757208389513c788ac317f2f3d66c7 100644 --- a/VectoMockup/VectoMockup/Ninject/CIFMockupModule.cs +++ b/VectoMockup/VectoMockup/Ninject/CIFMockupModule.cs @@ -153,6 +153,11 @@ namespace TUGraz.VectoMockup.Ninject return _cifFactory.GetPEV_IEPC_CompletedBusVehicleType(); } + public IXmlTypeWriter GetConventional_SingleBusVehicleType() + { + return _cifFactory.GetConventional_SingleBusVehicleType(); + } + public IXmlTypeWriter GetExemptedCompletedBusVehicleType() { @@ -279,6 +284,16 @@ namespace TUGraz.VectoMockup.Ninject return _cifFactory.GetGeneralVehicleSequenceGroupWriterCompletedBus(); } + public IReportOutputGroup GetConventionalSingleBusAuxGroup() + { + return _cifFactory.GetConventionalSingleBusAuxGroup(); + } + + public IReportOutputGroup GetSingleBusVehicleTypeGroup() + { + return _cifFactory.GetSingleBusVehicleTypeGroup(); + } + public ICIFAdasType GetConventionalADASType() { return _cifFactory.GetConventionalADASType();