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

Gearbox: do not issue initialize requests for finding start gear but use dryrun requests

parent 787e8f00
No related branches found
No related tags found
No related merge requests found
......@@ -129,12 +129,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
inTorque += inertiaPowerLoss / inAngularVelocity;
}
var response = NextComponent.Initialize(inTorque, inAngularVelocity);
response.Switch().
Case<ResponseSuccess>().
Case<ResponseOverload>().
Case<ResponseUnderload>().
Default(r => { throw new UnexpectedResponseException("Gearbox.Initialize", r); });
var response =
(ResponseDryRun)
NextComponent.Request(0.SI<Second>(), Constants.SimulationSettings.TargetTimeInterval, inTorque,
inAngularVelocity, true); //NextComponent.Initialize(inTorque, inAngularVelocity);
//response.Switch().
// Case<ResponseSuccess>().
// Case<ResponseOverload>().
// Case<ResponseUnderload>().
// Default(r => { throw new UnexpectedResponseException("Gearbox.Initialize", r); });
var fullLoad = DataBus.EngineStationaryFullPower(inAngularVelocity);
if (ModelData.Gears[gear].MaxTorque != null) {
......@@ -145,6 +148,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return new ResponseDryRun {
Source = this,
EnginePowerRequest = response.EnginePowerRequest,
EngineSpeed = response.EngineSpeed,
DynamicFullLoadPower = response.DynamicFullLoadPower,
ClutchPowerRequest = response.ClutchPowerRequest,
GearboxPowerRequest = outTorque * outAngularVelocity,
DeltaFullLoad = response.EnginePowerRequest - fullLoad
......
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