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 be8fa5ff authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

throw exception if FWD vehicle is declared but no axlegear ratio is provided in gbx

parent acf12218
No related branches found
No related tags found
No related merge requests found
......@@ -523,6 +523,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
public AxleGearData CreateDummyAxleGearData(IGearboxDeclarationInputData gbxData)
{
if (double.IsNaN(gbxData.AxlegearRatio)) {
throw new VectoException("Axlegear ratio required in gearbox data for gearboxes with included axlegear");
}
return new AxleGearData() {
AxleGear = new TransmissionData() {
Ratio = gbxData.AxlegearRatio,
......
......@@ -81,7 +81,7 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl {
_segment.Missions.First().Loadings.First());
_airdragData = DataAdapter.CreateAirdragData(vehicle.Components.AirdragInputData,
_segment.Missions.First(), _segment);
if (InputDataProvider.JobInputData.Vehicle.Components.GearboxInputData.DifferentialIncluded) {
if (InputDataProvider.JobInputData.Vehicle.AxleConfiguration.AxlegearIncludedInGearbox()) {
_axlegearData = DataAdapter.CreateDummyAxleGearData(InputDataProvider.JobInputData.Vehicle.Components.GearboxInputData);
} else {
_axlegearData = DataAdapter.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.Components.AxleGearInputData);
......
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