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

adding testcase for eco-roll with AT

parent 9d3c80b7
Branches
Tags
No related merge requests found
......@@ -267,6 +267,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private void HandleEngineStopStartDuringVehicleStop(Second absTime)
{
if (Driver.DataBus.CycleData.LeftSample.PTOActive) {
// engine stop start is disabled for stops where the PTO is activated
return;
}
if (VehicleHaltTimestamp == null) {
VehicleHaltTimestamp = absTime;
}
......
......@@ -51,7 +51,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected readonly Dictionary<string, Func<PerSecond, Watt>> Auxiliaries =
new Dictionary<string, Func<PerSecond, Watt>>();
public EngineAuxiliary(IVehicleContainer container) : base(container) {}
protected double EngineStopStartUtilityFactor;
public EngineAuxiliary(IVehicleContainer container) : base(container)
{
EngineStopStartUtilityFactor = container.RunData.DriverData.EngineStopStart.UtilityFactor;
}
public IAuxPort Port()
{
......@@ -157,9 +162,23 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
var auxiliarieIgnoredDuringVehicleStop = new[] {
Constants.Auxiliaries.IDs.SteeringPump, Constants.Auxiliaries.IDs.Fan
Constants.Auxiliaries.IDs.SteeringPump, Constants.Auxiliaries.IDs.Fan,
Constants.Auxiliaries.IDs.PTOConsumer, Constants.Auxiliaries.IDs.PTOTransmission
};
return Auxiliaries.Where(x => !auxiliarieIgnoredDuringVehicleStop.Contains(x.Key)).Sum(x => x.Value(0.RPMtoRad()));
var powerDemands = new Dictionary<string, Watt>(Auxiliaries.Count);
var engineOffDemand = 0.SI<Watt>();
foreach (var item in Auxiliaries) {
var value = item.Value(DataBus.EngineIdleSpeed) ;
if (value == null) {
continue;
}
powerDemands[item.Key] = value * (1-EngineStopStartUtilityFactor);
engineOffDemand += auxiliarieIgnoredDuringVehicleStop.Contains(item.Key) ? 0.SI<Watt>() : value * EngineStopStartUtilityFactor;
}
CurrentState.PowerDemands = powerDemands;
return engineOffDemand; //powerDemands.Sum(kv => kv.Value);
}
public Watt PowerDemandEngineOn(PerSecond engineSpeed)
......
......@@ -49,7 +49,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
CurrentState.dt = dt;
if (!dryRun) {
EngineAux.TorqueDemand(absTime, dt, 0.SI<NewtonMeter>(), 0.SI<NewtonMeter>(), ModelData.IdleSpeed);
//EngineAux.TorqueDemand(absTime, dt, 0.SI<NewtonMeter>(), 0.SI<NewtonMeter>(), ModelData.IdleSpeed);
CurrentState.AuxPowerEngineOff = EngineAux.PowerDemandEngineOff();
} else {
return new ResponseDryRun {
......@@ -109,7 +109,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
container[ModalResultField.Tq_drag] = 0.SI<NewtonMeter>();
container[ModalResultField.IgnitionOn] = CurrentState.IgnitionOn;
container[ModalResultField.P_aux_ice_off] = (CurrentState.AuxPowerEngineOff ?? 0.SI<Watt>()) * EngineStopStartUtilityFactor;
container[ModalResultField.P_aux_ice_off] = (CurrentState.AuxPowerEngineOff ?? 0.SI<Watt>());
......
......@@ -125,6 +125,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.SetState(inTorque, operatingPoint.InAngularVelocity, outTorque, outAngularVelocity);
CurrentState.OperatingPoint = operatingPoint;
CurrentState.IgnitionOn = DataBus.IgnitionOn;
var retVal = NextComponent.Request(absTime, dt, inTorque, operatingPoint.InAngularVelocity);
......@@ -142,11 +143,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private NewtonMeter CalculateAverageInTorque(TorqueConverterOperatingPoint operatingPoint)
{
var avgEngineSpeed = (PreviousState.InAngularVelocity + operatingPoint.InAngularVelocity) / 2;
var prevInSpeed = PreviousState.IgnitionOn ? PreviousState.InAngularVelocity : DataBus.EngineIdleSpeed;
var avgEngineSpeed = (prevInSpeed + operatingPoint.InAngularVelocity) / 2;
//var prevInSpeed = PreviousState.OperatingPoint?.InAngularVelocity ?? PreviousState.InAngularVelocity;
//var prevInTorque = PreviousState.OperatingPoint?.InTorque ?? PreviousState.InTorque;
var prevInSpeed = PreviousState.InAngularVelocity;
//var prevInSpeed = PreviousState.InAngularVelocity;
var prevInTorque = PreviousState.InTorque;
var avgPower = (prevInSpeed * prevInTorque +
operatingPoint.InAngularVelocity * operatingPoint.InTorque) / 2;
......@@ -408,6 +410,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public class TorqueConverterComponentState : SimpleComponentState
{
public TorqueConverterOperatingPoint OperatingPoint;
public bool IgnitionOn;
}
}
}
......@@ -152,6 +152,20 @@ namespace TUGraz.VectoCore.Tests.Integration.ADAS
}
[TestCase(@"TestData\Integration\ADAS\Group9_AT_EngineStopStart.xml")]
public void TestATVehicleWithADASEngineStopStart(string filename)
{
//var container = RunAllDeclarationJob(filename);
var container = RunSingleDeclarationJob(filename, 5);
}
[TestCase(@"TestData\Integration\ADAS\Group9_AT_EcoRoll.xml")]
public void TestATVehicleWithADASEcoRoll(string filename)
{
var container = RunAllDeclarationJob(filename);
//var container = RunSingleDeclarationJob(filename, 1);
}
public JobContainer RunAllDeclarationJob(string jobName)
{
var relativeJobPath = jobName;
......
This diff is collapsed.
......@@ -2969,6 +2969,12 @@
<Folder Include="Integration\FullPowertrain\" />
</ItemGroup>
<ItemGroup>
<Content Include="TestData\Integration\ADAS\Group9_AT_EcoRoll.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\Integration\ADAS\Group9_AT_EngineStopStart.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\Integration\ADAS\Group5_EcoRollEngineStop.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment