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

hybrid strategy: bugfix vehicle propulsion torque limits and AT gearbox

parent c0262800
Branches
Tags
No related merge requests found
......@@ -572,8 +572,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
dryRunResponse.ElectricMotor.AvgDrivetrainSpeed;
var gbxOutTqV = dryRunResponse.Gearbox.OutputTorque - emTq;
var prevGbxSpeed = (DataBus.GearboxInfo as AbstractGearbox<GearboxState>).PreviousState
.OutAngularVelocity;
var prevGbxSpeed = GetPrevGbxSpeed();
var gbxLoss = ModelData.GearboxData.Gears[gear.Gear].LossMap
.GetTorqueLoss((dryRunResponse.Gearbox.OutputSpeed + prevGbxSpeed) / 2.0, gbxOutTqV);
gbxInTq = gbxOutTqV / ModelData.GearboxData.Gears[gear.Gear].Ratio + gbxLoss.Value;
......@@ -597,8 +596,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
gbxInTorque = anglInTorque;
}
var gear = dryRunResponse.Gearbox.Gear;
var prevGbxSpeed = (DataBus.GearboxInfo as AbstractGearbox<GearboxState>).PreviousState
.OutAngularVelocity;
var prevGbxSpeed = GetPrevGbxSpeed();
var gbxLoss = ModelData.GearboxData.Gears[gear.Gear].LossMap
.GetTorqueLoss((dryRunResponse.Gearbox.OutputSpeed + prevGbxSpeed) / 2.0, gbxInTorque);
gbxInTq = gbxInTorque / ModelData.GearboxData.Gears[gear.Gear].Ratio + gbxLoss.Value;
......@@ -609,6 +607,17 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return gbxInTq;
}
private PerSecond GetPrevGbxSpeed()
{
switch (DataBus.GearboxInfo) {
case Gearbox gbx:
return gbx.PreviousState.OutAngularVelocity;
case ATGearbox atGbx:
return atGbx.PreviousState.OutAngularVelocity;
default: throw new VectoException("Unsupported gearbox type!");
}
}
public void OperatingpointChangedDuringRequest(Second absTime, Second dt, NewtonMeter outTorque,
PerSecond outAngularVelocity,
bool dryRun, IResponse retVal)
......
......@@ -17,7 +17,6 @@
"AuxiliaryAssembly": "Classic",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [],
"Padd": 3000.0,
"Padd_electric": 0.0,
"VACC": "Vehicle\\Truck.vacc",
......
......@@ -17,7 +17,6 @@
"AuxiliaryAssembly": "Classic",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [],
"Padd": 3000.0,
"Padd_electric": 0.0,
"VACC": "Vehicle\\Truck.vacc",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment