From 47faead44f2c753ed420592c58b6b48b3a606f9d Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Tue, 14 Jun 2016 12:24:35 +0200 Subject: [PATCH] comments and double-equals --- .../Models/SimulationComponent/Data/VehicleData.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs index 8ceece580b..aca8f710a0 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/VehicleData.cs @@ -41,6 +41,9 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.Models.SimulationComponent.Data { + /// <summary> + /// Data Class for the Vehicle + /// </summary> [CustomValidation(typeof(VehicleData), "ValidateVehicleData")] public class VehicleData : SimulationComponentData { @@ -52,9 +55,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data private List<Axle> _axleData; - /// <summary> - /// Set the properties for all axles of the vehicle - /// </summary> [ValidateObject] public List<Axle> AxleData { @@ -85,7 +85,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data public KilogramSquareMeter WheelsInertia { get; internal set; } - public string Rim { get; internal set; } [Required, SIRange(0, 1E12)] @@ -126,7 +125,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data foreach (var axle in _axleData) { var nrWheels = axle.TwinTyres ? 4 : 2; var baseValue = (axle.AxleWeightShare * TotalVehicleWeight() * g / axle.TyreTestLoad / nrWheels).Value(); - if (baseValue == 0) { + if (baseValue.IsEqual(0)) { throw new VectoSimulationException( "Axle Roll Resistance Coefficient could not be calculated. One of the values is 0: AxleWeightShare: {0}, TotalVehicleWeight: {1}, TyreTestLoad: {2}, nrWheels: {3}", axle.AxleWeightShare, TotalVehicleWeight(), axle.TyreTestLoad, nrWheels); -- GitLab