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

adding eingine max torque / drag torque to dry-run response

parent 63b2021e
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,8 @@ namespace TUGraz.VectoCore.Models.Connector.Ports.Impl
{
public Watt DeltaFullLoad { get; set; }
public Watt DeltaDragLoad { get; set; }
public NewtonMeter EngineMaxTorqueOut { get; set; }
public NewtonMeter EngineDragTorque { get; set; }
}
internal class ResponseGearShift : AbstractResponse {}
......
......@@ -157,7 +157,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
IterationStatistics.Increment(this, "Requests");
Log.Debug("Engine Powertrain Power Request: torque: {0}, angularVelocity: {1}, power: {2}", outTorque, outAngularVelocity,
Log.Debug("Engine Powertrain Power Request: torque: {0}, angularVelocity: {1}, power: {2}", outTorque,
outAngularVelocity,
outTorque * outAngularVelocity);
return DoHandleRequest(absTime, dt, outTorque, outAngularVelocity, dryRun);
......@@ -214,6 +215,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
EnginePowerRequest = torqueOut * avgEngineSpeed,
AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed,
EngineSpeed = angularVelocity,
EngineMaxTorqueOut =
VectoMath.Max(CurrentState.DynamicFullLoadTorque - auxTorqueDemand - CurrentState.InertiaTorqueLoss,
gearboxFullLoad ?? 0.SI<NewtonMeter>()),
EngineDragTorque = CurrentState.FullDragTorque,
Source = this,
};
}
......@@ -302,7 +307,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
};
PreviousState.DynamicFullLoadTorque = PreviousState.StationaryFullLoadTorque;
return new ResponseSuccess { Source = this, EnginePowerRequest = PreviousState.EnginePower, EngineSpeed = outAngularVelocity};
return new ResponseSuccess {
Source = this,
EnginePowerRequest = PreviousState.EnginePower,
EngineSpeed = outAngularVelocity
};
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment