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
Verified Commit ca2999ea authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding sanity checks for heatpump type in case of PEV and S-HEV

parent f4fd25af
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ namespace TUGraz.VectoCore.InputData.Impl
public double RollResistanceCoefficient { get; internal set; }
public Newton TyreTestLoad { get; internal set; }
public string FuelEfficiencyClass { get; internal set; }
public KilogramSquareMeter Inertia { get; internal set; }
......
......@@ -281,6 +281,24 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
if (xEVBus && busAux.OtherHeatingTechnology == null) {
throw new VectoException("OtherElectricHeater input parameter is required for xEV vehicles");
}
if (primaryVehicle.ArchitectureID.IsBatteryElectricVehicle() ||
primaryVehicle.ArchitectureID.IsSerialHybridVehicle()) {
var heatpumps = new Dictionary<string, HeatPumpType>() {
{ "Heatpump Driver Compartment - cooling", busAux.HeatPumpTypeCoolingDriverCompartment.Value },
{ "Heatpump Driver Compartment - heating", busAux.HeatPumpTypeHeatingDriverCompartment.Value },
{ "Heatpump Passenger Compartment - cooling", busAux.HeatPumpTypeCoolingPassengerCompartment.Value },
{ "Heatpump Passenger Compartment - heating", busAux.HeatPumpTypeHeatingPassengerCompartment.Value },
};
var errors = new List<string>();
foreach (var entry in heatpumps) {
if (!entry.Value.IsOneOf(HeatPumpType.non_R_744_continuous, HeatPumpType.none, HeatPumpType.not_applicable)) {
errors.Add($"{entry.Key}: must not be mechanically driven for PEV/S-HEV ({entry.Value.ToXML()})");
}
}
throw new VectoException(errors.Join(Environment.NewLine));
}
}
private HeaterType GetElectricHeater(IHVACBusAuxiliariesDeclarationData busAux)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment