Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 47faead4 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

comments and double-equals

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