Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Verified Commit 9e0ccd80 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge branch 'amdm2/develop' of...

Merge branch 'amdm2/develop' of https://code.europa.eu/vecto/tug-itna/mq_vecto-sim into amdm2/develop
parents 8f033f15 350b6ad6
No related branches found
No related tags found
No related merge requests found
......@@ -323,9 +323,9 @@ namespace TUGraz.VectoCore.Models.Declaration
switch (compressorSize) {
case "Small": return "DEFAULT_1-Cylinder_1-Stage_393ccm.acmp";
case "Medium Supply 1-stage": return "DEFAULT_1-Cylinder_1-Stage_393ccm.acmp";
case "Medium Supply 2-stage": return "DEFAULT_2-Cylinder_1-Stage_650ccm.acmp";
case "Large Supply 1-stage": return "DEFAULT_2-Cylinder_2-Stage_398ccm.acmp";
case "Large Supply 2-stage": return "DEFAULT_3-Cylinder_2-Stage_598ccm.acmp";
case "Medium Supply 2-stage": return "DEFAULT_2-Cylinder_2-Stage_398ccm.acmp";
case "Large Supply 1-stage": return "DEFAULT_2-Cylinder_1-Stage_650ccm.acmp";
case "Large Supply 2-stage": return "DEFAULT_3-Cylinder_2-Stage_598ccm.acmp";
//case "electrically": return "DEFAULT_electrically.acmp";
default: throw new ArgumentException($"unknown compressor size {compressorSize}", compressorSize);
}
......
......@@ -1151,7 +1151,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
IElectricMotor em = _PWheelBEVBuilders[position].Invoke(data, container, es, powertrain);
var dcdc = new DCDCConverter(container, data.BusAuxiliaries.ElectricalUserInputsConfig.DCDCEfficiency);
var dcdc = new DCDCConverter(container, GetDCDCEfficiency(data));
if (data.BusAuxiliaries != null) {
AddBEVBusAuxiliaries(data, container, es, em,dcdc);
}
......@@ -1311,7 +1311,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
IElectricMotor em = _MeasuredSpeedBEVBuilders[position].Invoke(data, container, es, powertrain);
var dcdc = new DCDCConverter(container, data.BusAuxiliaries.ElectricalUserInputsConfig.DCDCEfficiency);
var dcdc = new DCDCConverter(container,GetDCDCEfficiency(data));
if (data.BusAuxiliaries != null) {
AddBEVBusAuxiliaries(data, container, es, em, dcdc);
}
......@@ -1322,6 +1323,13 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
return container;
}
private static double GetDCDCEfficiency(VectoRunData rd)
{
double dcdcEff = rd.BusAuxiliaries?.ElectricalUserInputsConfig?.DCDCEfficiency ?? rd.DCDCData?.DCDCEfficiency ?? 0;
return dcdcEff;
}
private static IElectricMotor BuildMeasuredSpeedForIEPC(VectoRunData data, VehicleContainer container, ElectricSystem es, IPowerTrainComponent powertrain)
{
var ctl = new BatteryElectricMotorController(container, es);
......@@ -1465,7 +1473,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
new ATClutchInfo(container);
new DummyEngineInfo(container);
var dcdc = new DCDCConverter(container, data.BusAuxiliaries.ElectricalUserInputsConfig.DCDCEfficiency);
var dcdc = new DCDCConverter(container, GetDCDCEfficiency(data));
if (data.BusAuxiliaries != null) {
AddBEVBusAuxiliaries(data, container, es, em, dcdc);
}
......@@ -1511,7 +1519,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
new DummyAxleGearInfo(container);
}
var dcdc = new DCDCConverter(container, data.BusAuxiliaries.ElectricalUserInputsConfig.DCDCEfficiency);
var dcdc = new DCDCConverter(container, GetDCDCEfficiency(data));
if (data.BusAuxiliaries != null) {
AddBEVBusAuxiliaries(data, container, es, em, dcdc);
}
......

#define singlethreaded
//#define singlethreaded
using System.Collections.Immutable;
using System.IO;
......
......@@ -67,8 +67,7 @@ namespace TUGraz.VectoCore.Tests.XML
//TestCase(@"CompletedBus/HEV_completedBus_1.xml"),
//TestCase(@"CompletedBus/IEPC_completedBus_1.xml"),
//TestCase(@"CompletedBus/PEV_completedBus_1.xml"),
TestCase(@"ExemptedVehicles/exempted_completedBus_input_full.xml"),
TestCase(@"ExemptedVehicles/exempted_completedBus_input_only_mandatory_entries.xml"),
TestCase(@"ExemptedVehicles/exempted_heavyLorry.xml"),
TestCase(@"ExemptedVehicles/exempted_mediumLorry.xml"),
TestCase(@"ExemptedVehicles/exempted_primaryBus.xml"),
......@@ -106,6 +105,22 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.IsTrue(busAux.ElectricConsumers.BrakelightsLED);
}
[TestCase(@"ExemptedVehicles/exempted_completedBus_input_full.xml"),
TestCase(@"ExemptedVehicles/exempted_completedBus_input_only_mandatory_entries.xml")]
public void TestReadingExemptedCompletedBus_V24(string jobFile)
{
var filename = Path.Combine(BASE_DIR, jobFile);
var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename));
Assert.NotNull(dataProvider);
Assert.NotNull(dataProvider.JobInputData);
Assert.NotNull(dataProvider.JobInputData.Vehicle);
var job = dataProvider.JobInputData;
var veh = dataProvider.JobInputData.Vehicle;
Assert.IsTrue(veh.ExemptedVehicle);
}
public IVectoRun[] ReadDeclarationJob(string jobfile)
{
var filename = Path.Combine(BASE_DIR, jobfile);
......
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