Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

Merge branch...

Merge branch 'hm/feature/VECTO-1638-rundatafactories-and-declarationdataadapter-for-xev' of https://citnet.tech.ec.europa.eu/CITnet/stash/scm/vecto/hm_vecto-dev into hm/feature/VECTO-1638-rundatafactories-and-declarationdataadapter-for-xev
parents 1d491f81 9251b474
No related branches found
No related tags found
No related merge requests found
......@@ -1190,7 +1190,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Second absTime, Meter ds, MeterPerSecond targetVelocity, Radian gradient,
bool prohibitOverspeed = false)
{
if (DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DriverStrategy.BrakeTrigger.NextTargetSpeed, Constants.SimulationSettings.BrakeTriggerSpeedTolerance)
//If we have reached the target speed exactly we stop breaking
//if (DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DriverStrategy.BrakeTrigger.NextTargetSpeed, Constants.SimulationSettings.BrakeTriggerSpeedTolerance)
if (DataBus.VehicleInfo.VehicleSpeed <= DriverStrategy.BrakeTrigger.NextTargetSpeed
&& !DataBus.VehicleInfo.VehicleStopped) {
var retVal = HandleTargetspeedReached(absTime, ds, targetVelocity, gradient);
for (var i = 0; i < 3 && retVal == null; i++) {
......
......@@ -178,7 +178,9 @@ namespace TUGraz.VectoCore.Tests.Integration.BatteryElectric
Assert.IsTrue(run.FinishedWithoutErrors);
string distanceSumPath = Path.Combine(Path.GetDirectoryName(jobFile), "distance.vsum");
TestContext.WriteLine($"Comparing with results from {distanceSumPath}");
AssertHelper.ReportDeviations(distanceSumPath, distanceCycleIdx, factory, metrics);
AssertHelper.AssertMetrics(factory, metrics);
......@@ -202,7 +204,7 @@ namespace TUGraz.VectoCore.Tests.Integration.BatteryElectric
Assert.IsTrue(run.FinishedWithoutErrors);
string distanceSumPath = Path.Combine(Path.GetDirectoryName(jobFile), "distance.vsum");
TestContext.WriteLine($"Comparing with results from {distanceSumPath}");
const int DISTANCE_RUN_START_POSITION = 3;
AssertHelper.ReadMetricsFromVSum(distanceSumPath, cycleIdx - DISTANCE_RUN_START_POSITION, metrics);
......
......@@ -146,7 +146,7 @@ namespace TUGraz.VectoCore.Tests.Utils
continue;
}
if (propertyType.IsPrimitive || propertyType == typeof(string)) {
Assert.AreEqual(expectedVal, actualVal);
Assert.AreEqual(expectedVal, actualVal, $"Property {prop.Name}, expected: {expectedVal}, actual: {actualVal}");
} else if (propertyType == typeof(SI)) {
Assert.AreEqual((expectedVal as SI).Value(), (actualVal as SI).Value());
Assert.AreEqual((expectedVal as SI).UnitString, (actualVal as SI).UnitString);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment