diff --git a/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs b/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs index 70c72876e0abc9f67954ce839d30ecd01911be4d..a1bf29ab51b5f7b7ee3fe088f909ad47ddf64727 100644 --- a/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs +++ b/VectoCore/InputData/Reader/DataObjectAdaper/DeclarationDataAdapter.cs @@ -177,7 +177,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper new GearData { LossMap = gearLossMap, ShiftPolygon = shiftPolygon, - FullLoadCurve = gearFullLoad ?? engine.FullLoadCurve, + FullLoadCurve = gearFullLoad, Ratio = gear.Ratio, TorqueConverterActive = false }); diff --git a/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs b/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs index 870d96d6ed03f79496079652015928522553c79a..2c88dfb1699cf1aabc12d39a3dcf032a3e4044a0 100644 --- a/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs +++ b/VectoCore/InputData/Reader/DataObjectAdaper/EngineeringDataAdapter.cs @@ -136,7 +136,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper return new KeyValuePair<uint, GearData>((uint)(i + 1), new GearData { LossMap = lossMap, ShiftPolygon = shiftPolygon, - FullLoadCurve = gearFullLoad ?? engineData.FullLoadCurve, + FullLoadCurve = gearFullLoad, Ratio = gear.Ratio, TorqueConverterActive = gear.TorqueConverterActive }); diff --git a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index f71711f5505f57815a0d988fd3e2abb592226268..371825a372f230029342778247a140c6de0aecb9 100644 --- a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -170,22 +170,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ValidatePowerDemand(totalTorqueDemand); // requires CurrentState.FullDragTorque and DynamicfullLoad to be set! // get max. torque as limited by gearbox. gearbox only limits torqueOut! - //NewtonMeter deltaGbxFld = null; NewtonMeter gearboxFullLoad = null; var curve = DataBus.GearFullLoadCurve; if (curve != null) { // if the current gear has a full-load curve, limit the max. torque to the // gbx. full-load and continue (remmber the delta for further below) gearboxFullLoad = curve.FullLoadStationaryTorque(avgEngineSpeed); - //var maxGbxTorque = VectoMath.Limit(torqueOut, -gearboxFullLoad, gearboxFullLoad); - //if (!torqueOut.IsEqual(maxGbxTorque)) { - // deltaGbxFld = torqueOut - maxGbxTorque; - //} - //CurrentState.EngineTorqueOut = maxGbxTorque; } - //CurrentState.EngineTorque = totalTorqueDemand; - var deltaFull = ComputeDelta(torqueOut, totalTorqueDemand, CurrentState.DynamicFullLoadTorque, gearboxFullLoad, true); var deltaDrag = ComputeDelta(torqueOut, totalTorqueDemand, CurrentState.FullDragTorque, gearboxFullLoad != null ? -gearboxFullLoad : null, false); @@ -217,13 +209,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CurrentState.EngineTorque = VectoMath.Limit(totalTorqueDemand, minTorque, maxTorque); CurrentState.EnginePower = CurrentState.EngineTorque * avgEngineSpeed; - //NewtonMeter deltaEngineFld = null; - //Watt delta = null; - //if (!CurrentState.EngineTorque.IsEqual(totalTorqueDemand)) { - // delta = (torqueOut - CurrentState.EngineTorque) * avgEngineSpeed; - //} - - if (torqueOut.IsGreater(0.SI<NewtonMeter>()) && (deltaFull * avgEngineSpeed).IsGreater(0.SI<Watt>(), Constants.SimulationSettings.EnginePowerSearchTolerance)) { Log.Debug("requested engine power exceeds fullload power: delta: {0}", deltaFull); diff --git a/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs b/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs index 81959e699b05ff78f315a9e07c31171c6e768b11..5168b52f2127cf26e2ffe167ceb94733b9bccc62 100644 --- a/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs +++ b/VectoCore/Models/SimulationComponent/Impl/ShiftStrategy.cs @@ -196,7 +196,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl for (var gear = (uint)Data.Gears.Count; gear > 1; gear--) { var inAngularSpeed = outEngineSpeed * Data.Gears[gear].Ratio; - if (inAngularSpeed > Data.Gears[gear].FullLoadCurve.RatedSpeed || inAngularSpeed.IsEqual(0)) { + var ratedSpeed = Data.Gears[gear].FullLoadCurve != null + ? Data.Gears[gear].FullLoadCurve.RatedSpeed + : DataBus.EngineRatedSpeed; + if (inAngularSpeed > ratedSpeed || inAngularSpeed.IsEqual(0)) { continue; } diff --git a/VectoCoreTest/Integration/CoachPowerTrain.cs b/VectoCoreTest/Integration/CoachPowerTrain.cs index 5ab03a3f0397d56e262d2de15a59cd5a13032649..bb74ea31fe694af5289d9edce35cae25d9064ca6 100644 --- a/VectoCoreTest/Integration/CoachPowerTrain.cs +++ b/VectoCoreTest/Integration/CoachPowerTrain.cs @@ -74,9 +74,9 @@ namespace TUGraz.VectoCore.Tests.Integration tmp = Port.AddComponent(tmp, new Wheels(container, vehicleData.DynamicTyreRadius, vehicleData.WheelsInertia)); tmp = Port.AddComponent(tmp, new Brakes(container)); tmp = Port.AddComponent(tmp, new AxleGear(container, axleGearData)); + tmp = Port.AddComponent(tmp, new DummyRetarder(container)); tmp = Port.AddComponent(tmp, new Gearbox(container, gearboxData, new AMTShiftStrategy(gearboxData, container))); - tmp = Port.AddComponent(tmp, new DummyRetarder(container)); tmp = Port.AddComponent(tmp, clutch); var aux = new EngineAuxiliary(container);