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 eb18f34b authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added semitrailer weights

parent 7b157edd
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,13 @@ namespace TUGraz.VectoCore.Models.Declaration
? DeclarationData.StandardWeights.Lookup(row.Field<string>("trailer"))
: DeclarationData.StandardWeights.Empty;
var semiTrailerField = row.Field<string>("semitrailer");
var semiTrailer = !string.IsNullOrWhiteSpace(semiTrailerField)
? DeclarationData.StandardWeights.Lookup(semiTrailerField)
: DeclarationData.StandardWeights.Empty;
trailer += semiTrailer;
// limit gvw to MaxGVW (40t)
var gvw = VectoMath.Min(grossVehicleWeight + trailer.GrossVehicleWeight,
Constants.SimulationSettings.MaximumGrossVehicleWeight);
......
......@@ -29,6 +29,7 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System.CodeDom;
using System.Collections.Generic;
using System.Data;
using System.Linq;
......@@ -49,6 +50,15 @@ namespace TUGraz.VectoCore.Models.Declaration
}
public SquareMeter DeltaCrossWindArea;
public static StandardWeight operator +(StandardWeight first, StandardWeight second)
{
return new StandardWeight {
CurbWeight = first.CurbWeight + second.CurbWeight,
DeltaCrossWindArea = first.DeltaCrossWindArea + second.DeltaCrossWindArea,
GrossVehicleWeight = first.GrossVehicleWeight + second.GrossVehicleWeight
};
}
}
/// <summary>
......
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