Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 1b42c61b authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding steered axles to input provider, hand over number of steered axles to...

adding steered axles to input provider, hand over number of steered axles to dataadapter aux-method.
parent 7c66d330
No related branches found
No related tags found
No related merge requests found
Showing
with 43 additions and 47 deletions
......@@ -7,36 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_full-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_full-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries01-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-exempted_input_only_certain_entries02-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-exempted_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-exempted_input_only_mandatory_entries.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_full-sample.xml" Link="Testdata\vecto_vehicle-stage_input_full-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_certain_entries01-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries01-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_certain_entries02-sample.xml" Link="Testdata\vecto_vehicle-stage_input_only_certain_entries02-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_component_nullable_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_component_nullable_entries.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_mandatory_entries.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_entries.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml" Link="Testdata\vecto_vehicle-stage_input_only_mandatory_standard_value_airdrag.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\AidragComponent.xml" Link="Testdata\AidragComponent.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
......@@ -457,6 +457,8 @@ namespace TUGraz.VectoCommon.InputData
ITyreDeclarationInputData Tyre { get; }
DataSource DataSource { get; }
bool Steered { get; }
}
public interface ITyreDeclarationInputData : IComponentInputData
......
......@@ -52,6 +52,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
protected ITyreDeclarationInputData _tyre;
protected bool? _twinTyre;
protected AxleType? _axleType;
private bool? _steered;
public XMLDeclarationAxleDataProviderV10(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(componentNode, sourceFile)
......@@ -67,6 +68,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public virtual ITyreDeclarationInputData Tyre => _tyre ?? (_tyre = Reader.Tyre);
public bool Steered =>
_steered ?? (_steered = XmlConvert.ToBoolean(GetString(XMLNames.AxleWheels_Axles_Axle_Steered))).Value;
#endregion
......
......@@ -488,7 +488,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
}
public virtual IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData, IBusAuxiliariesDeclarationData busAuxData, MissionType mission, VehicleClass hvdClass, Meter vehicleLength)
public virtual IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxInputData,
IBusAuxiliariesDeclarationData busAuxData, MissionType mission, VehicleClass hvdClass, Meter vehicleLength, int? numSteeredAxles)
{
if (!auxInputData.SavedInDeclarationMode) {
WarnDeclarationMode("AuxiliariesData");
......@@ -520,6 +521,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
aux.ID = Constants.Auxiliaries.IDs.Fan;
break;
case AuxiliaryType.SteeringPump:
if (numSteeredAxles.HasValue && auxData.Technology.Count != numSteeredAxles.Value) {
throw new VectoException($"Number of steering pump technologies does not match number of steered axles ({numSteeredAxles.Value}, {auxData.Technology.Count})");
}
aux.PowerDemand = DeclarationData.SteeringPump.Lookup(mission, hvdClass, auxData.Technology);
aux.ID = Constants.Auxiliaries.IDs.SteeringPump;
break;
......
......@@ -76,12 +76,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
public override IList<VectoRunData.AuxData> CreateAuxiliaryData(
IAuxiliariesDeclarationInputData auxInputData, IBusAuxiliariesDeclarationData busAuxData, MissionType mission,
VehicleClass hdvClass, Meter vehicleLength)
VehicleClass hdvClass, Meter vehicleLength, int? numSteeredAxles)
{
if (auxInputData != null) {
throw new VectoException("Only BusAuxiliaries can be provided as input!");
}
if (numSteeredAxles.HasValue && busAuxData.SteeringPumpTechnology.Count != numSteeredAxles.Value) {
throw new VectoException($"Number of steering pump technologies does not match number of steered axles ({numSteeredAxles.Value}, {busAuxData.SteeringPumpTechnology.Count})");
}
var retVal = new List<VectoRunData.AuxData>();
retVal.Add(
......
......@@ -26,7 +26,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter {
RetarderData CreateRetarderData(IRetarderInputData retarderData);
PTOData CreatePTOTransmissionData(IPTOTransmissionInputData ptoData);
IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData, IBusAuxiliariesDeclarationData busAuxData, MissionType missionType, VehicleClass vehicleClass, Meter vehicleLength);
IList<VectoRunData.AuxData> CreateAuxiliaryData(IAuxiliariesDeclarationInputData auxData, IBusAuxiliariesDeclarationData busAuxData, MissionType missionType, VehicleClass vehicleClass, Meter vehicleLength, int? numSteeredAxles);
AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData);
}
}
\ No newline at end of file
......@@ -215,8 +215,10 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
}
protected VectoRunData CreateVectoRunDataSpecific(Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, int modeIdx) {
protected VectoRunData CreateVectoRunDataSpecific(Mission mission, KeyValuePair<LoadingType, Tuple<Kilogram, double?>> loading, int modeIdx)
{
var cycle = DeclarationData.CyclesCache.GetOrAdd(mission.MissionType, _ => DrivingCycleDataReader.ReadFromStream(mission.CycleFile, CycleType.DistanceBased, "", false));
var numSteeredAxles = PrimaryVehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered);
var simulationRunData = new VectoRunData {
Loading = loading.Key,
......@@ -229,7 +231,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
AxleGearData = _axlegearData,
AngledriveData = _angledriveData,
Aux = DataAdapterSpecific.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData,
PrimaryVehicle.Components.BusAuxiliaries, mission.MissionType, _segmentCompletedBus.VehicleClass, CompletedVehicle.Length),
PrimaryVehicle.Components.BusAuxiliaries, mission.MissionType, _segmentCompletedBus.VehicleClass, CompletedVehicle.Length, numSteeredAxles),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverData,
......@@ -267,7 +269,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
AngledriveData = _angledriveData,
Aux = DataAdapterGeneric.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData,
primaryBusAuxiliaries, mission.MissionType, primarySegment.VehicleClass,
mission.BusParameter.VehicleLength),
mission.BusParameter.VehicleLength, PrimaryVehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverData,
......
......@@ -251,7 +251,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
AxleGearData = _axlegearData,
AngledriveData = _angledriveData,
Aux = DataAdapterSpecific.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData,
PrimaryVehicle.Components.BusAuxiliaries, mission.MissionType, _segmentCompletedBus.VehicleClass, CompletedVehicle.Length),
PrimaryVehicle.Components.BusAuxiliaries, mission.MissionType, _segmentCompletedBus.VehicleClass, CompletedVehicle.Length,
PrimaryVehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverData,
......@@ -290,7 +291,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
AngledriveData = _angledriveData,
Aux = DataAdapterGeneric.CreateAuxiliaryData(PrimaryVehicle.Components.AuxiliaryInputData,
primaryBusAuxiliaries, mission.MissionType, primarySegment.VehicleClass,
mission.BusParameter.VehicleLength),
mission.BusParameter.VehicleLength,
PrimaryVehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverData,
......
......@@ -31,6 +31,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
......@@ -163,7 +164,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
Aux = DataAdapter.CreateAuxiliaryData(
vehicle.Components.AuxiliaryInputData,
vehicle.Components.BusAuxiliaries, mission.MissionType,
_segment.VehicleClass, vehicle.Length),
_segment.VehicleClass, vehicle.Length,
vehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverdata,
......
using System;
using System.Collections.Generic;
using System.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
......@@ -119,7 +120,8 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
Aux = DataAdapter.CreateAuxiliaryData(
vehicle.Components.AuxiliaryInputData,
vehicle.Components.BusAuxiliaries, mission.MissionType, _segment.VehicleClass,
vehicle.Length ?? mission.BusParameter.VehicleLength),
vehicle.Length ?? mission.BusParameter.VehicleLength,
vehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverdata,
......
......@@ -81,7 +81,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
AxleGearData = _axlegearData,
AngledriveData = _angledriveData,
Aux = DataAdapter.CreateAuxiliaryData(vehicle.Components.AuxiliaryInputData,
vehicle.Components.BusAuxiliaries, mission.MissionType, _segment.VehicleClass, vehicle.Length ?? mission.BusParameter.VehicleLength),
vehicle.Components.BusAuxiliaries, mission.MissionType,
_segment.VehicleClass, vehicle.Length ?? mission.BusParameter.VehicleLength,
vehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered)),
Cycle = new DrivingCycleProxy(cycle, mission.MissionType.ToString()),
Retarder = _retarderData,
DriverData = _driverdata,
......
......@@ -119,27 +119,29 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
JobInputData.Vehicle.Components.AuxiliaryInputData,
JobInputData.Vehicle.Components.BusAuxiliaries,
missionType,
Segment.VehicleClass, JobInputData.Vehicle.Length);
Segment.VehicleClass, JobInputData.Vehicle.Length,
JobInputData.Vehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered));
}
protected virtual List<VectoRunData.AuxData> CreateVTPAuxData(IVehicleDeclarationInputData vehicle)
{
var numSteered = vehicle.Components.AxleWheels.AxlesDeclaration.Count(x => x.Steered);
var auxRD = Dao.CreateAuxiliaryData(
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.RegionalDelivery, Segment.VehicleClass, vehicle.Length)
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.RegionalDelivery, Segment.VehicleClass, vehicle.Length, numSteered)
.ToList();
foreach (var entry in auxRD) {
entry.MissionType = MissionType.RegionalDelivery;
}
var auxLH = Dao.CreateAuxiliaryData(
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.LongHaul, Segment.VehicleClass, vehicle.Length)
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.LongHaul, Segment.VehicleClass, vehicle.Length, numSteered)
.ToList();
foreach (var entry in auxLH) {
entry.MissionType = MissionType.LongHaul;
}
var auxUD = Dao.CreateAuxiliaryData(
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.UrbanDelivery, Segment.VehicleClass, vehicle.Length)
vehicle.Components.AuxiliaryInputData, vehicle.Components.BusAuxiliaries, MissionType.UrbanDelivery, Segment.VehicleClass, vehicle.Length, numSteered)
.ToList();
foreach (var entry in auxUD) {
entry.MissionType = MissionType.UrbanDelivery;
......
......@@ -465,7 +465,7 @@ namespace TUGraz.VectoCore.Models.Declaration
public static PerSecond MinEngineSpeedPostUpshift = 0.RPMtoRad();
public static Second ATLookAheadTime = Gearbox.PowershiftShiftTime;
public static Second ATLookAheadTime = 1.5.SI<Second>(); //Gearbox.PowershiftShiftTime;
public static double[] LoadStageThresholdsUp = { 19.7, 36.34, 53.01, 69.68, 86.35 };
public static double[] LoadStageThresoldsDown = { 13.7, 30.34, 47.01, 63.68, 80.35 };
......
Technology , fullyelectric , tubing - Heavy Urban , tubing - Urban , tubing - Suburban , tubing - Interurban , tubing - Coach , axle - Heavy Urban , axle - Urban , axle - Suburban , axle - Interurban , axle - Coach , axle - VerificationTest , tubing - VerificationTest
Fixed displacement , 0 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.0 , 1.0
Fixed displacement with elec. control , 0 , 0.95 , 0.95 , 0.95 , 0.95 , 0.95 , 1.00 , 1.00 , 1.00 , 1.00 , 1.00 , 1.0 , 0.95
Dual displacement , 0 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85
Dual displacement with mech. control , 0 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85
Dual displacement with elec. control , 0 , 0.80 , 0.80 , 0.80 , 0.80 , 0.80 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.85 , 0.8
Variable displacement mech. controlled , 0 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75 , 0.75
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment