diff --git a/VectoCore/Models/Connector/Ports/ITnOutPort.cs b/VectoCore/Models/Connector/Ports/ITnOutPort.cs deleted file mode 100644 index 66c250afedefd66af7f872b0a0f67ebe1c419590..0000000000000000000000000000000000000000 --- a/VectoCore/Models/Connector/Ports/ITnOutPort.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.Connector.Ports -{ - public interface ITnOutPort : ITnPort, IOutPort - { - /// <summary> - /// Requests the Outport with the given torque [Nm] and angularVelocity [rad/s]. - /// </summary> - /// <param name="absTime">[s]</param> - /// <param name="dt">[s]</param> - /// <param name="torque">[Nm]</param> - /// <param name="angularVelocity">[rad/s]</param> - IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond angularVelocity); - } -} \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs b/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs deleted file mode 100644 index af2c8e0e53b49c08a6d18eb29feea0e39f708a31..0000000000000000000000000000000000000000 --- a/VectoCore/Models/SimulationComponent/Factories/EngineeringModeFactory.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.IO; -using System.Linq; -using Newtonsoft.Json; -using TUGraz.VectoCore.Exceptions; -using TUGraz.VectoCore.FileIO; -using TUGraz.VectoCore.Models.Declaration; -using TUGraz.VectoCore.Models.SimulationComponent.Data; -using TUGraz.VectoCore.Utils; - -namespace TUGraz.VectoCore.Models.SimulationComponent.Factories -{ - public class EngineeringModeFactory : InputFileReader - { - protected static EngineeringModeFactory _instance; - - public static EngineeringModeFactory Instance() - { - return _instance ?? (_instance = new EngineeringModeFactory()); - } - - private void CheckEngineeringMode(string fileName, VersionInfo fileInfo) - { - if (fileInfo.SavedInDeclarationMode) { - Log.WarnFormat("File {0} was saved in Declaration Mode but is used for Engineering Mode!", fileName); - } - } - - public VehicleData CreateVehicleData(string fileName) - { - var json = File.ReadAllText(fileName); - var fileInfo = GetFileVersion(json); - CheckEngineeringMode(fileName, fileInfo); - - switch (fileInfo.Version) { - case 5: - var data = JsonConvert.DeserializeObject<VehicleFileV5Engineering>(json); - return CreateVehicleData(Path.GetDirectoryName(fileName), data.Body); - default: - throw new UnsupportedFileVersionException(fileName, fileInfo.Version); - } - } - - - protected VehicleData CreateVehicleData(string basePath, VehicleFileV5Engineering.DataBodyEng data) - { - return new VehicleData { - BasePath = basePath, - SavedInDeclarationMode = data.SavedInDeclarationMode, - VehicleCategory = data.VehicleCategory(), - CurbWeight = data.CurbWeight.SI<Kilogram>(), - CurbWeigthExtra = data.CurbWeightExtra.SI<Kilogram>(), - Loading = data.Loading.SI<Kilogram>(), - GrossVehicleMassRating = data.GrossVehicleMassRating.SI().Kilo.Kilo.Gramm.Cast<Kilogram>(), - DragCoefficient = data.DragCoefficient, - CrossSectionArea = data.CrossSectionArea.SI<SquareMeter>(), - DragCoefficientRigidTruck = data.DragCoefficientRigidTruck, - CrossSectionAreaRigidTruck = data.CrossSectionAreaRigidTruck.SI<SquareMeter>(), - DynamicTyreRadius = data.DynamicTyreRadius.SI().Milli.Meter.Cast<Meter>(), - // .SI<Meter>(), - Rim = data.RimStr, - Retarder = new RetarderData(data.Retarder, basePath), - AxleData = data.AxleConfig.Axles.Select(axle => new Axle { - Inertia = axle.Inertia.SI<KilogramSquareMeter>(), - TwinTyres = axle.TwinTyres, - RollResistanceCoefficient = axle.RollResistanceCoefficient, - AxleWeightShare = axle.AxleWeightShare, - TyreTestLoad = axle.TyreTestLoad.SI<Newton>() - }).ToList() - }; - } - } -} \ No newline at end of file diff --git a/VectoCore/VectoCore.csproj b/VectoCore/VectoCore.csproj index c61527e774ef8e409942450c1c8cf4294cd71182..92de436e0ff4710191ffb3fec8ead2e7eb3ea49e 100644 --- a/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore.csproj @@ -260,8 +260,10 @@ <EmbeddedResource Include="Resources\Declaration\VAUX\PS-Table.csv" /> <EmbeddedResource Include="Resources\Declaration\VAUX\SP-Table.csv" /> <EmbeddedResource Include="Resources\Declaration\VAUX\SP-Tech.csv" /> + <EmbeddedResource Include="Resources\Declaration\DefaultTC.vtcc" /> <None Include="Resources\Declaration\VCDV\parameters.csv" /> <EmbeddedResource Include="Resources\Declaration\WHTC-Weighting-Factors.csv" /> + <EmbeddedResource Include="Resources\Declaration\WHTC.csv" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it.