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

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

started with declaration input data interfaces for bus auxiliaries

parent 1758718e
No related branches found
No related tags found
No related merge requests found
Showing
with 221 additions and 33 deletions
......@@ -608,10 +608,18 @@ Public Class DummyVehicle
Public ReadOnly Property DualFuelVehicle As Boolean Implements IVehicleDeclarationInputData.DualFuelVehicle
Public ReadOnly Property MaxNetPower1 As Watt Implements IVehicleDeclarationInputData.MaxNetPower1
Public ReadOnly Property MaxNetPower2 As Watt Implements IVehicleDeclarationInputData.MaxNetPower2
Public ReadOnly Property RegisteredClass As String Implements IVehicleDeclarationInputData.RegisteredClass
Public ReadOnly Property NuberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NuberOfPassengersUpperDeck
Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
Public ReadOnly Property IVehicleDeclarationInputData_Height As Meter Implements IVehicleDeclarationInputData.Height
Public ReadOnly Property CurbMassExtra As Kilogram Implements IVehicleEngineeringInputData.CurbMassExtra
Public ReadOnly Property Loading As Kilogram Implements IVehicleEngineeringInputData.Loading
Public ReadOnly Property DynamicTyreRadius As Meter Implements IVehicleEngineeringInputData.DynamicTyreRadius
Public ReadOnly Property Height As Meter Implements IVehicleEngineeringInputData.Height
Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
Public ReadOnly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
get
......@@ -639,6 +647,7 @@ Public Class DummyVehicle
Public ReadOnly Property PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsDeclaration.PTOTransmissionInputData
Public ReadOnly Property IVehicleComponentsEngineering_AxleWheels As IAxlesEngineeringInputData Implements IVehicleComponentsEngineering.AxleWheels
Public ReadOnly Property AxleWheels As IAxlesDeclarationInputData Implements IVehicleComponentsDeclaration.AxleWheels
Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
End Class
......@@ -406,13 +406,19 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property Height As Meter Implements IVehicleEngineeringInputData.Height
Public ReadOnly Property LowEntry As Boolean Implements IVehicleDeclarationInputData.LowEntry
Public ReadOnly Property IVehicleDeclarationInputData_Height As Meter Implements IVehicleDeclarationInputData.Height
Public ReadOnly Property Height As Meter Implements IVehicleEngineeringInputData.Height
Get
Return VehicleHeight.SI(Of Meter)()
End Get
End Property
Public ReadOnly Property IVehicleEngineeringInputData_Components As IVehicleComponentsEngineering Implements IVehicleEngineeringInputData.Components
Public ReadOnly Property Length As Meter Implements IVehicleDeclarationInputData.Length
Public ReadOnly Property Width As Meter Implements IVehicleDeclarationInputData.Width
Public ReadOnly Property IVehicleEngineeringInputData_Components As IVehicleComponentsEngineering Implements IVehicleEngineeringInputData.Components
get
Return me
End Get
......@@ -680,7 +686,9 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
Public ReadOnly Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
get
Return DeclarationData.Vehicle.VocationalVehicleDefault
End Get
......@@ -740,7 +748,12 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
Public ReadOnly Property RegisteredClass As String Implements IVehicleDeclarationInputData.RegisteredClass
Public ReadOnly Property NuberOfPassengersUpperDeck As Integer Implements IVehicleDeclarationInputData.NuberOfPassengersUpperDeck
Public ReadOnly Property NumberOfPassengersLowerDeck As Integer Implements IVehicleDeclarationInputData.NumberOfPassengersLowerDeck
Public ReadOnly Property VehicleCode As VehicleCode Implements IVehicleDeclarationInputData.VehicleCode
Public ReadOnly Property Components As IVehicleComponentsDeclaration Implements IVehicleDeclarationInputData.Components
get
Return Me
End Get
......
......@@ -33,6 +33,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Net.NetworkInformation;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
......@@ -156,6 +157,21 @@ namespace TUGraz.VectoCommon.InputData
Watt MaxNetPower2 { get; }
string RegisteredClass { get; }
int NuberOfPassengersUpperDeck { get; }
int NumberOfPassengersLowerDeck { get; }
VehicleCode VehicleCode { get; }
bool LowEntry { get; }
Meter Height { get; }
Meter Length { get; }
Meter Width { get; }
// components
IVehicleComponentsDeclaration Components { get; }
......@@ -185,6 +201,8 @@ namespace TUGraz.VectoCommon.InputData
IAxlesDeclarationInputData AxleWheels { get; }
IBusAuxiliariesDeclarationData BusAuxiliaries { get; }
}
public interface IAxlesDeclarationInputData
......@@ -636,4 +654,100 @@ namespace TUGraz.VectoCommon.InputData
NewtonMeter MaxTorque { get; }
}
public interface IBusAuxiliariesDeclarationData
{
string FanTechnology { get; }
IList<string> SteeringPumpTechnology { get; }
IElectricSupplyDeclarationData ElectricSupply { get; }
IElectricConsumersDeclarationData ElectricConsumers { get; }
IPneumaticSupplyDeclarationData PneumaticSupply { get; }
IPneumaticConsumersDeclarationData PneumaticConsumers { get; }
IHVACBusAuxiliariesDeclarationData HVACAux { get; }
}
public interface IElectricSupplyDeclarationData
{
IList<IAlternatorDeclarationInputData> Alternators { get; }
IResultCardDeclarationInputData ResultCards { get; }
}
public interface IElectricConsumersDeclarationData
{
bool InteriorLightsLED { get; }
bool DayrunninglightsLED { get; }
bool PositionlightsLED { get; }
bool HeadlightsLED { get; }
bool BrakelightsLED { get; }
bool SmartElectrics { get; }
}
public interface IAlternatorDeclarationInputData
{
string Technology { get; }
double Ratio { get; }
}
public interface IResultCardDeclarationInputData
{
IList<IResultCardEntry> Idle { get; }
IList<IResultCardEntry> Traction { get; }
IList<IResultCardEntry> Overrun { get; }
}
public interface IResultCardEntry
{
Ampere Current { get; }
Ampere SmartCurrent { get; }
}
public interface IPneumaticSupplyDeclarationData
{
double Ratio { get; }
string CompressorSize { get; }
}
public interface IPneumaticConsumersDeclarationData
{
ConsumerTechnology AirsuspensionControl { get; }
ConsumerTechnology AdBlueDosing { get; }
ConsumerTechnology DoorDriveTechnology { get; }
}
public interface IHVACBusAuxiliariesDeclarationData
{
int SystemConfiguration { get; }
ACCompressorType CompressorType { get; }
string AuxHeaterPower { get; }
bool DoubleGlasing { get; }
bool HeatPump { get; }
bool AdjustableCoolantThermostat { get; }
bool AdjustableAuxiliaryHeater { get; }
bool EngineWasteGasHeatExchanger { get; }
bool SeparateAirDistributionDucts { get; }
}
}
namespace TUGraz.VectoCommon.Models {
public enum VehicleCode
{
NOT_APPLICABLE,
CA,
CB,
CC,
CD,
CE,
CF,
CG,
CI,
CJ
}
}
\ No newline at end of file
......@@ -109,6 +109,7 @@
<Compile Include="Models\RetarderType.cs" />
<Compile Include="Models\SimulationType.cs" />
<Compile Include="Models\VehicleCategory.cs" />
<Compile Include="Models\VehicleCode.cs" />
<Compile Include="Models\WHRType.cs" />
<Compile Include="OutputData\IOutputFileWriter.cs" />
<Compile Include="OutputData\IOutputPlugin.cs" />
......
......@@ -205,16 +205,23 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return _axleWheelsDecl; }
}
public IBusAuxiliariesDeclarationData BusAuxiliaries { get { return null; } }
public Meter DynamicTyreRadius
{
get { return VehicleData.DynamicTyreRadius; }
}
public bool LowEntry { get; set; }
public Meter Height
{
get { return VehicleData.Height; }
}
public Meter Length { get { return null; } }
public Meter Width { get { return null; } }
IVehicleComponentsEngineering IVehicleEngineeringInputData.Components
{
get { return this; }
......@@ -376,6 +383,11 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return null; }
}
public string RegisteredClass { get { return string.Empty; } }
public int NuberOfPassengersUpperDeck { get { return 0; } }
public int NumberOfPassengersLowerDeck { get { return 0; } }
public VehicleCode VehicleCode { get { return VehicleCode.NOT_APPLICABLE; } }
IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
{
get { return this; }
......
......@@ -155,11 +155,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return Body.GetEx<double>(JsonKeys.Vehicle_DynamicTyreRadius).SI(Unit.SI.Milli.Meter).Cast<Meter>(); }
}
public virtual bool LowEntry { get; set; }
public virtual Meter Height
{
get { return Body["VehicleHeight"] == null ? null : Body.GetEx<double>("VehicleHeight").SI<Meter>(); }
}
public virtual Meter Length { get { return null; } }
public virtual Meter Width { get { return null; } }
IVehicleComponentsEngineering IVehicleEngineeringInputData.Components
{
get { return this; }
......@@ -310,6 +315,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
get { return this; }
}
public virtual IBusAuxiliariesDeclarationData BusAuxiliaries { get { return null; } }
IAxlesDeclarationInputData IVehicleComponentsDeclaration.AxleWheels
{
get { return this; }
......@@ -331,6 +338,10 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
public virtual Watt MaxNetPower1 { get { return null; } }
public virtual Watt MaxNetPower2 { get { return null; } }
public virtual string RegisteredClass { get { return string.Empty; } }
public virtual int NuberOfPassengersUpperDeck { get { return 0; } }
public virtual int NumberOfPassengersLowerDeck { get { return 0; } }
public virtual VehicleCode VehicleCode { get { return VehicleCode.NOT_APPLICABLE; } }
IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
{
......
......@@ -89,6 +89,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
get { return _axleWheels ?? (_axleWheels = ComponentReader.AxlesDeclarationInputData); }
}
public virtual IBusAuxiliariesDeclarationData BusAuxiliaries { get { return null; } }
#endregion
#region Implementation of IXMLVehicleComponentsDeclaration
......
......@@ -267,6 +267,15 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
}
}
public virtual string RegisteredClass { get { return string.Empty; } }
public virtual int NuberOfPassengersUpperDeck { get { return 0; } }
public virtual int NumberOfPassengersLowerDeck { get { return 0; } }
public virtual VehicleCode VehicleCode { get { return VehicleCode.NOT_APPLICABLE; } }
public virtual bool LowEntry { get { return false; } }
public virtual Meter Height { get { return null; } }
public virtual Meter Length { get { return null; } }
public virtual Meter Width { get { return null; } }
public virtual IVehicleComponentsDeclaration Components
{
get { return _components ?? (_components = ComponentReader.ComponentInputData); }
......
using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Linq;
......@@ -162,6 +163,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
get { return null; }
}
public virtual string RegisteredClass { get { return string.Empty;} }
public virtual int NuberOfPassengersUpperDeck { get { return 0; } }
public virtual int NumberOfPassengersLowerDeck { get { return 0; } }
public virtual VehicleCode VehicleCode { get { return VehicleCode.NOT_APPLICABLE; } }
public virtual bool LowEntry { get { return false; } }
public virtual Meter Width { get { return null; } }
IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
{
get { return null; }
......@@ -231,6 +240,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
get { return GetNode("VehicleHeight")?.InnerText.ToDouble().SI<Meter>(); }
}
public virtual Meter Length { get { return null; } }
public IVehicleComponentsEngineering Components
{
get { return _components ?? (_components = ComponentReader.ComponentInputData); }
......
......@@ -121,22 +121,10 @@ namespace TUGraz.VectoCore.OutputData.FileIO
}
//private Dictionary<string,object > SaveHVACUserConfig()
//{
// var hvac = new Dictionary<string, object>();
// hvac["SSMFilePath"] = HvacUserInputsConfig.SSMFilePath;
// hvac["BusDatabasePath"] = HvacUserInputsConfig.BusDatabasePath;
// hvac["SSMDisabled"] = HvacUserInputsConfig.SSMDisabled;
// return hvac;
//}
private static Dictionary<string, object> SavePneumaticUserConfig(IPneumaticUserInputsConfig pneumaticUserCfg, string auxPath)
{
var puData = new Dictionary<string, object>();
//puData["ActuationsMap"] = pneumaticUserCfg.ActuationsMap;
puData["AdBlueDosing"] = pneumaticUserCfg.AdBlueDosing;
puData["AirSuspensionControl"] = pneumaticUserCfg.AirSuspensionControl.ToString();
puData["CompressorGearEfficiency"] = pneumaticUserCfg.CompressorGearEfficiency;
......@@ -158,7 +146,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
paData["AdBlueNIperMinute"] = pneumaticAuxCfg.AdBlueInjection.ConvertToNlPerMin().Value;
paData["AirControlledSuspensionNIperMinute"] = pneumaticAuxCfg.AirControlledSuspension.ConvertToNlPerMin().Value;
paData["BrakingNIperKG"] = pneumaticAuxCfg.Braking.Value();
//paData["BrakingWithRetarderNIperKG"] = pneumaticAuxCfg.BrakingWithRetarderNIperKG.Value();
paData["BreakingPerKneelingNIperKGinMM"] = pneumaticAuxCfg.BreakingWithKneeling.Value() / 1000;
paData["DeadVolBlowOutsPerLitresperHour"] = pneumaticAuxCfg.DeadVolBlowOuts.ConvertToPerHour().Value;
paData["DeadVolumeLitres"] = pneumaticAuxCfg.DeadVolume.Cast<CubicMeter>().ConvertToCubicDeziMeter().Value;
......@@ -177,25 +164,15 @@ namespace TUGraz.VectoCore.OutputData.FileIO
public static bool SaveSSMConfig(ISSMInputs ssmInput, string filePath)
{
var returnValue = true;
//var settings = new JsonSerializerSettings();
//settings.TypeNameHandling = TypeNameHandling.Objects;
// JSON METHOD
try {
//var output = JsonConvert.SerializeObject(this, Formatting.Indented, settings);
//File.WriteAllText(FilePath, output);
var body = new Dictionary<string, object>();
body["SSMDisabled"] = ssmInput.SSMDisabled;
body["SSMInputs"] = SaveGenInputs(ssmInput);
body["TechList"] = SaveTechlist(ssmInput);
JSONInputDataFactory.WriteFile(JToken.FromObject(new Dictionary<string, object>() { { "Header", "AHSM" }, { "Body", body } }), filePath);
} catch (Exception) {
// Nothing to do except return false.
returnValue = false;
}
......@@ -208,7 +185,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
var retVal = new Dictionary<string, object>();
retVal["BC_GFactor"] = ssmInputs.BoundaryConditions.GFactor;
//retVal["BC_PassengerBoundaryTemperature"] = ssmInputs.BoundaryConditions.PassengerBoundaryTemperature.AsDegCelsius;
retVal["BC_HeatingBoundaryTemperature"] = ssmInputs.BoundaryConditions.HeatingBoundaryTemperature.AsDegCelsius;
retVal["BC_CoolingBoundaryTemperature"] = ssmInputs.BoundaryConditions.CoolingBoundaryTemperature.AsDegCelsius;
retVal["BC_HighVentilation"] = ssmInputs.BoundaryConditions.HighVentilation.ConvertToPerHour().Value;
......@@ -220,8 +196,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
retVal["BC_MaxPossibleBenefitFromTechnologyList"] = ssmInputs.BoundaryConditions.MaxPossibleBenefitFromTechnologyList;
retVal["EC_EnviromentalTemperature"] = ssmInputs.EnvironmentalConditions.DefaultConditions.Temperature.AsDegCelsius;
retVal["EC_Solar"] = ssmInputs.EnvironmentalConditions.DefaultConditions.Solar.Value();
//retVal["EC_EnviromentalConditions_BatchFile"] = ssmInputs.EnvironmentalConditions.EnviromentalConditions_BatchFile;
//retVal["EC_EnviromentalConditions_BatchEnabled"] = ssmInputs.EnvironmentalConditions.EnviromentalConditions_BatchEnabled;
retVal["AC_CompressorType"] = ssmInputs.ACSystem.CompressorType.ToString();
retVal["AC_CompressorCapacitykW"] = ssmInputs.ACSystem.CompressorCapacity.ConvertToKiloWatt().Value;
retVal["VEN_VentilationOnDuringHeating"] = ssmInputs.Ventilation.VentilationOnDuringHeating;
......@@ -230,7 +204,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
retVal["VEN_VentilationFlowSettingWhenHeatingAndACInactive"] = ssmInputs.Ventilation.VentilationFlowSettingWhenHeatingAndACInactive;
retVal["VEN_VentilationDuringHeating"] = ssmInputs.Ventilation.VentilationDuringHeating;
retVal["VEN_VentilationDuringCooling"] = ssmInputs.Ventilation.VentilationDuringCooling;
//retVal["AH_EngineWasteHeatkW"] = ssmInputs.AuxHeater.EngineWasteHeatkW.ConvertToKiloWatt().Value;
retVal["AH_FuelFiredHeaterkW"] = ssmInputs.AuxHeater.FuelFiredHeaterPower.ConvertToKiloWatt().Value;
retVal["AH_FuelEnergyToHeatToCoolant"] = ssmInputs.AuxHeater.FuelEnergyToHeatToCoolant;
retVal["AH_CoolantHeatTransferredToAirCabinHeater"] = ssmInputs.AuxHeater.CoolantHeatTransferredToAirCabinHeater;
......@@ -244,7 +217,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
foreach (var line in ssmInputs.Technologies.Items) {
var tmp = new Dictionary<string, object>();
//tmp["Units"] = line.Units;
tmp["Category"] = line.Category;
tmp["BenefitName"] = line.BenefitName;
tmp["LowFloorH"] = line.LowFloorH;
......@@ -260,7 +232,6 @@ namespace TUGraz.VectoCore.OutputData.FileIO
tmp["ActiveVH"] = line.ActiveVH;
tmp["ActiveVV"] = line.ActiveVV;
tmp["ActiveVC"] = line.ActiveVC;
//tmp["LineType"] = line.LineType;
retVal.Add(tmp);
}
......
......@@ -790,6 +790,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<EmbeddedResource Include="Resources\Declaration\Buses\DefaultActuationsMap.APAC" />
<EmbeddedResource Include="Resources\Declaration\Buses\DEFAULT_1-Cylinder_1-Stage_393ccm.ACMP" />
<EmbeddedResource Include="Resources\Declaration\Buses\DEFAULT_2-Cylinder_1-Stage_650ccm.ACMP" />
<EmbeddedResource Include="Resources\Declaration\Buses\DEFAULT_2-Cylinder_2-Stage_398ccm.ACMP" />
<EmbeddedResource Include="Resources\Declaration\Buses\DEFAULT_3-Cylinder_2-Stage_598ccm.ACMP" />
<None Include="Utils\VectoVersionCore.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>VectoVersionCore.cs</LastGenOutput>
......
......@@ -41,6 +41,14 @@ namespace TUGraz.VectoCore.Tests.Utils {
public bool DualFuelVehicle { get; }
public Watt MaxNetPower1 { get; }
public Watt MaxNetPower2 { get; }
public string RegisteredClass { get; set; }
public int NuberOfPassengersUpperDeck { get; set; }
public int NumberOfPassengersLowerDeck { get; set; }
public VehicleCode VehicleCode { get; set; }
public bool LowEntry { get; set; }
public Meter Height { get; set; }
public Meter Length { get; set; }
public Meter Width { get; set; }
public IVehicleComponentsDeclaration Components { get { return this; } }
#endregion
......@@ -57,6 +65,7 @@ namespace TUGraz.VectoCore.Tests.Utils {
public IRetarderInputData RetarderInputData { get; set; }
public IPTOTransmissionInputData PTOTransmissionInputData { get; set; }
public IAxlesDeclarationInputData AxleWheels { get; set; }
public IBusAuxiliariesDeclarationData BusAuxiliaries { get; set; }
#endregion
}
......@@ -84,8 +93,15 @@ namespace TUGraz.VectoCore.Tests.Utils {
public Kilogram CurbMassExtra { get; }
public Kilogram Loading { get; }
public Meter DynamicTyreRadius { get; }
public bool LowEntry { get; set; }
public Meter Height { get; }
public Meter Length { get; set; }
public Meter Width { get; set; }
public Watt MaxNetPower2 { get; }
public string RegisteredClass { get; set; }
public int NuberOfPassengersUpperDeck { get; set; }
public int NumberOfPassengersLowerDeck { get; set; }
public VehicleCode VehicleCode { get; set; }
IVehicleComponentsDeclaration IVehicleDeclarationInputData.Components
{
......
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