Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 4558d04f authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

bugfix: calculate correct shift lines in declaration mode for AT-EffShift

parent a442fe13
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,7 @@ Public Class Gearbox
End Try
axlegearData = doa.CreateAxleGearData(gearbox)
gearboxData = doa.CreateGearboxData(gearbox, engine, axlegearData.AxleGear.Ratio, rdyn, vehiclecategory, gearbox)
gearboxData = doa.CreateGearboxData(gearbox, engine, axlegearData.AxleGear.Ratio, rdyn, vehiclecategory, gearbox, Nothing)
Else
Dim doa As EngineeringDataAdapter = New EngineeringDataAdapter()
Try
......
......@@ -41,6 +41,7 @@ using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.ShiftStrategy;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
......@@ -250,7 +251,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
return null;
}
internal GearboxData CreateGearboxData(IGearboxDeclarationInputData gearbox, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, ITorqueConverterDeclarationInputData torqueConverter)
internal GearboxData CreateGearboxData(IGearboxDeclarationInputData gearbox, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius, VehicleCategory vehicleCategory, ITorqueConverterDeclarationInputData torqueConverter, IShiftStrategy shiftStrategy)
{
if (!gearbox.SavedInDeclarationMode) {
WarnDeclarationMode("GearboxData");
......@@ -279,10 +280,13 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
var gear = gearsInput[(int)i];
var lossMap = CreateGearLossMap(gear, i, false);
var shiftPolygon = DeclarationData.Gearbox.ComputeShiftPolygon(
gearbox.Type, (int)i, engine.FullLoadCurves[i + 1],
gearsInput, engine,
axlegearRatio, dynamicTyreRadius);
var shiftPolygon = shiftStrategy != null
? shiftStrategy.ComputeDeclarationShiftPolygon(
gearbox.Type, (int)i, engine.FullLoadCurves[i + 1], gearbox.Gears, engine, axlegearRatio, dynamicTyreRadius)
: DeclarationData.Gearbox.ComputeShiftPolygon(
gearbox.Type, (int)i, engine.FullLoadCurves[i + 1],
gearsInput, engine,
axlegearRatio, dynamicTyreRadius);
var gearData = new GearData {
ShiftPolygon = shiftPolygon,
......
......@@ -40,7 +40,9 @@ using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
......@@ -115,9 +117,16 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
vehicle.Components.GearboxInputData, vehicle.TorqueLimits, vehicle.TankSystem);
_axlegearData = _dao.CreateAxleGearData(InputDataProvider.JobInputData.Vehicle.Components.AxleGearInputData);
_angledriveData = _dao.CreateAngledriveData(InputDataProvider.JobInputData.Vehicle.Components.AngledriveInputData);
var tmpRunData = new VectoRunData() {
ShiftStrategy = InputDataProvider.JobInputData.ShiftStrategy,
GearboxData = new GearboxData() {
Type = vehicle.Components.GearboxInputData.Type,
}
};
var tmpStrategy = PowertrainBuilder.GetShiftStrategy(tmpRunData, new SimplePowertrainContainer(tmpRunData));
_gearboxData = _dao.CreateGearboxData(vehicle.Components.GearboxInputData, _engineData,
_axlegearData.AxleGear.Ratio,
tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData);
tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData, tmpStrategy);
_retarderData = _dao.CreateRetarderData(vehicle.Components.RetarderInputData);
_ptoTransmissionData = _dao.CreatePTOTransmissionData(vehicle.Components.PTOTransmissionInputData);
......
......@@ -41,7 +41,9 @@ using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.OutputData;
namespace TUGraz.VectoCore.InputData.Reader.Impl
......@@ -131,10 +133,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl
vehicle.Components.GearboxInputData, vehicle.TorqueLimits, vehicle.TankSystem);
AxlegearData = Dao.CreateAxleGearData(vehicle.Components.AxleGearInputData);
AngledriveData = Dao.CreateAngledriveData(vehicle.Components.AngledriveInputData);
GearboxData = Dao.CreateGearboxData(
vehicle.Components.GearboxInputData, EngineData,
AxlegearData.AxleGear.Ratio,
tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData);
tempVehicle.DynamicTyreRadius, tempVehicle.VehicleCategory, vehicle.Components.TorqueConverterInputData, null);
RetarderData = Dao.CreateRetarderData(vehicle.Components.RetarderInputData);
PTOTransmissionData =
......
......@@ -57,7 +57,7 @@ namespace TUGraz.VectoCore.Tests.Utils
var dao = new DeclarationDataAdapter();
var engineData = dao.CreateEngineData(engineInput, null, gearboxInput, new List<ITorqueLimitInputData>());
return dao.CreateGearboxData(gearboxInput, engineData, ((IAxleGearInputData)gearboxInput).Ratio, 0.5.SI<Meter>(),
VehicleCategory.RigidTruck, (ITorqueConverterDeclarationInputData)gearboxInput);
VehicleCategory.RigidTruck, (ITorqueConverterDeclarationInputData)gearboxInput, null);
} else {
var dao = new EngineeringDataAdapter();
var engineData = dao.CreateEngineData(engineInput, gearboxInput, new List<ITorqueLimitInputData>(), (ITorqueConverterEngineeringInputData)gearboxInput);
......
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