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

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

cleanup: remove no longer needed files

parent e3402ec8
No related branches found
No related tags found
No related merge requests found
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
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
......@@ -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.
......
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