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

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

adapt testcase for shift-losses

parent 5453249a
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Tests.Integration;
using TUGraz.VectoCore.Tests.Utils;
......@@ -93,6 +94,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var container = new VehicleContainer(ExecutionMode.Engineering);
gearboxData.PowershiftInertiaFactor = inertiaFactor;
gearboxData.PowershiftShiftTime = 0.8.SI<Second>();
var cycleDataStr = "0, 0, 0, 2\n100, 20, 0, 0\n1000, 50, 0, 0";
var cycleData = SimpleDrivingCycles.CreateCycleData(cycleDataStr);
......@@ -138,7 +140,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
response = gbx.Request(absTime, dt, torqueDemand.SI<NewtonMeter>(), postShiftRpm.RPMtoRad());
Assert.IsInstanceOf<ResponseSuccess>(response);
Assert.AreEqual(expectedShiftLoss, gbx.CurrentState.PowershiftLosses.Value(), 1e-3);
Assert.AreEqual(expectedShiftLoss, gbx.CurrentState.PowershiftLoss.Value(), 1e-3);
Assert.AreEqual(gear + (postShiftRpm > preShiftRpm ? 1 : -1), gbx.Gear);
}
}
......
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