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

Powertrain driving cycle: if powerdemand exceeds engine's max torque, reduce...

Powertrain driving cycle: if powerdemand exceeds engine's max torque, reduce torque demand for this single simulation step but keep engine speed.
parent b84d38ae
No related branches found
No related tags found
No related merge requests found
......@@ -128,11 +128,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.InTorque = torque;
})
.Case<ResponseOverload>(r => {
angularVelocity = SearchAlgorithm.Search(angularVelocity, r.Delta, 50.RPMtoRad(),
var torque = SearchAlgorithm.Search(CycleIterator.LeftSample.Torque, r.Delta, 50.SI<NewtonMeter>(),
getYValue: result => ((ResponseDryRun)result).DeltaFullLoad,
evaluateFunction: n => NextComponent.Request(absTime, dt, CycleIterator.LeftSample.Torque, n, true),
evaluateFunction: t => NextComponent.Request(absTime, dt, t, angularVelocity, true),
criterion: y => ((ResponseDryRun)y).DeltaFullLoad.Value());
response = NextComponent.Request(absTime, dt, CycleIterator.LeftSample.Torque, angularVelocity);
response = NextComponent.Request(absTime, dt, torque, angularVelocity);
CurrentState.InAngularVelocity = angularVelocity;
})
.Case<ResponseFailTimeInterval>(r => { dt = r.DeltaT; })
......@@ -173,8 +173,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public CycleData CycleData
{
get
{
get {
return new CycleData {
AbsTime = CycleIterator.LeftSample.Time,
AbsDistance = null,
......
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