diff --git a/HashingCmd/HashingCmd.csproj b/HashingCmd/HashingCmd.csproj index 4868200609d2647ab12ce9343eb55ce07c4e78c2..c9d59a06e4cfe45615e3a218db9bb9a58b1b90fd 100644 --- a/HashingCmd/HashingCmd.csproj +++ b/HashingCmd/HashingCmd.csproj @@ -6,7 +6,7 @@ <RootNamespace>HashingCmd</RootNamespace> <AssemblyName>hashingcmd</AssemblyName> - <TargetFrameworks>net45;net48;net6.0</TargetFrameworks> + <TargetFrameworks>net45;net48;net5.0</TargetFrameworks> <DefineConstants /> <OutputType>Exe</OutputType> </PropertyGroup> diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index 80c3048ca9208e3e6a992e75997d868f19c94a9c..4875a10c693447aea85b047131b6b2c345f33b46 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -8,7 +8,7 @@ <OptionStrict>On</OptionStrict> <UseWindowsForms>true</UseWindowsForms> <MyType>WindowsForms</MyType> - <TargetFrameworks>net6.0-windows</TargetFrameworks> + <TargetFrameworks>net48</TargetFrameworks> <TargetFrameworks Condition="'$(Configuration)' == 'Release'">net45;net48;net6.0-windows</TargetFrameworks> <DefineTrace>false</DefineTrace> <DefineConstants /> diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index cf22747ae4f9c6c49c51144aab4d1303f6de176f..ea6328192c054ac5be843a0f33a602220e300a11 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -484,6 +484,12 @@ namespace TUGraz.VectoCommon.InputData new IList<ElectricMachineEntry<IElectricMotorEngineeringInputData>> Entries { get; } } + + public interface IIEPCEngineeringInputData : IIEPCDeclarationInputData + { + double OverloadRecoveryFactor { get; } + } + public interface IElectricStorageEngineeringInputData : IElectricStorageDeclarationInputData { diff --git a/VectoCommon/VectoCommon/VectoCommon.csproj b/VectoCommon/VectoCommon/VectoCommon.csproj index 157a10ad21b5f0c50a7fbbe0aeff1af3af72eb44..ed662b4f867780a517523d66324d9280a8355bb9 100644 --- a/VectoCommon/VectoCommon/VectoCommon.csproj +++ b/VectoCommon/VectoCommon/VectoCommon.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <RootNamespace>TUGraz.VectoCommon</RootNamespace> <AssemblyName>VectoCommon</AssemblyName> - <TargetFrameworks>net45;net48;net6.0</TargetFrameworks> + <TargetFrameworks>net45;net48;net5.0</TargetFrameworks> <DefineConstants /> </PropertyGroup> diff --git a/VectoCommon/VectoHashing/VectoHashing.csproj b/VectoCommon/VectoHashing/VectoHashing.csproj index f833fa86eb34d4986fa7a4a941b5fefba4267658..344905666b398395a0af7d5efa62775f5ec15b9a 100644 --- a/VectoCommon/VectoHashing/VectoHashing.csproj +++ b/VectoCommon/VectoHashing/VectoHashing.csproj @@ -6,7 +6,7 @@ <RootNamespace>TUGraz.VectoHashing</RootNamespace> <AssemblyName>VectoHashing</AssemblyName> - <TargetFrameworks>net45;net48;net6.0</TargetFrameworks> + <TargetFrameworks>net45;net48</TargetFrameworks> <DefineConstants /> </PropertyGroup> diff --git a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj index 762bdaa894b986a0b04bd057a1156e6ec08b296f..fea05be9f6d088f78ed5b9d67418c9daca099923 100644 --- a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj +++ b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <RootNamespace>VectoHashingTest</RootNamespace> <AssemblyName>VectoHashingTest</AssemblyName> - <TargetFrameworks>net6.0</TargetFrameworks> + <TargetFrameworks>net5.0</TargetFrameworks> <DefineConstants /> </PropertyGroup> diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index b12fffd2d0d04bfce81c117c2bb58f13e9c90136..c1290de9f64efe895a30aff06448a4c3b040bd8e 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <RootNamespace>TUGraz.VectoCore</RootNamespace> <AssemblyName>VectoCore</AssemblyName> - <TargetFrameworks>net45;net48;net6.0</TargetFrameworks> + <TargetFrameworks>net45;net48;net5.0</TargetFrameworks> <DefineConstants /> </PropertyGroup> <ItemGroup> diff --git a/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs b/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs index 4b3029ff706da714b6f01886453b350f3acb3c5d..f08b435f929f79ae34fda2b01f0e49d3d3095030 100644 --- a/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs +++ b/VectoCore/VectoCoreTest/Integration/BatteryElectric/BatteryElectricTest.cs @@ -28,7 +28,6 @@ using TUGraz.VectoCore.OutputData.FileIO; using TUGraz.VectoCore.Tests.Models.SimulationComponentData; using TUGraz.VectoCore.Tests.Utils; using TUGraz.VectoCore.Utils; -using static System.Formats.Asn1.AsnWriter; using ElectricSystem = TUGraz.VectoCore.Models.SimulationComponent.ElectricSystem; diff --git a/VectoCore/VectoCoreTest/TestData/Hybrids/IEPC/GenericIEPC.viepc b/VectoCore/VectoCoreTest/TestData/Hybrids/IEPC/GenericIEPC.viepc new file mode 100644 index 0000000000000000000000000000000000000000..1564766f2cb4e71cf70b6a0e1110f4dc7ffc682d --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/Hybrids/IEPC/GenericIEPC.viepc @@ -0,0 +1,70 @@ +{ + "Header": { + "CreatedBy": " ()", + "Date": "2016-10-13T08:54:28.7387223Z", + "AppVersion": "3", + "FileVersion": 1 + }, + "Body": { + "SavedInDeclMode": false, + "Model": "Generic IEPC", + "Inertia": 0.15, + "DifferentialIncluded": false, + "DesignTypeWheelMotor": false, + "NrOfDesignTypeWheelMotorMeasured": 1, + "ThermalOverloadRecoveryFactor": 0.9 + "Gears": [ + { + "Ratio": 3.2, + "MaxOutShaftTorque": 10000, + "MaxOutShaftSpeed": 5000 + }, + { + "Ratio": 1.6, + "MaxOutShaftTorque": 10000, + "MaxOutShaftSpeed": 5000 + } + { + "Ratio": 1.6, + "MaxOutShaftTorque": 10000, + "MaxOutShaftSpeed": 5000 + } + ] + "VoltageLevels" [ + { + "Voltage": 400, + "ContinuousTorque": 200, + "ContinuoursTorqueSpeed": 2000 + "OverloadTorque": 500, + "OverloadTorqueSpeed": 2000, + "OverloadTime": 60, + "FullLoadCurve": "GenericIEPC.viepcp" + "PowerMaps": { + "1": "PowerMap1.viepco", + "2": "PowerMap1.viepco", + "3": "PowerMap1.viepco", + } + }, + { + "Voltage": 800, + "ContinuousTorque": 200, + "ContinuoursTorqueSpeed": 2000 + "OverloadTorque": 500, + "OverloadTorqueSpeed": 2000, + "OverloadTime": 60, + "FullLoadCurve": "GenericIEPC.viepcp" + "PowerMaps": { + "1": "PowerMap1.viepco", + "2": "PowerMap1.viepco", + "3": "PowerMap1.viepco", + } + } + ] + + "DragCurves": { + "1": "GenericDrag.viepcd", + "2": "GenericDrag.viepcd", + "3": "GenericDrag.viepcd", + }, + } +} \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Utils/GraphWriter.cs b/VectoCore/VectoCoreTest/Utils/GraphWriter.cs index 138d96bcf74b4d9713ce31198f6b4bded6e8d473..401406af8536025b319b374e57d8a4a98e414357 100644 --- a/VectoCore/VectoCoreTest/Utils/GraphWriter.cs +++ b/VectoCore/VectoCoreTest/Utils/GraphWriter.cs @@ -387,8 +387,14 @@ namespace TUGraz.VectoCore.Tests.Utils .ToArray(); } - private static double[] LoadDataMapped(DataTable modDataV3, string field, Dictionary<string, double> mapping) => - modDataV3.Rows.Cast<DataRow>().Select(x => mapping.GetValueOrDefault(((string)x[field]), double.NaN)).ToArray(); + //private static double[] LoadDataMapped(DataTable modDataV3, string field, Dictionary<string, double> mapping) => + // modDataV3.Rows.Cast<DataRow>().Select(x => mapping.GetValueOrDefault(((string)x[field]), double.NaN)).ToArray(); + private static double[] LoadDataMapped(DataTable modDataV3, string field, Dictionary<string, double> mapping) + { + return (from x in modDataV3.Rows.Cast<DataRow>() + let val = x.Field<string>(field) + select mapping.ContainsKey(val) ? mapping[val] : double.NaN).ToArray(); + } private static void AlignChart(Chart chart, string chartToAlign, string chartToAlignWith) { diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index 2d2271a7187577126581344c79abc78d16ffefad..39ee394acaeccc9c0af291b74513dccf351045f1 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -2,7 +2,7 @@ <PropertyGroup> <RootNamespace>TUGraz.VectoCore.Tests</RootNamespace> <AssemblyName>VectoCoreTest</AssemblyName> - <TargetFrameworks>net6.0</TargetFrameworks> + <TargetFramework>net48</TargetFramework> <DefineConstants /> </PropertyGroup> @@ -24,4 +24,11 @@ <None Include="TestData\**" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> + <ItemGroup> + <Reference Include="System.Windows.Forms"> + <HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll</HintPath> + </Reference> + <Reference Include="System.Windows.Forms.DataVisualization" /> + </ItemGroup> + </Project> \ No newline at end of file