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

driver strategy: annouce drivingMode drive, test coach cycle added

parent 0bdeed43
No related branches found
No related tags found
No related merge requests found
......@@ -343,6 +343,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
IResponse response = null;
DriverStrategy.DriverBehavior = DrivingBehavior.Driving;
var velocity = targetVelocity;
if (DriverStrategy.OverspeedAllowed(gradient, targetVelocity)) {
velocity += DriverData.OverSpeedEcoRoll.OverSpeed;
......
......@@ -635,10 +635,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Default(r => { throw new UnexpectedResponseException("Unknown response type.", r); });
}
var delta = origDelta;
var auxPower = initialResponse.AuxiliariesPowerDemand;
var retryCount = 0;
do {
debug.Add(new { delta, acceleration = retVal.Acceleration, searchInterval });
debug.Add(new { delta, acceleration = retVal.Acceleration, searchInterval, auxPower });
// check if a correct searchInterval was found (when the delta changed signs, we stepped through the 0-point)
// from then on the searchInterval can be bisected.
......@@ -663,7 +663,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var response =
(ResponseDryRun)NextComponent.Request(absTime, retVal.SimulationInterval, retVal.Acceleration, gradient, true);
delta = actionRoll ? response.GearboxPowerRequest : (coasting ? response.DeltaDragLoad : response.DeltaFullLoad);
auxPower = response.AuxiliariesPowerDemand;
if (response is ResponseEngineSpeedTooLow) {
LogManager.EnableLogging();
Log.Debug("Got EngineSpeedTooLow during SearchOperatingPoint. Aborting!");
......
......@@ -31,7 +31,10 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NLog;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.Tests.Utils;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Tests.Integration.BusAuxiliaries
{
......@@ -1104,5 +1107,24 @@ namespace TUGraz.VectoCore.Tests.Integration.BusAuxiliaries
//}
//#endregion
[TestMethod, TestCategory("CycleTest")]
public void Coach_AAUX_Accelerate_0_40_downhill_1_overspeed()
{
var cycle = SimpleDrivingCycles.ReadDeclarationCycle("Coach");
var run = CoachAdvancedAuxPowertrain.CreateEngineeringRun(cycle,
"Coach_AAUX_CoachCycle.vmod", true);
//((DistanceBasedDrivingCycle)((VehicleContainer)run.GetContainer()).Cycle).SetDriveOffDistance(123613.SI<Meter>());
run.Run();
Assert.IsTrue(run.FinishedWithoutErrors);
//GraphWriter.Write("Coach_AAUX_Accelerate_0_40_downhill_1-overspeed.vmod",
// @"..\..\TestData\Integration\BusAuxiliaries\Vecto2.0_Overspeed\24t Coach_AAUX_Cycle_Accelerate_0_40_downhill_1.vmod");
}
//@"E:\QUAM\Workspace\VECTO_quam\Generic Vehicles\Engineering Mode\24t Coach\24t Coach_AAux.vecto"
}
}
\ No newline at end of file
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