Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 806c95fe authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added HEV-S medium lorry s2 to reader

parent e6a69348
No related branches found
No related tags found
No related merge requests found
......@@ -1228,7 +1228,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHEVPrimaryBusAMTPxDataProviderV210 : XMLDeclarationHEVPxHeavyLorryDataProviderV210
public class XMLDeclarationHEVPrimaryBusAMTPxDataProviderV210 : XMLDeclarationHEVPxMediumLorryDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_HEV-Px_PrimaryBusDeclarationType";
......@@ -1237,14 +1237,6 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public XMLDeclarationHEVPrimaryBusAMTPxDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
: base(jobData, xmlNode, sourceFile) { }
#region Overrides of XMLDeclarationVehicleDataProviderV10
public override IPTOTransmissionInputData PTOTransmissionInputData => null;
public override XmlElement PTONode => null;
#endregion
}
// ---------------------------------------------------------------------------------------
......@@ -1272,4 +1264,19 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHEVSxMediumLorryDataProviderV210 : XMLDeclarationHEVPxMediumLorryDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_HEV-Sx_MediumLorryDeclarationType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationHEVSxMediumLorryDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
: base(jobData, xmlNode, sourceFile) { }
}
// ---------------------------------------------------------------------------------------
}
\ No newline at end of file
......@@ -31,6 +31,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationHEVSxHeavyLorryDataProviderV210>()
.Named(XMLDeclarationHEVSxHeavyLorryDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationHEVSxMediumLorryDataProviderV210>()
.Named(XMLDeclarationHEVSxMediumLorryDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationHEVPxMediumLorryDataProviderV210>()
.Named(XMLDeclarationHEVPxMediumLorryDataProviderV210.QUALIFIED_XSD_TYPE);
......
......@@ -731,7 +731,38 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
[TestCase(@"MediumLorry\HEV-S_mediumLorry_AMT_S2.xml")]
public void TestMediumLorryS3(string jobfile)
{
var filename = Path.Combine(BASE_DIR, jobfile);
var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename));
Assert.NotNull(dataProvider.JobInputData);
var vehicle = dataProvider.JobInputData.Vehicle;
Assert.NotNull(vehicle);
Assert.IsNotNull(vehicle.Components);
Assert.IsNotNull(vehicle.Components.EngineInputData);
Assert.IsNotNull(vehicle.Components.ElectricMachines);
Assert.AreEqual(2, vehicle.Components.ElectricMachines.Entries.Count);
Assert.AreEqual(PowertrainPosition.BatteryElectricE2, vehicle.Components.ElectricMachines.Entries[0].Position);
Assert.AreEqual(PowertrainPosition.GEN, vehicle.Components.ElectricMachines.Entries[1].Position);
Assert.IsNotNull(vehicle.Components.GearboxInputData);
TestTorqueConverter(vehicle);
Assert.IsNotNull(vehicle.Components.AngledriveInputData);
Assert.IsNotNull(vehicle.Components.RetarderInputData);
Assert.IsNotNull(vehicle.Components.AxleGearInputData);
Assert.IsNotNull(vehicle.Components.AxleWheels);
Assert.IsNotNull(vehicle.Components.AuxiliaryInputData);
Assert.IsNull(vehicle.Components.BusAuxiliaries);
Assert.IsNotNull(vehicle.Components.AirdragInputData);
Assert.IsNotNull(vehicle.Components.ElectricStorage);
Assert.IsNull(vehicle.Components.PTOTransmissionInputData);
Assert.IsNotNull(vehicle.CargoVolume);
Assert.IsNotNull(vehicle.TorqueLimits);
Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
#region Test existence of torque converter
private void TestTorqueConverter(IVehicleDeclarationInputData vehicle)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment