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

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

update repo

parent 6424388c
No related branches found
No related tags found
No related merge requests found
Showing
with 159 additions and 2 deletions
......@@ -686,7 +686,11 @@ Public Class DummyVehicle
Public Property PTOTransmissionInputData As IPTOTransmissionInputData Implements IVehicleComponentsDeclaration.PTOTransmissionInputData
Public Property IVehicleComponentsEngineering_AxleWheels As IAxlesEngineeringInputData Implements IVehicleComponentsEngineering.AxleWheels
Public Property AxleWheels As IAxlesDeclarationInputData Implements IVehicleComponentsDeclaration.AxleWheels
Public ReadOnly Property IVehicleComponentsEngineering_ElectricStorage As IElectricStorageEngineeringInputData Implements IVehicleComponentsEngineering.ElectricStorage
Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
Public ReadOnly Property ElectricStorage As IElectricStorageDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricStorage
Public ReadOnly Property IVehicleComponentsEngineering_ElectricMachines As IElectricMachinesEngineeringInputData Implements IVehicleComponentsEngineering.ElectricMachines
Public ReadOnly Property ElectricMachines As IElectricMachinesDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricMachines
End Class
......@@ -874,6 +874,8 @@ Public Class MockEngineeringVehicle
Implements IVehicleComponentsEngineering.PTOTransmissionInputData
Public Property AxleWheels As IAxlesEngineeringInputData Implements IVehicleComponentsEngineering.AxleWheels
Public ReadOnly Property ElectricStorage As IElectricStorageEngineeringInputData Implements IVehicleComponentsEngineering.ElectricStorage
Public ReadOnly Property ElectricMachines As IElectricMachinesEngineeringInputData Implements IVehicleComponentsEngineering.ElectricMachines
End Class
Public Class MockJobInputData
......
......@@ -30,4 +30,6 @@ Public Class MockComponents
Public Property AxleWheels As IAxlesDeclarationInputData Implements IVehicleComponentsDeclaration.AxleWheels
Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
Public ReadOnly Property ElectricStorage As IElectricStorageDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricStorage
Public ReadOnly Property ElectricMachines As IElectricMachinesDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricMachines
End Class
\ No newline at end of file
......@@ -696,6 +696,11 @@ Public Class Vehicle
End Get
End Property
Public ReadOnly Property ElectricStorage As IElectricStorageEngineeringInputData Implements IVehicleComponentsEngineering.ElectricStorage
Public ReadOnly Property IVehicleComponentsDeclaration_ElectricMachines As IElectricMachinesDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricMachines
Public ReadOnly Property IVehicleComponentsDeclaration_ElectricStorage As IElectricStorageDeclarationInputData Implements IVehicleComponentsDeclaration.ElectricStorage
Public ReadOnly Property ElectricMachines As IElectricMachinesEngineeringInputData Implements IVehicleComponentsEngineering.ElectricMachines
Public ReadOnly Property BusAuxiliaries As IBusAuxiliariesDeclarationData Implements IVehicleComponentsDeclaration.BusAuxiliaries
Public ReadOnly Property VocationalVehicle As Boolean Implements IVehicleDeclarationInputData.VocationalVehicle
......
......@@ -34,6 +34,7 @@ using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using NLog.Filters;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
......@@ -211,6 +212,10 @@ namespace TUGraz.VectoCommon.InputData
IAxlesDeclarationInputData AxleWheels { get; }
IBusAuxiliariesDeclarationData BusAuxiliaries { get; }
IElectricStorageDeclarationInputData ElectricStorage { get; }
IElectricMachinesDeclarationInputData ElectricMachines { get; }
}
public interface IAxlesDeclarationInputData
......@@ -662,6 +667,53 @@ namespace TUGraz.VectoCommon.InputData
IList<string> Technology { get; }
}
public interface IElectricMotorDeclarationInputData : IComponentInputData
{
TableData FullLoadCurve { get; }
TableData EfficiencyMap { get; }
KilogramSquareMeter Inertia { get; }
}
public interface IElectricMachinesDeclarationInputData
{
IList<ElectricMachineEntry<IElectricMotorDeclarationInputData>> Entries { get; }
}
public class ElectricMachineEntry<T> where T : IElectricMotorDeclarationInputData
{
public T ElectricMachine { get; set; }
public int Count { get; set; }
public PowertrainPosition Position { get; set; }
}
public interface IElectricStorageDeclarationInputData
{
IBatteryPackDeclarationInputData BatteryPack { get; }
int Count { get; }
}
public interface IBatteryPackDeclarationInputData : IComponentInputData
{
double MinSOC { get; }
double MaxSOC { get; }
AmpereSecond Capacity { get; }
Ohm InternalResistance { get; }
TableData CellVoltage { get; }
Ampere MaxCurrent { get; }
}
public interface ITorqueLimitInputData
{
int Gear { get; }
......
......@@ -378,9 +378,9 @@ namespace TUGraz.VectoCommon.InputData
}
public interface IElectricMachinesEngineeringInputData
public interface IElectricMachinesEngineeringInputData : IElectricMachinesDeclarationInputData
{
IList<ElectricMachineEntry<IElectricMotorEngineeringInputData>> Entries { get; }
new IList<ElectricMachineEntry<IElectricMotorEngineeringInputData>> Entries { get; }
}
public interface IElectricStorageEngineeringInputData : IElectricStorageDeclarationInputData
......
......@@ -1045,6 +1045,20 @@ namespace TUGraz.VectoCommon.Utils
}
}
public class AmpereSecond : SIBase<AmpereSecond>
{
private static readonly int[] Units = { 0, 0, 1, 1, 0, 0, 0 };
private AmpereSecond(double val) : base(val, Units) { }
public override string UnitString { get { return "As"; } }
public static Ampere operator /(AmpereSecond ampereSecond, Second t)
{
return SIBase<Ampere>.Create(ampereSecond.Value() / t.Value());
}
}
/// <summary>
/// SI Class for Amperer [V].
/// V = kgm^2/As^2
......@@ -1065,6 +1079,25 @@ namespace TUGraz.VectoCommon.Utils
{
return SIBase<Ampere>.Create(watt.Value() / volt.Value());
}
public static Ohm operator /(Volt volt, Ampere current)
{
return SIBase<Ohm>.Create(volt.Value() / current.Value());
}
public static Ampere operator /(Volt volt, Ohm r)
{
return SIBase<Ampere>.Create(volt.Value() / r.Value());
}
}
public class Ohm : SIBase<Ohm>
{
private static readonly int[] Units = { 1, 2, -3, -2, 0, 0, 0 };
private Ohm(double val) : base(val, Units) { }
public override string UnitString { get { return "Ω"; } }
}
public class VolumePerMeter : SIBase<VolumePerMeter>
......
......@@ -78,6 +78,7 @@
<Compile Include="Hashing\VectoComponents.cs" />
<Compile Include="InputData\DataSourceType.cs" />
<Compile Include="InputData\DigestData.cs" />
<Compile Include="Models\PowertrainPosition.cs" />
<Compile Include="InputData\TableData.cs">
<SubType>Component</SubType>
</Compile>
......
......@@ -46,6 +46,31 @@ using TUGraz.VectoCore.Models.Declaration;
namespace TUGraz.VectoCore.InputData.FileIO.JSON
{
public class JSONVehicleDataV10 : JSONVehicleDataV9
{
public JSONVehicleDataV10(JObject data, string fileName, IJSONVehicleComponents job, bool tolerateMissing = false) :
base(data, fileName, job, tolerateMissing) { }
#region Overrides of JSONVehicleDataV7
protected override IElectricMachinesEngineeringInputData GetElectricMachines()
{
// TODO!
throw new NotImplementedException();
}
protected override IElectricStorageEngineeringInputData GetElectricStorage()
{
// TODO!
throw new NotImplementedException();
}
#endregion
}
// ###################################################################
// ###################################################################
public class JSONVehicleDataV9 : JSONVehicleDataV7, IBusAuxiliariesDeclarationData, IElectricSupplyDeclarationData,
IElectricConsumersDeclarationData, IPneumaticSupplyDeclarationData, IPneumaticConsumersDeclarationData,
IHVACBusAuxiliariesDeclarationData
......
......@@ -91,6 +91,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
}
public virtual IBusAuxiliariesDeclarationData BusAuxiliaries { get { return null; } }
public virtual IElectricStorageDeclarationInputData ElectricStorage { get { return null; } }
public virtual IElectricMachinesDeclarationInputData ElectricMachines { get { return null; } }
#endregion
......
......@@ -89,6 +89,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Engineering.DataProvider
get { return _axleWheels ?? (_axleWheels = ComponentReader.AxlesEngineeringInputData); }
}
public virtual IElectricStorageEngineeringInputData ElectricStorage { get { return null; } }
public virtual IElectricMachinesEngineeringInputData ElectricMachines { get { return null; } }
#endregion
#region Implementation of IXMLResource
......
......@@ -73,6 +73,8 @@ namespace TUGraz.VectoCore.Tests.Utils {
public IPTOTransmissionInputData PTOTransmissionInputData { get; set; }
public IAxlesDeclarationInputData AxleWheels { get; set; }
public IBusAuxiliariesDeclarationData BusAuxiliaries { get; set; }
public IElectricStorageDeclarationInputData ElectricStorage { get; set; }
public IElectricMachinesDeclarationInputData ElectricMachines { get; set; }
#endregion
}
......@@ -161,6 +163,8 @@ namespace TUGraz.VectoCore.Tests.Utils {
public IRetarderInputData RetarderInputData { get; set; }
public IPTOTransmissionInputData PTOTransmissionInputData { get; set; }
public IAxlesEngineeringInputData AxleWheels { get; set; }
public IElectricStorageEngineeringInputData ElectricStorage { get; set; }
public IElectricMachinesEngineeringInputData ElectricMachines { get; set; }
#endregion
}
......
......@@ -294,6 +294,30 @@
<None Include="TestData\Generic Vehicles\Engineering Mode\HeavyBusPrimary\HeavyBusPrimary_DECL.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\Battery\GenericBattery.vbat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\Battery\GenericBatteryLarge.vbat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericEMotor.vem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericEMotor.vemp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericEMotor240kW.vem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericEMotor240kW.vemp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericMap.vemo">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Hybrids\ElectricMotor\GenericMap240kW.vemo">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Integration\Buses\SingleBus.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
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