Code development platform for open source projects from the European Union institutions

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

more work on hybrid controller

parent 5971880e
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,34 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
{
if (!outTorque.IsEqual(0)) {
if (dryRun) {
return new ResponseOverload(this) {
Delta = outTorque * outAngularVelocity
return new ResponseDryRun(this) {
DeltaFullLoad = outTorque * ModelData.IdleSpeed,
DeltaDragLoad = outTorque * ModelData.IdleSpeed,
Engine = {
TotalTorqueDemand = outTorque,
PowerRequest = outTorque * outAngularVelocity,
DynamicFullLoadPower = 0.SI<Watt>(),
DragPower = 0.SI<Watt>(),
EngineSpeed = 0.RPMtoRad(),
AuxiliariesPowerDemand = 0.SI<Watt>(),
},
DeltaEngineSpeed = 0.RPMtoRad(),
};
}
throw new VectoSimulationException("Combustion engine cannot supply outtorque when switched off (T_out: {0})", outTorque);
return new ResponseOverload(this) {
Delta = outTorque * outAngularVelocity,
Engine = {
TotalTorqueDemand = outTorque,
PowerRequest = outTorque * outAngularVelocity,
DynamicFullLoadPower = 0.SI<Watt>(),
DragPower = 0.SI<Watt>(),
EngineSpeed = 0.RPMtoRad(),
AuxiliariesPowerDemand = 0.SI<Watt>(),
},
};
//throw new VectoSimulationException("Combustion engine cannot supply outtorque when switched off (T_out: {0})", outTorque);
}
CurrentState.EngineOn = false;
CurrentState.EngineSpeed = ModelData.IdleSpeed;
......
......@@ -174,7 +174,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
MechanicalAssistPower = ElectricMotorsOff
},
FuelCosts = double.NaN
FuelCosts = double.NaN,
ICEOff = !DataBus.EngineInfo.EngineOn,
});
}
if (DataBus.DriverInfo.DrivingAction == DrivingAction.Brake && eval.Count == 0) {
......
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