diff --git a/VECTO/GUI/EngineForm.Designer.vb b/VECTO/GUI/EngineForm.Designer.vb index 4027908c135b47423e464389ce7e52fffc62c66d..485b7e649d290db06b666d01a67d76af848f8287 100644 --- a/VECTO/GUI/EngineForm.Designer.vb +++ b/VECTO/GUI/EngineForm.Designer.vb @@ -566,6 +566,8 @@ Partial Class EngineForm 'EngineForm ' Me.AcceptButton = Me.ButOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel Me.ClientSize = New System.Drawing.Size(985, 508) Me.Controls.Add(Me.PicBox) diff --git a/VECTO/GUI/GearboxForm.Designer.vb b/VECTO/GUI/GearboxForm.Designer.vb index 4a44a5e1dac6f6ddd5ef692610c1c0b6746bdd58..dbeaadc1a91154d6bd67af4dd56e7dd03592d0fa 100644 --- a/VECTO/GUI/GearboxForm.Designer.vb +++ b/VECTO/GUI/GearboxForm.Designer.vb @@ -1063,6 +1063,8 @@ Partial Class GearboxForm 'GearboxForm ' Me.AcceptButton = Me.ButOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel Me.ClientSize = New System.Drawing.Size(877, 696) Me.Controls.Add(Me.gbTCAccMin) diff --git a/VECTO/GUI/GearboxGearDialog.Designer.vb b/VECTO/GUI/GearboxGearDialog.Designer.vb index fbe25e6bb292faa13dff23473089d9d249d555eb..90380c4d86160c241c5d4a70342d9d3f7af41b19 100644 --- a/VECTO/GUI/GearboxGearDialog.Designer.vb +++ b/VECTO/GUI/GearboxGearDialog.Designer.vb @@ -242,6 +242,8 @@ Partial Class GearboxGearDialog 'GearboxGearDialog ' Me.AcceptButton = Me.OK_Button + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.Cancel_Button Me.ClientSize = New System.Drawing.Size(528, 218) Me.Controls.Add(Me.BtPrevious) diff --git a/VECTO/GUI/GearboxGearDialog.resx b/VECTO/GUI/GearboxGearDialog.resx index 859d7075df62d5435774a8a6d6f3355c4355e97c..21a72f96d8f0532d69796e19264cda2d44036299 100644 --- a/VECTO/GUI/GearboxGearDialog.resx +++ b/VECTO/GUI/GearboxGearDialog.resx @@ -121,7 +121,7 @@ <data name="BtBrowse.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw + YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 @@ -139,7 +139,7 @@ <data name="BtShiftPolyBrowse.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw + YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAALVSURBVDhPhZJrSJNhGIYXOs1Nc8o8gJWZ+UNEEupPxDAw 0kIrs5JsTOcKRANNEs0827KM0BA1MlSo0G3o1DxkEsso1JqH8rBUSlPzPOfSeajkbu+7NSl/9MD147u/ 776eF96P0VbB7+6Q8tFZJcCH2gj01wsx0BD5F5+aRFA1iTR99ZERjH+HlKHLxexgEoZao0Geh96mY2FC AkBpYlX7HL3PhBpjbXNIYWP5DjaWDKwv3MKMKomKMHIXGDWikaGu5gw8n3LhUWKXZ6wbBL+0tyk/Fwk5 diff --git a/VECTO/GUI/GraphEditChannelDialog.Designer.vb b/VECTO/GUI/GraphEditChannelDialog.Designer.vb index 346ed748bd545c5fb5e4f996913377af7d1fced6..77c9ee25258f7dc3157da2ff761dc2e455a5d254 100644 --- a/VECTO/GUI/GraphEditChannelDialog.Designer.vb +++ b/VECTO/GUI/GraphEditChannelDialog.Designer.vb @@ -116,6 +116,8 @@ Partial Class GraphEditChannelDialog 'GraphEditChannelDialog ' Me.AcceptButton = Me.OK_Button + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.Cancel_Button Me.ClientSize = New System.Drawing.Size(216, 151) Me.Controls.Add(Me.GroupBox1) diff --git a/VECTO/GUI/GraphForm.Designer.vb b/VECTO/GUI/GraphForm.Designer.vb index 47732362f378df073de0feb3df8fba8ec7a3be8f..33aee6821c8c7fa6fd0ebada88fd5fb9f2c1806e 100644 --- a/VECTO/GUI/GraphForm.Designer.vb +++ b/VECTO/GUI/GraphForm.Designer.vb @@ -292,6 +292,8 @@ Partial Class GraphForm ' 'GraphForm ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(1258, 400) Me.Controls.Add(Me.BtZoomOut) Me.Controls.Add(Me.BtMoveR) diff --git a/VECTO/GUI/JiraDialog.Designer.vb b/VECTO/GUI/JiraDialog.Designer.vb index 2d91d2c46028ff58791d54bea95d249603f010d0..e24750bfa008962fa4c2bc1140a9ec993795b859 100644 --- a/VECTO/GUI/JiraDialog.Designer.vb +++ b/VECTO/GUI/JiraDialog.Designer.vb @@ -109,6 +109,8 @@ Partial Class JiraDialog 'JiraDialog ' Me.AcceptButton = Me.OK_Button + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(435, 240) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.GroupBox1) diff --git a/VECTO/GUI/MainForm.Designer.vb b/VECTO/GUI/MainForm.Designer.vb index 44b28367293482244e3e37eb44083c6a81847368..6d8bfa30a4f95b6ae4c2dbda6aaa77c36653f1c4 100644 --- a/VECTO/GUI/MainForm.Designer.vb +++ b/VECTO/GUI/MainForm.Designer.vb @@ -801,6 +801,8 @@ Partial Class MainForm 'MainForm ' Me.AcceptButton = Me.btStartV3 + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(1045, 670) Me.Controls.Add(Me.ToolStrip1) Me.Controls.Add(Me.SplitContainer1) diff --git a/VECTO/GUI/Settings.Designer.vb b/VECTO/GUI/Settings.Designer.vb index 65a116160fd9938d7545d783551cb24bd4800b95..685f298f867138fc4eef5455c43f4e5b18ff0aff 100644 --- a/VECTO/GUI/Settings.Designer.vb +++ b/VECTO/GUI/Settings.Designer.vb @@ -291,6 +291,8 @@ Partial Class Settings 'Settings ' Me.AcceptButton = Me.ButtonOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButtonCancel Me.ClientSize = New System.Drawing.Size(313, 320) Me.Controls.Add(Me.BtHelp) diff --git a/VECTO/GUI/VectoJobForm.Designer.vb b/VECTO/GUI/VectoJobForm.Designer.vb index 1aca9323ebc1829b85de32709edb1292b8e0cce1..104d02d89547023da7a71880c83232fd9cd61919 100644 --- a/VECTO/GUI/VectoJobForm.Designer.vb +++ b/VECTO/GUI/VectoJobForm.Designer.vb @@ -1277,6 +1277,8 @@ Partial Class VectoJobForm 'VectoJobForm ' Me.AcceptButton = Me.ButOK + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.ButCancel Me.ClientSize = New System.Drawing.Size(944, 646) Me.Controls.Add(Me.TbHVCclass) diff --git a/VECTO/GUI/VectoJobForm.resx b/VECTO/GUI/VectoJobForm.resx index 86bda0298ff9d20a16e9cd1ffc9613b4baff4457..e9a578870cae82e82a55883df6245850c7b01ac1 100644 --- a/VECTO/GUI/VectoJobForm.resx +++ b/VECTO/GUI/VectoJobForm.resx @@ -220,6 +220,9 @@ <metadata name="CmOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>350, 15</value> </metadata> + <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>468, 15</value> + </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>49</value> </metadata> diff --git a/VECTO/GUI/VectoJobForm.vb b/VECTO/GUI/VectoJobForm.vb index 08486d12121fe9fb13f216bd7f062194bb0656c4..efb1aefd2cdd9d8d1c35f1067a6287e60a9c1c58 100644 --- a/VECTO/GUI/VectoJobForm.vb +++ b/VECTO/GUI/VectoJobForm.vb @@ -1521,6 +1521,10 @@ Public Class VectoJobForm OpenFiles(FileRepl(LvCycles.SelectedItems(0).SubItems(0).Text, GetPath(VectoFile))) End If End Sub + + Private Sub LvAux_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LvAux.SelectedIndexChanged + + End Sub End Class diff --git a/VECTO/GUI/VehicleAuxiliariesDialog.Designer.vb b/VECTO/GUI/VehicleAuxiliariesDialog.Designer.vb index 4e43384ebc21cf37a4828bfdfc50017c98f3278d..137a529a43d8f76a68a0a058d82ef90323bfcdbb 100644 --- a/VECTO/GUI/VehicleAuxiliariesDialog.Designer.vb +++ b/VECTO/GUI/VehicleAuxiliariesDialog.Designer.vb @@ -270,6 +270,8 @@ Partial Class VehicleAuxiliariesDialog 'VehicleAuxiliariesDialog ' Me.AcceptButton = Me.OK_Button + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.Cancel_Button Me.ClientSize = New System.Drawing.Size(459, 174) Me.Controls.Add(Me.PnFile) diff --git a/VECTO/GUI/VehicleAxleDialog.Designer.vb b/VECTO/GUI/VehicleAxleDialog.Designer.vb index 1261f0b94580cbfdcca7ba379b49c530f0f8bb2c..ee8e1bad035f6ca25516910b76bdb0bd8507da8f 100644 --- a/VECTO/GUI/VehicleAxleDialog.Designer.vb +++ b/VECTO/GUI/VehicleAxleDialog.Designer.vb @@ -256,6 +256,8 @@ Partial Class VehicleAxleDialog 'VehicleAxleDialog ' Me.AcceptButton = Me.OK_Button + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.Cancel_Button Me.ClientSize = New System.Drawing.Size(461, 165) Me.Controls.Add(Me.CbWheels) diff --git a/VECTO/GUI/WelcomeDialog.Designer.vb b/VECTO/GUI/WelcomeDialog.Designer.vb index eb950bbe9adc13aff641ad8b4d42c298996f9b82..5c16f49cb78fdbc6908c1d2a078098e9927da984 100644 --- a/VECTO/GUI/WelcomeDialog.Designer.vb +++ b/VECTO/GUI/WelcomeDialog.Designer.vb @@ -82,6 +82,8 @@ Partial Class WelcomeDialog ' 'WelcomeDialog ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.Cancel_Button Me.ClientSize = New System.Drawing.Size(318, 168) Me.Controls.Add(Me.Button2) diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs index 8a613bd43e79a90270a1cd3e3e2cd4bf25cf39ad..5d8334261c67ed9f9ca77d2bd98fc8272f9aab60 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/DeclarationDataAdapter.cs @@ -102,7 +102,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter var aerodynamicDragArea = data.AirDragArea + mission.DeltaCdA; retVal.CrossWindCorrectionCurve = - new CrosswindCorrectionCdxALookup(GetDeclarationAirResistanceCurve(retVal.VehicleCategory, aerodynamicDragArea), + new CrosswindCorrectionCdxALookup( + GetDeclarationAirResistanceCurve(mission.CrossWindCorrectionParameters, aerodynamicDragArea), CrossWindCorrectionMode.DeclarationModeCorrection); var axles = data.Axles; if (axles.Count < mission.AxleWeightDistribution.Length) { @@ -286,7 +287,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter } public static List<CrossWindCorrectionCurveReader.CrossWindCorrectionEntry> GetDeclarationAirResistanceCurve( - VehicleCategory vehicleCategory, SquareMeter aerodynamicDragAera) + string crosswindCorrectionParameters, SquareMeter aerodynamicDragAera) { const int startSpeed = 60; const int maxSpeed = 130; @@ -295,7 +296,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter const int maxAlpha = 180; const int alphaStep = 10; - var values = DeclarationData.AirDrag.Lookup(vehicleCategory); + var values = DeclarationData.AirDrag.Lookup(crosswindCorrectionParameters); var points = new List<CrossWindCorrectionCurveReader.CrossWindCorrectionEntry> { new CrossWindCorrectionCurveReader.CrossWindCorrectionEntry { Velocity = 0.SI<MeterPerSecond>(), diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index 4c1340789235e5cdcae99ae94b52cd7adf13a6b4..80f797559e48c365690e306e379a5a0286dce22b 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -61,6 +61,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter retVal.Loading = data.Loading; retVal.DynamicTyreRadius = data.DynamicTyreRadius; retVal.CrossWindCorrectionMode = data.CrossWindCorrectionMode; + var axles = data.Axles; switch (data.CrossWindCorrectionMode) { case CrossWindCorrectionMode.NoCorrection: retVal.CrossWindCorrectionCurve = @@ -78,14 +79,15 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter break; case CrossWindCorrectionMode.DeclarationModeCorrection: retVal.CrossWindCorrectionCurve = - new CrosswindCorrectionCdxALookup(DeclarationDataAdapter.GetDeclarationAirResistanceCurve(retVal.VehicleCategory, - data.AirDragArea), CrossWindCorrectionMode.DeclarationModeCorrection); + new CrosswindCorrectionCdxALookup( + DeclarationDataAdapter.GetDeclarationAirResistanceCurve(GetAirdragParameterSet(retVal.VehicleCategory, data.AxleConfiguration, axles.Count), + data.AirDragArea), CrossWindCorrectionMode.DeclarationModeCorrection); break; default: throw new ArgumentOutOfRangeException(); } - var axles = data.Axles; + retVal.AxleData = axles.Select(axle => new Axle { WheelsDimension = axle.Wheels, Inertia = axle.Inertia, @@ -98,6 +100,22 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter return retVal; } + private string GetAirdragParameterSet(VehicleCategory vehicleCategory, AxleConfiguration axles, int numAxles) + { + switch (vehicleCategory) { + case VehicleCategory.RigidTruck: + return (numAxles > axles.NumAxles()) ? "RigidTrailer" : "RigidSolo"; + case VehicleCategory.Tractor: + return "TractorSemitrailer"; + case VehicleCategory.CityBus: + case VehicleCategory.InterurbanBus: + case VehicleCategory.Coach: + return "CoachBus"; + default: + throw new ArgumentOutOfRangeException("vehicleCategory", vehicleCategory, null); + } + } + private void WarnEngineeringMode(string msg) { Log.Error("{0} is in Declaration Mode but is used for Engineering Mode!", msg); @@ -129,8 +147,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter //var gears = gearbox.Gears; if (gearbox.Gears.Count < 2) { - throw new VectoSimulationException( - "At least two Gear-Entries must be defined in Gearbox!"); + throw new VectoSimulationException("At least two Gear-Entries must be defined in Gearbox!"); } retVal.Inertia = gearbox.Inertia; diff --git a/VectoCore/VectoCore/Models/Declaration/AirDrag.cs b/VectoCore/VectoCore/Models/Declaration/AirDrag.cs index 76c3f9991ef32740efe040a7ab909918b6f8ede8..73ed9de890811c868cc7048b5b1f476ec6c8c554 100644 --- a/VectoCore/VectoCore/Models/Declaration/AirDrag.cs +++ b/VectoCore/VectoCore/Models/Declaration/AirDrag.cs @@ -56,22 +56,6 @@ namespace TUGraz.VectoCore.Models.Declaration row => new Entry(row.ParseDouble("a1"), row.ParseDouble("a2"), row.ParseDouble("a3"))); } - public Entry Lookup(VehicleCategory category) - { - switch (category) { - case VehicleCategory.CityBus: - case VehicleCategory.InterurbanBus: - case VehicleCategory.Coach: - return Lookup("CoachBus"); - case VehicleCategory.Tractor: - return Lookup("TractorSemitrailer"); - case VehicleCategory.RigidTruck: - return Lookup("RigidSolo"); - default: - throw new ArgumentOutOfRangeException("category", category, null); - } - } - public class Entry { public double A1; diff --git a/VectoCore/VectoCore/Models/Declaration/Mission.cs b/VectoCore/VectoCore/Models/Declaration/Mission.cs index a11fccce4fbaecfac7f4a7790de744efc5a3c9ed..307e7b7a71dcc896f52ef0d8a9e8577867a93b77 100644 --- a/VectoCore/VectoCore/Models/Declaration/Mission.cs +++ b/VectoCore/VectoCore/Models/Declaration/Mission.cs @@ -63,7 +63,7 @@ namespace TUGraz.VectoCore.Models.Declaration public class Mission { public MissionType MissionType; - public string CrossWindCorrection; + public string CrossWindCorrectionParameters; public double[] AxleWeightDistribution; public double[] TrailerAxleWeightDistribution; diff --git a/VectoCore/VectoCore/Models/Declaration/Segment.cs b/VectoCore/VectoCore/Models/Declaration/Segment.cs index 3e21a8b0c35862bb1fa1fd432dfd728061728adb..cfd31a60eaa1250083ad71fa008c8b2b4f87fee3 100644 --- a/VectoCore/VectoCore/Models/Declaration/Segment.cs +++ b/VectoCore/VectoCore/Models/Declaration/Segment.cs @@ -53,5 +53,7 @@ namespace TUGraz.VectoCore.Models.Declaration public Stream AccelerationFile { get; internal set; } public Mission[] Missions { get; internal set; } + + public SquareMeter CdAConstruction { get; internal set; } } } \ No newline at end of file diff --git a/VectoCore/VectoCore/Models/Declaration/Segments.cs b/VectoCore/VectoCore/Models/Declaration/Segments.cs index 8606f7a12cf3cb44d7d4135c02e1731f12864dc3..a596eb77b47b9ad4d91a9522b979d6b7486cf704 100644 --- a/VectoCore/VectoCore/Models/Declaration/Segments.cs +++ b/VectoCore/VectoCore/Models/Declaration/Segments.cs @@ -109,7 +109,11 @@ namespace TUGraz.VectoCore.Models.Declaration RessourceHelper.ReadStream(DeclarationData.DeclarationDataResourcePrefix + ".VACC." + row.Field<string>(".vaccfile")), Missions = CreateMissions(ref grossVehicleMassRating, curbWeight, row), - GrossVehicleMassRating = grossVehicleMassRating + GrossVehicleMassRating = grossVehicleMassRating, + CdAConstruction = + string.IsNullOrEmpty(row["cdxa_construction"].ToString()) + ? null + : row.ParseDouble("cdxa_construction").SI<SquareMeter>() }; return segment; @@ -156,7 +160,7 @@ namespace TUGraz.VectoCore.Models.Declaration var mission = new Mission { MissionType = missionType, - CrossWindCorrection = row.Field<string>("crosswindcorrection" + GetMissionSuffix(missionType)), + CrossWindCorrectionParameters = row.Field<string>("crosswindcorrection" + GetMissionSuffix(missionType)), CycleFile = RessourceHelper.ReadStream(DeclarationData.DeclarationDataResourcePrefix + ".MissionCycles." + missionType + Constants.FileExtensions.CycleFile), diff --git a/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv b/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv index 1918214449d52452225539695b45cff3b9ed18d0..30cf96b3202fff426de0f558918f7f9d0c787b72 100644 --- a/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv +++ b/VectoCore/VectoCore/Resources/Declaration/SegmentTable.csv @@ -1,29 +1,29 @@ -Valid,Vehicle Category,Axle Conf.,GVW_Min,GVW_Max,HDV class,Body,Trailer,Semitrailer,.vacc file,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach -# @@@quam below 7.5t is not considered by VECTO atm. @@@ 0 ,RigidTruck ,4x2 ,0 ,7.5 ,0 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,RigidTruck ,4x2 ,7.5 ,10 ,1 ,B1 , , ,Truck.vacc, ,RigidSolo , ,45/55 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,Tractor ,4x2 ,7.5 ,10 ,1 ,B1 , , ,Truck.vacc, ,RigidSolo , ,45/55 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,RigidTruck ,4x2 ,10 ,12 ,2 ,B2 ,T1 , ,Truck.vacc,RigidTrailer ,RigidSolo ,22.5/32.5 ,45/55 ,45/1 , ,pc(R) ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,Tractor ,4x2 ,10 ,12 ,2 ,B2 ,T1 , ,Truck.vacc,RigidTrailer ,RigidSolo ,22.5/32.5 ,45/55 ,45/1 , ,pc(R) ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,RigidTruck ,4x2 ,12 ,16 ,3 ,B3 , , ,Truck.vacc, ,RigidSolo , ,40/60 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,Tractor ,4x2 ,12 ,16 ,3 ,B3 , , ,Truck.vacc, ,RigidSolo , ,40/60 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- -1 ,RigidTruck ,4x2 ,16 ,99 ,4 ,B4 ,T2 , ,Truck.vacc,RigidTrailer ,RigidSolo ,20/30 ,45/55 ,50/2 , ,14000 ,4400 ,- ,4400 ,- ,- ,- ,- ,- ,- -1 ,Tractor ,4x2 ,16 ,99 ,5 , , ,ST1 ,Truck.vacc,TractorSemitrailer ,TractorSemitrailer ,20/25 ,25/25 ,55/3 ,50/3 ,19300 ,12900 ,- ,- ,- ,- ,- ,- ,- ,- -0 ,RigidTruck ,4x4 ,7.5 ,16 ,6 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,??? ,??? ,- ,- ,- ,- ,- -0 ,RigidTruck ,4x4 ,16 ,99 ,7 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -0 ,Tractor ,4x4 ,16 ,99 ,8 , , , ,Truck.vacc, ,TractorSemitrailer , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -1 ,RigidTruck ,6x2 ,0 ,99 ,9 ,B5 ,T2 , ,Truck.vacc,RigidTrailer ,RigidSolo ,20/30/15 ,35/40/25 ,35/2 , ,19300 ,7100 ,- ,7100 ,- ,- ,- ,- ,- ,- -1 ,Tractor ,6x2 ,0 ,99 ,10 , , ,ST1 ,Truck.vacc,TractorSemitrailer ,TractorSemitrailer ,15/10/20 ,20/10/20 ,55/2 ,50/2 ,19300 ,12900 ,- ,- ,- ,- ,- ,- ,- ,- -0 ,RigidTruck ,6x4 ,0 ,99 ,11 , , , ,Truck.vacc, ,RigidSolo , ,35/35/30 , , ,- ,- ,- ,- ,7100 ,- ,- ,- ,- ,- -0 ,Tractor ,6x4 ,0 ,99 ,12 , , , ,Truck.vacc, ,TractorSemitrailer , ,20/15/15 , ,50/2 ,- ,- ,- ,- ,12900 ,- ,- ,- ,- ,- -0 ,RigidTruck ,6x6 ,0 ,99 ,13 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -0 ,Tractor ,6x6 ,0 ,99 ,14 , , , ,Truck.vacc, ,TractorSemitrailer , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -0 ,RigidTruck ,8x2 ,0 ,99 ,15 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,??? ,- ,- ,- ,- ,- ,- ,- ,- -0 ,RigidTruck ,8x4 ,0 ,99 ,16 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,12900 ,- ,- ,- ,- ,- -0 ,RigidTruck ,8x6 ,0 ,99 ,17 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -0 ,RigidTruck ,8x8 ,0 ,99 ,17 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- -0 ,CityBus ,4x2 ,0 ,18 ,B1 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,??? ,??? ,??? ,- ,- -0 ,InterurbanBus ,4x2 ,0 ,18 ,B2 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,??? ,- -0 ,Coach ,4x2 ,0 ,18 ,B3 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,- ,??? -0 ,CityBus ,6x2 ,18 ,99 ,B4 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,??? ,??? ,??? ,- ,- -0 ,InterurbanBus ,6x2 ,18 ,99 ,B5 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,??? ,- -0 ,Coach ,6x2 ,18 ,99 ,B6 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,- ,??? \ No newline at end of file +Valid,Vehicle Category,Axle Conf.,GVW_Min,GVW_Max,HDV class,Body,Trailer,Semitrailer,.vacc file,Cross Wind Correction - Long haul,Cross Wind Correction - Other,Truck Axles - Long haul,Truck Axles - Other,Trailer Axles - Long haul,Trailer Axles - Other,Long haul,Regional delivery,Urban delivery,Municipal utility,Construction,Heavy Urban,Urban,Suburban,Interurban,Coach,CdxA_Construction +# @@@quam below 7.5t is not considered by VECTO atm. @@@ 0 ,RigidTruck ,4x2 ,0 ,7.5 ,0 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,-, , +1 ,RigidTruck ,4x2 ,7.5 ,10 ,1 ,B1 , , ,Truck.vacc, ,RigidSolo , ,45/55 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,Tractor ,4x2 ,7.5 ,10 ,1 ,B1 , , ,Truck.vacc, ,RigidSolo , ,45/55 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,RigidTruck ,4x2 ,10 ,12 ,2 ,B2 ,T1 , ,Truck.vacc,RigidTrailer ,RigidSolo ,22.5/32.5 ,45/55 ,45/1 , ,pc(R) ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,Tractor ,4x2 ,10 ,12 ,2 ,B2 ,T1 , ,Truck.vacc,RigidTrailer ,RigidSolo ,22.5/32.5 ,45/55 ,45/1 , ,pc(R) ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,RigidTruck ,4x2 ,12 ,16 ,3 ,B3 , , ,Truck.vacc, ,RigidSolo , ,40/60 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,Tractor ,4x2 ,12 ,16 ,3 ,B3 , , ,Truck.vacc, ,RigidSolo , ,40/60 , , ,- ,pc(R) ,pc(R) ,- ,- ,- ,- ,- ,- ,- , +1 ,RigidTruck ,4x2 ,16 ,99 ,4 ,B4 ,T2 , ,Truck.vacc,RigidTrailer ,RigidSolo ,20/30 ,45/55 ,50/2 , ,14000 ,4400 ,- ,4400 ,- ,- ,- ,- ,- ,- , +1 ,Tractor ,4x2 ,16 ,99 ,5 , , ,ST1 ,Truck.vacc,TractorSemitrailer ,TractorSemitrailer ,20/25 ,25/25 ,55/3 ,50/3 ,19300 ,12900 ,- ,- ,- ,- ,- ,- ,- ,- , +0 ,RigidTruck ,4x4 ,7.5 ,16 ,6 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,??? ,??? ,- ,- ,- ,- ,- , +0 ,RigidTruck ,4x4 ,16 ,99 ,7 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- , +0 ,Tractor ,4x4 ,16 ,99 ,8 , , , ,Truck.vacc, ,TractorSemitrailer , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- , +1 ,RigidTruck ,6x2 ,0 ,99 ,9 ,B5 ,T2 , ,Truck.vacc,RigidTrailer ,RigidSolo ,20/30/15 ,35/40/25 ,35/2 , ,19300 ,7100 ,- ,7100 ,- ,- ,- ,- ,- ,- , +1 ,Tractor ,6x2 ,0 ,99 ,10 , , ,ST1 ,Truck.vacc,TractorSemitrailer ,TractorSemitrailer ,15/10/20 ,20/10/20 ,55/3 ,50/3 ,19300 ,12900 ,- ,- ,- ,- ,- ,- ,- ,- , +1 ,RigidTruck ,6x4 ,0 ,99 ,11 , ,T2 , ,Truck.vacc,RigidTrailer ,RigidSolo ,20/22.5/22.5 ,35/35/30 ,35/2 , ,19300 ,7100 ,- ,7100 ,7100 ,- ,- ,- ,- ,- ,8.5 +1 ,Tractor ,6x4 ,0 ,99 ,12 , , ,ST1 ,Truck.vacc,TractorSemitrailer ,TractorSemitrailer ,15/15/15 ,20/15/15 ,55/3 ,50/3 ,19300 ,7100 ,- ,7100 ,12900 ,- ,- ,- ,- ,- ,8.8 +0 ,RigidTruck ,6x6 ,0 ,99 ,13 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- , +0 ,Tractor ,6x6 ,0 ,99 ,14 , , , ,Truck.vacc, ,TractorSemitrailer , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- , +0 ,RigidTruck ,8x2 ,0 ,99 ,15 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,??? ,- ,- ,- ,- ,- ,- ,- ,- , +1 ,RigidTruck ,8x4 ,0 ,99 ,16 , , , ,Truck.vacc, ,RigidSolo , ,25/25/25/25 , , ,- ,- ,- ,- ,12900 ,- ,- ,- ,- ,- , +0 ,RigidTruck ,8x6 ,0 ,99 ,17 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- ,9.0 +0 ,RigidTruck ,8x8 ,0 ,99 ,17 , , , ,Truck.vacc, ,RigidSolo , , , , ,- ,- ,- ,- ,??? ,- ,- ,- ,- ,- , +0 ,CityBus ,4x2 ,0 ,18 ,B1 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,??? ,??? ,??? ,- ,- , +0 ,InterurbanBus ,4x2 ,0 ,18 ,B2 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,??? ,- , +0 ,Coach ,4x2 ,0 ,18 ,B3 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,- ,??? , +0 ,CityBus ,6x2 ,18 ,99 ,B4 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,??? ,??? ,??? ,- ,- , +0 ,InterurbanBus ,6x2 ,18 ,99 ,B5 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,??? ,- , +0 ,Coach ,6x2 ,18 ,99 ,B6 , , , , , ,CoachBus , , , , ,- ,- ,- ,- ,- ,- ,- ,- ,- ,??? , \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index d89cc5fea9df442784c277a5fe2fefb23f60cccc..83c485122262379f60b1dcce05099bc219ca7307 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -174,52 +174,51 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration Assert.AreEqual(a3, value.A3); } - [TestCase(VehicleCategory.RigidTruck, 0.013526, 0.017746, -0.000666), - TestCase(VehicleCategory.Tractor, 0.030042, 0.040817, -0.00213), - TestCase(VehicleCategory.CityBus, -0.000794, 0.02109, -0.00109), - TestCase(VehicleCategory.Coach, -0.000794, 0.02109, -0.00109), - TestCase(VehicleCategory.InterurbanBus, -0.000794, 0.02109, -0.00109)] - public void AirDrag_WithVehicleCategory(VehicleCategory cat, double a1, double a2, double a3) - { - var value = DeclarationData.AirDrag.Lookup(cat); + [TestCase("RigidSolo", 0.013526, 0.017746, -0.000666), + TestCase("TractorSemitrailer", 0.030042, 0.040817, -0.00213), + TestCase("RigidTrailer", 0.017125, 0.072275, -0.004148), + TestCase("CoachBus", -0.000794, 0.02109, -0.00109)] + public void AirDrag_WithVehicleCategory(string parameterSet, double a1, double a2, double a3) + { + var value = DeclarationData.AirDrag.Lookup(parameterSet); Assert.AreEqual(a1, value.A1); Assert.AreEqual(a2, value.A2); Assert.AreEqual(a3, value.A3); } - [TestCase(VehicleCategory.Tractor, 6.46, 0, 8.05913), - TestCase(VehicleCategory.Tractor, 6.46, 60, 8.05913), - TestCase(VehicleCategory.Tractor, 6.46, 75, 7.639436), - TestCase(VehicleCategory.Tractor, 6.46, 100, 7.22305), - TestCase(VehicleCategory.Tractor, 6.46, 52.1234, 8.059126), - TestCase(VehicleCategory.Tractor, 6.46, 73.5432, 7.67487), - TestCase(VehicleCategory.Tractor, 6.46, 92.8765, 7.317215), - TestCase(VehicleCategory.Tractor, 6.46, 100.449, 7.217975), - TestCase(VehicleCategory.Tractor, 6.46, 103, 7.18915), - TestCase(VehicleCategory.Tractor, 6.46, 105, 7.166555), - TestCase(VehicleCategory.Tractor, 6.46, 115, 7.071136), - TestCase(VehicleCategory.Tractor, 6.46, 130, 6.961237),] - public void CrossWindCorrectionTest(VehicleCategory vehicleCategory, double crossSectionArea, double kmph, + [TestCase("TractorSemitrailer", 6.46, 0, 8.05913), + TestCase("TractorSemitrailer", 6.46, 60, 8.05913), + TestCase("TractorSemitrailer", 6.46, 75, 7.639436), + TestCase("TractorSemitrailer", 6.46, 100, 7.22305), + TestCase("TractorSemitrailer", 6.46, 52.1234, 8.059126), + TestCase("TractorSemitrailer", 6.46, 73.5432, 7.67487), + TestCase("TractorSemitrailer", 6.46, 92.8765, 7.317215), + TestCase("TractorSemitrailer", 6.46, 100.449, 7.217975), + TestCase("TractorSemitrailer", 6.46, 103, 7.18915), + TestCase("TractorSemitrailer", 6.46, 105, 7.166555), + TestCase("TractorSemitrailer", 6.46, 115, 7.071136), + TestCase("TractorSemitrailer", 6.46, 130, 6.961237),] + public void CrossWindCorrectionTest(string parameterSet, double crossSectionArea, double kmph, double expected) { var crossWindCorrectionCurve = new CrosswindCorrectionCdxALookup( - DeclarationDataAdapter.GetDeclarationAirResistanceCurve(vehicleCategory, crossSectionArea.SI<SquareMeter>()), + DeclarationDataAdapter.GetDeclarationAirResistanceCurve(parameterSet, crossSectionArea.SI<SquareMeter>()), CrossWindCorrectionMode.DeclarationModeCorrection); var tmp = crossWindCorrectionCurve.EffectiveAirDragArea(kmph.KMPHtoMeterPerSecond()); Assert.AreEqual(expected, tmp.Value(), Tolerance); } - [TestCase(VehicleCategory.Tractor, 6.46, -0.1), - TestCase(VehicleCategory.Tractor, 6.46, 130.1),] - public void CrossWindCorrectionExceptionTest(VehicleCategory vehicleCategory, double crossSectionArea, double kmph) + [TestCase("TractorSemitrailer", 6.46, -0.1), + TestCase("TractorSemitrailer", 6.46, 130.1),] + public void CrossWindCorrectionExceptionTest(string parameterSet, double crossSectionArea, double kmph) { var crossWindCorrectionCurve = new CrosswindCorrectionCdxALookup( - DeclarationDataAdapter.GetDeclarationAirResistanceCurve(vehicleCategory, crossSectionArea.SI<SquareMeter>()), + DeclarationDataAdapter.GetDeclarationAirResistanceCurve(parameterSet, crossSectionArea.SI<SquareMeter>()), CrossWindCorrectionMode.DeclarationModeCorrection); AssertHelper.Exception<VectoException>(() => - crossWindCorrectionCurve.EffectiveAirDragArea(kmph.KMPHtoMeterPerSecond())); + crossWindCorrectionCurve.EffectiveAirDragArea(kmph.KMPHtoMeterPerSecond())); } [TestCase(MissionType.LongHaul, "Standard technology", 1200, 0.7), @@ -434,11 +433,11 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration public void SegmentWeightOutOfRange4X2(double weight) { AssertHelper.Exception<VectoException>(() => - DeclarationData.Segments.Lookup( - VehicleCategory.RigidTruck, - AxleConfiguration.AxleConfig_4x2, - weight.SI<Kilogram>(), - 0.SI<Kilogram>()), + DeclarationData.Segments.Lookup( + VehicleCategory.RigidTruck, + AxleConfiguration.AxleConfig_4x2, + weight.SI<Kilogram>(), + 0.SI<Kilogram>()), "Gross vehicle mass must be greater than 7.5 tons"); } @@ -451,11 +450,11 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration public void SegmentWeightOutOfRange4X4(double weight) { AssertHelper.Exception<VectoException>(() => - DeclarationData.Segments.Lookup( - VehicleCategory.RigidTruck, - AxleConfiguration.AxleConfig_4x4, - weight.SI<Kilogram>(), - 0.SI<Kilogram>()), + DeclarationData.Segments.Lookup( + VehicleCategory.RigidTruck, + AxleConfiguration.AxleConfig_4x4, + weight.SI<Kilogram>(), + 0.SI<Kilogram>()), "Gross vehicle mass must be greater than 7.5 tons"); } @@ -650,7 +649,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration double trailerGrossVehicleWeight, double deltaCdA) { Assert.AreEqual(missionType, m.MissionType); - Assert.AreEqual(cosswindCorrection, m.CrossWindCorrection); + Assert.AreEqual(cosswindCorrection, m.CrossWindCorrectionParameters); CollectionAssert.AreEqual(axleWeightDistribution, m.AxleWeightDistribution, "Axle distribution not equal.\nexpected: {0}\nactual: {1}", string.Join(",", axleWeightDistribution), string.Join(",", m.AxleWeightDistribution)); diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs index 32df2f1031443c20ddcc6701854e500016ac7daf..b5a20f3dcddcec142dcde09c15fd250ad7b920bf 100644 --- a/VectoCore/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs +++ b/VectoCore/VectoCoreTest/Models/SimulationComponent/VehicleTest.cs @@ -96,7 +96,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent var vehicleData = MockSimulationDataFactory.CreateVehicleDataFromFile(VehicleDataFileTruck); //vehicleData.AerodynamicDragAera = 6.46.SI<SquareMeter>(); vehicleData.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup( - DeclarationDataAdapter.GetDeclarationAirResistanceCurve(VehicleCategory.Tractor, + DeclarationDataAdapter.GetDeclarationAirResistanceCurve("TractorSemitrailer", 6.46.SI<SquareMeter>()), CrossWindCorrectionMode.DeclarationModeCorrection); var vehicle = new Vehicle(container, vehicleData); @@ -119,7 +119,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent var vehicleData = MockSimulationDataFactory.CreateVehicleDataFromFile(VehicleDataFileTruck); vehicleData.CrossWindCorrectionCurve = new CrosswindCorrectionCdxALookup( - DeclarationDataAdapter.GetDeclarationAirResistanceCurve(VehicleCategory.Tractor, + DeclarationDataAdapter.GetDeclarationAirResistanceCurve("TractorSemitrailer", 6.2985.SI<SquareMeter>()), CrossWindCorrectionMode.DeclarationModeCorrection); var vehicle = new Vehicle(container, vehicleData); diff --git a/VectoCore/VectoCoreTest/Reports/ModDataTest.cs b/VectoCore/VectoCoreTest/Reports/ModDataTest.cs index e8d2b34f59284b2c038545cee532b272b6883aad..12327e3ea90a8aa85efaea12eee23472b5e5d819 100644 --- a/VectoCore/VectoCoreTest/Reports/ModDataTest.cs +++ b/VectoCore/VectoCoreTest/Reports/ModDataTest.cs @@ -61,11 +61,14 @@ namespace TUGraz.VectoCore.Tests.Reports var engineData = MockSimulationDataFactory.CreateEngineDataFromFile(Truck40tPowerTrain.EngineFile); + // get a reference to the mod-data because the modaldata container clears it after simulation var modData = ((ModalDataContainer)run.GetContainer().ModalData).Data; run.Run(); Assert.IsTrue(run.FinishedWithoutErrors); + Assert.IsTrue(modData.Rows.Count > 0); + var lastGear = 0u; foreach (DataRow row in modData.Rows) { if (cycle.Entries.Last().Distance.IsEqual(((Meter)row[(int)ModalResultField.dist]))) { @@ -142,8 +145,8 @@ namespace TUGraz.VectoCore.Tests.Reports "time: {0} distance: {1}", time, distance); Assert.AreEqual(pEngFcmap.Value(), - (pTrac + pWheelInertia + pBrakeLoss + pLossAxle + pLossRet + pLossGbx + pGbxInertia + pEngInertia + pAux + - pClutchLoss).Value(), 0.5, "time: {0} distance: {1}", time, distance); + (pTrac + pWheelInertia + pBrakeLoss + pLossAxle + pLossRet + pLossGbx + pGbxInertia + pEngInertia + pAux + + pClutchLoss).Value(), 0.5, "time: {0} distance: {1}", time, distance); } lastGear = gear; }